Definition:
function delete_transient( $transient ) {}
Delete a transient.
Parameters
- string $transient: Transient name. Expected to not be SQL-escaped.
Return values
returns:true if successful, false otherwise
Defined actions
- delete_transient_’.$transient
do_action( 'delete_transient_' . $transient, $transient ); - deleted_transient
do_action( 'deleted_transient', $transient );
Source code
function delete_transient( $transient ) {
global $_wp_using_ext_object_cache;
do_action( 'delete_transient_' . $transient, $transient );
if ( $_wp_using_ext_object_cache ) {
$result = wp_cache_delete( $transient, 'transient' );
} else {
$option_timeout = '_transient_timeout_' . $transient;
$option = '_transient_' . $transient;
$result = delete_option( $option );
if ( $result )
delete_option( $option_timeout );
}
if ( $result )
do_action( 'deleted_transient', $transient );
return $result;
}
816

February 11, 2011 


No comments yet... Be the first to leave a reply!