Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_update_comment_type_batch_size

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3853      wp_schedule_single_event( time() + ( 2 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
3854
3855      /**
3856       * Filters the comment batch size for updating the comment type.
3857       *
3858       * @since 5.5.0
3859       *
3860       * @param int $comment_batch_size The comment batch size. Default 100.
3861       */
3862      $comment_batch_size = (int) apply_filters( 'wp_update_comment_type_batch_size', 100 );
3863
3864      // Get the IDs of the comments to update.
3865      $comment_ids = $wpdb->get_col(
3866           $wpdb->prepare(
3867                "SELECT comment_ID
3868                FROM {$wpdb->comments}
3869                WHERE comment_type = ''
3870                ORDER BY comment_ID DESC
3871                LIMIT %d",