Plugin Directory

Changeset 2285821


Ignore:
Timestamp:
04/17/2020 03:39:55 PM (6 years ago)
Author:
orangetoolz
Message:

Captcha added

Location:
cf7-db-tool/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cf7-db-tool/trunk/assets/css/cf7-bulk-mail.css

    r2279382 r2285821  
    202202    width: 150px;
    203203}
     204.captcha-shortcode{
     205    border: 2px solid #ddd; padding: 0 10px
     206}
     207.captcha-shortcode h3{
     208    border-bottom: 2px solid #000;width: max-content
     209}
     210.captcha-shortcode p{
     211    display: flex;align-items: center
     212}
    204213
    205214
  • cf7-db-tool/trunk/cf7-db-tool.php

    r2282421 r2285821  
    88 * Text Domain: cf7-db-tool
    99 * Tags: contact, cf7, zapier, integration, webhook, bulk mail, contact form 7, db, export, save, wpcf7, contact form 7 db,  contact form 7 database, contact form 7 data export, contact form 7 database addon
    10  * Version: 4.2.7
     10 * Version: 4.2.8
    1111 */
    1212
    13 define('CF7_DBT_VERSION', '4.2.7');
    14 define('CF7_DBT_DB_VERSION', '4.2.7');
     13define('CF7_DBT_VERSION', '4.2.8');
     14define('CF7_DBT_DB_VERSION', '4.2.8');
    1515define('CF7_DBT_PATH', __DIR__);
    1616define('CF7_DBT_URL', plugins_url(basename(CF7_DBT_PATH)));
  • cf7-db-tool/trunk/readme.txt

    r2282421 r2285821  
    11=== CF7 DB Tool & Webhook &  Zapier  & Bulk Email - All in one. ===
    22Contributors: orangetoolz
    3 Tags: contact, cf7, zapier, integration, webhook, bulk mail, contact form 7, db, export, save, wpcf7, contact form 7 db,  contact form 7 database, contact form 7 data export, contact form 7 database addon
     3Tags: contact, cf7, zapier, integration, webhook, bulk mail, contact form 7, db, export, save, wpcf7, contact form 7 db,
     4contact form 7 database, contact form 7 data export, contact form 7 database addon,Anti-spam security, Antispam,Captcha, Captha,Recaptcha
    45Requires at least: 4.8
    56Tested up to: 5.4
    6 Stable tag: 4.2.7
     7Stable tag: 4.2.8
    78License: GPLv2 or later
    89License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    1112
    1213== Description ==
    13 
     14The “CF7 DB TOOL” plugin saves contact form 7 submissions to your WordPress database.
     15Enable Bulk Email, and Zapier.
    1416After installing the plugin it automatically captures and stores all contact form 7 submission inside the wp-admin interface.
    1517
     
    3234Email integration with bulk mail [Mailgun](https://www.mailgun.com/)
    3335Email integration with bulk mail with  [sendgrid](https://sendgrid.com/)
     36Captcha Enable to protect spam.
     37
    3438
    3539
     
    179183*Email integration with bulk mail with
    180184
     185= 4.2.8 =
     186*Release Date - April 17, 2020*
     187*Captcha Enable to protect spam.
    181188
    182189
    183190
    184191
     192
     193
  • cf7-db-tool/trunk/src/Plugin.php

    r2282421 r2285821  
    6161        require_once'BulkMail.php';
    6262        require_once 'Integration/integration.php';
     63        require_once 'captcha/cf7DbToolcaptcha.php';
    6364        $this->config = new Config();
    6465        add_action('admin_menu', [$this, 'addOptionsPage'], 5);
     
    112113            [$this, 'cf7BulkMail']
    113114        );
    114 
     115        /**
     116         * Submenu for mail settings
     117         * */
    115118        add_submenu_page( 'cf7_dbt', 'Mail Settings', 'Mail settings', 'manage_options', 'Mail-Settings',[$this, 'cf7BulkMailSettings'] );
    116 
    117         add_action( 'admin_init', [$this, 'custom_mail_settings'] );
     119        /**
     120         * Submenu for captcha settings
     121         * */
     122        add_submenu_page( 'cf7_dbt', 'Captcha Settings', 'Captcha Settings', 'manage_options', 'Captcha-Settings',[$this, 'cf7BulkCaptchaSettings'] );
     123
     124
     125        /**
     126         * Register filed function call
     127         * */
     128        add_action( 'admin_init', [$this, 'custom_settings_fields'] );
    118129
    119130    }
     
    170181     */
    171182    public function cf7BulkMailSettings(){
    172         require_once 'mail-setting-options/mail-fields-support.php';
    173     }
     183        require_once 'setting-options-fileds/mail-fields-support.php';
     184    }
     185
     186
     187    /**
     188     * Callback for captcha File include
     189     * @return void
     190     */
     191    public  function cf7BulkCaptchaSettings(){
     192        require_once 'setting-options-fileds/captcha-settings-fields.php';
     193        }
    174194
    175195    /**
     
    177197     */
    178198
    179     function custom_mail_settings() {
     199    function custom_settings_fields() {
    180200        /**
    181201         * Mail Provider registered fileds
     
    211231        add_settings_field('sendgrid_username','SendGrid Username', [$this, 'sendgrid_userName'],'mail-support-options','sendgrid_mail_setting');
    212232        add_settings_field('sendgrid_password','SendGrid Password', [$this, 'sendgrid_userPassword'],'mail-support-options','sendgrid_mail_setting');
    213     }
    214 
     233
     234        /**
     235         * Captcha registered fileds
     236         * */
     237        register_setting('captcha-settings-group', 'cf7db-captcha-active');
     238        register_setting('captcha-settings-group', 'cf7db-captcha-keyLenght');
     239
     240
     241        /**
     242         * captcha settings Section
     243         * */
     244        add_settings_section( 'cf7_db_captcha_setting', 'Customize your captcha settings', [$this, 'cf7DbToolCaptcha__section_cb'], 'Captcha-Settings' );
     245        /**
     246         * Captcha Settings fileds
     247         * */
     248        add_settings_field('active_cf7DbToolCaptcha','Active Captcha', [$this, 'active_captcha_cb'],'Captcha-Settings','cf7_db_captcha_setting');
     249        add_settings_field('cf7DbToolCaptchaKeyLenght','Captcha Key Length', [$this, 'cf7DbKeyLength'],'Captcha-Settings','cf7_db_captcha_setting');
     250
     251    }
     252
     253
     254    /**
     255     * Captcha Fields Design
     256     * */
     257    //Active / Deactive captcha
     258    public function active_captcha_cb(){
     259        $active_captcha = get_option('cf7db-captcha-active');
     260        $checkded =  ($active_captcha? 'checked' : '');
     261        echo '<label><input type="checkbox"  '.$checkded.'  name="cf7db-captcha-active" class="active_captcha" value="1">  </label>';
     262        echo '<span>(If you already using <i><b>Really Simple CAPTCHA</b></i>, you dont need to active this.)</span>';
     263
     264    }
     265    //Captcha Length
     266    public function cf7DbKeyLength(){
     267        $capthcaLenght = get_option('cf7db-captcha-keyLenght');
     268        $capthcaLenght =  ($capthcaLenght? $capthcaLenght : 4);
     269        echo '<input type="number" class="captcha-keylenght"  value="'.$capthcaLenght.'" name="cf7db-captcha-keyLenght" > ';
     270    }
    215271
    216272    /**
    217273     * Mail provider inputs Fileds design
    218274     * */
    219     //Active / Deactive mail provider
    220     function active_mail_provider_cb(){
     275    //Active / Deactive mail provider
     276    public function active_mail_provider_cb(){
    221277        $active_mailer = get_option('active_mailer');
    222278        $checkded =  ($active_mailer? 'checked' : '');
    223279        echo '<label><input type="checkbox"  '.$checkded.'  name="active_mailer" class="active_mail_provider" value="1"> Active Thirdparty Mail Service </label>';
    224280    }
     281
    225282
    226283    //Choose mail provider
     
    292349
    293350    }
     351    public function cf7DbToolCaptcha__section_cb(){}
    294352
    295353    /**
     
    302360        wp_enqueue_style('cf7-dbt-bulkmail', CF7_DBT_URL . '/assets/css/cf7-bulk-mail.css', '', CF7_DBT_VERSION);
    303361        wp_enqueue_script('cf7-dbt-script', CF7_DBT_URL . '/assets/js/cf7-db-tool.js', ['jquery'], CF7_DBT_VERSION,true);
    304 
    305362
    306363        wp_localize_script('cf7-dbt-script','cf7DbtObj',[
     
    308365            'nonce' => wp_create_nonce('cf7-dbt-reply-nonce')
    309366        ]);
    310 
    311367
    312368    }
Note: See TracChangeset for help on using the changeset viewer.