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

Commit

Permalink
Merge pull request #45 from shinsenter/develop
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
shinsenter authored Apr 1, 2021
2 parents 23d9508 + 4a6d10e commit e1e63c9
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 81 deletions.
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ This plugin helps you to optimize everything like image tags, video, audio, ifra

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.

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


## Good points

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

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

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

## Powered by defer.js, defer.php

[defer.js](https://github.com/shinsenter/defer.js)
🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.

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

[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.
### Key features

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

---

Expand Down
32 changes: 20 additions & 12 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=== A faster website (with defer.js)! ===
=== A faster website! (aka defer.js) ===
Contributors: shinsenter
Donate link: https://www.paypal.me/shinsenter
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
Expand All @@ -19,7 +19,7 @@ This plugin helps you to optimize everything like image tags, video, audio, ifra

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.

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


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

### Powered by defer.php
### Powered by defer.js, defer.php

[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.
[defer.js](https://github.com/shinsenter/defer.js)
🥇 A super small, super efficient library that helps you lazy load almost everything like images, video, audio, iframes as well as stylesheets, and JavaScript.

[defer.php](https://github.com/shinsenter/defer.php)
🚀 A PHP library that focuses on minimizing payload size of HTML document and optimizing processing on the browser when rendering the web page.

#### Key features

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


### Keep in touch

[![Become a sponsor](https://c5.patreon.com/external/logo/become_a_patron_button@2x.png)](https://www.patreon.com/appseeds)
### Support my activities

- Keep up-to-date with new releases:
Keep up-to-date with new releases:
[https://wordpress.org/plugins/shins-pageload-magic/](https://wordpress.org/plugins/shins-pageload-magic/)
- Become a stargazer:
[https://github.com/shinsenter/defer.js/stargazers](https://github.com/shinsenter/defer.js/stargazers)
- Report an issue:
[https://github.com/shinsenter/defer.js/issues](https://github.com/shinsenter/defer.js/issues)

[![Donate via Paypal](https://img.shields.io/badge/Donate-Paypal-blue)](https://www.paypal.me/shinsenter)
[![Become a sponsor](https://img.shields.io/badge/Donate-Patreon-orange)](https://www.patreon.com/appseeds)
[![Become a stargazer](https://img.shields.io/badge/Support-Stargazer-yellow)](https://github.com/shinsenter/defer-wordpress/stargazers)
[![Report an issue](https://img.shields.io/badge/Support-Issues-green)](https://github.com/shinsenter/defer-wordpress/issues/new)


---

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

== Changelog ==

2.1.0 Bug fixes (https://github.com/shinsenter/defer.js/issues/82)

2.0.0 Upgraded to v2. Renamed plugin.

1.1.15 Fixed bugs in defer.js 1.1.13, 1.1.14
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0
10 changes: 5 additions & 5 deletions admin/class-defer-wordpress-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ class Defer_Wordpress_Admin
/**
* The ID of this plugin.
*
* @since 2.0.0
* @since 2.0
* @var string the ID of this plugin
*/
private $plugin_name;

/**
* The version of this plugin.
*
* @since 2.0.0
* @since 2.0
* @var string the current version of this plugin
*/
private $version;

/**
* Initialize the class and set its properties.
*
* @since 2.0.0
* @since 2.0
* @param string $plugin_name the name of this plugin
* @param string $version the version of this plugin
*/
Expand All @@ -58,7 +58,7 @@ public function __construct($plugin_name, $version)
/**
* Register the stylesheets for the admin area.
*
* @since 2.0.0
* @since 2.0
*/
public function enqueue_styles()
{
Expand All @@ -80,7 +80,7 @@ public function enqueue_styles()
/**
* Register the JavaScript for the admin area.
*
* @since 2.0.0
* @since 2.0
*/
public function enqueue_scripts()
{
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"require": {
"php": ">=5.6",
"shinsenter/defer.php": "^2.0",
"shinsenter/defer.php": "^2.1.0",
"symfony/polyfill-mbstring": "<=1.22.0",
"dangoodman/composer-for-wordpress": "^2.0"
},
Expand Down
30 changes: 17 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions defer-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
* The plugin bootstrap file
*
* @wordpress-plugin
* Plugin Name: A faster website (with defer.js)!
* Plugin Name: A faster website! (aka defer.js)
* Plugin URI: https://wordpress.org/plugins/shins-pageload-magic/
* Description: 🚀 A native, blazing fast lazy loader. ✅ Legacy browsers support (IE9+). 💯 SEO friendly. 🧩 Lazy-load everything.
* Version: 2.0.0
* Version: 2.1.0
* Author: Mai Nhut Tan
* Author URI: https://code.shin.company/
* License: GPL-2.0+
Expand All @@ -44,7 +44,7 @@
if (!defined('DEFER_WP_PLUGIN_VERSION')) {
define('DEFER_WP_PLUGIN_BASE', plugin_basename(__FILE__));
define('DEFER_WP_PLUGIN_NAME', 'defer-wordpress');
define('DEFER_WP_PLUGIN_VERSION', '2.0.0');
define('DEFER_WP_PLUGIN_VERSION', '2.1.0');
define('DEFER_WP_PLUGIN_PREFIX', DEFER_WP_PLUGIN_NAME . '_');

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

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

define('DEFER_WP_HOMEPAGE', 'https://github.com/shinsenter/defer.js');
define('DEFER_WP_HOMEPAGE', 'https://shinsenter.github.com/defer.js/');
define('DEFER_WP_PLUGIN_URL', 'https://wordpress.org/plugins/shins-pageload-magic/');
define('DEFER_WP_PAYPAL', 'https://www.paypal.me/shinsenter');
define('DEFER_WP_PATREON', 'https://www.patreon.com/appseeds');
Expand Down Expand Up @@ -161,7 +161,7 @@ function defer_wp_ob($buffer)
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 2.0.0
* @since 2.1.0
*/
function run_defer_wordpress()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/class-defer-wordpress-activator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Defer_Wordpress_Activator
*
* Long Description.
*
* @since 2.0.0
* @since 2.0
*/
public static function activate()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/class-defer-wordpress-deactivator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Defer_Wordpress_Deactivator
*
* Long Description.
*
* @since 2.0.0
* @since 2.0
*/
public static function deactivate()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/class-defer-wordpress-i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Defer_Wordpress_i18n
/**
* Load the plugin text domain for translation.
*
* @since 2.0.0
* @since 2.0
*/
public function load_plugin_textdomain()
{
Expand Down
Loading

0 comments on commit e1e63c9

Please sign in to comment.