Version Description
- Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting
- Bug - Fixed fatal error with servers using PHP5.2 or lower
- Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower
- Bug - Fixed issue with AJAX spinner showing when submitting support request
Download this release
Release Info
Developer | Blue Liquid Designs |
Plugin | Gravity PDF |
Version | 3.5.6 |
Comparing to | |
See all releases |
Code changes from version 3.5.5 to 3.5.6
- .gitignore +5 -0
- README.txt +7 -1
- model/pdf.php +3 -2
- pdf.php +20 -12
- resources/css/admin-styles.css +6 -1
- resources/css/admin-styles.min.css +1 -1
- resources/javascript/admin.js +8 -6
- resources/javascript/admin.min.js +1 -1
- view/templates/settings/changelog.php +9 -0
.gitignore
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
_notes
|
2 |
+
_notes/*
|
3 |
+
Thumbs.db
|
4 |
+
default.po
|
5 |
+
default.mo
|
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.gravityformspdfextended.com
|
|
4 |
Tags: gravity, forms, pdf, automation, attachment
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.9
|
7 |
-
Stable tag: 3.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -81,6 +81,12 @@ All FAQs can be [viewed on the Gravity Forms PDF Extended website](http://gravit
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
= 3.5.5 =
|
85 |
* Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)
|
86 |
* Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function
|
4 |
Tags: gravity, forms, pdf, automation, attachment
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.9
|
7 |
+
Stable tag: 3.5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 3.5.6 =
|
85 |
+
* Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting
|
86 |
+
* Bug - Fixed fatal error with servers using PHP5.2 or lower
|
87 |
+
* Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower
|
88 |
+
* Bug - Fixed issue with AJAX spinner showing when submitting support request
|
89 |
+
|
90 |
= 3.5.5 =
|
91 |
* Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)
|
92 |
* Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function
|
model/pdf.php
CHANGED
@@ -17,10 +17,11 @@ class GFPDF_Core_Model
|
|
17 |
public static function valid_gravity_forms()
|
18 |
{
|
19 |
$form_id = isset($_POST["gform_submit"]) ? $_POST["gform_submit"] : 0;
|
|
|
20 |
if($form_id)
|
21 |
{
|
22 |
-
$form_info = GFAPI::get_form($form_id);
|
23 |
-
$is_valid_form = $form_info && $form_info
|
24 |
|
25 |
if($is_valid_form)
|
26 |
{
|
17 |
public static function valid_gravity_forms()
|
18 |
{
|
19 |
$form_id = isset($_POST["gform_submit"]) ? $_POST["gform_submit"] : 0;
|
20 |
+
|
21 |
if($form_id)
|
22 |
{
|
23 |
+
$form_info = GFAPI::get_form($form_id);
|
24 |
+
$is_valid_form = $form_info && $form_info['is_active'];
|
25 |
|
26 |
if($is_valid_form)
|
27 |
{
|
pdf.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Gravity Forms PDF Extended
|
5 |
Plugin URI: http://www.gravityformspdfextended.com
|
6 |
Description: Gravity Forms PDF Extended allows you to save/view/download a PDF from the front- and back-end, and automate PDF creation on form submission. Our Business Plus package also allows you to overlay field onto an existing PDF.
|
7 |
-
Version: 3.5.
|
8 |
Author: Blue Liquid Designs
|
9 |
Author URI: http://www.blueliquiddesigns.com.au
|
10 |
|
@@ -33,7 +33,7 @@ GNU General Public License for more details.
|
|
33 |
/*
|
34 |
* Define our constants
|
35 |
*/
|
36 |
-
define('PDF_EXTENDED_VERSION', '3.5.
|
37 |
define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.7');
|
38 |
define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.5');
|
39 |
define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5');
|
@@ -76,7 +76,6 @@ define('GF_PDF_EXTENDED_PLUGIN_BASENAME', plugin_basename(__FILE__));
|
|
76 |
class GFPDF_Core extends PDFGenerator
|
77 |
{
|
78 |
public $render;
|
79 |
-
static $model;
|
80 |
|
81 |
/*
|
82 |
* Main Controller
|
@@ -105,13 +104,12 @@ class GFPDF_Core extends PDFGenerator
|
|
105 |
/*
|
106 |
* We'll initialise our model which will do any function checks ect
|
107 |
*/
|
108 |
-
include PDF_PLUGIN_DIR . 'model/pdf.php';
|
109 |
-
$model = self::$model = new GFPDF_Core_Model();
|
110 |
|
111 |
/*
|
112 |
* Check for any major compatibility issues early
|
113 |
*/
|
114 |
-
if(
|
115 |
{
|
116 |
/*
|
117 |
* Major compatibility errors (WP version, Gravity Forms or PHP errors)
|
@@ -134,9 +132,8 @@ class GFPDF_Core extends PDFGenerator
|
|
134 |
* - Load if on Gravity Form page on the front end
|
135 |
* - Load if receiving Paypal IPN
|
136 |
*/
|
137 |
-
if( (
|
138 |
( isset($_GET['gf_pdf']) ) ||
|
139 |
-
( RGForms::get("page") == "gf_paypal_ipn") ||
|
140 |
( isset($_POST["gform_submit"]) && GFPDF_Core_Model::valid_gravity_forms() ||
|
141 |
( defined( 'DOING_AJAX' ) && DOING_AJAX && isset($_POST['action']) && isset($_POST['gf_resend_notifications'])) )
|
142 |
)
|
@@ -159,8 +156,7 @@ class GFPDF_Core extends PDFGenerator
|
|
159 |
* Ensure the system is fully installed
|
160 |
* We run this after the 'settings' page has been set up (above)
|
161 |
*/
|
162 |
-
|
163 |
-
if($model::is_fully_installed() === false)
|
164 |
{
|
165 |
return;
|
166 |
}
|
@@ -348,8 +344,17 @@ class GFPDF_Core extends PDFGenerator
|
|
348 |
/*
|
349 |
* Configure the settings page
|
350 |
*/
|
351 |
-
wp_enqueue_style( 'pdfextended-admin-styles', PDF_PLUGIN_URL . 'resources/css/admin-styles.min.css', array('dashicons'), '1.
|
352 |
-
wp_enqueue_script( 'pdfextended-settings-script', PDF_PLUGIN_URL . 'resources/javascript/admin.min.js' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
|
354 |
/*
|
355 |
* Register our scripts/styles with Gravity Forms to prevent them being removed in no conflict mode
|
@@ -406,6 +411,9 @@ if (!function_exists('array_replace_recursive'))
|
|
406 |
// Loop through array key/value pairs
|
407 |
foreach ($array as $key => $value)
|
408 |
{
|
|
|
|
|
|
|
409 |
// Value is an array
|
410 |
if (is_array($value))
|
411 |
{
|
4 |
Plugin Name: Gravity Forms PDF Extended
|
5 |
Plugin URI: http://www.gravityformspdfextended.com
|
6 |
Description: Gravity Forms PDF Extended allows you to save/view/download a PDF from the front- and back-end, and automate PDF creation on form submission. Our Business Plus package also allows you to overlay field onto an existing PDF.
|
7 |
+
Version: 3.5.6
|
8 |
Author: Blue Liquid Designs
|
9 |
Author URI: http://www.blueliquiddesigns.com.au
|
10 |
|
33 |
/*
|
34 |
* Define our constants
|
35 |
*/
|
36 |
+
define('PDF_EXTENDED_VERSION', '3.5.6');
|
37 |
define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.7');
|
38 |
define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.5');
|
39 |
define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5');
|
76 |
class GFPDF_Core extends PDFGenerator
|
77 |
{
|
78 |
public $render;
|
|
|
79 |
|
80 |
/*
|
81 |
* Main Controller
|
104 |
/*
|
105 |
* We'll initialise our model which will do any function checks ect
|
106 |
*/
|
107 |
+
include PDF_PLUGIN_DIR . 'model/pdf.php';
|
|
|
108 |
|
109 |
/*
|
110 |
* Check for any major compatibility issues early
|
111 |
*/
|
112 |
+
if(GFPDF_Core_Model::check_major_compatibility() === false)
|
113 |
{
|
114 |
/*
|
115 |
* Major compatibility errors (WP version, Gravity Forms or PHP errors)
|
132 |
* - Load if on Gravity Form page on the front end
|
133 |
* - Load if receiving Paypal IPN
|
134 |
*/
|
135 |
+
if( ( isset($_GET['page']) && (substr($_GET['page'], 0, 3) === 'gf_') ) ||
|
136 |
( isset($_GET['gf_pdf']) ) ||
|
|
|
137 |
( isset($_POST["gform_submit"]) && GFPDF_Core_Model::valid_gravity_forms() ||
|
138 |
( defined( 'DOING_AJAX' ) && DOING_AJAX && isset($_POST['action']) && isset($_POST['gf_resend_notifications'])) )
|
139 |
)
|
156 |
* Ensure the system is fully installed
|
157 |
* We run this after the 'settings' page has been set up (above)
|
158 |
*/
|
159 |
+
if(GFPDF_Core_Model::is_fully_installed() === false)
|
|
|
160 |
{
|
161 |
return;
|
162 |
}
|
344 |
/*
|
345 |
* Configure the settings page
|
346 |
*/
|
347 |
+
wp_enqueue_style( 'pdfextended-admin-styles', PDF_PLUGIN_URL . 'resources/css/admin-styles.min.css', array('dashicons'), '1.3' );
|
348 |
+
wp_enqueue_script( 'pdfextended-settings-script', PDF_PLUGIN_URL . 'resources/javascript/admin.min.js', array(), '1.3' );
|
349 |
+
|
350 |
+
/*
|
351 |
+
* Localise admin script
|
352 |
+
*/
|
353 |
+
$localise_script = array(
|
354 |
+
'GFbaseUrl' => GFCommon::get_base_url(),
|
355 |
+
);
|
356 |
+
|
357 |
+
wp_localize_script( 'pdfextended-settings-script', 'GFPDF', $localise_script );
|
358 |
|
359 |
/*
|
360 |
* Register our scripts/styles with Gravity Forms to prevent them being removed in no conflict mode
|
411 |
// Loop through array key/value pairs
|
412 |
foreach ($array as $key => $value)
|
413 |
{
|
414 |
+
if(!isset($original[$key]))
|
415 |
+
$original[$key] = array();
|
416 |
+
|
417 |
// Value is an array
|
418 |
if (is_array($value))
|
419 |
{
|
resources/css/admin-styles.css
CHANGED
@@ -77,7 +77,12 @@ padding: 5px 4px;
|
|
77 |
}
|
78 |
|
79 |
#support-request #support-request-button {
|
80 |
-
padding:
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
#support-request textarea {
|
77 |
}
|
78 |
|
79 |
#support-request #support-request-button {
|
80 |
+
padding: 0 8px;
|
81 |
+
}
|
82 |
+
|
83 |
+
#support-request .gfspinner {
|
84 |
+
vertical-align: middle;
|
85 |
+
margin-left: 5px;
|
86 |
}
|
87 |
|
88 |
#support-request textarea {
|
resources/css/admin-styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#pdfextended-settings{margin-top:20px}#pdfextended-settings ol,#pdfextended-settings ul{margin-left:25px}#pdfextended-settings ul>li{list-style:disc}#pdfextended-settings ol>li{list-style:decimal}#pdfextended-settings ol li>ul,#pdfextended-settings ul li>ul{margin:5px 0 0 20px}#pdfextended-settings ul ul>li{list-style:circle}#pdfextended-settings ol ul>li{list-style:disc}#gform_tab_group #icon-gf_edit_forms{display:none}.detailed_pdf{clear:left;margin-bottom:3px}.detailed_pdf span{display:block;padding:2px 0 2px 2px}#support-request label{display:block;font-weight:bold}#pdf-system-status{overflow:hidden}#pdf-system-status p{clear:left}#pdf-system-status span.details,#support-request span.details{font-size:95%;color:#444;padding-top:7px;display:block}#support-request input,#support-request select{width:20em}#support-request input[type="submit"]{width:auto}#support-request textarea{width:65%;height:150px}#support-request input,#support-request textarea{padding:5px 4px}#support-request #support-request-button{padding:
|
1 |
+
#pdfextended-settings{margin-top:20px}#pdfextended-settings ol,#pdfextended-settings ul{margin-left:25px}#pdfextended-settings ul>li{list-style:disc}#pdfextended-settings ol>li{list-style:decimal}#pdfextended-settings ol li>ul,#pdfextended-settings ul li>ul{margin:5px 0 0 20px}#pdfextended-settings ul ul>li{list-style:circle}#pdfextended-settings ol ul>li{list-style:disc}#gform_tab_group #icon-gf_edit_forms{display:none}.detailed_pdf{clear:left;margin-bottom:3px}.detailed_pdf span{display:block;padding:2px 0 2px 2px}#support-request label{display:block;font-weight:bold}#pdf-system-status{overflow:hidden}#pdf-system-status p{clear:left}#pdf-system-status span.details,#support-request span.details{font-size:95%;color:#444;padding-top:7px;display:block}#support-request input,#support-request select{width:20em}#support-request input[type="submit"]{width:auto}#support-request textarea{width:65%;height:150px}#support-request input,#support-request textarea{padding:5px 4px}#support-request #support-request-button{padding:0 8px}#support-request .gfspinner{vertical-align:middle;margin-left:5px}#support-request textarea{border:1px solid #999;color:#444}#support-request :disabled,#support-request textarea:disabled{color:#CCC;border:1px solid #CCC}#support-request input.error,#support-request textarea.error,#support-request select.error{color:#d10b0b;border:1px solid #d10b0b}#support-request .icon-remove-sign{vertical-align:middle}.icon-spinner{font-size:18px;margin-left:5px}#support-request span.msg{margin-left:5px;color:#008000}#support-request span.error{margin-left:5px;color:#d10b0b}#pdfextended-settings #changelog h3{margin-top:20px}#pdfextended-settings div.notice{margin:5px 15px 2px;padding:0 .6em}#pdfextended-settings div.notice{background-color:#fff;border-left:4px solid #7ad03a;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.wrap #pdfextended-settings div.notice{margin:5px 0 15px;padding:1px 12px}div.notice p{margin:.5em 0;padding:2px}[class^="icon-"]:before,[class*=" icon-"]:before{display:inline-block;text-decoration:inherit;-webkit-font-smoothing:antialiased}[class^="icon-"],[class*=" icon-"]{background-image:none;background-position:0 0;background-repeat:repeat;display:inline;height:auto;line-height:normal;margin-top:0;vertical-align:baseline;width:auto;-webkit-font-smoothing:antialiased}[class^="icon-"],[class*=" icon-"]{font-family:"dashicons";font-style:normal;font-weight:normal;text-decoration:inherit}.icon-ok-sign,.icon-remove-sign,.icon-warning-sign{border-radius:50%;font-size:13px;margin-left:5px;color:#FFF}.icon-ok-sign{background:#008000}.icon-remove-sign{background:#d10b0b}.icon-warning-sign{background:#ff8a00}.icon-ok-sign:before{content:"\f147";padding:0 1px 0 0}.icon-remove-sign:before{content:"\f335";padding:0 1px 0 0}.icon-warning-sign:before{content:"\f107"}#pdf-system-status label,label.inline-label{float:left;width:15em}#pdf-system-status strong{display:inline-block;float:left;padding-left:15px;line-height:27px}#initialisation label{line-height:26px}@media only screen and (min-width:1000px){#pdfextended-settings .leftcolumn{width:65%;float:left}#pdfextended-settings .rightcolumn{margin-left:70%}#pdf-system-status label,label.inline-label{float:none;width:auto}#pdf-system-status strong{display:inline;float:none;vertical-align:middle}[class^="icon-"],[class*=" icon-"]{vertical-align:middle}}@media only screen and (min-width:1250px){#pdf-system-status label,label.inline-label{float:left;width:15em}#pdf-system-status strong{display:inline-block;float:left}#support-request span.details.tabbed{margin-left:16em}}
|
resources/javascript/admin.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
(function($) {
|
|
|
2 |
jQuery(document).ready(function($) {
|
3 |
jQuery('.nav-tab-contents:not(:first)').hide();
|
4 |
|
@@ -32,8 +33,10 @@
|
|
32 |
function ajax_request() {
|
33 |
/*
|
34 |
* Create an AJAX Request
|
35 |
-
*/
|
36 |
-
$('
|
|
|
|
|
37 |
$('span.msg').remove();
|
38 |
$('span.error').remove();
|
39 |
|
@@ -48,9 +51,8 @@
|
|
48 |
supportType: $('#support-type').val(),
|
49 |
comments: $('#comments').val()
|
50 |
}
|
51 |
-
})
|
52 |
-
|
53 |
-
$('.icon-spinner').remove();
|
54 |
|
55 |
if (results.error) {
|
56 |
if (results.error.email) {
|
1 |
+
(function($) {
|
2 |
+
|
3 |
jQuery(document).ready(function($) {
|
4 |
jQuery('.nav-tab-contents:not(:first)').hide();
|
5 |
|
33 |
function ajax_request() {
|
34 |
/*
|
35 |
* Create an AJAX Request
|
36 |
+
*/
|
37 |
+
var spinner = $('<img alt="Loading" class="gfspinner" src="' + GFPDF.GFbaseUrl + '/images/spinner.gif" />');
|
38 |
+
$('#support-request-button').after(spinner);
|
39 |
+
|
40 |
$('span.msg').remove();
|
41 |
$('span.error').remove();
|
42 |
|
51 |
supportType: $('#support-type').val(),
|
52 |
comments: $('#comments').val()
|
53 |
}
|
54 |
+
}).done(function(results) {
|
55 |
+
$('.gfspinner').remove();
|
|
|
56 |
|
57 |
if (results.error) {
|
58 |
if (results.error.email) {
|
resources/javascript/admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(
|
1 |
+
(function(d){jQuery(document).ready(function(e){jQuery(".nav-tab-contents:not(:first)").hide();jQuery(".nav-tab").click(function(){a(e(this));return false});if(window.location.hash){a(e('.nav-tab[href="'+window.location.hash+'"]'))}jQuery("#support-request-button").click(function(){if(c()===true){return false}else{b();return false}})});function b(){var e=d('<img alt="Loading" class="gfspinner" src="'+GFPDF.GFbaseUrl+'/images/spinner.gif" />');d("#support-request-button").after(e);d("span.msg").remove();d("span.error").remove();d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"support_request",nonce:d("#pdf_settings_nonce_field").val(),email:d("#email-address").val(),supportType:d("#support-type").val(),comments:d("#comments").val()}}).done(function(h){d(".gfspinner").remove();if(h.error){if(h.error.email){var f=d("#email-address");f.addClass("error").after(d('<span class="icon-remove-sign">'))}if(h.error.supportType){var g=d("#support-type");g.addClass("error").after(d('<span class="icon-remove-sign">'))}if(h.error.comments){var i=d("#comments");i.addClass("error").after(d('<span class="icon-remove-sign">'))}d("#support-request-button").after('<span class="error">'+h.error.msg+"</span>")}else{if(h.msg){d("#support-request-button").after('<span class="msg">'+h.msg+"</span>")}}})}function a(e){if(!e.hasClass("nav-tab-active")){jQuery(".nav-tab-active").removeClass("nav-tab-active");jQuery(".nav-tab-contents").hide();var f=e.attr("href");e.addClass("nav-tab-active");jQuery(f).show()}}function c(){var f=false;var e=d("#email-address");var g=d("#comments");e.removeClass("error");g.removeClass("error");d("#support .icon-remove-sign").remove();if(e.val().length==0){e.addClass("error").after(d('<span class="icon-remove-sign">'));f=true}if(g.val().length==0){g.addClass("error").after(d('<span class="icon-remove-sign">'));f=true}return f}})(jQuery);
|
view/templates/settings/changelog.php
CHANGED
@@ -21,6 +21,15 @@
|
|
21 |
<p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
|
22 |
|
23 |
<h3><?php echo PDF_EXTENDED_VERSION; ?></h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<ul>
|
25 |
<li>Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)</li>
|
26 |
<li>Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function</li>
|
21 |
<p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
|
22 |
|
23 |
<h3><?php echo PDF_EXTENDED_VERSION; ?></h3>
|
24 |
+
|
25 |
+
<ul>
|
26 |
+
<li>Bug - Fixed issue with last release that affected checks to see if Gravity Forms has submitting</li>
|
27 |
+
<li>Bug - Fixed fatal error with servers using PHP5.2 or lower</li>
|
28 |
+
<li>Bug - Fixed E_NOTICE for replacement array_replace_recursive() function in PHP5.2 or lower</li>
|
29 |
+
<li>Bug - Fixed issue with AJAX spinner showing when submitting support request</li>
|
30 |
+
</ul>
|
31 |
+
|
32 |
+
<h3>3.5.5</h3>
|
33 |
<ul>
|
34 |
<li>Housekeeping - Include French translation (thanks to Marie-Aude Koiransky-Ballouk)</li>
|
35 |
<li>Housekeeping - Wrap 'Initialise Fonts' text in translation ready _e() function</li>
|