Commit 25b535a4 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.9.5'

parents 84ba4f80 f61b377d
......@@ -4,7 +4,7 @@
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,
Requires at least: 3.8
Tested up to: 4.1.1
Stable tag: 2.9.2
Stable tag: 2.9.5
License: GPLv2 or later
Forms created with a simple drag and drop interface. Contact forms, Email collection forms, or any other form you want on your WordPress site.
......
......@@ -382,7 +382,7 @@ function ninja_forms_field_list_display( $field_id, $data, $form_id = '' ){
break;
case 'checkbox':
$x = 0;
?><input type="hidden" name="ninja_forms_field_<?php echo $field_id;?>" value=""><span id="ninja_forms_field_<?php echo $field_id;?>_options_span" class="<?php echo $list_options_span_class;?>" rel="<?php echo $field_id;?>"><ul><?php
?><input type="hidden" id="ninja_forms_field_<?php echo $field_id;?>" name="ninja_forms_field_<?php echo $field_id;?>" value=""><span id="ninja_forms_field_<?php echo $field_id;?>_options_span" class="<?php echo $list_options_span_class;?>" rel="<?php echo $field_id;?>"><ul><?php
foreach($options as $option){
if(isset($option['value'])){
......
......@@ -834,6 +834,9 @@ function ninja_forms_toggle_login_register(form_type, form_id) {
function ninja_forms_get_form_id(element){
var form_id = jQuery(element).closest('form').prop("id");
if ( 'undefined' === typeof form_id ) {
return false;
}
form_id = form_id.replace("ninja_forms_form_", "");
if(form_id == '' || form_id == 'ninja_forms_admin'){
form_id = jQuery("#_form_id").val();
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
Plugin Name: Ninja Forms
Plugin URI: http://ninjaforms.com/
Description: Ninja Forms is a webform builder with unparalleled ease of use and features.
Version: 2.9.4
Version: 2.9.5
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -284,7 +284,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '2.9.4' );
define( 'NF_PLUGIN_VERSION', '2.9.5' );
// Plugin Folder Path
if ( ! defined( 'NF_PLUGIN_DIR' ) )
......
......@@ -3,7 +3,7 @@ Contributors: wpninjasllc, kstover, jameslaws, wpnzach, daveshine, mordauk, bftr
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,
Requires at least: 3.8
Tested up to: 4.1.1
Stable tag: 2.9.4
Stable tag: 2.9.5
License: GPLv2 or later
Forms created with a simple drag and drop interface. Contact forms, Email collection forms, or any other form you want on your WordPress site.
......@@ -74,7 +74,7 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.9.4 (3 March 2015) =
= 2.9.5 (3 March 2015) =
*Changes:*
......@@ -85,6 +85,8 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
*Bugs:*
* Deleting Ninja Forms from the plugins page should now work in all instances.
* Display of checkbox lists should now work properly.
* Fixed a bug that could prompt users to run unnecessary updates on their site.
* Preview pages should now always display properly.
* Success messages should now always be shown after submission properly.
......
......@@ -20,39 +20,40 @@ global $wpdb;
$settings = Ninja_Forms()->get_plugin_settings();
// Bail if we haven't checked the "delete on uninstall" box.
if( ! isset ( $settings['delete_on_uninstall'] ) || 1 != $settings['delete_on_uninstall'] ) exit;
// Remove our options.
delete_option( 'ninja_forms_settings' );
delete_option( 'nf_version_upgraded_from' );
delete_option( 'nf_convert_notifications_complete' );
delete_option( 'nf_convert_subs_step' );
delete_option( 'nf_upgrade_notice' );
delete_option( 'nf_update_email_settings_complete' );
delete_option( 'nf_converted_subs' );
delete_option( 'nf_convert_subs_num' );
delete_option( 'nf_email_fav_updated' );
// Remove all of our submissions
$items = get_posts( array( 'post_type' => 'nf_sub', 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids' ) );
if ( $items ) {
foreach ( $items as $item ) {
wp_delete_post( $item, true);
if( isset ( $settings['delete_on_uninstall'] ) && 1 == $settings['delete_on_uninstall'] ) {
// Remove our options.
delete_option( 'ninja_forms_settings' );
delete_option( 'nf_version_upgraded_from' );
delete_option( 'nf_convert_notifications_complete' );
delete_option( 'nf_convert_subs_step' );
delete_option( 'nf_upgrade_notice' );
delete_option( 'nf_update_email_settings_complete' );
delete_option( 'nf_converted_subs' );
delete_option( 'nf_convert_subs_num' );
delete_option( 'nf_email_fav_updated' );
// Remove all of our submissions
$items = get_posts( array( 'post_type' => 'nf_sub', 'post_status' => 'any', 'numberposts' => -1, 'fields' => 'ids' ) );
if ( $items ) {
foreach ( $items as $item ) {
wp_delete_post( $item, true);
}
}
// Remove all of our custom tables
$wpdb->query( 'DROP TABLE ' . NF_OBJECTS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NF_OBJECT_META_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NF_OBJECT_RELATIONSHIPS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_FIELDS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_FAV_FIELDS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_SUBS_TABLE_NAME );
// Remove our daily cron job
$timestamp = wp_next_scheduled( 'ninja_forms_daily_action' );
wp_unschedule_event( $timestamp, 'ninja_forms_daily_action' );
}
// Remove all of our custom tables
$wpdb->query( 'DROP TABLE ' . NF_OBJECTS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NF_OBJECT_META_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NF_OBJECT_RELATIONSHIPS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_FIELDS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_FAV_FIELDS_TABLE_NAME );
$wpdb->query( 'DROP TABLE ' . NINJA_FORMS_SUBS_TABLE_NAME );
// Remove our daily cron job
$timestamp = wp_next_scheduled( 'ninja_forms_daily_action' );
wp_unschedule_event( $timestamp, 'ninja_forms_daily_action' );
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment