BP_Xprofile_Profile_Completion_Widget::delete_transient_query( type $transient_name_prefix )
Function deletes Transient based on the transient name specified.
Description
Parameters
- $transient_name_prefix
-
(Required)
Source
File: bp-xprofile/classes/class-bp-xprofile-profile-completion-widget.php
function delete_transient_query( $transient_name_prefix ) {
global $wpdb;
$sql = $wpdb->prepare(
"SELECT `option_name` FROM {$wpdb->options} WHERE option_name LIKE '%s' ",
$transient_name_prefix
);
$keys = $wpdb->get_col( $sql );
if ( ! empty( $keys ) ) {
foreach ( $keys as $transient ) {
delete_transient( str_replace( '_transient_', '', $transient ) );
}
}
}
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.