Commit f5189b7d authored by Kevin Stover's avatar Kevin Stover

Merge branch 'release/v2.8.12'

parents 67373516 1ed3b880
......@@ -3,8 +3,8 @@
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.0.1
Stable tag: 2.8.11
Tested up to: 4.1
Stable tag: 2.8.12
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.
......
......@@ -36,7 +36,7 @@ jQuery(document).ready(function($) {
nf_columns.init();
$( '.datepicker' ).datepicker( { dateFormat: nf_sub.date_format } );
$( '.datepicker' ).datepicker( nf_sub.datepicker_args );
$( document ).on( 'change', '.nf-form-jump', function( e ) {
$( '#posts-filter' ).submit();
......@@ -57,4 +57,4 @@ jQuery(document).ready(function($) {
$( '.screen-options' ).prepend( $( '#nf-subs-screen-options' ).html() );
$( '#nf-subs-screen-options' ).remove();
});
\ No newline at end of file
});
......@@ -287,13 +287,17 @@ class NF_Notification_Email extends NF_Notification_Base_Type
if ( ! empty( $cc ) ) {
foreach ($cc as $ccemail) {
$headers[] = 'Cc: ' . $ccemail;
if ( ! empty( $ccemail ) ) {
$headers[] = 'Cc: ' . $ccemail;
}
}
}
if ( ! empty( $bcc ) ) {
foreach ($bcc as $bccemail) {
$headers[] = 'Bcc: ' . $bccemail;
if ( ! empty( $bccemail ) ) {
$headers[] = 'Bcc: ' . $bccemail;
}
}
}
......
......@@ -126,7 +126,9 @@ class NF_Notification
*/
public function process() {
$type = $this->type;
Ninja_Forms()->notification_types[ $type ]->process( $this->id );
if ( isset ( Ninja_Forms()->notification_types[ $type ] ) && is_object( Ninja_Forms()->notification_types[ $type ] ) ) {
Ninja_Forms()->notification_types[ $type ]->process( $this->id );
}
}
/**
......
......@@ -223,11 +223,16 @@ class NF_Subs_CPT {
$plugin_settings = nf_get_settings();
$date_format = ninja_forms_date_to_datepicker( $plugin_settings['date_format'] );
$datepicker_args = array();
if ( !empty( $date_format ) ) {
$datepicker_args['dateFormat'] = $date_format;
}
wp_enqueue_script( 'subs-cpt',
NF_PLUGIN_URL . 'assets/js/' . $src .'/subs-cpt' . $suffix . '.js',
array('jquery', 'jquery-ui-datepicker') );
wp_localize_script( 'subs-cpt', 'nf_sub', array( 'form_id' => $form_id, 'date_format' => $date_format ) );
wp_localize_script( 'subs-cpt', 'nf_sub', array( 'form_id' => $form_id, 'datepicker_args' => apply_filters( 'ninja_forms_admin_submissions_datepicker_args', $datepicker_args ) ) );
}
......@@ -956,6 +961,7 @@ class NF_Subs_CPT {
$args['field_id'] = $field_id;
$args['user_value'] = nf_wp_kses_post_deep( $user_value );
$args['field'] = $field;
$args['sub_id'] = $post->ID;
call_user_func_array( $edit_value_function, $args );
......@@ -1245,4 +1251,4 @@ class NF_Subs_CPT {
return $allcaps;
}
}
\ No newline at end of file
}
......@@ -601,6 +601,38 @@ a.tooltip span
box-shadow: 5px 5px 8px #CCC;
}
.nf-brand-header {
background: #EF4748;
border-left: 4px solid #424242;
}
.nf-brand-header:after {
clear: both;
content: "";
display: block;
}
.nf-brand-header .nf-logo {
background-image: url("https://ninjaforms.com/wp-content/themes/ninja-brand/images/ninja-forms-logo-header.png");
background-size: 410px 600px;
background-position: 40px 80px;
float: left;
height: 80px;
width: 410px;
}
.nf-brand-header .wpn-logo {
background: #fff;
background-image: url("../images/wpninjas-logo.png");
background-size: 83px 70px;
background-position: 0 10px;
background-repeat: no-repeat;
float: right;
font-size: 8px;
height: 80px;
width: 83px;
text-align: center;
}
.nf-extend {
float: left;
margin: 0 20px 20px 0;
......@@ -691,7 +723,7 @@ a.tooltip span
}
#wpfooter {
display: none;
/*display: none;*/
}
......@@ -747,19 +779,25 @@ p.debug-report {
.branch-3-8 #post-body .menu-item-handle,
.branch-3-9 #post-body .menu-item-handle,
.branch-4 #post-body .menu-item-handle {
.branch-4 #post-body .menu-item-handle,
.branch-4-1 #post-body .menu-item-handle,
.branch-4-2 #post-body .menu-item-handle {
background: #fff;
padding: 10px 5px 10px 10px;
}
.branch-3-8 #post-body .menu-item-settings,
.branch-3-9 #post-body .menu-item-settings,
.branch-4 #post-body .menu-item-settings {
.branch-4 #post-body .menu-item-settings,
.branch-4-1 #post-body .menu-item-settings,
.branch-4-2 #post-body .menu-item-settings {
background: #fff;
padding: 12px;
}
.branch-3-8 #post-body #post-body-content h3,
.branch-3-9 #post-body #post-body-content h3,
.branch-4 #post-body #post-body-content h3 {
.branch-4 #post-body #post-body-content h3,
.branch-4-1 #post-body #post-body-content h3,
.branch-4-2 #post-body #post-body-content h3 {
margin-top: 0;
}
/*.branch-3-8 .item-controls {
......@@ -767,6 +805,8 @@ p.debug-report {
}*/
.branch-3-8 #TB_window .item-controls,
.branch-3-9 #TB_window .item-controls,
.branch-4 #TB_window .item-controls {
.branch-4 #TB_window .item-controls,
.branch-4-1 #TB_window .item-controls,
.branch-4-2 #TB_window .item-controls {
top: -5px;
}
......@@ -147,7 +147,7 @@ function ninja_forms_output_tab_metabox($form_id = '', $slug, $metabox){
}
}
}
$value = $tmp;
$value = (!is_array ($tmp) && !is_object ($tmp)) ? $tmp : '';
}else{
if(isset($current_settings[$name])){
if(is_array($current_settings[$name])){
......
......@@ -8,6 +8,7 @@ function ninja_forms_register_tab_addons(){
'display_function' => 'ninja_forms_tab_addons',
'save_function' => '',
'show_save' => false,
'title' => '<div class="nf-brand-header"><div class="nf-logo"></div><div class="wpn-logo">brought by</div></div>',
);
ninja_forms_register_tab('extend', $args);
}
......@@ -29,7 +30,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/layout-styles/',
'plugin' => 'ninja-forms-style/ninja-forms-style.php',
'docs' => 'http://ninjaforms.com/documentation/extensions/layout-styles/',
),
),
array (
'title' => __( 'PayPal Express', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/09/paypal-express-300x121.png',
......@@ -133,7 +134,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/freshbooks/',
'plugin' => 'ninja-forms-freshbooks/ninja-forms-freshbooks.php',
'docs' => '',
),
),
array (
'title' => __( 'AWeber', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/08/aweber-300x121.png',
......@@ -141,7 +142,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/aweber/',
'plugin' => 'ninja-forms-aweber/ninja-forms-aweber.php',
'docs' => '',
),
),
array (
'title' => __( 'Picatcha', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/08/picatcha-header-300x121.png',
......@@ -149,7 +150,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/picatcha/',
'plugin' => 'ninja-forms-picatcha/ninja-forms-picatcha.php',
'docs' => 'http://ninjaforms.com/documentation/extension-docs/picatcha/',
),
),
array (
'title' => __( 'MailPoet (formerly Wysija)', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/09/mailpoet-300x121.png',
......@@ -157,7 +158,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/mailpoet/',
'plugin' => 'ninja-forms-mailpoet/nf-mailpoet.php',
'docs' => '',
),
),
array (
'title' => __( 'Text Message Notifications', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/10/text-message-notifications-300x121.png',
......@@ -197,7 +198,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/table-editor/',
'plugin' => 'ninja-forms-table-editor/ninja-forms-table-editor.php',
'docs' => 'http://ninjaforms.com/documentation/extension-docs/table-editor/',
),
),
array (
'title' => __( 'Stripe', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2013/09/stripe-300x121.png',
......@@ -214,7 +215,7 @@ function ninja_forms_tab_addons(){
'plugin' => 'ninja-forms-pop-control/PopControl.php',
'docs' => '',
),
array (
'title' => __( 'Sendy', 'ninja-forms' ),
'image' => 'http://ninjaforms.com/wp-content/uploads/edd/2014/08/sendy-300x121.png',
......@@ -270,7 +271,7 @@ function ninja_forms_tab_addons(){
'link' => 'http://ninjaforms.com/downloads/capsule-crm/',
'plugin' => 'ninja-forms-capsule-crm/ninja-forms-capsule-crm.php',
'docs' => 'http://ninjaforms.com/documentation/extension-docs/capsule-crm/',
),
),
);
shuffle( $items );
......
......@@ -37,10 +37,15 @@ function ninja_forms_admin_js(){
$date_format = ninja_forms_date_to_datepicker($date_format);
$datepicker_args = array();
if ( !empty( $date_format ) ) {
$datepicker_args['dateFormat'] = $date_format;
}
wp_enqueue_script('ninja-forms-admin',
NINJA_FORMS_URL . 'js/' . $src .'/ninja-forms-admin' . $suffix . '.js',
array('jquery', 'jquery-ui-core', 'jquery-ui-sortable', 'jquery-ui-datepicker', 'jquery-ui-draggable', 'jquery-ui-droppable'));
wp_localize_script( 'ninja-forms-admin', 'ninja_forms_settings', array('date_format' => $date_format, 'nf_ajax_nonce' => wp_create_nonce( 'nf_ajax') ) );
wp_localize_script( 'ninja-forms-admin', 'ninja_forms_settings', array( 'nf_ajax_nonce' => wp_create_nonce( 'nf_ajax'), 'datepicker_args' => apply_filters( 'ninja_forms_admin_forms_datepicker_args', $datepicker_args ) ) );
}
......@@ -244,6 +244,12 @@ function ninja_forms_display_js( $form_id, $local_vars = '' ) {
}
$date_format = ninja_forms_date_to_datepicker($date_format);
$datepicker_args = array();
if ( !empty( $date_format ) ) {
$datepicker_args['dateFormat'] = $date_format;
}
$currency_symbol = $plugin_settings['currency_symbol'];
$password_mismatch = esc_html(stripslashes($plugin_settings['password_mismatch']));
......@@ -255,7 +261,7 @@ function ninja_forms_display_js( $form_id, $local_vars = '' ) {
array( 'jquery', 'jquery-form', 'backbone', 'underscore' ) );
if( !isset( $ninja_forms_display_localize_js ) OR !$ninja_forms_display_localize_js ){
wp_localize_script( 'ninja-forms-display', 'ninja_forms_settings', array('ajax_msg_format' => $msg_format, 'password_mismatch' => $password_mismatch, 'plugin_url' => NINJA_FORMS_URL, 'date_format' => $date_format, 'currency_symbol' => $currency_symbol ) );
wp_localize_script( 'ninja-forms-display', 'ninja_forms_settings', array('ajax_msg_format' => $msg_format, 'password_mismatch' => $password_mismatch, 'plugin_url' => NINJA_FORMS_URL, 'datepicker_args' => apply_filters( 'ninja_forms_forms_display_datepicker_args', $datepicker_args ), 'currency_symbol' => $currency_symbol ) );
$ninja_forms_display_localize_js = true;
}
wp_localize_script( 'ninja-forms-display','thousandsSeparator', addslashes( $wp_locale->number_format['thousands_sep'] ) );
......
......@@ -841,7 +841,7 @@ function ninja_forms_calc_filter_list_options_span( $class, $field_id ) {
$field = $ninja_forms_processing->get_field_settings( $f_id );
}
if ( $field['type'] == '_calc' ) {
if ( isset ( $field['type'] ) && $field['type'] == '_calc' ) {
if ( isset ( $field['data']['calc_method'] ) ) {
$calc_method = $field['data']['calc_method'];
} else {
......
......@@ -446,7 +446,7 @@ function nf_get_object_parent( $child_id ) {
/**
* Get an object's type
*
*
* @since 2.8.6
* @param $object_id
* @return string $type
......@@ -520,7 +520,7 @@ function nf_get_objects_by_type( $object_type ) {
/**
* Add filters so that users given the ability to see the "All Forms" table and the add new form page
* can add new fields and delete forms.
*
*
* @since 2.8.6
* @return void
*/
......@@ -530,4 +530,17 @@ function nf_add_permissions_filters( $cap ) {
add_filter( 'nf_new_field_capabilities', 'nf_add_permissions_filters' );
add_filter( 'nf_delete_field_capabilities', 'nf_add_permissions_filters' );
add_filter( 'nf_delete_form_capabilities', 'nf_add_permissions_filters' );
\ No newline at end of file
add_filter( 'nf_delete_form_capabilities', 'nf_add_permissions_filters' );
function nf_admin_footer_text( $footer_text ) {
global $current_screen, $pagenow, $typenow;
// only display custom text on Ninja Admin Pages
if ( isset( $current_screen->id ) && strpos( $current_screen->id, 'ninja' ) !== false || ( ( $pagenow == 'edit.php' || $pagenow == 'post.php' ) && $typenow == 'nf_sub' ) ) {
return sprintf( __( 'Please rate <strong>Ninja Forms</strong> <a href="%1$s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us keep this plugin free. Thank you from the WP Ninjas team!', 'ninja-forms' ), __( 'http://wordpress.org/support/view/plugin-reviews/ninja-forms?filter=5', 'ninja-forms' ) );
} else {
return $footer_text;
}
}
add_filter( 'admin_footer_text', 'nf_admin_footer_text' , 1, 2 );
<?php
function ninja_forms_shortcode( $atts ){
if ( is_admin() ) {
if ( is_admin() && ( !defined( 'DOING_AJAX' ) || !DOING_AJAX ) ) {
$return = '[ninja_forms_display_form';
if ( is_array ( $atts ) ) {
foreach ( $atts as $key => $value ) {
......
......@@ -90,9 +90,7 @@ jQuery(document).ready(function($) {
/* * * General JS * * */
$(".ninja-forms-admin-date").datepicker({
dateFormat: ninja_forms_settings.date_format
});
$(".ninja-forms-admin-date").datepicker( ninja_forms_settings.datepicker_args );
//Select All Checkbox
$(".ninja-forms-select-all").click(function(){
......@@ -1055,4 +1053,4 @@ function ninja_forms_escape_html(html) {
var escape = document.createElement('textarea');
escape.innerHTML = html;
return escape.innerHTML;
}
\ No newline at end of file
}
......@@ -43,9 +43,7 @@ jQuery(document).ready(function(jQuery) {
}
if( jQuery.fn.datepicker ){
jQuery(".ninja-forms-datepicker").datepicker({
dateFormat: ninja_forms_settings.date_format
});
jQuery(".ninja-forms-datepicker").datepicker( ninja_forms_settings.datepicker_args );
}
if( jQuery.fn.autoNumeric ){
......
......@@ -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.8.11
Version: 2.8.12
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -263,7 +263,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '2.8.11' );
define( 'NF_PLUGIN_VERSION', '2.8.12' );
// Plugin Folder Path
if ( ! defined( 'NF_PLUGIN_DIR' ) )
......
......@@ -2,8 +2,8 @@
Contributors: kstover, jameslaws, wpnzach, daveshine, mordauk, bftrick, helgatheviking
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.0.1
Stable tag: 2.8.11
Tested up to: 4.1
Stable tag: 2.8.12
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,14 +74,20 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 2.8.11 (8 December 2014) =
= 2.8.12 (17 December 2014) =
*Bugs:*
* Fixed a bug that could cause submissions to view improperly.
* Appending forms to a post or page from the post/page edit screen should now work properly in all instances.
* Importing form from versions previous to 2.8 should no longer create a phantom email.
* Importing or duplicating a form that has submissions shouldn't cause the sequential numbers for the new form to start with the same number.
* Fixed a bug that could cause field settings to appear incorrectly on WordPress version 4.1.
* Fixed several PHP notices.
* Fetching a form over AJAX from the frontend via the shortcode should now work properly.
* Fixed a bug that prevented the NL translation from working properly.
* Fixed issues that could be caused by sending blank CC and BCC headers.
*Changes:*
* Added a rating request at the bottom of Ninja Forms pages in the admin area.
* Added filters for the datepicker args so that it is more easily customisable.
== Requested Features ==
......@@ -89,6 +95,21 @@ If you have any feature requests, please feel free to visit [ninjaforms.com](htt
== Changelog ==
= 2.8.12 (17 December 2014) =
*Bugs:*
* Fixed a bug that could cause field settings to appear incorrectly on WordPress version 4.1.
* Fixed several PHP notices.
* Fetching a form over AJAX from the frontend via the shortcode should now work properly.
* Fixed a bug that prevented the NL translation from working properly.
* Fixed issues that could be caused by sending blank CC and BCC headers.
*Changes:*
* Added a rating request at the bottom of Ninja Forms pages in the admin area.
* Added filters for the datepicker args so that it is more easily customisable.
= 2.8.11 (8 December 2014) =
*Bugs:*
......
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