Commit 5fca97bc authored by KR Moorhouse's avatar KR Moorhouse

Merged develop into feat-stage-two. Resolved merge conflicts.

parents 4508e06f 08be869f
Pipeline #651 passed with stage
in 1 minute and 10 seconds
......@@ -19,6 +19,7 @@ deploy-old.sh
tests/
vendor/
composer.lock
package-lock.json
*.sass-cache
*.scssc
......@@ -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: 4.7
Tested up to: 4.9
Stable tag: 3.3.16
Stable tag: 3.3.17
License: GPLv2 or later
With a simple drag and drop interface you can create contact forms, email subscription forms, order forms, payment forms, and any other type of form for your WordPress site.
......
assets/img/add-ons/webhooks.png

8.27 KB | W: | H:

assets/img/add-ons/webhooks.png

19 KB | W: | H:

assets/img/add-ons/webhooks.png
assets/img/add-ons/webhooks.png
assets/img/add-ons/webhooks.png
assets/img/add-ons/webhooks.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
File mode changed from 100644 to 100755
File mode changed from 100755 to 100644
......@@ -44,7 +44,7 @@ define( ['models/formModel'], function( FormModel ) {
messageBox = document.createElement( 'p' );
title = document.createElement( 'em' );
buttons = document.createElement( 'div' );
confirm = document.createElement( 'div' );
confirm = document.createElement( 'button' );
cancel = document.createElement( 'div' );
container.classList.add( 'message' );
......@@ -121,9 +121,10 @@ define( ['models/formModel'], function( FormModel ) {
} );
var btnConfirm = this.modal.container[0].getElementsByClassName('confirm')[0];
btnConfirm.addEventListener('click', function() {
btnConfirm.addEventListener('click', function( e ) {
e.preventDefault();
var deleteInputVal = document.getElementById( 'confirmDeleteFormInput' ).value;
if( 'DELETE' === deleteInputVal ) {
that.confirmDelete(view);
} else {
......
......@@ -10,7 +10,7 @@
},
{
"title":"MailChimp",
"image":"assets/img/add-ons/mailchimp-for-ninja-forms.png",
"image":"assets/img/add-ons/mail-chimp.png",
"content":"Quickly create newsletter signup forms for your MailChimp account.",
"link":"https://ninjaforms.com/extensions/mail-chimp/?utm_medium=plugin&utm_source=plugin-addons-page&utm_campaign=Ninja+Forms+Addons+Page&utm_content=MailChimp",
"plugin":"ninja-forms-mail-chimp/ninja-forms-mail-chimp.php",
......
......@@ -265,7 +265,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '3.3.16' );
define( 'NF_PLUGIN_VERSION', '3.3.17' );
// Plugin Folder Path
if ( ! defined( 'NF_PLUGIN_DIR' ) )
......
......@@ -41,20 +41,31 @@ final class NF_Admin_Menus_Addons extends NF_Abstracts_Submenu
public function display()
{
//wp_enqueue_style( 'nf-admin-addons', Ninja_Forms::$url . 'assets/css/admin-addons.css' );
// $items = wp_remote_get( 'https://ninjaforms.com/?extend_feed=jlhrbgf89734go7387o4g3h' );
// $items = wp_remote_retrieve_body( $items );
$items = file_get_contents( Ninja_Forms::$dir . '/deprecated/addons-feed.json' );
$items = json_decode( $items, true );
// Fetch our marketing feed.
$saved = get_option( 'ninja_forms_addons_feed', false );
// If we got back nothing...
if ( ! $saved ) {
// Default to the in-app file.
$items = file_get_contents( Ninja_Forms::$dir . '/deprecated/addons-feed.json' );
$items = json_decode( $items, true );
} // Otherwise... (We did get something from the db.)
else {
// Use the data we fetched.
$items = json_decode( $saved, true );
}
//shuffle( $items );
$notices = array();
foreach ($items as $item) {
foreach ($items as &$item) {
$plugin_data = array();
if( !empty( $item['plugin'] ) && file_exists( WP_PLUGIN_DIR.'/'.$item['plugin'] ) ){
$plugin_data = get_plugin_data( WP_PLUGIN_DIR.'/'.$item['plugin'], false, true );
}
if ( ! file_exists( Ninja_Forms::$dir . '/' . $item[ 'image' ] ) ) {
$item[ 'image' ] = 'assets/img/add-ons/placeholder.png';
}
$version = isset ( $plugin_data['Version'] ) ? $plugin_data['Version'] : '';
......
......@@ -10,6 +10,8 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
public $position = '35.1337';
public $ver = Ninja_Forms::VERSION;
// Stores whether or not this form has a password field.
private $legacy_password = false;
......@@ -154,10 +156,10 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
wp_enqueue_script( 'backbone-radio', Ninja_Forms::$url . 'assets/js/lib/backbone.radio.min.js', array( 'jquery', 'backbone' ) );
wp_enqueue_script( 'backbone-marionette-3', Ninja_Forms::$url . 'assets/js/lib/backbone.marionette3.min.js', array( 'jquery', 'backbone' ) );
wp_enqueue_script( 'nf-jbox', Ninja_Forms::$url . 'assets/js/lib/jBox.min.js', array( 'jquery' ) );
wp_enqueue_script( 'nf-ninjamodal', Ninja_Forms::$url . 'assets/js/lib/ninjaModal.js', array( 'jquery' ) );
wp_enqueue_script( 'nf-batch-processor', Ninja_Forms::$url . 'assets/js/lib/batch-processor.js', array( 'nf-ninjamodal' ) );
wp_enqueue_script( 'nf-ninjamodal', Ninja_Forms::$url . 'assets/js/lib/ninjaModal.js', array( 'jquery' ), $this->ver );
wp_enqueue_script( 'nf-batch-processor', Ninja_Forms::$url . 'assets/js/lib/batch-processor.js', array( 'nf-ninjamodal' ), $this->ver );
wp_enqueue_script( 'nf-moment', Ninja_Forms::$url . 'assets/js/lib/moment-with-locales.min.js', array( 'jquery', 'nf-dashboard' ) );
wp_enqueue_script( 'nf-dashboard', Ninja_Forms::$url . 'assets/js/min/dashboard.min.js', array( 'backbone-radio', 'backbone-marionette-3' ) );
wp_enqueue_script( 'nf-dashboard', Ninja_Forms::$url . 'assets/js/min/dashboard.min.js', array( 'backbone-radio', 'backbone-marionette-3' ), $this->ver );
$current_user = wp_get_current_user();
wp_localize_script( 'nf-dashboard', 'nfi18n', Ninja_Forms::config( 'i18nDashboard' ) );
......@@ -176,8 +178,8 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
'builderURL' => admin_url( 'admin.php?page=ninja-forms&form_id=' ),
) );
wp_enqueue_style( 'nf-builder', Ninja_Forms::$url . 'assets/css/builder.css' );
wp_enqueue_style( 'nf-dashboard', Ninja_Forms::$url . 'assets/css/dashboard.min.css' );
wp_enqueue_style( 'nf-builder', Ninja_Forms::$url . 'assets/css/builder.css', array(), $this->ver );
wp_enqueue_style( 'nf-dashboard', Ninja_Forms::$url . 'assets/css/dashboard.min.css', array(), $this->ver );
wp_enqueue_style( 'nf-jbox', Ninja_Forms::$url . 'assets/css/jBox.css' );
wp_enqueue_style( 'nf-font-awesome', Ninja_Forms::$url . 'assets/css/font-awesome.min.css' );
......@@ -232,7 +234,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
wp_enqueue_media();
wp_enqueue_style( 'nf-builder', Ninja_Forms::$url . 'assets/css/builder.css' );
wp_enqueue_style( 'nf-builder', Ninja_Forms::$url . 'assets/css/builder.css', array(), $this->ver );
wp_enqueue_style( 'nf-font-awesome', Ninja_Forms::$url . 'assets/css/font-awesome.min.css' );
/**
* CSS Libraries
......@@ -255,7 +257,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
wp_enqueue_script( 'jquery-perfect-scrollbar', Ninja_Forms::$url . 'assets/js/lib/perfect-scrollbar.jquery.min.js', array( 'jquery' ) );
wp_enqueue_script( 'jquery-hotkeys-new', Ninja_Forms::$url . 'assets/js/lib/jquery.hotkeys.min.js' );
wp_enqueue_script( 'jBox', Ninja_Forms::$url . 'assets/js/lib/jBox.min.js' );
wp_enqueue_script( 'nf-ninjamodal', Ninja_Forms::$url . 'assets/js/lib/ninjaModal.js', array( 'jBox' ) );
wp_enqueue_script( 'nf-ninjamodal', Ninja_Forms::$url . 'assets/js/lib/ninjaModal.js', array( 'jBox' ), $this->ver );
wp_enqueue_script( 'nf-jquery-caret', Ninja_Forms::$url . 'assets/js/lib/jquery.caret.min.js' );
wp_enqueue_script( 'speakingurl', Ninja_Forms::$url . 'assets/js/lib/speakingurl.js' );
wp_enqueue_script( 'jquery-slugify', Ninja_Forms::$url . 'assets/js/lib/slugify.min.js', array( 'jquery', 'speakingurl' ) );
......@@ -273,7 +275,7 @@ final class NF_Admin_Menus_Forms extends NF_Abstracts_Menu
wp_enqueue_script( 'summernote', Ninja_Forms::$url . 'assets/js/lib/summernote.min.js', array( 'jquery', 'speakingurl' ) );
wp_enqueue_script( 'nf-builder', Ninja_Forms::$url . 'assets/js/min/builder.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-effects-bounce', 'wp-color-picker' ) );
wp_enqueue_script( 'nf-builder', Ninja_Forms::$url . 'assets/js/min/builder.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-effects-bounce', 'wp-color-picker' ), $this->ver );
wp_localize_script( 'nf-builder', 'nfi18n', Ninja_Forms::config( 'i18nBuilder' ) );
$home_url = parse_url( home_url() );
......
......@@ -9,7 +9,7 @@ return apply_filters( 'ninja_forms_available_actions', array(
'link' => 'https://ninjaforms.com/extensions/mail-chimp/?utm_medium=plugin&utm_source=plugin&utm_campaign=Ninja+Forms+Actions+Drawer&utm_content=MailChimp',
'plugin_path' => 'ninja-forms-mail-chimp/ninja-forms-mail-chimp.php',
'modal_content' => '<div class="available-action-modal">
<img src="' . Ninja_Forms::$url . 'assets/img/add-ons/mailchimp-for-ninja-forms.png"/>
<img src="' . Ninja_Forms::$url . 'assets/img/add-ons/mail-chimp.png"/>
<p>In order to use this action, you need MailChimp for Ninja Forms.</p>
<p>The MailChimp extension allows you to quickly create newsletter signup forms for your MailChimp account using the power and flexibility that Ninja Forms provides.</p>
<div class="actions">
......
......@@ -19,5 +19,17 @@ return apply_filters( 'ninja-forms-dashboard-promotions', array(
"
),
/*
|--------------------------------------------------------------------------
| Ninja Shop
|--------------------------------------------------------------------------
|
*/
'ninja-shop' => array(
'id' => 'ninja-shop',
'content' => '<a href="https://getninjashop.com/?utm_medium=dashboard_banner&utm_source=ninja-forms&utm_campaign=Awareness" target="_blank" style="color:#FFF !important;background:#5DA54B;"><span class="dashicons dashicons-cart"></span>' . __( 'Are you frustrated with complicated eCommerce solutions?', 'ninja-forms' ) . '<br /><span class="cta">' . __( 'Start Selling Today With Ninja Shop!', 'ninja-forms' ) . '</span></a>',
'script' => "",
),
));
......@@ -81,7 +81,7 @@ $ads = array(
'type' => 'ad',
'modal-title' => 'Get MailChimp for Ninja Forms',
'modal-content' => '<div class="modal-template">
<img src="' . Ninja_Forms::$url . 'assets/img/add-ons/mailchimp-for-ninja-forms.png"/>
<img src="' . Ninja_Forms::$url . 'assets/img/add-ons/mail-chimp.png"/>
<p>In order to use this template, you need MailChimp for Ninja Forms.</p>
<p>The MailChimp extension allows you to quickly create newsletter signup forms for your MailChimp account using the power and flexibility that Ninja Forms provides.</p>
<div class="actions">
......
......@@ -35,6 +35,8 @@ final class NF_Dispatcher
*
* @since 3.2
* @return void
*
* @updated 3.3.17
*/
public function update_environment_vars() {
global $wpdb;
......@@ -73,6 +75,7 @@ final class NF_Dispatcher
$environment = array(
'nf_version' => Ninja_Forms::VERSION,
'nf_db_version' => get_option( 'ninja_forms_db_version', '1.0' ),
'wp_version' => get_bloginfo('version'),
'multisite_enabled' => $multisite_enabled,
'server_type' => $_SERVER['SERVER_SOFTWARE'],
......
......@@ -119,6 +119,10 @@
<!-- Section: Memberships -->
<script id="tmpl-nf-memberships" type="text/template">
<?php
$saved = get_option( 'ninja_forms_memberships_feed', false );
if ( ! $saved ) {
?>
<div class="widget widget-memberships">
<div class="pricing-container">
<div class="pricing-block widget">
......@@ -134,11 +138,6 @@
<span class="pricing-body-title"><?php _e( 'Unlimited Sites', 'ninja-forms' ); ?></span>
<span><?php _e( 'Updates & Support', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-money" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( '50% off recurring renewals', 'ninja-forms' ); ?></span>
<span><?php _e( 'Renews at $249.50/year', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-rocket" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( 'Fastest Support', 'ninja-forms' ); ?></span>
......@@ -175,11 +174,6 @@
<span class="pricing-body-title"><?php _e( '20 Sites', 'ninja-forms' ); ?></span>
<span><?php _e( 'Updates & Support', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-money" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( '50% off recurring renewals', 'ninja-forms' ); ?></span>
<span><?php _e( 'Renews at $99.50/year', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-plane" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( 'Faster Support', 'ninja-forms' ); ?></span>
......@@ -208,11 +202,6 @@
<span class="pricing-body-title"><?php _e( '1 Site', 'ninja-forms' ); ?></span>
<span><?php _e( 'Updates & Support', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-money" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( '50% off recurring renewals', 'ninja-forms' ); ?></span>
<span><?php _e( 'Renews at $49.50/year', 'ninja-forms' ); ?></span>
</div>
<div>
<i class="fa fa-car" aria-hidden="true"></i>
<span class="pricing-body-title"><?php _e( 'Fast Support', 'ninja-forms' ); ?></span>
......@@ -234,9 +223,14 @@
<div class="widget widget-plan-notice">
<p class="widget-title"><?php _e( 'That sounds amazing! What else comes with Ninja Forms?', 'ninja-forms' ); ?></p>
<a href="https://ninjaforms.com/features/?utm_medium=plugin&utm_source=plugin-dashboard&utm_campaign=Ninja+Forms+Memberships&utm_content=Features" target="_blank" class="nf-button primary feature-list-link"><?php _e( 'We\'re glad you asked! Checkout our full list of features!', 'ninja-forms' ); ?> <i class="fa fa-chevron-circle-right" aria-hidden="true"></i></a>
<div><em><?php _e( 'All plans include 50% discount on automatic renewals, and a 14 day money back guarantee.', 'ninja-forms' ); ?></em></div>
<div><em><?php _e( 'All plans include a 14 day money back guarantee.', 'ninja-forms' ); ?></em></div>
<div><?php _e( 'Requires a current active license and subject to our', 'ninja-forms' ); ?> <a target="_blank" href="https://ninjaforms.com/terms-conditions/?utm_medium=plugin&utm_source=plugin-dashboard&utm_campaign=Ninja+Forms+Memberships&utm_content=Terms+Conditions"><?php _e( 'Terms & Conditions', 'ninja-forms' ); ?></a>.</div>
</div>
<?php
} else {
echo( $saved );
}
?>
</script>
<!-- Section: Required Updates -->
......
......@@ -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: 3.3.16
Version: 3.3.17
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -57,7 +57,7 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
/**
* @since 3.0
*/
const VERSION = '3.3.16';
const VERSION = '3.3.17';
const WP_MIN_VERSION = '4.7';
......@@ -1085,12 +1085,24 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
}
add_action( 'nf_optin_cron', 'nf_optin_update_environment_vars' );
// Custom Cron Recurrences
/**
* Function to register our Custom Cron Recurrences.
*
* @param $schedules (Array) The available cron recurrences.
* @return (Array) The filtered cron recurrences.
*
* @since
* @updated 3.3.17
*/
function nf_custom_cron_job_recurrence( $schedules ) {
$schedules[ 'nf-monthly' ] = array(
'display' => __( 'Once per month', 'ninja-forms' ),
'interval' => 2678400,
);
$schedules[ 'nf-weekly' ] = array(
'display' => __( 'Once per week', 'ninja-forms' ),
'interval' => 604800,
);
return $schedules;
}
add_filter( 'cron_schedules', 'nf_custom_cron_job_recurrence' );
......@@ -1101,6 +1113,42 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
wp_schedule_event( current_time( 'timestamp' ), 'nf-monthly', 'nf_optin_cron' );
}
}
add_action( 'wp', 'nf_optin_send_admin_email_cron_job' );
/**
* Function called via weekly wp_cron to update our marketing feeds.
*
* @since 3.3.17
*/
function nf_update_marketing_feed() {
// Fetch our membership data.
$data = wp_remote_get( 'http://api.ninjaforms.com/feeds/?fetch=memberships' );
// If we got a valid response...
if ( 200 == $data[ 'response' ][ 'code' ] ) {
// Save the data to our option.
$data = wp_remote_retrieve_body( $data );
update_option( 'ninja_forms_memberships_feed', $data, false );
}
// Fetch our addon data.
$data = wp_remote_get( 'http://api.ninjaforms.com/feeds/?fetch=addons' );
// If we got a valid response...
if ( 200 == $data[ 'response' ][ 'code' ] ) {
// Save the data to our option.
$data = wp_remote_retrieve_body( $data );
update_option( 'ninja_forms_addons_feed', $data, false );
}
}
add_action( 'nf_marketing_feed_cron', 'nf_update_marketing_feed' );
/**
* Function called by our marketing feed cron.
*
* @since 3.3.17
*/
function nf_marketing_feed_cron_job() {
if ( ! wp_next_scheduled( 'nf_marketing_feed_cron' ) ) {
wp_schedule_event( current_time( 'timestamp' ), 'nf-weekly', 'nf_marketing_feed_cron' );
}
}
add_action( 'wp', 'nf_marketing_feed_cron_job' );
}
......@@ -3,7 +3,7 @@ Contributors: wpninjasllc, kstover, jameslaws, kbjohnson90, klhall1987, krmoorho
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: 4.7
Tested up to: 4.9
Stable tag: 3.3.16
Stable tag: 3.3.17
License: GPLv2 or later
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,36 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 3.3.16 (17 September 2018) =
= 3.3.17 (16 October 2018) =
*Bugs:*
* Resolved an issue that was sometimes causing upgrades on multi-site to delete forms from other sites on the installation.
* Corrected a bad reference in our Create a Post template documentation.
* List field values sent in an email via CSV should no longer display as NULL if their value was 0.
* Resolved a couple issues that were causing server warnings.
* Pressing the tab key while in the delete a form modal should now shift focus to the delete button.
* Resolved an issue that could have caused some display issues on the dashboard due to cached scripts.
*Changes:*
* Removed some outdated objects to improve speed of publish.
* Added modal on downgrade to prevent accidental usage.
* Password fields have been deprecated in Ninja Forms core. Some of our add-ons will still utilize them.
* Updated several of our product images on the apps & integrations tab of the dashboard.
* Our in-app marketing feed will now fetch from a remote site for more swift product updates.
* [Ninja Shop](https://getninjashop.com/?utm_medium=dashboard_banner&utm_source=ninja-forms&utm_campaign=Awareness) has arrived!
== Changelog ==
= 3.3.17 (16 October 2018) =
*Bugs:*
* Pressing the tab key while in the delete a form modal should now shift focus to the delete button.
* Resolved an issue that could have caused some display issues on the dashboard due to cached scripts.
*Changes:*
* Updated several of our product images on the apps & integrations tab of the dashboard.
* Our in-app marketing feed will now fetch from a remote site for more swift product updates.
* [Ninja Shop](https://getninjashop.com/?utm_medium=dashboard_banner&utm_source=ninja-forms&utm_campaign=Awareness) has arrived!
= 3.3.16 (17 September 2018) =
*Bugs:*
* Resolved an issue that was sometimes causing upgrades on multi-site to delete forms from other sites on the installation.
......
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