Commit 489f6221 authored by Kevin Stover's avatar Kevin Stover

Merge branch 'develop'

parents aa3b1ace d123c38c
......@@ -265,7 +265,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '3.0.17' );
define( 'NF_PLUGIN_VERSION', '3.0.18' );
// Plugin Folder Path
if ( ! defined( 'NF_PLUGIN_DIR' ) )
......
......@@ -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.0.17
Version: 3.0.18
Author: The WP Ninjas
Author URI: http://ninjaforms.com
Text Domain: ninja-forms
......@@ -51,7 +51,7 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
/**
* @since 3.0
*/
const VERSION = '3.0.17';
const VERSION = '3.0.18';
/**
* @var Ninja_Forms
......@@ -701,64 +701,64 @@ if( get_option( 'ninja_forms_load_deprecated', FALSE ) && ! ( isset( $_POST[ 'nf
$migrations->nuke(TRUE, TRUE);
}
}
}
// Scheduled Action Hook
function nf_optin_send_admin_email( ) {
/*
* If we aren't opted in, or we've specifically opted out, then return false.
*/
if ( ! Ninja_Forms()->tracking->is_opted_in() || Ninja_Forms()->tracking->is_opted_out() ) {
return false;
}
// Scheduled Action Hook
function nf_optin_send_admin_email( ) {
/*
* If we aren't opted in, or we've specifically opted out, then return false.
*/
if ( ! Ninja_Forms()->tracking->is_opted_in() || Ninja_Forms()->tracking->is_opted_out() ) {
return false;
}
/*
* If we haven't already submitted our email to api.ninjaforms.com, submit it and set an option saying we have.
*/
if ( get_option ( 'ninja_forms_optin_admin_email', false ) ) {
return false;
}
/*
* If we haven't already submitted our email to api.ninjaforms.com, submit it and set an option saying we have.
*/
if ( get_option ( 'ninja_forms_optin_admin_email', false ) ) {
return false;
}
/*
* Ping api.ninjaforms.com
*/
$admin_email = get_option('admin_email');
$url = home_url();
$response = wp_remote_post(
'http://api.ninjaforms.com',
array(
'body' => array( 'admin_email' => $admin_email, 'url' => $url ),
)
);
if( is_array($response) ) {
$header = $response['headers']; // array of http header lines
$body = $response['body']; // use the content
/*
* Ping api.ninjaforms.com
*/
$admin_email = get_option('admin_email');
$url = home_url();
$response = wp_remote_post(
'http://api.ninjaforms.com',
array(
'body' => array( 'admin_email' => $admin_email, 'url' => $url ),
)
);
if( is_array($response) ) {
$header = $response['headers']; // array of http header lines
$body = $response['body']; // use the content
}
update_option( 'ninja_forms_optin_admin_email', true );
}
update_option( 'ninja_forms_optin_admin_email', true );
}
add_action( 'nf_optin_cron', 'nf_optin_send_admin_email' );
add_action( 'nf_optin_cron', 'nf_optin_send_admin_email' );
// Custom Cron Recurrences
function nf_custom_cron_job_recurrence( $schedules ) {
$schedules['nf-monthly'] = array(
'display' => __( 'Once per month', 'textdomain' ),
'interval' => 2678400,
);
return $schedules;
}
add_filter( 'cron_schedules', 'nf_custom_cron_job_recurrence' );
// Custom Cron Recurrences
function nf_custom_cron_job_recurrence( $schedules ) {
$schedules['nf-monthly'] = array(
'display' => __( 'Once per month', 'textdomain' ),
'interval' => 2678400,
);
return $schedules;
}
add_filter( 'cron_schedules', 'nf_custom_cron_job_recurrence' );
// Schedule Cron Job Event
function nf_optin_send_admin_email_cron_job() {
wp_clear_scheduled_hook( 'nf_optin_cron' );
if ( ! wp_next_scheduled( 'nf_optin_cron' ) ) {
nf_optin_send_admin_email();
wp_schedule_event( current_time( 'timestamp' ), 'nf-monthly', 'nf_optin_cron' );
// Schedule Cron Job Event
function nf_optin_send_admin_email_cron_job() {
if ( ! wp_next_scheduled( 'nf_optin_cron' ) ) {
nf_optin_send_admin_email();
wp_schedule_event( current_time( 'timestamp' ), 'nf-monthly', 'nf_optin_cron' );
}
}
}
add_action( 'wp', 'nf_optin_send_admin_email_cron_job' );
add_action( 'wp', 'nf_optin_send_admin_email_cron_job' );
}
\ No newline at end of file
......@@ -3,7 +3,7 @@ Contributors: wpninjasllc, kstover, jameslaws, kbjohnson90, klhall1987, wpnzach,
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.4
Tested up to: 4.6.1
Stable tag: 3.0.17
Stable tag: 3.0.18
License: GPLv2 or later
Drag and drop fields in an intuitive UI to create create contact forms, email subscription forms, order forms, payment forms, send emails and more!
......@@ -102,10 +102,11 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 3.0.17 (06 December 2016) =
= 3.0.18 (06 December 2016) =
*Bugs:*
* Fixed a bug with the deprecated code base and version 3.0.17.
* When using the RTE setting on the textarea field, the media button should show on all themes.
* The Modernizr library should only be loaded if you are using the RTE on the front-end.
* System date merge tag should respect the date format plugin setting.
......@@ -129,6 +130,12 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Changelog ==
= 3.0.18 (06 December 2016) =
*Bugs:*
* Fixed a bug with 3.0.17 and the deprecated code base.
= 3.0.17 (06 December 2016) =
*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