Changeset 2431089
- Timestamp:
- 12/03/2020 07:16:35 PM (5 years ago)
- Location:
- cf7-custom-validation-message/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (2 diffs)
-
admin/class-cf7cvm-admin.php (modified) (1 diff)
-
cf7-custom-validation-message.php (modified) (2 diffs)
-
includes/class-cf7cvm-activator.php (modified) (1 diff)
-
languages/cf7-custom-validation-message.pot (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cf7-custom-validation-message/trunk/README.txt
r2429767 r2431089 5 5 Requires at least: 3.0.1 6 6 Tested up to: 5.5 7 Stable tag: 1.0 7 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 72 72 * Allow to set custom validation message for wrong email address validation. 73 73 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 74 78 == Upgrade Notice == 75 79 -
cf7-custom-validation-message/trunk/admin/class-cf7cvm-admin.php
r2429751 r2431089 66 66 ?> 67 67 <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> 68 70 69 71 <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 } 74 81 $arr_values = get_post_meta( $form_ID, '_wpcf7_cv_validation_messages', true ); 75 82 // Good idea to make sure things are set before using them -
cf7-custom-validation-message/trunk/cf7-custom-validation-message.php
r2429767 r2431089 16 16 * Plugin Name: Custom Validation Message for CF7 17 17 * Description: Plugin provides custom validation message for each field of contact form 7. 18 * Version: 1.0. 018 * Version: 1.0.1 19 19 * Author: DigitalDyna 20 20 * Author URI: http://digitaldyna.com … … 35 35 * Rename this for your plugin and update it as you release new versions. 36 36 */ 37 define( 'CF7_CVM_VERSION', '1.0. 0' );37 define( 'CF7_CVM_VERSION', '1.0.1' ); 38 38 define( 'CF7_CVM_BASE_URL', plugin_basename( __FILE__ ) ); 39 39 -
cf7-custom-validation-message/trunk/includes/class-cf7cvm-activator.php
r2429751 r2431089 34 34 require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 35 35 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' ) ); 37 38 } 39 38 40 } 39 41 -
cf7-custom-validation-message/trunk/languages/cf7-custom-validation-message.pot
r2429751 r2431089 1 1 # Copyright (C) 2020 DigitalDyna 2 # This file is distributed under the same license as the C F7 Custom Validation Messageplugin.2 # This file is distributed under the same license as the Custom Validation Message for CF7 plugin. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: C F7 Custom Validation Message 1.0.0\n"5 "Project-Id-Version: Custom Validation Message for CF7 1.0.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cf7-custom-validation-message\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2020-1 1-25T19:58:28+00:00\n"12 "POT-Creation-Date: 2020-12-03T19:14:48+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.4.0\n" … … 16 16 17 17 #. 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" 18 msgid "Custom Validation Message for CF7" 24 19 msgstr "" 25 20 … … 32 27 msgstr "" 33 28 34 #: admin/class-cf7cvm-admin.php:59 35 #: admin/class-cf7cvm-admin.php:68 29 #. Author URI of the plugin 30 msgid "http://digitaldyna.com" 31 msgstr "" 32 33 #: admin/class-cf7cvm-admin.php:58 34 #: admin/class-cf7cvm-admin.php:67 36 35 msgid "Custom Validation" 37 36 msgstr "" 38 37 39 #: admin/class-cf7cvm-admin.php:80 38 #: admin/class-cf7cvm-admin.php:68 39 msgid "<b>Note:</b>" 40 msgstr "" 41 42 #: admin/class-cf7cvm-admin.php:69 43 msgid "You need to save form to reflect new tag(s)." 44 msgstr "" 45 46 #: admin/class-cf7cvm-admin.php:91 40 47 msgid "Activate" 41 48 msgstr "" 42 49 43 #: admin/class-cf7cvm-admin.php: 8450 #: admin/class-cf7cvm-admin.php:95 44 51 msgid "Your field" 45 52 msgstr "" 46 53 47 #: admin/class-cf7cvm-admin.php: 8554 #: admin/class-cf7cvm-admin.php:96 48 55 msgid "Your custom validation message" 49 56 msgstr "" 50 57 51 #: includes/class-cf7cvm-activator.php:3 658 #: includes/class-cf7cvm-activator.php:37 52 59 msgid "Please install and Activate Contact Form 7." 53 60 msgstr ""
Note: See TracChangeset
for help on using the changeset viewer.