Commit 4a408c7b authored by Kevin Stover's avatar Kevin Stover

Merge branch 'develop'

parents 60bf46e0 6267f2bd
......@@ -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: 4.5
Tested up to: 4.7
Stable tag: 3.0.23
Tested up to: 4.7.1
Stable tag: 3.0.24
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.
......
......@@ -17,6 +17,7 @@ function ninja_forms_register_field_recaptcha() {
'edit_custom_class' => false,
'edit_help' => false,
'edit_meta' => false,
'sidebar' => 'template_fields',
'edit_conditional' => true,
'conditional' => array(
'action' => array(
......@@ -50,22 +51,15 @@ function ninja_forms_field_recaptcha_display( $field_id, $data, $form_id = '' )
$lang = $settings['recaptcha_lang'];
$siteKey = $settings['recaptcha_site_key'];
$field_class = ninja_forms_get_field_class( $field_id, $form_id );
$rand = wp_rand(0, 99999);
wp_enqueue_script(
'g-recaptcha',
'https://www.google.com/recaptcha/api.js?onload=ninja_forms_grecaptcha_explicit_render&render=explicit&hl='.$lang,
array( 'ninja-forms-display' ) );
if ( !empty( $siteKey ) ) { ?>
<input id="ninja_forms_field_<?php echo $rand;?>" name="ninja_forms_field_<?php echo
$field_id;?>" type="hidden" class="<?php echo $field_class;?>" value="" rel="<?php echo $field_id;?>"
/>
<div class="g-recaptcha" data-callback="nf_recaptcha_set_field_value"
data-sitekey="<?php echo $siteKey; ?>"></div>
<input id="ninja_forms_field_<?php echo $field_id;?>" name="ninja_forms_field_<?php echo $field_id;?>" type="hidden" class="<?php echo $field_class;?>" value="" rel="<?php echo $field_id;?>" />
<div class="g-recaptcha" data-callback="nf_recaptcha_set_field_value" data-sitekey="<?php echo $siteKey; ?>"></div>
<script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang; ?>"> </script>
<script type="text/javascript">
function nf_recaptcha_set_field_value(inpval){
jQuery("#ninja_forms_field_<?php echo $rand;?>").val(inpval);
}
</script>
function nf_recaptcha_set_field_value(inpval){
jQuery("#ninja_forms_field_<?php echo $field_id;?>").val(inpval)
}
</script>
<?php
}
}
......
......@@ -999,11 +999,3 @@ function ninja_forms_var_operator(op) {
}
}
}
function ninja_forms_grecaptcha_explicit_render(){
jQuery('.g-recaptcha').each(function(){
grecaptcha.render(this, {
'sitekey':jQuery(this).data('sitekey')
});
});
}
\ No newline at end of file
......@@ -265,7 +265,7 @@ class Ninja_Forms {
// Plugin version
if ( ! defined( 'NF_PLUGIN_VERSION' ) )
define( 'NF_PLUGIN_VERSION', '3.0.23' );
define( 'NF_PLUGIN_VERSION', '3.0.24' );
// 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.23
Version: 3.0.24
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.23';
const VERSION = '3.0.24';
/**
* @var Ninja_Forms
......
......@@ -2,8 +2,8 @@
Contributors: wpninjasllc, kstover, jameslaws, kbjohnson90, klhall1987, wpnzach, aman086, 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: 4.5
Tested up to: 4.7
Stable tag: 3.0.23
Tested up to: 4.7.1
Stable tag: 3.0.24
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,14 +102,20 @@ For help and video tutorials, please visit our website: [Ninja Forms Documentati
== Upgrade Notice ==
= 3.0.23 (12 January 2017) =
= 3.0.24 (15 January 2017) =
*Bugs:*
* Fixed a bug with form duplication.
* Fixed a bug with Google reCaptcha and the deprecated, 2.9.x codebase.
== Changelog ==
= 3.0.24 (15 January 2017) =
*Bugs:*
* Fixed a bug with Google reCaptcha and the deprecated, 2.9.x codebase.
= 3.0.23 (12 January 2017) =
*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