Version Description
- Removed page content selection option - Wordpress Standard/Strict
Download this release
Release Info
Developer | printfriendly |
Plugin | Print, PDF, Email by PrintFriendly |
Version | 3.4.4 |
Comparing to | |
See all releases |
Code changes from version 3.4.3 to 3.4.4
- pf.php +25 -35
- readme.txt +4 -1
pf.php
CHANGED
@@ -5,11 +5,12 @@ Plugin Name: Print Friendly and PDF
|
|
5 |
Plugin URI: http://www.printfriendly.com
|
6 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
7 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
8 |
-
Version: 3.4.
|
9 |
Author: Print Friendly
|
10 |
Author URI: http://www.PrintFriendly.com
|
11 |
|
12 |
Changelog :
|
|
|
13 |
3.4.2 - Fixed the issue occured due to new changes made in the page content selection options
|
14 |
3.4.1 - Improved page content selection options
|
15 |
3.4.0 - Fixed the admin javascript error and increased plugin text boxes size
|
@@ -129,6 +130,14 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
129 |
if ( ! is_array( $this->options ) )
|
130 |
$this->set_defaults();
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
// If the version number doesn't match, upgrade
|
133 |
if ( $this->db_version > $this->options['db_version'] )
|
134 |
$this->upgrade();
|
@@ -160,26 +169,6 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
160 |
}
|
161 |
}
|
162 |
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Returns true if the content displayed by main WP query
|
166 |
-
* @since 3.4.1
|
167 |
-
*
|
168 |
-
**/
|
169 |
-
function is_main_query_loop(){
|
170 |
-
return true;
|
171 |
-
$is_main_query_loop = false;
|
172 |
-
if( ! empty($GLOBALS['wp_the_query']->posts) ){
|
173 |
-
foreach ($GLOBALS['wp_the_query']->posts as $query_post) {
|
174 |
-
if($query_post->ID == get_the_ID() ){
|
175 |
-
$is_main_query_loop = true;
|
176 |
-
break;
|
177 |
-
}
|
178 |
-
}
|
179 |
-
}
|
180 |
-
return $is_main_query_loop;
|
181 |
-
}
|
182 |
-
|
183 |
/**
|
184 |
* Adds wraps content in pf-content class to help Printfriendly algo determine the content
|
185 |
*
|
@@ -188,11 +177,14 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
188 |
**/
|
189 |
function add_pf_content_class_around_content_hook($content = false) {
|
190 |
|
191 |
-
if( isset($this->options['pf_algo']) &&
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
194 |
} else {
|
195 |
-
|
196 |
}
|
197 |
}
|
198 |
|
@@ -340,10 +332,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
340 |
if( !$content && !$is_manual )
|
341 |
return "";
|
342 |
|
343 |
-
|
344 |
-
return $content;
|
345 |
-
|
346 |
-
$button = $this->getButton();
|
347 |
if ( $is_manual )
|
348 |
{
|
349 |
// Hook the script call now, so it only get's loaded when needed, and need is determined by the user calling pf_button
|
@@ -388,6 +377,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
388 |
}
|
389 |
$js_enabled = $this->js_enabled();
|
390 |
$analytics_code = "";
|
|
|
391 |
|
392 |
if ( $this->google_analytics_enabled() ) {
|
393 |
$title_var = "NULL";
|
@@ -637,7 +627,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
637 |
$valid_input['enable_google_analytics'] = "no";
|
638 |
}
|
639 |
|
640 |
-
if ( !isset( $input['pf_algo'] ) || !in_array( $input['pf_algo'], array( 'wp', '
|
641 |
$valid_input['pf_algo'] = "wp";
|
642 |
}
|
643 |
|
@@ -747,8 +737,8 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
747 |
'password_protected' => 'no',
|
748 |
'javascript' => 'yes',
|
749 |
'custom_css_url' => '',
|
750 |
-
|
751 |
-
|
752 |
// 'category_ids' => array('all'),
|
753 |
);
|
754 |
|
@@ -1134,6 +1124,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
1134 |
*/
|
1135 |
function config_page() {
|
1136 |
|
|
|
1137 |
// Since WP 3.2 outputs these errors by default, only display them when we're on versions older than 3.2 that do support the settings errors.
|
1138 |
global $wp_version;
|
1139 |
if(version_compare($wp_version, '3.2', '<' ) && $this->wp_version_gt30() )
|
@@ -1387,8 +1378,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
1387 |
|
1388 |
<label for="pf-algo-usage"><?php _e( 'My Page Content Selected By:', $this->hook ); ?> <span class="description no-italics" ><?php _e( 'Change this setting if your content is not showing in the preview.', $this->hook ); ?></span><br>
|
1389 |
<select id="pf-algo-usage" name="<?php echo $this->option_name; ?>[pf_algo]">
|
1390 |
-
<option value="wp" <?php $this->selected( 'pf_algo', 'wp' ); ?>> <?php _e( '
|
1391 |
-
<option value="ws" <?php $this->selected( 'pf_algo', 'ws' ); ?>> <?php _e( "Wordpress Standard/Strict", $this->hook ); ?></option>
|
1392 |
<option value="pf" <?php $this->selected( 'pf_algo', 'pf' ); ?>> <?php _e( "Content Algorithm", $this->hook ); ?></option>
|
1393 |
</select>
|
1394 |
</label>
|
@@ -1423,4 +1413,4 @@ add_shortcode( 'printfriendly', 'pf_show_link' );
|
|
1423 |
function pf_show_link() {
|
1424 |
global $printfriendly;
|
1425 |
return $printfriendly->getButton(true);
|
1426 |
-
}
|
5 |
Plugin URI: http://www.printfriendly.com
|
6 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
7 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
8 |
+
Version: 3.4.4
|
9 |
Author: Print Friendly
|
10 |
Author URI: http://www.PrintFriendly.com
|
11 |
|
12 |
Changelog :
|
13 |
+
3.4.4 - Removed page content selection option - Wordpress Standard/Strict
|
14 |
3.4.2 - Fixed the issue occured due to new changes made in the page content selection options
|
15 |
3.4.1 - Improved page content selection options
|
16 |
3.4.0 - Fixed the admin javascript error and increased plugin text boxes size
|
130 |
if ( ! is_array( $this->options ) )
|
131 |
$this->set_defaults();
|
132 |
|
133 |
+
/**
|
134 |
+
* Set page content selection option "Wordpress Standard/Strict" to "WP Template"
|
135 |
+
*/
|
136 |
+
if( isset( $this->options['pf_algo'] ) && $this->options['pf_algo'] == 'ws' ){
|
137 |
+
$this->options['pf_algo'] = 'wp';
|
138 |
+
update_option( $this->option_name, $this->options );
|
139 |
+
}
|
140 |
+
|
141 |
// If the version number doesn't match, upgrade
|
142 |
if ( $this->db_version > $this->options['db_version'] )
|
143 |
$this->upgrade();
|
169 |
}
|
170 |
}
|
171 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
/**
|
173 |
* Adds wraps content in pf-content class to help Printfriendly algo determine the content
|
174 |
*
|
177 |
**/
|
178 |
function add_pf_content_class_around_content_hook($content = false) {
|
179 |
|
180 |
+
if( isset($this->options['pf_algo']) &&
|
181 |
+
$content &&
|
182 |
+
$this->options['pf_algo'] == 'wp' &&
|
183 |
+
!$this->print_only_override($content) ) {
|
184 |
+
add_action( 'wp_footer', array( &$this, 'print_script_footer' ));
|
185 |
+
return '<div class="pf-content">'.$content.'</div>';
|
186 |
} else {
|
187 |
+
return $content;
|
188 |
}
|
189 |
}
|
190 |
|
332 |
if( !$content && !$is_manual )
|
333 |
return "";
|
334 |
|
335 |
+
$button = $this->getButton();
|
|
|
|
|
|
|
336 |
if ( $is_manual )
|
337 |
{
|
338 |
// Hook the script call now, so it only get's loaded when needed, and need is determined by the user calling pf_button
|
377 |
}
|
378 |
$js_enabled = $this->js_enabled();
|
379 |
$analytics_code = "";
|
380 |
+
$onclick = '';
|
381 |
|
382 |
if ( $this->google_analytics_enabled() ) {
|
383 |
$title_var = "NULL";
|
627 |
$valid_input['enable_google_analytics'] = "no";
|
628 |
}
|
629 |
|
630 |
+
if ( !isset( $input['pf_algo'] ) || !in_array( $input['pf_algo'], array( 'wp', 'pf' ) ) ) {
|
631 |
$valid_input['pf_algo'] = "wp";
|
632 |
}
|
633 |
|
737 |
'password_protected' => 'no',
|
738 |
'javascript' => 'yes',
|
739 |
'custom_css_url' => '',
|
740 |
+
'enable_google_analytics' => 'no',
|
741 |
+
'pf_algo' => 'wp'
|
742 |
// 'category_ids' => array('all'),
|
743 |
);
|
744 |
|
1124 |
*/
|
1125 |
function config_page() {
|
1126 |
|
1127 |
+
|
1128 |
// Since WP 3.2 outputs these errors by default, only display them when we're on versions older than 3.2 that do support the settings errors.
|
1129 |
global $wp_version;
|
1130 |
if(version_compare($wp_version, '3.2', '<' ) && $this->wp_version_gt30() )
|
1378 |
|
1379 |
<label for="pf-algo-usage"><?php _e( 'My Page Content Selected By:', $this->hook ); ?> <span class="description no-italics" ><?php _e( 'Change this setting if your content is not showing in the preview.', $this->hook ); ?></span><br>
|
1380 |
<select id="pf-algo-usage" name="<?php echo $this->option_name; ?>[pf_algo]">
|
1381 |
+
<option value="wp" <?php $this->selected( 'pf_algo', 'wp' ); ?>> <?php _e( 'WP Template', $this->hook ); ?></option>
|
|
|
1382 |
<option value="pf" <?php $this->selected( 'pf_algo', 'pf' ); ?>> <?php _e( "Content Algorithm", $this->hook ); ?></option>
|
1383 |
</select>
|
1384 |
</label>
|
1413 |
function pf_show_link() {
|
1414 |
global $printfriendly;
|
1415 |
return $printfriendly->getButton(true);
|
1416 |
+
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: printfriendly,joostdevalk, jrf
|
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.3
|
6 |
-
Stable tag: 3.4.
|
7 |
|
8 |
|
9 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
@@ -140,6 +140,9 @@ If you have any other issues with the plugin or the PrintFriendly widget, please
|
|
140 |
|
141 |
== Changelog ==
|
142 |
|
|
|
|
|
|
|
143 |
= 3.4.2 =
|
144 |
* Fixed the issue occured due to new changes made in the page content selection options
|
145 |
|
3 |
Tags: print, pdf, printer, printing, printable, widget, plugin
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: 3.4.4
|
7 |
|
8 |
|
9 |
The #1 Print and PDF button for your WordPress site. Printer Friendly pages without coding, css, or print.css. Fast, easy, and professional.
|
140 |
|
141 |
== Changelog ==
|
142 |
|
143 |
+
= 3.4.4 =
|
144 |
+
* Removed page content selection option - Wordpress Standard/Strict
|
145 |
+
|
146 |
= 3.4.2 =
|
147 |
* Fixed the issue occured due to new changes made in the page content selection options
|
148 |
|