wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
delete_transient › WordPress Function
Seit2.8.0
Veraltetn/v
› delete_transient ( $transient )
Parameter: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Deletes a transient.
Ähnliche Funktionen: delete_site_transient, set_transient, get_transient, delete_expired_transients, get_site_transient
Quellcode
function delete_transient( $transient ) { /** * Fires immediately before a specific transient is deleted. * * The dynamic portion of the hook name, `$transient`, refers to the transient name. * * @since 3.0.0 * * @param string $transient Transient name. */ do_action( "delete_transient_{$transient}", $transient ); if ( wp_using_ext_object_cache() || wp_installing() ) { $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 ) { /** * Fires after a transient is deleted. * * @since 3.0.0 * * @param string $transient Deleted transient name. */ do_action( 'deleted_transient', $transient ); } return $result; }