Plugin Directory

Changeset 2646879


Ignore:
Timestamp:
12/20/2021 03:39:36 PM (3 years ago)
Author:
neuropassenger
Message:

Upgrade routine

Location:
bs-spam-protector/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bs-spam-protector/trunk/README.txt

    r2646847 r2646879  
    55Requires at least: 5.7.2
    66Tested up to: 5.8.2
    7 Stable tag: 1.6.0
     7Stable tag: 1.6.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1717
    1818== Changelog ==
     19
     20= 1.6.1 =
     21* After the plugin update, the time interval for filling out forms is set to 12 hours for the validator to work correctly.
    1922
    2023= 1.6.0 =
  • bs-spam-protector/trunk/bs-spam-protector.php

    r2646847 r2646879  
    1616 * Plugin Name:       BS SPAM Protector
    1717 * Description:       This plugin protects Contact Form 7 from spam.
    18  * Version:           1.6.0
     18 * Version:           1.6.1
    1919 * Author:            Oleg Sokolov
    2020 * Author URI:        https://neuropassenger.ru
     
    3535 * Rename this for your plugin and update it as you release new versions.
    3636 */
    37 define( 'BS_SPAM_PROTECTOR_VERSION', '1.6.0' );
     37define( 'BS_SPAM_PROTECTOR_VERSION', '1.6.1' );
    3838
    3939/**
  • bs-spam-protector/trunk/includes/class-bs-spam-protector.php

    r2646847 r2646879  
    179179        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    180180
     181        $this->loader->add_action( 'plugins_loaded', $plugin_public, 'do_upgrade' );
     182
    181183        $this->loader->add_action( 'wp_ajax_bs_get_validation_key', $plugin_public, 'ajax_get_validation_key' );
    182184        $this->loader->add_action( 'wp_ajax_nopriv_bs_get_validation_key', $plugin_public, 'ajax_get_validation_key' );
     
    185187
    186188        $this->loader->add_filter( 'wpcf7_spam', $plugin_public, 'is_spam_submission' );
    187 
    188         //$this->loader->add_action( 'load-flamingo_page_flamingo_inbound', $plugin_public, 'add_spam_protector_flamingo_meta_box' );
    189189        $this->loader->add_filter( 'flamingo_add_inbound', $plugin_public, 'prepare_data_for_flamingo_inbound' );
    190190
  • bs-spam-protector/trunk/public/class-bs-spam-protector-public.php

    r2646847 r2646879  
    404404    }
    405405
    406     function prepare_data_for_flamingo_inbound( $args ) {
     406    public function prepare_data_for_flamingo_inbound( $args ) {
    407407        // Let's save SPAM Protector fields to the meta section
    408408        $args['meta']['bs_hf_nonce'] = $args['fields']['bs_hf_nonce'];
     
    424424    }
    425425
     426    public function do_upgrade() {
     427        // Expiration interval
     428        $expiration_interval = get_option( 'bs_spam_protector_expiration_interval', false );
     429
     430        if ( version_compare( $this->version, '1.6.0', '>=' ) && $expiration_interval == false ) {
     431            update_option( 'bs_spam_protector_expiration_interval', 12 );
     432        }
     433    }
     434
    426435}
Note: See TracChangeset for help on using the changeset viewer.