• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Akismet_Admin::recheck_queue() –

You appear to be a bot. Output may be restricted

Description

Usage

Akismet_Admin::recheck_queue();

Parameters

Returns

void

Source

File name: akismet/class.akismet-admin.php
Lines:

1 to 29 of 29
  public static function recheck_queue() {
    global $wpdb;

    Akismet::fix_scheduled_recheck();

    if ( ! ( isset( $_GET['recheckqueue'] ) || ( isset( $_REQUEST['action'] ) && 'akismet_recheck_queue' == $_REQUEST['action'] ) ) ) {
      return;
    }
    
    if ( ! wp_verify_nonce( $_POST['nonce'], 'akismet_check_for_spam' ) ) {
      wp_send_json( array(
        'error' => __( 'You don’t have permission to do that.', 'akismet' ),
      ));
      return;
    }

    $result_counts = self::recheck_queue_portion( empty( $_POST['offset'] ) ? 0 : $_POST['offset'], empty( $_POST['limit'] ) ? 100 : $_POST['limit'] );

    if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
      wp_send_json( array(
        'counts' => $result_counts,
      ));
    }
    else {
      $redirect_to = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url( 'edit-comments.php' );
      wp_safe_redirect( $redirect_to );
      exit;
    }
  }
 

 View on GitHub View on Trac

Published: 19th December 2019 | Last updated: 9th June 2022

Primary Sidebar

Information

Function name: Akismet_Admin::recheck_queue
Class ref: Akismet_Admin
Plugin ref: Akismet
Version: 5.0.1
Sourcefile: class.akismet-admin.php
File ref: class.akismet-admin.php
Deprecated?: No
API Letters: A,Q,R

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites