akismet_optimize_table

akismet_optimize_table

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('akismet_optimize_table') is found 3 times:

  • /wp-content/plugins/akismet/class.akismet.php line 534
    			clean_comment_cache( $comment_ids );
    			do_action( 'akismet_delete_comment_batch', is_countable( $comment_ids ) ? count( $comment_ids ) : 0 );
    		}
    
    		if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->comments ) ) // lucky number
    			$wpdb->query("OPTIMIZE TABLE {$wpdb->comments}");
    	}
    
    	public static function delete_old_comments_meta() {
    		global $wpdb;
    
    
  • /wp-content/plugins/akismet/class.akismet.php line 564
     
    			do_action( 'akismet_delete_commentmeta_batch', is_countable( $comment_ids ) ? count( $comment_ids ) : 0 );
    		}
    
    		if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number
    			$wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}");
    	}
    
    	// Clear out comments meta that no longer have corresponding comments in the database
    	public static function delete_orphaned_commentmeta() {
    		global $wpdb;
    
  • /wp-content/plugins/akismet/class.akismet.php line 601
    			if ( microtime(true) - $start_time > $max_exec_time )
    				return;
    		}
    
    		if ( apply_filters( 'akismet_optimize_table', ( mt_rand(1, 5000) == 11), $wpdb->commentmeta ) ) // lucky number
    			$wpdb->query("OPTIMIZE TABLE {$wpdb->commentmeta}");
    	}
    
    	// how many approved comments does this author have?
    	public static function get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
    		global $wpdb;