Plugin Directory

Changeset 3111923

Timestamp:
07/03/2024 08:13:42 PM (6 weeks ago)
Author:
kbrownkd
Message:

Restrict alert code updates to requests to specific paths.

Location:
akismet/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r3111915 r3111923  
    77Plugin URI: https://akismet.com/
    88Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
    9 Version: 5.3.3a6
     9Version: 5.3.3a
    1010Requires at least: 5.8
    1111Requires PHP: 5.6.20
     
    4040}
    4141
    42 define( 'AKISMET_VERSION', '5.3.3a6' );
     42define( 'AKISMET_VERSION', '5.3.3a' );
    4343define( 'AKISMET__MINIMUM_WP_VERSION', '5.8' );
    4444define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     
    4848register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) );
    4949
    50 require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' );
    51 require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' );
    52 require_once( AKISMET__PLUGIN_DIR . 'class.akismet-rest-api.php' );
     50require_once;
     51require_once;
     52require_once;
    5353
    5454add_action( 'init', array( 'Akismet', 'init' ) );
     
    5757
    5858if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
    59     require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' );
     59    require_once;
    6060    add_action( 'init', array( 'Akismet_Admin', 'init' ) );
    6161}
    6262
    6363//add wrapper class around deprecated akismet functions that are referenced elsewhere
    64 require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' );
     64require_once;
    6565
    6666if ( defined( 'WP_CLI' ) && WP_CLI ) {
    67     require_once( AKISMET__PLUGIN_DIR . 'class.akismet-cli.php' );
     67    require_once;
    6868}
  • akismet/trunk/class.akismet-admin.php

    r3111915 r3111923  
    11151115        if ( isset( Akismet::$limit_notices[ $alert_code ] ) ) {
    11161116            $notices[] = self::get_usage_limit_alert_data();
     1117
     1118
     1119
     1120
     1121
     1122
    11171123        }
    11181124
  • akismet/trunk/class.akismet.php

    r3057012 r3111923  
    14391439       
    14401440        $simplified_response = array( $response['headers'], $response['body'] );
    1441        
    1442         self::update_alert( $simplified_response );
     1441
     1442        $alert_code_check_paths = array(
     1443            'verify-key',
     1444            'comment-check',
     1445            'get-stats',
     1446        );
     1447
     1448        if ( in_array( $path, $alert_code_check_paths ) ) {
     1449            self::update_alert( $simplified_response );
     1450        }
    14431451
    14441452        return $simplified_response;
Note: See TracChangeset for help on using the changeset viewer.