Version Description
Download this release
Release Info
Developer | Jules Colle |
Plugin | Conditional Fields for Contact Form 7 |
Version | 1.9.16 |
Comparing to | |
See all releases |
Code changes from version 1.9.15 to 1.9.16
- admin.php +8 -4
- contact-form-7-conditional-fields.php +3 -3
- init.php +1 -1
- js/scripts_admin.js +0 -26
- js/scripts_admin_all_pages.js +25 -0
- jsdoc-out/index.html +1 -1
- jsdoc-out/scripts_es6.js.html +1 -1
- jsdoc-out/wpcf7cf.html +1 -1
- readme.txt +3 -1
admin.php
CHANGED
@@ -3,6 +3,10 @@
|
|
3 |
add_action( 'admin_enqueue_scripts', 'wpcf7cf_admin_enqueue_scripts', 11 ); // set priority so scripts and styles get loaded later.
|
4 |
|
5 |
function wpcf7cf_admin_enqueue_scripts( $hook_suffix ) {
|
|
|
|
|
|
|
|
|
6 |
if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
|
7 |
return; //don't load styles and scripts if this isn't a CF7 page.
|
8 |
}
|
@@ -300,9 +304,9 @@ add_action('admin_notices', function () {
|
|
300 |
?>
|
301 |
<div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="<?php echo $nid ?>">
|
302 |
<p>
|
303 |
-
<strong>Conditional Fields for Contact Form 7</strong> is not
|
304 |
-
If you notice any problems with your forms, please roll back to
|
305 |
-
<a
|
306 |
</p>
|
307 |
</div>
|
308 |
<?php
|
@@ -314,7 +318,7 @@ add_action('admin_notices', function () {
|
|
314 |
<div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="<?php echo $nid ?>">
|
315 |
<p>
|
316 |
<strong>Conditional Fields for Contact Form 7</strong> is fully compatible and tested with Contact Form 7 version <?php echo WPCF7CF_CF7_MAX_VERSION ?>.
|
317 |
-
Compatibility with other versions of CF7 is not guaranteed, so please install <a target="_blank" href="https://downloads.wordpress.org/plugin/contact-form-7.<?php echo WPCF7CF_CF7_MAX_VERSION ?>.zip">CF7 version <?php echo WPCF7CF_CF7_MAX_VERSION ?></a>
|
318 |
</p>
|
319 |
</div>
|
320 |
<?php
|
3 |
add_action( 'admin_enqueue_scripts', 'wpcf7cf_admin_enqueue_scripts', 11 ); // set priority so scripts and styles get loaded later.
|
4 |
|
5 |
function wpcf7cf_admin_enqueue_scripts( $hook_suffix ) {
|
6 |
+
|
7 |
+
wp_enqueue_script('cf7cf-scripts-admin-all-pages', wpcf7cf_plugin_url( 'js/scripts_admin_all_pages.js' ),array( 'jquery' ), WPCF7CF_VERSION,true);
|
8 |
+
|
9 |
+
|
10 |
if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
|
11 |
return; //don't load styles and scripts if this isn't a CF7 page.
|
12 |
}
|
304 |
?>
|
305 |
<div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="<?php echo $nid ?>">
|
306 |
<p>
|
307 |
+
<strong>Conditional Fields for Contact Form 7</strong> is not yet compatible with your current version of Contact Form 7.
|
308 |
+
<br>If you notice any problems with your forms, please roll back to Contact Form 7 <strong>version <?php echo WPCF7CF_CF7_MAX_VERSION ?></strong>.
|
309 |
+
<br>For a quick and safe rollback, we recommend <a href="https://wordpress.org/plugins/wp-rollback/" target="_blank">WP Rollback</a>.
|
310 |
</p>
|
311 |
</div>
|
312 |
<?php
|
318 |
<div class="wpcf7cf-admin-notice notice notice-warning is-dismissible" data-notice-id="<?php echo $nid ?>">
|
319 |
<p>
|
320 |
<strong>Conditional Fields for Contact Form 7</strong> is fully compatible and tested with Contact Form 7 version <?php echo WPCF7CF_CF7_MAX_VERSION ?>.
|
321 |
+
<br>Compatibility with other versions of CF7 is not guaranteed, so please install <a target="_blank" href="https://downloads.wordpress.org/plugin/contact-form-7.<?php echo WPCF7CF_CF7_MAX_VERSION ?>.zip">CF7 version <?php echo WPCF7CF_CF7_MAX_VERSION ?></a>
|
322 |
</p>
|
323 |
</div>
|
324 |
<?php
|
contact-form-7-conditional-fields.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin URI: http://bdwm.be/
|
5 |
* Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
|
6 |
* Author: Jules Colle
|
7 |
-
* Version: 1.9.
|
8 |
* Author URI: http://bdwm.be/
|
9 |
* Text Domain: cf7-conditional-fields
|
10 |
* License: GPL v2 or later
|
@@ -37,7 +37,7 @@ if ( function_exists( 'wpcf7cf_pro_deactivate_free_version_notice' ) ) {
|
|
37 |
<div class="notice notice-error is-dismissible">
|
38 |
<p><?php
|
39 |
// translators: 1. <a>, 2. </a>
|
40 |
-
printf( __( '<strong>Contact Form 7 - Conditional Fields
|
41 |
?></p>
|
42 |
</div>
|
43 |
<?php
|
@@ -45,4 +45,4 @@ if ( function_exists( 'wpcf7cf_pro_deactivate_free_version_notice' ) ) {
|
|
45 |
|
46 |
require_once __DIR__.'/init.php';
|
47 |
|
48 |
-
}
|
4 |
* Plugin URI: http://bdwm.be/
|
5 |
* Description: Adds support for conditional fields to Contact Form 7. This plugin depends on Contact Form 7.
|
6 |
* Author: Jules Colle
|
7 |
+
* Version: 1.9.16
|
8 |
* Author URI: http://bdwm.be/
|
9 |
* Text Domain: cf7-conditional-fields
|
10 |
* License: GPL v2 or later
|
37 |
<div class="notice notice-error is-dismissible">
|
38 |
<p><?php
|
39 |
// translators: 1. <a>, 2. </a>
|
40 |
+
printf( __( '<strong>Contact Form 7 - Conditional Fields</strong> needs to %1$sdeactivate the free plugin%1$s', 'cf7-conditional-fields' ), '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&plugin=cf7-conditional-fields%2Fcontact-form-7-conditional-fields.php&plugin_status=all&paged=1&s=', 'deactivate-plugin_cf7-conditional-fields/contact-form-7-conditional-fields.php' ) . '">', '</a>' );
|
41 |
?></p>
|
42 |
</div>
|
43 |
<?php
|
45 |
|
46 |
require_once __DIR__.'/init.php';
|
47 |
|
48 |
+
}
|
init.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.9.
|
4 |
if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.3.2' );
|
5 |
if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
|
6 |
if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
|
1 |
<?php
|
2 |
|
3 |
+
if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '1.9.16' );
|
4 |
if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '5.3.2' );
|
5 |
if (!defined('WPCF7CF_REQUIRED_WP_VERSION')) define( 'WPCF7CF_REQUIRED_WP_VERSION', '4.1' );
|
6 |
if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ );
|
js/scripts_admin.js
CHANGED
@@ -383,32 +383,6 @@ wpcf7cf.$formEditorForm.on('submit', function() {
|
|
383 |
});
|
384 |
|
385 |
|
386 |
-
// ------------------------------------
|
387 |
-
// OPTIONS PAGE / DISMISS NOTICES
|
388 |
-
// ------------------------------------
|
389 |
-
|
390 |
-
jQuery(document).ready(function($) {
|
391 |
-
|
392 |
-
$('.notice-dismiss,.notice-dismiss-alt', '.wpcf7cf-admin-notice').click(function () {
|
393 |
-
wpcf7cf_dismiss_notice(
|
394 |
-
$(this).closest('.wpcf7cf-admin-notice').data('noticeId')
|
395 |
-
);
|
396 |
-
});
|
397 |
-
|
398 |
-
function wpcf7cf_dismiss_notice(noticeId) {
|
399 |
-
|
400 |
-
if (noticeId === '') {
|
401 |
-
$('input[name="wpcf7cf_options[notice_dismissed]"]').val('true');
|
402 |
-
}
|
403 |
-
|
404 |
-
$.post(ajaxurl, { action:'wpcf7cf_dismiss_notice', noticeId:noticeId }, function(response) {
|
405 |
-
// nothing to do. dismiss_notice option should be set to TRUE server side by now.
|
406 |
-
});
|
407 |
-
|
408 |
-
}
|
409 |
-
|
410 |
-
});
|
411 |
-
|
412 |
// ------------------------------------
|
413 |
// CF7 TAG GENERATOR OVERRIDE
|
414 |
// ------------------------------------
|
383 |
});
|
384 |
|
385 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
// ------------------------------------
|
387 |
// CF7 TAG GENERATOR OVERRIDE
|
388 |
// ------------------------------------
|
js/scripts_admin_all_pages.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// ------------------------------------
|
2 |
+
// DISMISS NOTICES
|
3 |
+
// ------------------------------------
|
4 |
+
|
5 |
+
jQuery(document).ready(function($) {
|
6 |
+
|
7 |
+
$('.notice-dismiss,.notice-dismiss-alt', '.wpcf7cf-admin-notice').click(function () {
|
8 |
+
wpcf7cf_dismiss_notice(
|
9 |
+
$(this).closest('.wpcf7cf-admin-notice').data('noticeId')
|
10 |
+
);
|
11 |
+
});
|
12 |
+
|
13 |
+
function wpcf7cf_dismiss_notice(noticeId) {
|
14 |
+
|
15 |
+
if (noticeId === '') {
|
16 |
+
$('input[name="wpcf7cf_options[notice_dismissed]"]').val('true');
|
17 |
+
}
|
18 |
+
|
19 |
+
$.post(ajaxurl, { action:'wpcf7cf_dismiss_notice', noticeId:noticeId }, function(response) {
|
20 |
+
// nothing to do. dismiss_notice option should be set to TRUE server side by now.
|
21 |
+
});
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
});
|
jsdoc-out/index.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56 |
<br class="clear">
|
57 |
|
58 |
<footer>
|
59 |
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021
|
60 |
</footer>
|
61 |
|
62 |
<script> prettyPrint(); </script>
|
56 |
<br class="clear">
|
57 |
|
58 |
<footer>
|
59 |
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021 18:06:04 GMT+0100 (Midden-Europese standaardtijd)
|
60 |
</footer>
|
61 |
|
62 |
<script> prettyPrint(); </script>
|
jsdoc-out/scripts_es6.js.html
CHANGED
@@ -1531,7 +1531,7 @@ jQuery.fn.wpcf7ExclusiveCheckbox = function() {
|
|
1531 |
<br class="clear">
|
1532 |
|
1533 |
<footer>
|
1534 |
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021
|
1535 |
</footer>
|
1536 |
|
1537 |
<script> prettyPrint(); </script>
|
1531 |
<br class="clear">
|
1532 |
|
1533 |
<footer>
|
1534 |
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021 18:06:04 GMT+0100 (Midden-Europese standaardtijd)
|
1535 |
</footer>
|
1536 |
|
1537 |
<script> prettyPrint(); </script>
|
jsdoc-out/wpcf7cf.html
CHANGED
@@ -1359,7 +1359,7 @@ Subs are either appended to or removed from the end of the repeater.</p>
|
|
1359 |
<br class="clear">
|
1360 |
|
1361 |
<footer>
|
1362 |
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021
|
1363 |
</footer>
|
1364 |
|
1365 |
<script> prettyPrint(); </script>
|
1359 |
<br class="clear">
|
1360 |
|
1361 |
<footer>
|
1362 |
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Wed Mar 03 2021 18:06:04 GMT+0100 (Midden-Europese standaardtijd)
|
1363 |
</footer>
|
1364 |
|
1365 |
<script> prettyPrint(); </script>
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Website: http://bdwm.be
|
|
6 |
Tags: wordpress, contact form 7, forms, conditional fields
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.7
|
9 |
-
Stable tag: 1.9.
|
10 |
Requires PHP: 7.0
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -117,6 +117,8 @@ The conditional fields javascript code is loaded during wp_footer, so a call to
|
|
117 |
|
118 |
== Changelog ==
|
119 |
|
|
|
|
|
120 |
= 1.9.15 (2021-03-03) =
|
121 |
* PRO: add [disable_on_hide](https://conditional-fields-cf7.bdwm.be/disable_on_hide/) attribute, which allows using multiple fields with the same name.
|
122 |
* Make plugin translatable. Big thanks to Yordan Soares for the [PR](https://github.com/pwkip/contact-form-7-conditional-fields/pull/73)
|
6 |
Tags: wordpress, contact form 7, forms, conditional fields
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.7
|
9 |
+
Stable tag: 1.9.16
|
10 |
Requires PHP: 7.0
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
117 |
|
118 |
== Changelog ==
|
119 |
|
120 |
+
|
121 |
+
|
122 |
= 1.9.15 (2021-03-03) =
|
123 |
* PRO: add [disable_on_hide](https://conditional-fields-cf7.bdwm.be/disable_on_hide/) attribute, which allows using multiple fields with the same name.
|
124 |
* Make plugin translatable. Big thanks to Yordan Soares for the [PR](https://github.com/pwkip/contact-form-7-conditional-fields/pull/73)
|