Languages: English • 日本語 (Add your language)
Delete a transient. If the specified transient does not exist then no action will be taken.
<?php delete_transient( $transient ); ?>
<?php // Create a simple function to delete our transient function edit_term_delete_transient() { delete_transient( 'special_query_results' ); } // Add the function to the edit_term hook so it runs when categories/tags are edited add_action( 'edit_term', 'edit_term_delete_transient' ); ?>
Since: 2.8
delete_transient() is located in wp-includes/option.php
.
Transients API: set_transient(), get_transient(), delete_transient(), set_site_transient(), get_site_transient(), delete_site_transient()