Plugin Directory

Changeset 2753903

Timestamp:
07/08/2022 08:48:46 PM (2 years ago)
Author:
kbrownkd
Message:

Add a notice that displays when WP-Cron is disabled

Location:
akismet/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r2753902 r2753903  
    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>. It 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: 4.2.5a1
     9Version: 4.2.5a
    1010Author: Automattic
    1111Author URI: https://automattic.com/wordpress-plugins/
     
    3838}
    3939
    40 define( 'AKISMET_VERSION', '4.2.5a1' );
     40define( 'AKISMET_VERSION', '4.2.5a' );
    4141define( 'AKISMET__MINIMUM_WP_VERSION', '5.0' );
    4242define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
  • akismet/trunk/class.akismet-admin.php

    r2724833 r2753903  
    924924
    925925        if ( wp_next_scheduled('akismet_schedule_cron_recheck') > time() && self::are_any_comments_waiting_to_be_checked() ) {
    926             $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet'), esc_url( self::get_page_url() ) ) );
    927             Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
     926            /*
     927             * The 'akismet_display_cron_disabled_notice' filter can be used to control whether the WP-Cron disabled notice is displayed.
     928             */
     929            if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && apply_filters( 'akismet_display_cron_disabled_notice', true ) ) {
     930                Akismet::view( 'notice', array( 'type' => 'spam-check-cron-disabled' ) );
     931            } else {
     932                /* translators: The Akismet configuration page URL. */
     933                $link_text = apply_filters( 'akismet_spam_check_warning_link_text', sprintf( __( 'Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.', 'akismet' ), esc_url( self::get_page_url() ) ) );
     934                Akismet::view( 'notice', array( 'type' => 'spam-check', 'link_text' => $link_text ) );
     935            }
    928936        }
    929937    }
     
    10781086        $notices[] = array( 'type' => 'limit-reached', 'level' => 'red' );
    10791087        $notices[] = array( 'type' => 'usage-limit', 'api_calls' => '15000', 'usage_limit' => '10000', 'upgrade_plan' => 'Enterprise', 'upgrade_url' => 'https://akismet.com/account/' );
     1088
    10801089        */
    10811090       
  • akismet/trunk/readme.txt

    r2753902 r2753903  
    3535
    3636* Fix a bug that added unnecessary comment history entries after comment rechecks.
     37
    3738
    3839= 4.2.4 =
  • akismet/trunk/views/notice.php

    r2606384 r2753903  
    2626        <p><?php echo $link_text; ?></p>
    2727    <?php } ?>
     28
     29
     30
     31
     32
    2833</div>
    2934<?php elseif ( $type == 'alert' ) : ?>
Note: See TracChangeset for help on using the changeset viewer.