Plugin Directory

Changeset 3225956


Ignore:
Timestamp:
01/21/2025 06:47:05 AM (14 months ago)
Author:
bannersky
Message:

version 4.0

Location:
bsk-gravityforms-blacklist/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • bsk-gravityforms-blacklist/trunk/bsk-gravityforms-blacklist.php

    r3157195 r3225956  
    55* Plugin URI: https://www.bannersky.com/gravity-forms-blacklist-and-custom-validation/
    66* Description: The plugin help you avoid spam submissions from GravityForms, Formidable Forms, WP Forms. You may set it to use blacklist, whitelist, ip address or email to validate visitor's input and only allow valid entry submitted. It support validate multiple fields.
    7 * Version: 3.9
     7* Version: 4.0
    88* Author: BannerSky.com
    99* Author URI: http://www.bannersky.com/
     
    2929    private static $instance;
    3030   
    31     public static $_plugin_version = '3.9';
     31    public static $_plugin_version = '4.0';
    3232    private static $_bsk_gfblcv_db_version = '3.2';
    3333    private static $_bsk_gfblcv_saved_db_version_option = '_bsk_gfbl_db_ver_';
  • bsk-gravityforms-blacklist/trunk/classes/dashboard/dashboard-settings.php

    r3121967 r3225956  
    33
    44    var $settings_targets = array( 'general-settings', 'blocked-data', 'sending-invitaiton-code' );
     5    public static $_bsk_gfbl_OBJ_settings_capabilities = NULL;
    56   
    67    public function __construct() {
    78       
     9        require_once( 'dashboard-settings-capabilities.php' );
     10
     11        self::$_bsk_gfbl_OBJ_settings_capabilities = new BSK_GFBLCV_Dashboard_Settings_Capabilities();
     12
    813        add_action( 'bsk_gfblcv_save_general_settings', array( $this, 'bsk_gfblcv_save_general_settings_fun' ) );
    914        add_action( 'bsk_gfblcv_save_blocked_data_settings', array( $this, 'bsk_gfblcv_save_blocked_data_settings_fun' ) );
     
    2126                <a class="nav-tab" href="javascript:void(0);" id="bsk_gfblcv_setings_tab-blocked-data"><?php esc_html_e( 'Block Form Data & Notify', 'bskgfbl' ); ?></a>
    2227                <a class="nav-tab" href="javascript:void(0);" id="bsk_gfblcv_setings_tab-sending-invitaiton-code"><?php esc_html_e( 'Inviation Code Email Settings', 'bskgfbl' ); ?></a>
     28                <a class="nav-tab" href="javascript:void(0);" id="bsk_gfblcv_setings_tab-capabilities"><?php esc_html_e( 'Backend Access', 'bskgfbl' ); ?></a>
    2329            </h2>
    2430            <div id="bsk_gfblcv_setings_tab_content_wrap_ID">
     
    2632                <section><?php $this->show_blocked_data_settings( $settings_data, 'blocked-data' ); ?></section>
    2733                <section><?php $this->show_sending_invitation_code_settings( $settings_data, 'sending-invitaiton-code' ); ?></section>
     34                <section><?php self::$_bsk_gfbl_OBJ_settings_capabilities->show_settings( $settings_data ); ?></section>
    2835            </div>
    2936        </div>
  • bsk-gravityforms-blacklist/trunk/classes/dashboard/items.php

    r3077430 r3225956  
    9090    function do_bulk_action() {
    9191        global $wpdb;
     92
     93        // Detect when a bulk action is being triggered.
     94        $action = $this->current_action();
     95        if ( ! $action ) {
     96            return;
     97        }
     98
     99        check_admin_referer( 'bulk-' . $this->_args['plural'] );
    92100       
    93101        $items_table = $wpdb->prefix.BSK_GFBLCV::$_bsk_gfblcv_items_tbl_name;
    94        
    95         if( isset($_POST['bsk-gfblcv-item']) && count($_POST['bsk-gfblcv-item']) > 0 ){
    96            
    97             if( $_POST['action'] == 'delete' || $_POST['action2'] == 'delete' ){
    98                 $sql = 'DELETE FROM `'.$items_table.'` WHERE `id` IN('.implode(',', $_POST['bsk-gfblcv-item']).')';
     102        if ( isset( $_POST['bsk-gfblcv-item'] ) && count( $_POST['bsk-gfblcv-item'] ) > 0 ) {
     103
     104            $ids_array = array();
     105            foreach ( $_POST['bsk-gfblcv-item'] as $id ) {
     106                $ids_array[] = intval( sanitize_text_field( $id ) );
     107            }
     108            if ( $action == 'delete' ) {
     109               
     110                $sql = 'DELETE FROM `' . $items_table . '` WHERE `id` IN(' . implode( ',', $ids_array ) . ')';
    99111                $wpdb->query( $sql );
     112               
    100113            }
    101114        }
  • bsk-gravityforms-blacklist/trunk/js/bsk-gfblcv-admin.js

    r2751883 r3225956  
    203203        $("#bsk_gfblcv_item_id_ID").val( item_id );
    204204        $("#bsk_gfblcv_action_ID").val( "delete_item" );
    205        
    206         $("#bsk_gfblcv_items_form_id").submit();
     205        $("#bsk_gfblcv_items_form_id").submit();
     206
    207207    });
    208208   
  • bsk-gravityforms-blacklist/trunk/readme.txt

    r3157195 r3225956  
    44Tags: gravity form,blacklist,ip blacklist,invitation code,formidable forms
    55Requires at least: 4.0
    6 Tested up to: 6.6.2
    7 Stable tag: 3.9
     6Tested up to: 6.7.1
     7Stable tag: 4.0
    88
    99Checks field content and block submitting base on your keywords. Blocking IP, Country is only supported in the Pro version.
     
    4242== Changelog ==
    4343
     444.0
     45
     46* ( Pro Version )Added: new capability settings to allow editor, author, contributor and custom roles visit backend settings
     47
     48* Fixed: Cross Site Request Forgery (CSRF) vulnerability when delete item( keyword ) and blocked data
     49
     50* Compatible with Gravity Forms 2.9.x
     51
     52* Compatible with Formidable Forms 6.16.x
     53
     54* Compatible with WPForms 1.9.2.x
     55
     56* Compatible with Contact Form 7 6.0.x
     57
     58* Compatible with Forminator 1.37.x
     59
     60* Compatible with WordPress 6.7.1
     61
    44623.9
    4563
Note: See TracChangeset for help on using the changeset viewer.