関数 delete_transient()
定義ファイル :/blog/wp-includes/option.php 3
delete_transient()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | /** * Delete a transient. * * @since 2.8.0 * * @param string $transient Transient name. Expected to not be SQL-escaped. * @return bool true if successful, false otherwise */ 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() ) { $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; } |