_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.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
null
. Nothing (null).
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.7.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' ); } }