Skip to content

Commit

Permalink
force lazy load images to load before print
Browse files Browse the repository at this point in the history
  • Loading branch information
baden03 committed Jan 18, 2022
1 parent 1f592c3 commit fbf1358
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Print-O-Matic
==============
* Contributors: twinpictures, baden03
* Donate link: https://plugins.twinpictures.de/flying-houseboat/
* Donate link: https://pluginoven.com/panares-fund/
* Tags: print, print element, print shortcode, send to print, print button, print me, jQuery, print page, javascript, twinpictures, plugin oven
* Requires at least: 4.9
* Tested up to: 5.8.1
* Stable tag: 2.1.3
* Tested up to: 5.9
* Stable tag: 2.1.4
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down
7 changes: 6 additions & 1 deletion js/printomat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Print-O-Matic JavaScript v2.0.6
* Print-O-Matic JavaScript v2.0.7
* https://pluginoven.com/plugins/print-o-matic/
*/

Expand Down Expand Up @@ -78,6 +78,11 @@ jQuery(document).ready(function() {

});

// remove loading attribute
jQuery('img').each( function () {
jQuery(this).removeAttr('loading');
});

var pause_time = print_data.pom_pause_time;
if(this_print_data && 'pom_pause_time' in this_print_data){
pause_time = this_print_data.pom_pause_time;
Expand Down
6 changes: 3 additions & 3 deletions print-o-matic.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Text Domain: print-o-matic
Plugin URI: https://pluginoven.com/plugins/print-o-matic/
Description: Shortcode that adds a printer icon, allowing the user to print the post or a specified HTML element in the post.
Version: 2.1.3
Version: 2.1.4
Author: twinpictures
Author URI: https://twinpictures.de
License: GPL2
Expand All @@ -17,7 +17,7 @@
*/
class WP_Print_O_Matic {

var $version = '2.1.3';
var $version = '2.1.4';
var $domain = 'printomat';
var $options_name = 'WP_Print_O_Matic_options';
var $options = array(
Expand Down Expand Up @@ -65,7 +65,7 @@ function load_textdomain() {
*/
function printMaticInit() {
//script
wp_register_script('printomatic-js', plugins_url('js/printomat.js', __FILE__), array('jquery'), '2.0.6', true);
wp_register_script('printomatic-js', plugins_url('js/printomat.js', __FILE__), array('jquery'), '2.0.7', true);
wp_register_script('pe-js', plugins_url('js/print_elements.js', __FILE__), array('printomatic-js'), '1.0', true);

//prep options for injection
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== Print-O-Matic ===
Contributors: twinpictures, baden03
Donate link: https://plugins.twinpictures.de/flying-houseboat/
Donate link: https://pluginoven.com/panares-fund/
Tags: print, print element, print shortcode, send to print, print button, print me, jQuery, print page, javascript, twinpictures, plugin oven
Requires at least: 4.9
Tested up to: 5.8.1
Stable tag: 2.1.3
Tested up to: 5.9
Stable tag: 2.1.4
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -50,6 +50,9 @@ We like to rock the party.

== Changelog ==

= 2.1.4 =
* try and force lazy load images to load before print

= 2.1.3 =
* improved method of passing default and print-trigger specific data to js script using wp_add_inline_script
* added line numbers back to CodeMirror, with admin css
Expand Down

0 comments on commit fbf1358

Please sign in to comment.