Uses
Uses | Description |
---|---|
wp-includes/cache.php: wp_cache_delete() | Removes the cache contents matching key and group. |
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Clear the lastcommentmodified cached value when a comment status is changed.
Deletes the lastcommentmodified cache key when a comment enters or leaves ‘approved’ status.
(string) (Required) The new comment status.
(string) (Required) The old comment status.
File: wp-includes/comment.php
function _clear_modified_cache_on_transition_comment_status( $new_status, $old_status ) { if ( 'approved' === $new_status || 'approved' === $old_status ) { foreach ( array( 'server', 'gmt', 'blog' ) as $timezone ) { wp_cache_delete( "lastcommentmodified:$timezone", 'timeinfo' ); } } }
Version | Description |
---|---|
4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/_clear_modified_cache_on_transition_comment_status