Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit e1e63c9

Browse files
authored
Merge pull request #45 from shinsenter/develop
Bug fixes
2 parents 23d9508 + 4a6d10e commit e1e63c9

15 files changed

+113
-81
lines changed

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,20 @@ This plugin helps you to optimize everything like image tags, video, audio, ifra
1717

1818
This plugin incorporates tips used a lot by experienced web experts, as well as making the most of the latest web technologies in lazy-loading resources on the page.
1919

20-
Rate [5 stars (⭐️⭐️⭐️⭐️⭐️)](https://wordpress.org/support/plugin/shins-pageload-magic/reviews/?filter=5) if you guys like it.
20+
Rate [5 stars (⭐️⭐️⭐️⭐️⭐️)](https://wordpress.org/support/plugin/shins-pageload-magic/reviews/?filter=5#new-post) if you guys like it.
2121

2222

2323
## Good points
2424

25-
- ⚡️ Native API, blazing fast
26-
- 👍 Legacy browsers support (IE9+)
27-
- 🥇 SEO friendly
28-
-Very easy to use
29-
- 💯 No dependencies, no jQuery
30-
- 🤝 Works well with your favorite frameworks
25+
- 🔰 Very easy to use
26+
- 🚀 Native API, blazing fast
27+
- 👍 No dependencies, no jQuery
28+
-Supports legacy browsers (IE9+)
29+
- 🎯 [Core Web Vitals](https://web.dev/vitals/) friendly
30+
- 🧩 Lazy load almost everything
3131
- 🧩 Uses [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) for optimized CPU usage
3232
- 🏞 Supports for responsive images, both `srcset` and `sizes` attributes
33+
- 🤝 Works well with your favorite frameworks
3334

3435
💡 Tip: To archive better result, you should consider disabling all optimization features (Eg. lazy-loading, HTML minification, JS minification, etc.) by other plugins.
3536

@@ -48,10 +49,15 @@ Available in latest browsers. This library also works perfectly with Internet Ex
4849
- 📱 Android 4+
4950
- 📱 iOS 3.2+
5051

52+
## Powered by defer.js, defer.php
53+
54+
[defer.js](https://github.com/shinsenter/defer.js)
55+
🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.
5156

52-
## Powered by defer.php
57+
[defer.php](https://github.com/shinsenter/defer.php)
58+
🚀 A PHP library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.
5359

54-
[defer.php](https://github.com/shinsenter/defer.php) is a library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering web pages.
60+
### Key features
5561

5662
- [x] Simplify library options
5763
- [x] Embed defer.js library
@@ -123,7 +129,7 @@ We recommend you use it with another page-caching plugin for best performance.
123129
[![Donate via Paypal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter)
124130
[![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)
125131
[![Become a stargazer](https://img.shields.io/badge/Support-Stargazer-yellow)](https://github.com/shinsenter/defer-wordpress/stargazers)
126-
[![Report an issue](https://img.shields.io/badge/Support-Issues-red)](https://github.com/shinsenter/defer-wordpress/issues/new)
132+
[![Report an issue](https://img.shields.io/badge/Support-Issues-green)](https://github.com/shinsenter/defer-wordpress/issues/new)
127133

128134
---
129135

README.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
=== A faster website (with defer.js)! ===
1+
=== A faster website! (aka defer.js) ===
22
Contributors: shinsenter
33
Donate link: https://www.paypal.me/shinsenter
44
Tags: defer.js,optimization,core-web-vitals,lazyload,loading-lazy,lazy-loading,lazyload-image,lazyload-video,lazyload-font,lazyload-js,lazyload-css,lazyload-wordpress,lazyload-facebook,lazyload-youtube,site-performance,speed,pagespeed,page-speed,html-minify,shinsenter
@@ -19,7 +19,7 @@ This plugin helps you to optimize everything like image tags, video, audio, ifra
1919

2020
This plugin incorporates tips used a lot by experienced web experts, as well as making the most of the latest web technologies in lazy-loading resources on the page.
2121

22-
Rate [5 stars (⭐️⭐️⭐️⭐️⭐️)](https://wordpress.org/support/plugin/shins-pageload-magic/reviews/?filter=5) if you guys like it.
22+
Rate [5 stars (⭐️⭐️⭐️⭐️⭐️)](https://wordpress.org/support/plugin/shins-pageload-magic/reviews/?filter=5#new-post) if you guys like it.
2323

2424

2525
### Good points
@@ -52,9 +52,15 @@ Available in latest browsers. This library also works perfectly with Internet Ex
5252
- 📱 Android 4+
5353
- 📱 iOS 3.2+
5454

55-
### Powered by defer.php
55+
### Powered by defer.js, defer.php
5656

57-
[defer.php](https://github.com/shinsenter/defer.php) is a library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering web pages.
57+
[defer.js](https://github.com/shinsenter/defer.js)
58+
🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.
59+
60+
[defer.php](https://github.com/shinsenter/defer.php)
61+
🚀 A PHP library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.
62+
63+
#### Key features
5864

5965
- [x] Simplify library options
6066
- [x] Embed defer.js library
@@ -80,16 +86,16 @@ Available in latest browsers. This library also works perfectly with Internet Ex
8086
- [x] Minify HTML output
8187

8288

83-
### Keep in touch
84-
85-
[![Become a sponsor](https://c5.patreon.com/external/logo/[email protected])](https://www.patreon.com/appseeds)
89+
### Support my activities
8690

87-
- Keep up-to-date with new releases:
91+
Keep up-to-date with new releases:
8892
[https://wordpress.org/plugins/shins-pageload-magic/](https://wordpress.org/plugins/shins-pageload-magic/)
89-
- Become a stargazer:
90-
[https://github.com/shinsenter/defer.js/stargazers](https://github.com/shinsenter/defer.js/stargazers)
91-
- Report an issue:
92-
[https://github.com/shinsenter/defer.js/issues](https://github.com/shinsenter/defer.js/issues)
93+
94+
[![Donate via Paypal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter)
95+
[![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)
96+
[![Become a stargazer](https://img.shields.io/badge/Support-Stargazer-yellow)](https://github.com/shinsenter/defer-wordpress/stargazers)
97+
[![Report an issue](https://img.shields.io/badge/Support-Issues-green)](https://github.com/shinsenter/defer-wordpress/issues/new)
98+
9399

94100
---
95101

@@ -158,6 +164,8 @@ We recommend you use it with another page-caching plugin for best performance.
158164

159165
== Changelog ==
160166

167+
2.1.0 Bug fixes (https://github.com/shinsenter/defer.js/issues/82)
168+
161169
2.0.0 Upgraded to v2. Renamed plugin.
162170

163171
1.1.15 Fixed bugs in defer.js 1.1.13, 1.1.14

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0
1+
2.1.0

admin/class-defer-wordpress-admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@ class Defer_Wordpress_Admin
2929
/**
3030
* The ID of this plugin.
3131
*
32-
* @since 2.0.0
32+
* @since 2.0
3333
* @var string the ID of this plugin
3434
*/
3535
private $plugin_name;
3636

3737
/**
3838
* The version of this plugin.
3939
*
40-
* @since 2.0.0
40+
* @since 2.0
4141
* @var string the current version of this plugin
4242
*/
4343
private $version;
4444

4545
/**
4646
* Initialize the class and set its properties.
4747
*
48-
* @since 2.0.0
48+
* @since 2.0
4949
* @param string $plugin_name the name of this plugin
5050
* @param string $version the version of this plugin
5151
*/
@@ -58,7 +58,7 @@ public function __construct($plugin_name, $version)
5858
/**
5959
* Register the stylesheets for the admin area.
6060
*
61-
* @since 2.0.0
61+
* @since 2.0
6262
*/
6363
public function enqueue_styles()
6464
{
@@ -80,7 +80,7 @@ public function enqueue_styles()
8080
/**
8181
* Register the JavaScript for the admin area.
8282
*
83-
* @since 2.0.0
83+
* @since 2.0
8484
*/
8585
public function enqueue_scripts()
8686
{

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
},
5555
"require": {
5656
"php": ">=5.6",
57-
"shinsenter/defer.php": "^2.0",
57+
"shinsenter/defer.php": "^2.1.0",
5858
"symfony/polyfill-mbstring": "<=1.22.0",
5959
"dangoodman/composer-for-wordpress": "^2.0"
6060
},

composer.lock

Lines changed: 17 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

defer-wordpress.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
* The plugin bootstrap file
2626
*
2727
* @wordpress-plugin
28-
* Plugin Name: A faster website (with defer.js)!
28+
* Plugin Name: A faster website! (aka defer.js)
2929
* Plugin URI: https://wordpress.org/plugins/shins-pageload-magic/
3030
* Description: 🚀 A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy-load everything.
31-
* Version: 2.0.0
31+
* Version: 2.1.0
3232
* Author: Mai Nhut Tan
3333
* Author URI: https://code.shin.company/
3434
* License: GPL-2.0+
@@ -44,7 +44,7 @@
4444
if (!defined('DEFER_WP_PLUGIN_VERSION')) {
4545
define('DEFER_WP_PLUGIN_BASE', plugin_basename(__FILE__));
4646
define('DEFER_WP_PLUGIN_NAME', 'defer-wordpress');
47-
define('DEFER_WP_PLUGIN_VERSION', '2.0.0');
47+
define('DEFER_WP_PLUGIN_VERSION', '2.1.0');
4848
define('DEFER_WP_PLUGIN_PREFIX', DEFER_WP_PLUGIN_NAME . '_');
4949

5050
define('DEFER_WP_PLUGIN_HOOK', 'plugin_action_links_' . DEFER_WP_PLUGIN_BASE);
@@ -58,14 +58,14 @@
5858
$has_deferjs = file_exists(__DIR__ . '/public/lib/defer_plus.min.js');
5959
define('DEFER_WP_SRC_DEFERJS_CDN', $has_deferjs
6060
? __DIR__ . '/public/lib/defer_plus.min.js'
61-
: 'https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.1.0/dist/defer_plus.min.js');
61+
: 'https://cdn.jsdelivr.net/npm/@shinsenter/defer.js@2.3.0/dist/defer_plus.min.js');
6262

6363
$has_polyfill = file_exists(__DIR__ . '/public/lib/polyfill.min.js');
6464
define('DEFER_WP_SRC_POLYFILL_CDN', $has_polyfill
6565
? plugin_dir_url(__FILE__) . 'public/lib/polyfill.min.js'
6666
: 'https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver');
6767

68-
define('DEFER_WP_HOMEPAGE', 'https://github.com/shinsenter/defer.js');
68+
define('DEFER_WP_HOMEPAGE', 'https://shinsenter.github.com/defer.js/');
6969
define('DEFER_WP_PLUGIN_URL', 'https://wordpress.org/plugins/shins-pageload-magic/');
7070
define('DEFER_WP_PAYPAL', 'https://www.paypal.me/shinsenter');
7171
define('DEFER_WP_PATREON', 'https://www.patreon.com/appseeds');
@@ -161,7 +161,7 @@ function defer_wp_ob($buffer)
161161
* then kicking off the plugin from this point in the file does
162162
* not affect the page life cycle.
163163
*
164-
* @since 2.0.0
164+
* @since 2.1.0
165165
*/
166166
function run_defer_wordpress()
167167
{

includes/class-defer-wordpress-activator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Defer_Wordpress_Activator
3131
*
3232
* Long Description.
3333
*
34-
* @since 2.0.0
34+
* @since 2.0
3535
*/
3636
public static function activate()
3737
{

includes/class-defer-wordpress-deactivator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Defer_Wordpress_Deactivator
3131
*
3232
* Long Description.
3333
*
34-
* @since 2.0.0
34+
* @since 2.0
3535
*/
3636
public static function deactivate()
3737
{

includes/class-defer-wordpress-i18n.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Defer_Wordpress_i18n
3030
/**
3131
* Load the plugin text domain for translation.
3232
*
33-
* @since 2.0.0
33+
* @since 2.0
3434
*/
3535
public function load_plugin_textdomain()
3636
{

0 commit comments

Comments
 (0)