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
3831      wp_schedule_single_event( time() + ( 2 * MINUTE_IN_SECONDS ), 'wp_update_comment_type_batch' );
3832
3833      /**
3834       * Filters the comment batch size for updating the comment type.
3835       *
3836       * @since 5.5.0
3837       *
3838       * @param int $comment_batch_size The comment batch size. Default 100.
3839       */
3840      $comment_batch_size = (int) apply_filters( 'wp_update_comment_type_batch_size', 100 );
3841
3842      // Get the IDs of the comments to update.
3843      $comment_ids = $wpdb->get_col(
3844           $wpdb->prepare(
3845                "SELECT comment_ID
3846                FROM {$wpdb->comments}
3847                WHERE comment_type = ''
3848                ORDER BY comment_ID DESC
3849                LIMIT %d",