Plugin Directory

Changeset 2431089


Ignore:
Timestamp:
12/03/2020 07:16:35 PM (5 years ago)
Author:
mohanitpro
Message:

Added some fix like when plugin activate then show proper message and also when form is not saved then show default tag with blank message at custom validation tab.

Location:
cf7-custom-validation-message/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cf7-custom-validation-message/trunk/README.txt

    r2429767 r2431089  
    55Requires at least: 3.0.1
    66Tested up to: 5.5
    7 Stable tag: 1.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7272* Allow to set custom validation message for wrong email address validation.
    7373
     74= 1.0.1 =
     75* Showing default tags if contact form not saved.
     76* Added note at top of tab for user understanding. New tag will be displayed at Custom Validation form only after form is saved.
     77
    7478== Upgrade Notice ==
    7579
  • cf7-custom-validation-message/trunk/admin/class-cf7cvm-admin.php

    r2429751 r2431089  
    6666        ?>
    6767        <h2><?php _e( 'Custom Validation', 'cf7-custom-validation-message' ); ?></h2>
     68        <p><?php _e( '<b>Note:</b>', 'cf7-custom-validation-message' ); ?>
     69        <?php _e( 'You need to save form to reflect new tag(s).', 'cf7-custom-validation-message' ); ?></p>
    6870       
    6971        <fieldset>
    70             <?php
    71             $form_ID     = $post->id; # change the 1538 to your CF7 form ID
    72             $ContactForm = WPCF7_ContactForm::get_instance( $form_ID );
    73             $form_fields = $ContactForm->scan_form_tags();
     72            <?php
     73            $form_fields = array();
     74            $form_ID     = $post->id; # get CF7 form ID
     75            if( $form_ID != null){
     76                $ContactForm = WPCF7_ContactForm::get_instance( $form_ID );
     77                $form_fields = $ContactForm->scan_form_tags();
     78            }else{
     79                $form_fields = $post->scan_form_tags();
     80            }
    7481            $arr_values = get_post_meta( $form_ID, '_wpcf7_cv_validation_messages', true );
    7582            // Good idea to make sure things are set before using them
  • cf7-custom-validation-message/trunk/cf7-custom-validation-message.php

    r2429767 r2431089  
    1616 * Plugin Name:       Custom Validation Message for CF7
    1717 * Description:       Plugin provides custom validation message for each field of contact form 7.
    18  * Version:           1.0.0
     18 * Version:           1.0.1
    1919 * Author:            DigitalDyna
    2020 * Author URI:        http://digitaldyna.com
     
    3535 * Rename this for your plugin and update it as you release new versions.
    3636 */
    37 define( 'CF7_CVM_VERSION', '1.0.0' );
     37define( 'CF7_CVM_VERSION', '1.0.1' );
    3838define( 'CF7_CVM_BASE_URL', plugin_basename( __FILE__ ) );
    3939
  • cf7-custom-validation-message/trunk/includes/class-cf7cvm-activator.php

    r2429751 r2431089  
    3434            require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    3535            deactivate_plugins( CF7_CVM_BASE_URL );
    36             wp_die( __( 'Please install and Activate Contact Form 7.', 'cf7-custom-validation-message' ), 'Plugin dependency check', array( 'back_link' => true ) );
     36            //wp_die( __( 'Please install and Activate Contact Form 7.', 'cf7-custom-validation-message' ), 'Plugin dependency check', array( 'back_link' => true ) );
     37            die( __( 'Please install and Activate Contact Form 7.', 'cf7-custom-validation-message' ) );
    3738        }
     39
    3840    }
    3941
  • cf7-custom-validation-message/trunk/languages/cf7-custom-validation-message.pot

    r2429751 r2431089  
    11# Copyright (C) 2020 DigitalDyna
    2 # This file is distributed under the same license as the CF7 Custom Validation Message plugin.
     2# This file is distributed under the same license as the Custom Validation Message for CF7 plugin.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: CF7 Custom Validation Message 1.0.0\n"
     5"Project-Id-Version: Custom Validation Message for CF7 1.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cf7-custom-validation-message\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2020-11-25T19:58:28+00:00\n"
     12"POT-Creation-Date: 2020-12-03T19:14:48+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.4.0\n"
     
    1616
    1717#. Plugin Name of the plugin
    18 msgid "CF7 Custom Validation Message"
    19 msgstr ""
    20 
    21 #. Plugin URI of the plugin
    22 #. Author URI of the plugin
    23 msgid "http://digitaldyna.com"
     18msgid "Custom Validation Message for CF7"
    2419msgstr ""
    2520
     
    3227msgstr ""
    3328
    34 #: admin/class-cf7cvm-admin.php:59
    35 #: admin/class-cf7cvm-admin.php:68
     29#. Author URI of the plugin
     30msgid "http://digitaldyna.com"
     31msgstr ""
     32
     33#: admin/class-cf7cvm-admin.php:58
     34#: admin/class-cf7cvm-admin.php:67
    3635msgid "Custom Validation"
    3736msgstr ""
    3837
    39 #: admin/class-cf7cvm-admin.php:80
     38#: admin/class-cf7cvm-admin.php:68
     39msgid "<b>Note:</b>"
     40msgstr ""
     41
     42#: admin/class-cf7cvm-admin.php:69
     43msgid "You need to save form to reflect new tag(s)."
     44msgstr ""
     45
     46#: admin/class-cf7cvm-admin.php:91
    4047msgid "Activate"
    4148msgstr ""
    4249
    43 #: admin/class-cf7cvm-admin.php:84
     50#: admin/class-cf7cvm-admin.php:95
    4451msgid "Your field"
    4552msgstr ""
    4653
    47 #: admin/class-cf7cvm-admin.php:85
     54#: admin/class-cf7cvm-admin.php:96
    4855msgid "Your custom validation message"
    4956msgstr ""
    5057
    51 #: includes/class-cf7cvm-activator.php:36
     58#: includes/class-cf7cvm-activator.php:37
    5259msgid "Please install and Activate Contact Form 7."
    5360msgstr ""
Note: See TracChangeset for help on using the changeset viewer.