akismet_scheduled_recheck

akismet_scheduled_recheck

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

do_action('akismet_scheduled_recheck') is found 5 times:

  • /wp-content/plugins/akismet/class.akismet.php line 434
    			}
    
    			if ( ! wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
    				wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
    				do_action( 'akismet_scheduled_recheck', 'invalid-response-' . $response[1] );
    			}
    
    			self::$prevent_moderation_email_for_these_comments[] = $commentdata;
    		}
    
    		// Delete old comments daily
    
  • /wp-content/plugins/akismet/class.akismet.php line 1107
    		$status = self::verify_key( $api_key );
    		if ( get_option( 'akismet_alert_code' ) || $status == 'invalid' ) {
    			// since there is currently a problem with the key, reschedule a check for 6 hours hence
    			wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' );
    			do_action( 'akismet_scheduled_recheck', 'key-problem-' . get_option( 'akismet_alert_code' ) . '-' . $status );
    			return false;
    		}
    
    		delete_option( 'akismet_available_servers' );
    
    		$comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'	LIMIT 100" );
    
  • /wp-content/plugins/akismet/class.akismet.php line 1175
    				}
    
    				delete_comment_meta( $comment_id, 'akismet_rechecking' );
    				wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
    				do_action( 'akismet_scheduled_recheck', 'check-db-comment-' . $status );
    				return;
    			}
    			delete_comment_meta( $comment_id, 'akismet_rechecking' );
    		}
    
    		$remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
    
  • /wp-content/plugins/akismet/class.akismet.php line 1184
     
    		$remaining = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error'" );
    		if ( $remaining && ! wp_next_scheduled( 'akismet_schedule_cron_recheck' ) ) {
    			wp_schedule_single_event( time() + 1200, 'akismet_schedule_cron_recheck' );
    			do_action( 'akismet_scheduled_recheck', 'remaining' );
    		}
    	}
    
    	public static function fix_scheduled_recheck() {
    		$future_check = wp_next_scheduled( 'akismet_schedule_cron_recheck' );
    		if ( ! $future_check ) {
    
  • /wp-content/plugins/akismet/class.akismet.php line 1202
    		$check_range = time() + 1200;
    		if ( $future_check > $check_range ) {
    			wp_clear_scheduled_hook( 'akismet_schedule_cron_recheck' );
    			wp_schedule_single_event( time() + 300, 'akismet_schedule_cron_recheck' );
    			do_action( 'akismet_scheduled_recheck', 'fix-scheduled-recheck' );
    		}
    	}
    
    	public static function add_comment_nonce( $post_id ) {
    		/**
    		 * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag