_wp_check_for_scheduled_update_comment_type()
In order to avoid the _wp_batch_update_comment_type() job being accidentally removed, check that it's still scheduled while we haven't finished updating comment types.
This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.
No Hooks.
Return
null
. Nothing.
Usage
_wp_check_for_scheduled_update_comment_type();
Changelog
Since 5.5.0 | Introduced. |
_wp_check_for_scheduled_update_comment_type() wp check for scheduled update comment type code WP 6.1.1
function _wp_check_for_scheduled_update_comment_type() { if ( ! get_option( 'finished_updating_comment_type' ) && ! wp_next_scheduled( 'wp_update_comment_type_batch' ) ) { wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'wp_update_comment_type_batch' ); } }