Version Description
(21 June 2018) =
Bugs:
- Resolved an issue that sometimes caused the form builder to crash when deleting a field.
- Submissions removed by the expired submissions feature should now be moved to the trash instead of completely removed.
=
Download this release
Release Info
Developer | krmoorhouse |
Plugin | Ninja Forms – The Easy and Powerful Forms Builder |
Version | 3.3.7 |
Comparing to | |
See all releases |
Code changes from version 3.3.6 to 3.3.7
- deprecated/ninja-forms.php +1 -1
- includes/Actions/Save.php +2 -3
- includes/Config/ActionSaveSettings.php +2 -1
- includes/Database/SubmissionExpirationCron.php +4 -4
- ninja-forms.php +7 -2
- readme.txt +8 -11
deprecated/ninja-forms.php
CHANGED
@@ -265,7 +265,7 @@ class Ninja_Forms {
|
|
265 |
|
266 |
// Plugin version
|
267 |
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
|
268 |
-
define( 'NF_PLUGIN_VERSION', '3.3.
|
269 |
|
270 |
// Plugin Folder Path
|
271 |
if ( ! defined( 'NF_PLUGIN_DIR' ) )
|
265 |
|
266 |
// Plugin version
|
267 |
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
|
268 |
+
define( 'NF_PLUGIN_VERSION', '3.3.7' );
|
269 |
|
270 |
// Plugin Folder Path
|
271 |
if ( ! defined( 'NF_PLUGIN_DIR' ) )
|
includes/Actions/Save.php
CHANGED
@@ -70,11 +70,10 @@ final class NF_Actions_Save extends NF_Abstracts_Action
|
|
70 |
$expiration_value = $form_id . ',' . $action_settings[ 'subs_expire_time' ];
|
71 |
|
72 |
// Check for option value...
|
73 |
-
$option = get_option( 'nf_sub_expiration' );
|
74 |
|
75 |
// If option doesn't exist we know that we can just create the option.
|
76 |
-
if( ! $option ){
|
77 |
-
update_option( 'nf_sub_expiration', array( $expiration_value ) );
|
78 |
return;
|
79 |
}
|
80 |
|
70 |
$expiration_value = $form_id . ',' . $action_settings[ 'subs_expire_time' ];
|
71 |
|
72 |
// Check for option value...
|
73 |
+
$option = get_option( 'nf_sub_expiration', false );
|
74 |
|
75 |
// If option doesn't exist we know that we can just create the option.
|
76 |
+
if( ! $option || empty( $option ) ){
|
|
|
77 |
return;
|
78 |
}
|
79 |
|
includes/Config/ActionSaveSettings.php
CHANGED
@@ -60,7 +60,8 @@ return apply_filters( 'ninja_forms_action_email_settings', array(
|
|
60 |
'type' => 'toggle',
|
61 |
'group' => 'advanced',
|
62 |
'label' => __( 'Set Submissions to expire?', 'ninja-forms' ),
|
63 |
-
'value' =>
|
|
|
64 |
'width' => 'one-half',
|
65 |
),
|
66 |
|
60 |
'type' => 'toggle',
|
61 |
'group' => 'advanced',
|
62 |
'label' => __( 'Set Submissions to expire?', 'ninja-forms' ),
|
63 |
+
'value' => 0,
|
64 |
+
'help' => __( 'Sets submissions to be trashes after a certain number of days, it affects all existing and new submissions', 'ninja-forms' ),
|
65 |
'width' => 'one-half',
|
66 |
),
|
67 |
|
includes/Database/SubmissionExpirationCron.php
CHANGED
@@ -10,7 +10,7 @@ final class NF_Database_SubmissionExpirationCron
|
|
10 |
public function __construct()
|
11 |
{
|
12 |
// Retrieves the option that contains all of our expiration data.
|
13 |
-
$options = get_option( 'nf_sub_expiration' );
|
14 |
|
15 |
// Schedules our CRON job.
|
16 |
if( ! wp_next_scheduled( 'nf_submission_expiration_cron' ) && ! empty( $options ) ) {
|
@@ -29,10 +29,10 @@ final class NF_Database_SubmissionExpirationCron
|
|
29 |
*/
|
30 |
public function expired_submission_cron()
|
31 |
{
|
32 |
-
$options = get_option( 'nf_sub_expiration' );
|
33 |
|
34 |
// If options are empty bail..
|
35 |
-
if( ! $options ) return;
|
36 |
|
37 |
// Loop over our options and ...
|
38 |
foreach( $options as $option ) {
|
@@ -98,7 +98,7 @@ final class NF_Database_SubmissionExpirationCron
|
|
98 |
foreach( $expired_subs as $subs ) {
|
99 |
foreach( $subs as $sub ) {
|
100 |
if( $i >= 100 ) break;
|
101 |
-
|
102 |
$i++;
|
103 |
}
|
104 |
}
|
10 |
public function __construct()
|
11 |
{
|
12 |
// Retrieves the option that contains all of our expiration data.
|
13 |
+
$options = get_option( 'nf_sub_expiration', false );
|
14 |
|
15 |
// Schedules our CRON job.
|
16 |
if( ! wp_next_scheduled( 'nf_submission_expiration_cron' ) && ! empty( $options ) ) {
|
29 |
*/
|
30 |
public function expired_submission_cron()
|
31 |
{
|
32 |
+
$options = get_option( 'nf_sub_expiration', false );
|
33 |
|
34 |
// If options are empty bail..
|
35 |
+
if( ! $options || ! is_array( $options ) ) return;
|
36 |
|
37 |
// Loop over our options and ...
|
38 |
foreach( $options as $option ) {
|
98 |
foreach( $expired_subs as $subs ) {
|
99 |
foreach( $subs as $sub ) {
|
100 |
if( $i >= 100 ) break;
|
101 |
+
wp_trash_post( $sub );
|
102 |
$i++;
|
103 |
}
|
104 |
}
|
ninja-forms.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ninja Forms
|
4 |
Plugin URI: http://ninjaforms.com/
|
5 |
Description: Ninja Forms is a webform builder with unparalleled ease of use and features.
|
6 |
-
Version: 3.3.
|
7 |
Author: The WP Ninjas
|
8 |
Author URI: http://ninjaforms.com
|
9 |
Text Domain: ninja-forms
|
@@ -58,7 +58,7 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
|
|
58 |
/**
|
59 |
* @since 3.0
|
60 |
*/
|
61 |
-
const VERSION = '3.3.
|
62 |
|
63 |
const WP_MIN_VERSION = '4.7';
|
64 |
|
@@ -213,6 +213,11 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
|
|
213 |
// If we have a recorded version...
|
214 |
// AND that version is less than our current version...
|
215 |
if ( $saved_version && version_compare( $saved_version, self::VERSION, '<' ) ) {
|
|
|
|
|
|
|
|
|
|
|
216 |
// We just upgraded the plugin.
|
217 |
$plugin_upgrade = true;
|
218 |
} else {
|
3 |
Plugin Name: Ninja Forms
|
4 |
Plugin URI: http://ninjaforms.com/
|
5 |
Description: Ninja Forms is a webform builder with unparalleled ease of use and features.
|
6 |
+
Version: 3.3.7
|
7 |
Author: The WP Ninjas
|
8 |
Author URI: http://ninjaforms.com
|
9 |
Text Domain: ninja-forms
|
58 |
/**
|
59 |
* @since 3.0
|
60 |
*/
|
61 |
+
const VERSION = '3.3.7';
|
62 |
|
63 |
const WP_MIN_VERSION = '4.7';
|
64 |
|
213 |
// If we have a recorded version...
|
214 |
// AND that version is less than our current version...
|
215 |
if ( $saved_version && version_compare( $saved_version, self::VERSION, '<' ) ) {
|
216 |
+
// *IMPORTANT: Filter to delete old bad data.
|
217 |
+
// Leave this here until at least 3.4.0.
|
218 |
+
if ( version_compare( $saved_version, '3.3.7', '<' ) && version_compare( $saved_version, '3.3.4', '>' ) ) {
|
219 |
+
delete_option( 'nf_sub_expiration' );
|
220 |
+
}
|
221 |
// We just upgraded the plugin.
|
222 |
$plugin_upgrade = true;
|
223 |
} else {
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: wpninjasllc, kstover, jameslaws, kbjohnson90, klhall1987, krmoorho
|
|
3 |
Tags: form, forms, contact form, custom form, form builder, form creator, form manager, form creation, contact forms, custom forms, forms builder, forms creator, forms manager, forms creation, form administration,
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 3.3.
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Drag and drop fields in an intuitive UI to create contact forms, email subscription forms, order forms, payment forms, send emails and more!
|
@@ -111,23 +111,20 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
|
|
111 |
|
112 |
== Upgrade Notice ==
|
113 |
|
114 |
-
= 3.3.
|
115 |
|
116 |
*Bugs:*
|
117 |
|
118 |
-
* Made some performance updates to several of our popup modals.
|
119 |
-
* The agency remove marketing hook should now properly hide the new services tab.
|
120 |
* Resolved an issue that sometimes caused the form builder to crash when deleting a field.
|
|
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
-
* Added a tooltip to the value section of list fields, giving details about allowed characters.
|
126 |
-
* List field merge tags can now be configured to show labels instead of values by appending ":label" to the merge tag.
|
127 |
-
* The store submissions action can now be configured to remove submissions that exceed a defined timeframe.
|
128 |
-
* Added a confirm modal to field deletion to prevent accidental removal of data.
|
129 |
|
130 |
-
|
|
|
|
|
131 |
|
132 |
= 3.3.6 (20 June 2018) =
|
133 |
|
3 |
Tags: form, forms, contact form, custom form, form builder, form creator, form manager, form creation, contact forms, custom forms, forms builder, forms creator, forms manager, forms creation, form administration,
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 3.3.7
|
7 |
License: GPLv2 or later
|
8 |
|
9 |
Drag and drop fields in an intuitive UI to create contact forms, email subscription forms, order forms, payment forms, send emails and more!
|
111 |
|
112 |
== Upgrade Notice ==
|
113 |
|
114 |
+
= 3.3.7 (21 June 2018) =
|
115 |
|
116 |
*Bugs:*
|
117 |
|
|
|
|
|
118 |
* Resolved an issue that sometimes caused the form builder to crash when deleting a field.
|
119 |
+
* Submissions removed by the expired submissions feature should now be moved to the trash instead of completely removed.
|
120 |
|
121 |
+
== Changelog ==
|
122 |
|
123 |
+
= 3.3.7 (21 June 2018) =
|
|
|
|
|
|
|
|
|
124 |
|
125 |
+
*Bugs:*
|
126 |
+
|
127 |
+
* Submissions removed by the expired submissions feature should now be moved to the trash instead of completely removed.
|
128 |
|
129 |
= 3.3.6 (20 June 2018) =
|
130 |
|