Version Description
- Bugfixes
- Tested against WP 5.7
Download this release
Release Info
| Developer | printfriendly |
| Plugin | |
| Version | 4.1 |
| Comparing to | |
| See all releases | |
Code changes from version 4.0.1 to 4.1
- assets/js/admin.js +10 -0
- languages/printfriendly.pot +46 -46
- pf.php +25 -8
- readme.txt +6 -2
- views/settings.php +2 -0
- views/tabs.php +4 -4
assets/js/admin.js
CHANGED
|
@@ -4,11 +4,21 @@
|
|
| 4 |
initAll();
|
| 5 |
});
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
function initAll() {
|
| 8 |
$('#pf-tabs').tabs({
|
|
|
|
| 9 |
activate: function( event, ui ) {
|
| 10 |
$(ui.oldTab).removeClass('pf-bu-is-active');
|
| 11 |
$(ui.newTab).addClass('pf-bu-is-active');
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
}
|
| 13 |
});
|
| 14 |
|
| 4 |
initAll();
|
| 5 |
});
|
| 6 |
|
| 7 |
+
$(window).load(function() {
|
| 8 |
+
// load the tab from where the settings was saved.
|
| 9 |
+
$('#pf-tabs .pf-bu-tabs li[data-id="' + $('#current-tab').val() + '"]').trigger('click');
|
| 10 |
+
});
|
| 11 |
+
|
| 12 |
function initAll() {
|
| 13 |
$('#pf-tabs').tabs({
|
| 14 |
+
active: $('#current-tab').val(),
|
| 15 |
activate: function( event, ui ) {
|
| 16 |
$(ui.oldTab).removeClass('pf-bu-is-active');
|
| 17 |
$(ui.newTab).addClass('pf-bu-is-active');
|
| 18 |
+
|
| 19 |
+
// set the current tab so that when the page is reloaded after save
|
| 20 |
+
// we know which tab to activate
|
| 21 |
+
$('#current-tab').val($(ui.newTab).attr('data-id'));
|
| 22 |
}
|
| 23 |
});
|
| 24 |
|
languages/printfriendly.pot
CHANGED
|
@@ -2,177 +2,177 @@
|
|
| 2 |
# This file is distributed under the same license as the Print, PDF & Email by PrintFriendly package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: Print, PDF & Email by PrintFriendly
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-printfriendly\n"
|
| 7 |
-
"POT-Creation-Date: 2021-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
"Last-Translator: PrintFriendly Translate Team <support@printfriendly.com>\n"
|
| 12 |
"Language-Team: PrintFriendly Translate Team <support@printfriendly.com>\n"
|
| 13 |
|
| 14 |
-
#: pf.php:
|
| 15 |
msgid ""
|
| 16 |
"No valid custom image url received, please enter a valid url to use a "
|
| 17 |
"custom image."
|
| 18 |
msgstr ""
|
| 19 |
|
| 20 |
-
#: pf.php:
|
| 21 |
msgid "The text size you entered is invalid, please stay between 9px and 25px"
|
| 22 |
msgstr ""
|
| 23 |
|
| 24 |
-
#: pf.php:
|
| 25 |
msgid ""
|
| 26 |
"The color you entered is not valid, it must be a valid hexadecimal RGB font "
|
| 27 |
"color."
|
| 28 |
msgstr ""
|
| 29 |
|
| 30 |
-
#: pf.php:
|
| 31 |
msgid ""
|
| 32 |
"No valid custom logo url received, please enter a valid url to use a custom "
|
| 33 |
"logo."
|
| 34 |
msgstr ""
|
| 35 |
|
| 36 |
-
#: pf.php:
|
| 37 |
msgid "PrintFriendly Options"
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
-
#: pf.php:
|
| 41 |
msgid "Print Friendly & PDF"
|
| 42 |
msgstr ""
|
| 43 |
|
| 44 |
-
#: pf.php:
|
| 45 |
msgid "Custom Image"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
-
#: pf.php:
|
| 49 |
msgid "Use Image"
|
| 50 |
msgstr ""
|
| 51 |
|
| 52 |
-
#: pf.php:
|
| 53 |
msgid "Invalid Image URL"
|
| 54 |
msgstr ""
|
| 55 |
|
| 56 |
-
#: pf.php:
|
| 57 |
msgid "Activation"
|
| 58 |
msgstr ""
|
| 59 |
|
| 60 |
-
#: pf.php:
|
| 61 |
msgid "Checking status"
|
| 62 |
msgstr ""
|
| 63 |
|
| 64 |
-
#: pf.php:
|
| 65 |
msgid "Activate"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
-
#: pf.php:
|
| 69 |
msgid "Active Trial"
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
-
#: pf.php:
|
| 73 |
msgid "Active"
|
| 74 |
msgstr ""
|
| 75 |
|
| 76 |
-
#: pf.php:
|
| 77 |
msgid "Expired"
|
| 78 |
msgstr ""
|
| 79 |
|
| 80 |
-
#: pf.php:
|
| 81 |
msgid "Please check Internet connection."
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
-
#: pf.php:
|
| 85 |
msgid "Settings"
|
| 86 |
msgstr ""
|
| 87 |
|
| 88 |
-
#: pf.php:
|
| 89 |
#: views/tabs.php:365 views/tabs.php:397
|
| 90 |
msgid "Documentation"
|
| 91 |
msgstr ""
|
| 92 |
|
| 93 |
-
#: pf.php:
|
| 94 |
msgid "Custom Button"
|
| 95 |
msgstr ""
|
| 96 |
|
| 97 |
-
#: pf.php:
|
| 98 |
msgid "Only display when post is in:"
|
| 99 |
msgstr ""
|
| 100 |
|
| 101 |
-
#: pf.php:
|
| 102 |
msgid ""
|
| 103 |
"You are currently using %1$s%2$s%3$s. You can copy copy its contents into "
|
| 104 |
"the textbox if you want to update the styles."
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
-
#: views/pro.php:
|
| 108 |
msgid "Learn more"
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
-
#: views/pro.php:
|
| 112 |
msgid "Email"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
-
#: views/pro.php:
|
| 116 |
msgid "To send account details"
|
| 117 |
msgstr ""
|
| 118 |
|
| 119 |
-
#: views/pro.php:
|
| 120 |
msgid "Email is invalid"
|
| 121 |
msgstr ""
|
| 122 |
|
| 123 |
-
#: views/pro.php:
|
| 124 |
msgid "Website Domain"
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
-
#: views/pro.php:
|
| 128 |
msgid "Domain is invalid"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
-
#: views/pro.php:
|
| 132 |
msgid "Free 30 days trial, no credit card required."
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
-
#: views/pro.php:
|
| 136 |
msgid "Buy Now"
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
-
#: views/pro.php:
|
| 140 |
msgid "Last Checked"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
-
#: views/pro.php:
|
| 144 |
msgid "Please wait"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
-
#: views/pro.php:
|
| 148 |
msgid "Pro Features"
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
-
#: views/pro.php:
|
| 152 |
msgid "Faster, better experience for end-user"
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
-
#: views/pro.php:
|
| 156 |
msgid "Cache-free, so any updates are instantly included"
|
| 157 |
msgstr ""
|
| 158 |
|
| 159 |
-
#: views/pro.php:
|
| 160 |
msgid "Ad-Free for companies and organizations"
|
| 161 |
msgstr ""
|
| 162 |
|
| 163 |
-
#: views/pro.php:
|
| 164 |
msgid "Works on all sites (Password protected, Angular/React/Ember)"
|
| 165 |
msgstr ""
|
| 166 |
|
| 167 |
-
#: views/pro.php:
|
| 168 |
msgid "Email support"
|
| 169 |
msgstr ""
|
| 170 |
|
| 171 |
-
#: views/pro.php:
|
| 172 |
msgid "Have a development/staging domain?"
|
| 173 |
msgstr ""
|
| 174 |
|
| 175 |
-
#: views/pro.php:
|
| 176 |
msgid "Add Free Development Domain"
|
| 177 |
msgstr ""
|
| 178 |
|
|
@@ -180,19 +180,19 @@ msgstr ""
|
|
| 180 |
msgid "Print Friendly & PDF Settings"
|
| 181 |
msgstr ""
|
| 182 |
|
| 183 |
-
#: views/settings.php:
|
| 184 |
msgid ""
|
| 185 |
"If you like <strong>PrintFriendly</strong> please leave us a %s rating. A "
|
| 186 |
"huge thanks in advance!"
|
| 187 |
msgstr ""
|
| 188 |
|
| 189 |
-
#: views/settings.php:
|
| 190 |
msgid ""
|
| 191 |
"Need professional options for your corporate, education, or agency "
|
| 192 |
"developed website? Check out"
|
| 193 |
msgstr ""
|
| 194 |
|
| 195 |
-
#: views/settings.php:
|
| 196 |
msgid "Need help or have suggestions?"
|
| 197 |
msgstr ""
|
| 198 |
|
|
@@ -481,13 +481,13 @@ msgstr ""
|
|
| 481 |
#: views/tabs.php:477
|
| 482 |
msgid ""
|
| 483 |
"Customize the styles of the printed/pdf page using your own CSS. Create "
|
| 484 |
-
"your custom CSS, and put the URL to your Custom CSS file in the box
|
| 485 |
msgstr ""
|
| 486 |
|
| 487 |
#: views/tabs.php:479
|
| 488 |
msgid ""
|
| 489 |
"Customize the styles of the printed/pdf page using your own CSS. Add your "
|
| 490 |
-
"custom CSS (without the %s tags) in the box
|
| 491 |
msgstr ""
|
| 492 |
|
| 493 |
#: views/tabs.php:504
|
| 2 |
# This file is distributed under the same license as the Print, PDF & Email by PrintFriendly package.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: Print, PDF & Email by PrintFriendly 4.0.1\n"
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-printfriendly\n"
|
| 7 |
+
"POT-Creation-Date: 2021-02-12 06:27:07+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 11 |
"Last-Translator: PrintFriendly Translate Team <support@printfriendly.com>\n"
|
| 12 |
"Language-Team: PrintFriendly Translate Team <support@printfriendly.com>\n"
|
| 13 |
|
| 14 |
+
#: pf.php:518
|
| 15 |
msgid ""
|
| 16 |
"No valid custom image url received, please enter a valid url to use a "
|
| 17 |
"custom image."
|
| 18 |
msgstr ""
|
| 19 |
|
| 20 |
+
#: pf.php:526
|
| 21 |
msgid "The text size you entered is invalid, please stay between 9px and 25px"
|
| 22 |
msgstr ""
|
| 23 |
|
| 24 |
+
#: pf.php:534
|
| 25 |
msgid ""
|
| 26 |
"The color you entered is not valid, it must be a valid hexadecimal RGB font "
|
| 27 |
"color."
|
| 28 |
msgstr ""
|
| 29 |
|
| 30 |
+
#: pf.php:594
|
| 31 |
msgid ""
|
| 32 |
"No valid custom logo url received, please enter a valid url to use a custom "
|
| 33 |
"logo."
|
| 34 |
msgstr ""
|
| 35 |
|
| 36 |
+
#: pf.php:665
|
| 37 |
msgid "PrintFriendly Options"
|
| 38 |
msgstr ""
|
| 39 |
|
| 40 |
+
#: pf.php:665
|
| 41 |
msgid "Print Friendly & PDF"
|
| 42 |
msgstr ""
|
| 43 |
|
| 44 |
+
#: pf.php:695 views/tabs.php:270
|
| 45 |
msgid "Custom Image"
|
| 46 |
msgstr ""
|
| 47 |
|
| 48 |
+
#: pf.php:696
|
| 49 |
msgid "Use Image"
|
| 50 |
msgstr ""
|
| 51 |
|
| 52 |
+
#: pf.php:697
|
| 53 |
msgid "Invalid Image URL"
|
| 54 |
msgstr ""
|
| 55 |
|
| 56 |
+
#: pf.php:709
|
| 57 |
msgid "Activation"
|
| 58 |
msgstr ""
|
| 59 |
|
| 60 |
+
#: pf.php:710
|
| 61 |
msgid "Checking status"
|
| 62 |
msgstr ""
|
| 63 |
|
| 64 |
+
#: pf.php:711 views/pro.php:45
|
| 65 |
msgid "Activate"
|
| 66 |
msgstr ""
|
| 67 |
|
| 68 |
+
#: pf.php:712
|
| 69 |
msgid "Active Trial"
|
| 70 |
msgstr ""
|
| 71 |
|
| 72 |
+
#: pf.php:713
|
| 73 |
msgid "Active"
|
| 74 |
msgstr ""
|
| 75 |
|
| 76 |
+
#: pf.php:714
|
| 77 |
msgid "Expired"
|
| 78 |
msgstr ""
|
| 79 |
|
| 80 |
+
#: pf.php:715
|
| 81 |
msgid "Please check Internet connection."
|
| 82 |
msgstr ""
|
| 83 |
|
| 84 |
+
#: pf.php:743
|
| 85 |
msgid "Settings"
|
| 86 |
msgstr ""
|
| 87 |
|
| 88 |
+
#: pf.php:766 views/tabs.php:37 views/tabs.php:234 views/tabs.php:311
|
| 89 |
#: views/tabs.php:365 views/tabs.php:397
|
| 90 |
msgid "Documentation"
|
| 91 |
msgstr ""
|
| 92 |
|
| 93 |
+
#: pf.php:1112 views/tabs.php:93
|
| 94 |
msgid "Custom Button"
|
| 95 |
msgstr ""
|
| 96 |
|
| 97 |
+
#: pf.php:1293
|
| 98 |
msgid "Only display when post is in:"
|
| 99 |
msgstr ""
|
| 100 |
|
| 101 |
+
#: pf.php:1385
|
| 102 |
msgid ""
|
| 103 |
"You are currently using %1$s%2$s%3$s. You can copy copy its contents into "
|
| 104 |
"the textbox if you want to update the styles."
|
| 105 |
msgstr ""
|
| 106 |
|
| 107 |
+
#: views/pro.php:18
|
| 108 |
msgid "Learn more"
|
| 109 |
msgstr ""
|
| 110 |
|
| 111 |
+
#: views/pro.php:30 views/tabs.php:405
|
| 112 |
msgid "Email"
|
| 113 |
msgstr ""
|
| 114 |
|
| 115 |
+
#: views/pro.php:30
|
| 116 |
msgid "To send account details"
|
| 117 |
msgstr ""
|
| 118 |
|
| 119 |
+
#: views/pro.php:33
|
| 120 |
msgid "Email is invalid"
|
| 121 |
msgstr ""
|
| 122 |
|
| 123 |
+
#: views/pro.php:38
|
| 124 |
msgid "Website Domain"
|
| 125 |
msgstr ""
|
| 126 |
|
| 127 |
+
#: views/pro.php:41
|
| 128 |
msgid "Domain is invalid"
|
| 129 |
msgstr ""
|
| 130 |
|
| 131 |
+
#: views/pro.php:46
|
| 132 |
msgid "Free 30 days trial, no credit card required."
|
| 133 |
msgstr ""
|
| 134 |
|
| 135 |
+
#: views/pro.php:50
|
| 136 |
msgid "Buy Now"
|
| 137 |
msgstr ""
|
| 138 |
|
| 139 |
+
#: views/pro.php:55
|
| 140 |
msgid "Last Checked"
|
| 141 |
msgstr ""
|
| 142 |
|
| 143 |
+
#: views/pro.php:61
|
| 144 |
msgid "Please wait"
|
| 145 |
msgstr ""
|
| 146 |
|
| 147 |
+
#: views/pro.php:70
|
| 148 |
msgid "Pro Features"
|
| 149 |
msgstr ""
|
| 150 |
|
| 151 |
+
#: views/pro.php:72
|
| 152 |
msgid "Faster, better experience for end-user"
|
| 153 |
msgstr ""
|
| 154 |
|
| 155 |
+
#: views/pro.php:73
|
| 156 |
msgid "Cache-free, so any updates are instantly included"
|
| 157 |
msgstr ""
|
| 158 |
|
| 159 |
+
#: views/pro.php:74
|
| 160 |
msgid "Ad-Free for companies and organizations"
|
| 161 |
msgstr ""
|
| 162 |
|
| 163 |
+
#: views/pro.php:75
|
| 164 |
msgid "Works on all sites (Password protected, Angular/React/Ember)"
|
| 165 |
msgstr ""
|
| 166 |
|
| 167 |
+
#: views/pro.php:76
|
| 168 |
msgid "Email support"
|
| 169 |
msgstr ""
|
| 170 |
|
| 171 |
+
#: views/pro.php:78
|
| 172 |
msgid "Have a development/staging domain?"
|
| 173 |
msgstr ""
|
| 174 |
|
| 175 |
+
#: views/pro.php:78
|
| 176 |
msgid "Add Free Development Domain"
|
| 177 |
msgstr ""
|
| 178 |
|
| 180 |
msgid "Print Friendly & PDF Settings"
|
| 181 |
msgstr ""
|
| 182 |
|
| 183 |
+
#: views/settings.php:16
|
| 184 |
msgid ""
|
| 185 |
"If you like <strong>PrintFriendly</strong> please leave us a %s rating. A "
|
| 186 |
"huge thanks in advance!"
|
| 187 |
msgstr ""
|
| 188 |
|
| 189 |
+
#: views/settings.php:18
|
| 190 |
msgid ""
|
| 191 |
"Need professional options for your corporate, education, or agency "
|
| 192 |
"developed website? Check out"
|
| 193 |
msgstr ""
|
| 194 |
|
| 195 |
+
#: views/settings.php:20
|
| 196 |
msgid "Need help or have suggestions?"
|
| 197 |
msgstr ""
|
| 198 |
|
| 481 |
#: views/tabs.php:477
|
| 482 |
msgid ""
|
| 483 |
"Customize the styles of the printed/pdf page using your own CSS. Create "
|
| 484 |
+
"your custom CSS, and put the URL to your Custom CSS file in the box above"
|
| 485 |
msgstr ""
|
| 486 |
|
| 487 |
#: views/tabs.php:479
|
| 488 |
msgid ""
|
| 489 |
"Customize the styles of the printed/pdf page using your own CSS. Add your "
|
| 490 |
+
"custom CSS (without the %s tags) in the box above"
|
| 491 |
msgstr ""
|
| 492 |
|
| 493 |
#: views/tabs.php:504
|
pf.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
Plugin URI: http://www.printfriendly.com
|
| 5 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
| 6 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
| 7 |
-
Version: 4.
|
| 8 |
Author: Print, PDF, & Email by PrintFriendly
|
| 9 |
Author URI: http://www.printfriendly.com
|
| 10 |
Domain Path: /languages
|
|
@@ -32,7 +32,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 32 |
*
|
| 33 |
* @var string
|
| 34 |
*/
|
| 35 |
-
var $plugin_version = '4.
|
| 36 |
|
| 37 |
/**
|
| 38 |
* The hook, used for text domain as well as hooks on pages and in get requests for admin.
|
|
@@ -235,6 +235,11 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 235 |
@media print {
|
| 236 |
.printfriendly {display: none}
|
| 237 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 238 |
</style>
|
| 239 |
<?php
|
| 240 |
}
|
|
@@ -284,11 +289,6 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 284 |
function show_link_on_content( $content ) {
|
| 285 |
$content = $this->show_link( $content, true );
|
| 286 |
|
| 287 |
-
$styles = '.pf-button.pf-button-excerpt { display: none; }';
|
| 288 |
-
|
| 289 |
-
// hide the excerpt button in case it is available so that 2 buttons do not show.
|
| 290 |
-
$content .= '<style>' . apply_filters( 'printfriendly_styles', $styles, 'content' ) . '</style>';
|
| 291 |
-
|
| 292 |
return $content;
|
| 293 |
}
|
| 294 |
|
|
@@ -648,6 +648,11 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 648 |
/* Database version */
|
| 649 |
$valid_input['db_version'] = $this->db_version;
|
| 650 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 651 |
return $valid_input;
|
| 652 |
}
|
| 653 |
|
|
@@ -1375,7 +1380,7 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 1375 |
*/
|
| 1376 |
function get_custom_css_upgrade_message() {
|
| 1377 |
// upgrading from a version that was using urls instead of the textarea?
|
| 1378 |
-
if ( isset( $this->options['custom_css_url'] ) ) {
|
| 1379 |
$css_url = $this->options['custom_css_url'];
|
| 1380 |
return sprintf( __( 'You are currently using %1$s%2$s%3$s. You can copy copy its contents into the textbox if you want to update the styles.', 'printfriendly' ), '<a href="' . $css_url . '" target="_blank">', $css_url, '</a>' );
|
| 1381 |
}
|
|
@@ -1398,6 +1403,18 @@ if ( ! class_exists( 'PrintFriendly_WordPress' ) ) {
|
|
| 1398 |
|
| 1399 |
include_once PRINTFRIENDLY_BASEPATH . '/views/settings.php';
|
| 1400 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1401 |
}
|
| 1402 |
$printfriendly = new PrintFriendly_WordPress();
|
| 1403 |
}
|
| 4 |
Plugin URI: http://www.printfriendly.com
|
| 5 |
Description: PrintFriendly & PDF button for your website. Optimizes your pages and brand for print, pdf, and email.
|
| 6 |
Name and URL are included to ensure repeat visitors and new visitors when printed versions are shared.
|
| 7 |
+
Version: 4.1
|
| 8 |
Author: Print, PDF, & Email by PrintFriendly
|
| 9 |
Author URI: http://www.printfriendly.com
|
| 10 |
Domain Path: /languages
|
| 32 |
*
|
| 33 |
* @var string
|
| 34 |
*/
|
| 35 |
+
var $plugin_version = '4.1';
|
| 36 |
|
| 37 |
/**
|
| 38 |
* The hook, used for text domain as well as hooks on pages and in get requests for admin.
|
| 235 |
@media print {
|
| 236 |
.printfriendly {display: none}
|
| 237 |
}
|
| 238 |
+
|
| 239 |
+
.pf-button.pf-button-excerpt {
|
| 240 |
+
display: none;
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
</style>
|
| 244 |
<?php
|
| 245 |
}
|
| 289 |
function show_link_on_content( $content ) {
|
| 290 |
$content = $this->show_link( $content, true );
|
| 291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
return $content;
|
| 293 |
}
|
| 294 |
|
| 648 |
/* Database version */
|
| 649 |
$valid_input['db_version'] = $this->db_version;
|
| 650 |
|
| 651 |
+
// set the current tab from where the settings were saved from
|
| 652 |
+
if ( isset( $_POST['tab'] ) ) {
|
| 653 |
+
set_transient( 'pf-tab', $_POST['tab'], 5 );
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
return $valid_input;
|
| 657 |
}
|
| 658 |
|
| 1380 |
*/
|
| 1381 |
function get_custom_css_upgrade_message() {
|
| 1382 |
// upgrading from a version that was using urls instead of the textarea?
|
| 1383 |
+
if ( isset( $this->options['custom_css_url'] ) && ! empty( $this->options['custom_css_url'] ) ) {
|
| 1384 |
$css_url = $this->options['custom_css_url'];
|
| 1385 |
return sprintf( __( 'You are currently using %1$s%2$s%3$s. You can copy copy its contents into the textbox if you want to update the styles.', 'printfriendly' ), '<a href="' . $css_url . '" target="_blank">', $css_url, '</a>' );
|
| 1386 |
}
|
| 1403 |
|
| 1404 |
include_once PRINTFRIENDLY_BASEPATH . '/views/settings.php';
|
| 1405 |
}
|
| 1406 |
+
|
| 1407 |
+
/**
|
| 1408 |
+
* Returns the current tab to activate.
|
| 1409 |
+
*
|
| 1410 |
+
* @since 4.0.1
|
| 1411 |
+
*/
|
| 1412 |
+
function is_tab( $tab_id ) {
|
| 1413 |
+
$tab = get_transient( 'pf-tab' );
|
| 1414 |
+
// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
|
| 1415 |
+
return empty( $tab ) && $tab_id == 0 ? true : $tab == $tab_id;
|
| 1416 |
+
}
|
| 1417 |
+
|
| 1418 |
}
|
| 1419 |
$printfriendly = new PrintFriendly_WordPress();
|
| 1420 |
}
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: printfriendly, joostdevalk, jrf, rozroz
|
| 3 |
Tags: print, pdf, email, woocommerce print, woocommerce pdf, print plugin, print button, pdf plugin, pdf button
|
| 4 |
Requires at least: 4.9
|
| 5 |
-
Tested up to: 5.
|
| 6 |
-
Stable tag: 4.
|
| 7 |
|
| 8 |
|
| 9 |
The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
|
|
@@ -144,6 +144,10 @@ You can [hide the Print, PDF, and Email button](https://support.printfriendly.co
|
|
| 144 |
|
| 145 |
== Changelog ==
|
| 146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
= 4.0.1 =
|
| 148 |
* Bugfixes
|
| 149 |
|
| 2 |
Contributors: printfriendly, joostdevalk, jrf, rozroz
|
| 3 |
Tags: print, pdf, email, woocommerce print, woocommerce pdf, print plugin, print button, pdf plugin, pdf button
|
| 4 |
Requires at least: 4.9
|
| 5 |
+
Tested up to: 5.7
|
| 6 |
+
Stable tag: 4.1
|
| 7 |
|
| 8 |
|
| 9 |
The #1 Print, PDF, Email button. Stylish, full featured, customizable. Add custom header, footer, and more.
|
| 144 |
|
| 145 |
== Changelog ==
|
| 146 |
|
| 147 |
+
= 4.1 =
|
| 148 |
+
* Bugfixes
|
| 149 |
+
* Tested against WP 5.7
|
| 150 |
+
|
| 151 |
= 4.0.1 =
|
| 152 |
* Bugfixes
|
| 153 |
|
views/settings.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
| 8 |
|
| 9 |
<?php include_once PRINTFRIENDLY_BASEPATH . '/views/tabs.php'; ?>
|
| 10 |
|
|
|
|
|
|
|
| 11 |
<footer id="after-submit" class="pf-bu-footer">
|
| 12 |
<div class="pf-bu-content pf-bu-has-text-centered">
|
| 13 |
<p>
|
| 8 |
|
| 9 |
<?php include_once PRINTFRIENDLY_BASEPATH . '/views/tabs.php'; ?>
|
| 10 |
|
| 11 |
+
<input type="hidden" name="tab" id="current-tab" value="<?php echo get_transient( 'pf-tab' ); ?>">
|
| 12 |
+
|
| 13 |
<footer id="after-submit" class="pf-bu-footer">
|
| 14 |
<div class="pf-bu-content pf-bu-has-text-centered">
|
| 15 |
<p>
|
views/tabs.php
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
<div id="pf-tabs">
|
| 2 |
<div class="pf-bu-tabs pf-bu-is-centered">
|
| 3 |
<ul>
|
| 4 |
-
<li class="pf-bu-is-active"><a href="#tab-standard"><?php _e( 'Standard', 'printfriendly' ); ?></a></li>
|
| 5 |
-
<li><a href="#tab-advanced"><?php _e( 'Advanced', 'printfriendly' ); ?></a></li>
|
| 6 |
<?php if ( WP_DEBUG ) { ?>
|
| 7 |
<li><a href="#tab-debug"><?php _e( 'Debug', 'printfriendly' ); ?></a></li>
|
| 8 |
<?php } ?>
|
|
@@ -474,9 +474,9 @@
|
|
| 474 |
<p class="pf-bu-card-footer-item">
|
| 475 |
<?php
|
| 476 |
if ( ! $this->is_pro( 'custom-css' ) ) {
|
| 477 |
-
_e( 'Customize the styles of the printed/pdf page using your own CSS. Create your custom CSS, and put the URL to your Custom CSS file in the box
|
| 478 |
} else {
|
| 479 |
-
echo sprintf( __( 'Customize the styles of the printed/pdf page using your own CSS. Add your custom CSS (without the %s tags) in the box
|
| 480 |
}
|
| 481 |
?>
|
| 482 |
</p>
|
| 1 |
<div id="pf-tabs">
|
| 2 |
<div class="pf-bu-tabs pf-bu-is-centered">
|
| 3 |
<ul>
|
| 4 |
+
<li class="<?php echo $this->is_tab( 0 ) ? 'pf-bu-is-active' : ''; ?>" data-id="0"><a href="#tab-standard"><?php _e( 'Standard', 'printfriendly' ); ?></a></li>
|
| 5 |
+
<li class="<?php echo $this->is_tab( 1 ) ? 'pf-bu-is-active' : ''; ?>" data-id="1"><a href="#tab-advanced"><?php _e( 'Advanced', 'printfriendly' ); ?></a></li>
|
| 6 |
<?php if ( WP_DEBUG ) { ?>
|
| 7 |
<li><a href="#tab-debug"><?php _e( 'Debug', 'printfriendly' ); ?></a></li>
|
| 8 |
<?php } ?>
|
| 474 |
<p class="pf-bu-card-footer-item">
|
| 475 |
<?php
|
| 476 |
if ( ! $this->is_pro( 'custom-css' ) ) {
|
| 477 |
+
_e( 'Customize the styles of the printed/pdf page using your own CSS. Create your custom CSS, and put the URL to your Custom CSS file in the box above', 'printfriendly' );
|
| 478 |
} else {
|
| 479 |
+
echo sprintf( __( 'Customize the styles of the printed/pdf page using your own CSS. Add your custom CSS (without the %s tags) in the box above', 'printfriendly' ), '<code><style></code>' );
|
| 480 |
}
|
| 481 |
?>
|
| 482 |
</p>
|
