Version Description
- Bug - Correctly call javascript to control admin area 'View PDFs' drop down
- Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.
- Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages
Download this release
Release Info
Developer | Blue Liquid Designs |
Plugin | Gravity PDF |
Version | 3.3.3 |
Comparing to | |
See all releases |
Code changes from version 3.3.2.1 to 3.3.3
- README.txt +6 -2
- model/settings.php +7 -0
- pdf.php +54 -40
- view/templates/settings/changelog.php +8 -0
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.8
|
7 |
-
Stable tag: 3.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -45,7 +45,7 @@ Along with the above, the PDF software includes powerful feature such as:
|
|
45 |
|
46 |
1. PHP 5+
|
47 |
2. MB String
|
48 |
-
3. GD Library
|
49 |
4. RAM: Recommended: 128MB. Minimum: 64MB.
|
50 |
|
51 |
**Software Requirements**
|
@@ -78,6 +78,10 @@ All FAQs can be [viewed on the Gravity Forms PDF Extended website](http://gravit
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
|
|
81 |
|
82 |
= 3.3.2.1 =
|
83 |
* Bug - Incorrectly showing assigned RAM to website
|
4 |
Tags: gravity, forms, pdf, automation, attachment
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.8
|
7 |
+
Stable tag: 3.3.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
45 |
|
46 |
1. PHP 5+
|
47 |
2. MB String
|
48 |
+
3. GD Library
|
49 |
4. RAM: Recommended: 128MB. Minimum: 64MB.
|
50 |
|
51 |
**Software Requirements**
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 3.3.3 =
|
82 |
+
* Bug - Correctly call javascript to control admin area 'View PDFs' drop down
|
83 |
+
* Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.
|
84 |
+
* Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages
|
85 |
|
86 |
= 3.3.2.1 =
|
87 |
* Bug - Incorrectly showing assigned RAM to website
|
model/settings.php
CHANGED
@@ -179,6 +179,13 @@ class GFPDF_Settings_Model extends GFPDF_Settings
|
|
179 |
/* convert ini memory limit to bytes */
|
180 |
private function convert_ini_memory($size_str)
|
181 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
switch (substr ($size_str, -1))
|
183 |
{
|
184 |
case 'M': case 'm': return (int)$size_str * 1048576;
|
179 |
/* convert ini memory limit to bytes */
|
180 |
private function convert_ini_memory($size_str)
|
181 |
{
|
182 |
+
$convert = array('mb' => 'm', 'kb' => 'k', 'gb' => 'g');
|
183 |
+
|
184 |
+
foreach($convert as $k => $v)
|
185 |
+
{
|
186 |
+
$size_str = str_replace($k, $v, $size_str);
|
187 |
+
}
|
188 |
+
|
189 |
switch (substr ($size_str, -1))
|
190 |
{
|
191 |
case 'M': case 'm': return (int)$size_str * 1048576;
|
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.3.
|
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 |
-
if(!defined('PDF_EXTENDED_VERSION')) { define('PDF_EXTENDED_VERSION', '3.3.
|
37 |
if(!defined('GF_PDF_EXTENDED_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.7'); }
|
38 |
if(!defined('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.5'); }
|
39 |
if(!defined('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5'); }
|
@@ -126,6 +126,14 @@ class GFPDF_Core extends PDFGenerator
|
|
126 |
add_action('admin_init', array('GFPDF_Core', 'fully_loaded_admin'));
|
127 |
add_action('after_switch_theme', array('GFPDF_InstallUpdater', 'gf_pdf_on_switch_theme'), 10, 2);
|
128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
/*
|
130 |
* Only load the plugin if the following requirements are met:
|
131 |
* - Load on Gravity Forms Admin pages
|
@@ -185,7 +193,7 @@ class GFPDF_Core extends PDFGenerator
|
|
185 |
/* Check if on the entries page and output javascript */
|
186 |
if(is_admin() && rgget('page') == 'gf_entries')
|
187 |
{
|
188 |
-
wp_enqueue_script( 'gfpdfeentries', PDF_PLUGIN_URL . 'javascript/entries-admin.js', array('jquery') );
|
189 |
}
|
190 |
|
191 |
/*
|
@@ -218,49 +226,55 @@ class GFPDF_Core extends PDFGenerator
|
|
218 |
GFPDF_InstallUpdater::check_theme_switch();
|
219 |
}
|
220 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
/**
|
223 |
* Check to see if Gravity Forms is actually installed
|
224 |
*/
|
225 |
function gfe_admin_init()
|
226 |
{
|
227 |
-
|
228 |
-
/*
|
229 |
-
* Check if database plugin version matches current plugin version and updates if needed
|
230 |
-
*/
|
231 |
-
if(get_option('gf_pdf_extended_version') != PDF_EXTENDED_VERSION &&
|
232 |
-
(((isset($_GET['page']) && $_GET['page'] != 'gf_settings') && (isset($_GET['addon']) && $_GET['addon'] != 'PDF'))
|
233 |
-
|| empty($_GET['page'])) )
|
234 |
-
{
|
235 |
-
update_option('gf_pdf_extended_deploy', 'no');
|
236 |
-
/* redirect */
|
237 |
-
Header('Location: '.PDF_SETTINGS_URL);
|
238 |
-
exit;
|
239 |
-
}
|
240 |
-
|
241 |
-
/*
|
242 |
-
* Check if GF PDF Extended is correctly installed. If not we'll run the installer.
|
243 |
-
*/
|
244 |
-
$theme_switch = get_option('gfpdfe_switch_theme');
|
245 |
-
|
246 |
-
if( ( (get_option('gf_pdf_extended_installed') != 'installed') || (!is_dir(PDF_TEMPLATE_LOCATION)) ) && (!rgpost('upgrade') && (empty($theme_switch['old']) ) ) )
|
247 |
-
{
|
248 |
-
/*
|
249 |
-
* Prompt user to initialise plugin
|
250 |
-
*/
|
251 |
-
add_action('admin_notices', array("GFPDF_InstallUpdater", "gf_pdf_not_deployed_fresh"));
|
252 |
-
}
|
253 |
-
else
|
254 |
-
{
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Check if deployed new template files after update
|
258 |
-
*/
|
259 |
-
if( (get_option('gf_pdf_extended_deploy') == 'no' && !rgpost('upgrade') ) || (file_exists(PDF_PLUGIN_DIR .'mPDF.zip') && !rgpost('upgrade') ) ) {
|
260 |
-
/*show warning message */
|
261 |
-
add_action('admin_notices', array("GFPDF_InstallUpdater", "gf_pdf_not_deployed"));
|
262 |
-
}
|
263 |
-
}
|
264 |
|
265 |
/*
|
266 |
* Configure the settings page
|
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.3.3
|
8 |
Author: Blue Liquid Designs
|
9 |
Author URI: http://www.blueliquiddesigns.com.au
|
10 |
|
33 |
/*
|
34 |
* Define our constants
|
35 |
*/
|
36 |
+
if(!defined('PDF_EXTENDED_VERSION')) { define('PDF_EXTENDED_VERSION', '3.3.3'); }
|
37 |
if(!defined('GF_PDF_EXTENDED_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_SUPPORTED_VERSION', '1.7'); }
|
38 |
if(!defined('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_WP_SUPPORTED_VERSION', '3.5'); }
|
39 |
if(!defined('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION')) { define('GF_PDF_EXTENDED_PHP_SUPPORTED_VERSION', '5'); }
|
126 |
add_action('admin_init', array('GFPDF_Core', 'fully_loaded_admin'));
|
127 |
add_action('after_switch_theme', array('GFPDF_InstallUpdater', 'gf_pdf_on_switch_theme'), 10, 2);
|
128 |
|
129 |
+
/*
|
130 |
+
* Check if we need to deploy the software
|
131 |
+
*/
|
132 |
+
if( is_admin() )
|
133 |
+
{
|
134 |
+
self::check_deployment();
|
135 |
+
}
|
136 |
+
|
137 |
/*
|
138 |
* Only load the plugin if the following requirements are met:
|
139 |
* - Load on Gravity Forms Admin pages
|
193 |
/* Check if on the entries page and output javascript */
|
194 |
if(is_admin() && rgget('page') == 'gf_entries')
|
195 |
{
|
196 |
+
wp_enqueue_script( 'gfpdfeentries', PDF_PLUGIN_URL . 'resources/javascript/entries-admin.js', array('jquery') );
|
197 |
}
|
198 |
|
199 |
/*
|
226 |
GFPDF_InstallUpdater::check_theme_switch();
|
227 |
}
|
228 |
}
|
229 |
+
|
230 |
+
/*
|
231 |
+
* Check if the software needs to be deployed/redeployed
|
232 |
+
*/
|
233 |
+
public static function check_deployment()
|
234 |
+
{
|
235 |
+
/*
|
236 |
+
* Check if database plugin version matches current plugin version and updates if needed
|
237 |
+
*/
|
238 |
+
if(get_option('gf_pdf_extended_version') != PDF_EXTENDED_VERSION &&
|
239 |
+
(((isset($_GET['page']) && $_GET['page'] != 'gf_settings') && (isset($_GET['addon']) && $_GET['addon'] != 'PDF'))
|
240 |
+
|| empty($_GET['page'])) )
|
241 |
+
{
|
242 |
+
update_option('gf_pdf_extended_deploy', 'no');
|
243 |
+
/* redirect */
|
244 |
+
Header('Location: '.PDF_SETTINGS_URL);
|
245 |
+
exit;
|
246 |
+
}
|
247 |
+
|
248 |
+
/*
|
249 |
+
* Check if GF PDF Extended is correctly installed. If not we'll run the installer.
|
250 |
+
*/
|
251 |
+
$theme_switch = get_option('gfpdfe_switch_theme');
|
252 |
+
|
253 |
+
if( ( (get_option('gf_pdf_extended_installed') != 'installed') || (!is_dir(PDF_TEMPLATE_LOCATION)) ) && (!rgpost('upgrade') && (empty($theme_switch['old']) ) ) )
|
254 |
+
{
|
255 |
+
/*
|
256 |
+
* Prompt user to initialise plugin
|
257 |
+
*/
|
258 |
+
add_action('admin_notices', array("GFPDF_InstallUpdater", "gf_pdf_not_deployed_fresh"));
|
259 |
+
}
|
260 |
+
else
|
261 |
+
{
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Check if deployed new template files after update
|
265 |
+
*/
|
266 |
+
if( (get_option('gf_pdf_extended_deploy') == 'no' && !rgpost('upgrade') ) || (file_exists(PDF_PLUGIN_DIR .'mPDF.zip') && !rgpost('upgrade') ) ) {
|
267 |
+
/*show warning message */
|
268 |
+
add_action('admin_notices', array("GFPDF_InstallUpdater", "gf_pdf_not_deployed"));
|
269 |
+
}
|
270 |
+
}
|
271 |
+
}
|
272 |
|
273 |
/**
|
274 |
* Check to see if Gravity Forms is actually installed
|
275 |
*/
|
276 |
function gfe_admin_init()
|
277 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
|
279 |
/*
|
280 |
* Configure the settings page
|
view/templates/settings/changelog.php
CHANGED
@@ -19,6 +19,14 @@
|
|
19 |
<h2><?php _e('Changelog'); ?></h2>
|
20 |
|
21 |
<p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
<h3>3.3.2.1</h3>
|
23 |
<ul>
|
24 |
<li>Bug - Incorrectly showing assigned RAM to website</li>
|
19 |
<h2><?php _e('Changelog'); ?></h2>
|
20 |
|
21 |
<p><strong>Current Version: <?php echo PDF_EXTENDED_VERSION; ?></strong></p>
|
22 |
+
|
23 |
+
<h3>3.3.3</h3>
|
24 |
+
<ul>
|
25 |
+
<li>Bug - Correctly call javascript to control admin area 'View PDFs' drop down</li>
|
26 |
+
<li>Bug - Some users still reported incorrect RAM. Convert MB/KB/GB values to M/K/G as per the PHP documentation.</li>
|
27 |
+
<li>Housekeeping - Show initilisation prompt on all admin area pages instead of only on the Gravity Forms pages</li>
|
28 |
+
</ul>
|
29 |
+
|
30 |
<h3>3.3.2.1</h3>
|
31 |
<ul>
|
32 |
<li>Bug - Incorrectly showing assigned RAM to website</li>
|