Version Description
Download this release
Release Info
Developer | sevenspark |
Plugin | Contact Form 7 Dynamic Text Extension |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- wpcf7_dynamic_text.php +17 -15
wpcf7_dynamic_text.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Contact Form 7 - Dynamic Text Extension
|
5 |
-
Plugin URI: http://
|
6 |
Description: Provides a dynamic text field that accepts any shortcode to generate the content. Requires Contact Form 7
|
7 |
-
Version: 1.0.
|
8 |
Author: Chris Mavricos, SevenSpark
|
9 |
Author URI: http://sevenspark.com
|
10 |
License: GPL2
|
@@ -31,14 +31,20 @@ License: GPL2
|
|
31 |
** A base module for [dynamictext], [dynamictext*]
|
32 |
**/
|
33 |
function wpcf7_dynamictext_init(){
|
|
|
34 |
if(function_exists('wpcf7_add_shortcode')){
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
wpcf7_add_shortcode( 'dynamictext*', 'wpcf7_dynamictext_shortcode_handler', true );
|
40 |
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
add_action( 'plugins_loaded', 'wpcf7_dynamictext_init');
|
44 |
|
@@ -133,9 +139,6 @@ function wpcf7_dynamictext_shortcode_handler( $tag ) {
|
|
133 |
|
134 |
/* Validation filter */
|
135 |
|
136 |
-
add_filter( 'wpcf7_validate_dynamictext', 'wpcf7_dynamictext_validation_filter', 10, 2 );
|
137 |
-
add_filter( 'wpcf7_validate_dynamictext*', 'wpcf7_dynamictext_validation_filter', 10, 2 );
|
138 |
-
|
139 |
function wpcf7_dynamictext_validation_filter( $result, $tag ) {
|
140 |
global $wpcf7_contact_form;
|
141 |
|
@@ -157,12 +160,11 @@ function wpcf7_dynamictext_validation_filter( $result, $tag ) {
|
|
157 |
|
158 |
/* Tag generator */
|
159 |
|
160 |
-
add_action( 'admin_init', 'wpcf7_add_tag_generator_dynamictext', 15 );
|
161 |
-
|
162 |
function wpcf7_add_tag_generator_dynamictext() {
|
163 |
-
|
164 |
-
'
|
165 |
-
|
|
|
166 |
}
|
167 |
|
168 |
function wpcf7_tg_pane_dynamictext_( &$contact_form ) {
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Contact Form 7 - Dynamic Text Extension
|
5 |
+
Plugin URI: http://sevenspark.com/wordpress-plugins/contact-form-7-dynamic-text-extension
|
6 |
Description: Provides a dynamic text field that accepts any shortcode to generate the content. Requires Contact Form 7
|
7 |
+
Version: 1.0.2
|
8 |
Author: Chris Mavricos, SevenSpark
|
9 |
Author URI: http://sevenspark.com
|
10 |
License: GPL2
|
31 |
** A base module for [dynamictext], [dynamictext*]
|
32 |
**/
|
33 |
function wpcf7_dynamictext_init(){
|
34 |
+
|
35 |
if(function_exists('wpcf7_add_shortcode')){
|
36 |
+
|
37 |
+
/* Shortcode handler */
|
38 |
+
wpcf7_add_shortcode( 'dynamictext', 'wpcf7_dynamictext_shortcode_handler', true );
|
39 |
+
wpcf7_add_shortcode( 'dynamictext*', 'wpcf7_dynamictext_shortcode_handler', true );
|
|
|
40 |
|
41 |
}
|
42 |
+
|
43 |
+
add_filter( 'wpcf7_validate_dynamictext', 'wpcf7_dynamictext_validation_filter', 10, 2 );
|
44 |
+
add_filter( 'wpcf7_validate_dynamictext*', 'wpcf7_dynamictext_validation_filter', 10, 2 );
|
45 |
+
|
46 |
+
add_action( 'admin_init', 'wpcf7_add_tag_generator_dynamictext', 15 );
|
47 |
+
|
48 |
}
|
49 |
add_action( 'plugins_loaded', 'wpcf7_dynamictext_init');
|
50 |
|
139 |
|
140 |
/* Validation filter */
|
141 |
|
|
|
|
|
|
|
142 |
function wpcf7_dynamictext_validation_filter( $result, $tag ) {
|
143 |
global $wpcf7_contact_form;
|
144 |
|
160 |
|
161 |
/* Tag generator */
|
162 |
|
|
|
|
|
163 |
function wpcf7_add_tag_generator_dynamictext() {
|
164 |
+
if(function_exists('wpcf7_add_tag_generator')){
|
165 |
+
wpcf7_add_tag_generator( 'dynamictext', __( 'Dynamic Text field', 'wpcf7' ),
|
166 |
+
'wpcf7-tg-pane-dynamictext', 'wpcf7_tg_pane_dynamictext_' );
|
167 |
+
}
|
168 |
}
|
169 |
|
170 |
function wpcf7_tg_pane_dynamictext_( &$contact_form ) {
|