Changeset 820500
- Timestamp:
- 12/12/2013 11:12:54 PM (12 years ago)
- Location:
- contact-form-7-datepicker/trunk
- Files:
-
- 1 deleted
- 3 edited
-
date-module.php (deleted)
-
modules/date.php (modified) (2 diffs)
-
modules/datetime.php (modified) (2 diffs)
-
modules/time.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
contact-form-7-datepicker/trunk/modules/date.php
r801569 r820500 6 6 7 7 public static function register() { 8 // Remove Contact Form 7's date module 9 remove_action('init', 'wpcf7_add_shortcode_date', 5); 8 // Register shortcodes 9 add_action('wpcf7_init', array(__CLASS__, 'add_shortcodes')); 10 10 11 remove_filter('wpcf7_validate_date', 'wpcf7_date_validation_filter', 10); 11 12 remove_filter('wpcf7_validate_date*', 'wpcf7_date_validation_filter', 10); 12 13 remove_filter('wpcf7_messages', 'wpcf7_date_messages'); 13 14 remove_action('admin_init', 'wpcf7_add_tag_generator_date', 19); 14 15 // Register shortcodes16 self::add_shortcodes();17 15 18 16 // Validations … … 143 141 } 144 142 145 p rivatestatic function add_shortcodes() {143 public static function add_shortcodes() { 146 144 if (function_exists('wpcf7_add_shortcode')) { 147 wpcf7_add_shortcode('date', array(__CLASS__, 'shortcode_handler'), true); 148 wpcf7_add_shortcode('date*', array(__CLASS__, 'shortcode_handler'), true); 145 // Remove Contact Form 7's date module 146 wpcf7_remove_shortcode('date'); 147 wpcf7_remove_shortcode('date*'); 148 149 wpcf7_add_shortcode(array('date', 'date*'), array(__CLASS__, 'shortcode_handler'), true); 149 150 } 150 151 } -
contact-form-7-datepicker/trunk/modules/datetime.php
r801569 r820500 7 7 public static function register() { 8 8 // Register shortcodes 9 self::add_shortcodes();9 add_action('wpcf7_init', array(__CLASS__, 'add_shortcodes')); 10 10 11 11 // Validations … … 146 146 } 147 147 148 p rivatestatic function add_shortcodes() {148 public static function add_shortcodes() { 149 149 if (function_exists('wpcf7_add_shortcode')) { 150 wpcf7_add_shortcode('datetime', array(__CLASS__, 'shortcode_handler'), true); 151 wpcf7_add_shortcode('datetime*', array(__CLASS__, 'shortcode_handler'), true); 150 wpcf7_add_shortcode(array('datetime', 'datetime*'), array(__CLASS__, 'shortcode_handler'), true); 152 151 } 153 152 } -
contact-form-7-datepicker/trunk/modules/time.php
r801569 r820500 7 7 public static function register() { 8 8 // Register shortcodes 9 self::add_shortcodes();9 add_action('wpcf7_init', array(__CLASS__, 'add_shortcodes')); 10 10 11 11 // Validations … … 141 141 } 142 142 143 p rivatestatic function add_shortcodes() {143 public static function add_shortcodes() { 144 144 if (function_exists('wpcf7_add_shortcode')) { 145 wpcf7_add_shortcode('time', array(__CLASS__, 'shortcode_handler'), true); 146 wpcf7_add_shortcode('time*', array(__CLASS__, 'shortcode_handler'), true); 145 wpcf7_add_shortcode(array('time', 'time*'), array(__CLASS__, 'shortcode_handler'), true); 147 146 } 148 147 }
Note: See TracChangeset
for help on using the changeset viewer.