From 71c263e0dd9e0d9cd0f37032e83fe72a02a239fa Mon Sep 17 00:00:00 2001 From: Shin <2082119+shinsenter@users.noreply.github.com> Date: Sat, 27 Mar 2021 14:21:39 +0900 Subject: [PATCH 1/3] Updated README --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f639649..b37786a 100644 --- a/README.md +++ b/README.md @@ -22,14 +22,15 @@ Rate [5 stars (⭐️⭐️⭐️⭐️⭐️)](https://wordpress.org/support/pl ## 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. From 073019f4c4b165ff642829365411fdd838c1a4a6 Mon Sep 17 00:00:00 2001 From: Shin <2082119+shinsenter@users.noreply.github.com> Date: Sat, 27 Mar 2021 14:28:21 +0900 Subject: [PATCH 2/3] Updated to dev --- composer.json | 2 +- composer.lock | 31 +++++++++++++++++-------------- defer-wordpress.php | 2 +- package-lock.json | 15 ++++++++------- package.json | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/composer.json b/composer.json index 36f244e..3848809 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ }, "require": { "php": ">=5.6", - "shinsenter/defer.php": "^2.0", + "shinsenter/defer.php": "dev-develop", "symfony/polyfill-mbstring": "<=1.22.0", "dangoodman/composer-for-wordpress": "^2.0" }, diff --git a/composer.lock b/composer.lock index 7bcacbc..c6f6db6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "fb8acccbd287c05f02529c3739dec9c4", + "content-hash": "172b16ed3092399b49bbafa10c659b57", "packages": [ { "name": "dangoodman/composer-for-wordpress", @@ -152,16 +152,16 @@ }, { "name": "shinsenter/defer.php", - "version": "2.0.0", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/shinsenter/defer.php.git", - "reference": "abc844b2c141c50f6a3c2ae4ffebcbb6fc99bba3" + "reference": "97b36b97d81d546a3bc025905640a9cd3e7ee2b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/shinsenter/defer.php/zipball/abc844b2c141c50f6a3c2ae4ffebcbb6fc99bba3", - "reference": "abc844b2c141c50f6a3c2ae4ffebcbb6fc99bba3", + "url": "https://api.github.com/repos/shinsenter/defer.php/zipball/97b36b97d81d546a3bc025905640a9cd3e7ee2b2", + "reference": "97b36b97d81d546a3bc025905640a9cd3e7ee2b2", "shasum": "" }, "require": { @@ -241,7 +241,7 @@ "type": "paypal" } ], - "time": "2021-03-25T02:16:10+00:00" + "time": "2021-03-27T05:15:26+00:00" }, { "name": "symfony/css-selector", @@ -539,16 +539,16 @@ }, { "name": "composer/xdebug-handler", - "version": "1.4.5", + "version": "1.4.6", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "f28d44c286812c714741478d968104c5e604a1d4" + "reference": "f27e06cd9675801df441b3656569b328e04aa37c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f28d44c286812c714741478d968104c5e604a1d4", - "reference": "f28d44c286812c714741478d968104c5e604a1d4", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/f27e06cd9675801df441b3656569b328e04aa37c", + "reference": "f27e06cd9675801df441b3656569b328e04aa37c", "shasum": "" }, "require": { @@ -556,7 +556,8 @@ "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8" + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" }, "type": "library", "autoload": { @@ -582,7 +583,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/1.4.5" + "source": "https://github.com/composer/xdebug-handler/tree/1.4.6" }, "funding": [ { @@ -598,7 +599,7 @@ "type": "tidelift" } ], - "time": "2020-11-13T08:04:11+00:00" + "time": "2021-03-25T17:01:18+00:00" }, { "name": "doctrine/annotations", @@ -1710,7 +1711,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "shinsenter/defer.php": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/defer-wordpress.php b/defer-wordpress.php index 8901471..e97e4dc 100644 --- a/defer-wordpress.php +++ b/defer-wordpress.php @@ -58,7 +58,7 @@ $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.2.0/dist/defer_plus.min.js'); $has_polyfill = file_exists(__DIR__ . '/public/lib/polyfill.min.js'); define('DEFER_WP_SRC_POLYFILL_CDN', $has_polyfill diff --git a/package-lock.json b/package-lock.json index c69a19c..2f147cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,20 +7,21 @@ "name": "shinsenter/defer-wordpress", "license": "GPL-2.0", "dependencies": { - "@shinsenter/defer.js": "^2.1.0" + "@shinsenter/defer.js": "^2.2.0" } }, "node_modules/@shinsenter/defer.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.1.0.tgz", - "integrity": "sha512-Q0nnWr+nmSXzcsIiQ5sbLvLTYG30Hj3KusiodM+4jOfQdwgyzTjJeNVfokpWi1AW2Qw28cWX/PIXBlnqiTITMQ==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.2.0.tgz", + "integrity": "sha512-OkA5sY+KbO/PLqVxERzMMghCCB0MTZMF6vSDDGyaKEKslkyJRB0HJUMwvgaxUwtxs+Qt7PlSJFCYtGr75ueAUg==", + "license": "MIT" } }, "dependencies": { "@shinsenter/defer.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.1.0.tgz", - "integrity": "sha512-Q0nnWr+nmSXzcsIiQ5sbLvLTYG30Hj3KusiodM+4jOfQdwgyzTjJeNVfokpWi1AW2Qw28cWX/PIXBlnqiTITMQ==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.2.0.tgz", + "integrity": "sha512-OkA5sY+KbO/PLqVxERzMMghCCB0MTZMF6vSDDGyaKEKslkyJRB0HJUMwvgaxUwtxs+Qt7PlSJFCYtGr75ueAUg==" } } } diff --git a/package.json b/package.json index 8b35874..a605c9b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Mai Nhut Tan ", "license": "GPL-2.0", "dependencies": { - "@shinsenter/defer.js": "^2.1.0" + "@shinsenter/defer.js": "^2.2.0" }, "repository": { "type": "git", From 4a6d10e5aae9941f73ed50c408233198cc9dc4ca Mon Sep 17 00:00:00 2001 From: Shin <2082119+shinsenter@users.noreply.github.com> Date: Thu, 1 Apr 2021 13:24:58 +0900 Subject: [PATCH 3/3] v2.1.0 --- README.md | 13 +++++--- README.txt | 32 ++++++++++++------- VERSION | 2 +- admin/class-defer-wordpress-admin.php | 10 +++--- composer.json | 2 +- composer.lock | 19 +++++------ defer-wordpress.php | 12 +++---- includes/class-defer-wordpress-activator.php | 2 +- .../class-defer-wordpress-deactivator.php | 2 +- includes/class-defer-wordpress-i18n.php | 2 +- includes/class-defer-wordpress-loader.php | 14 ++++---- includes/class-defer-wordpress.php | 20 ++++++------ package-lock.json | 29 ++++++++++++----- package.json | 2 +- public/class-defer-wordpress-public.php | 10 +++--- 15 files changed, 99 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index b37786a..3fc32a8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,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 @@ -49,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 -## Powered by 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. -[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.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 @@ -124,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) --- diff --git a/README.txt b/README.txt index e9d4064..04e4cfe 100755 --- a/README.txt +++ b/README.txt @@ -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 @@ -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 @@ -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 @@ -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) + --- @@ -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 diff --git a/VERSION b/VERSION index 359a5b9..50aea0e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.1.0 \ No newline at end of file diff --git a/admin/class-defer-wordpress-admin.php b/admin/class-defer-wordpress-admin.php index 434c8f2..f4a3f51 100644 --- a/admin/class-defer-wordpress-admin.php +++ b/admin/class-defer-wordpress-admin.php @@ -29,7 +29,7 @@ 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; @@ -37,7 +37,7 @@ class Defer_Wordpress_Admin /** * The version of this plugin. * - * @since 2.0.0 + * @since 2.0 * @var string the current version of this plugin */ private $version; @@ -45,7 +45,7 @@ class Defer_Wordpress_Admin /** * 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 */ @@ -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() { @@ -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() { diff --git a/composer.json b/composer.json index 3848809..74c11a8 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,7 @@ }, "require": { "php": ">=5.6", - "shinsenter/defer.php": "dev-develop", + "shinsenter/defer.php": "^2.1.0", "symfony/polyfill-mbstring": "<=1.22.0", "dangoodman/composer-for-wordpress": "^2.0" }, diff --git a/composer.lock b/composer.lock index c6f6db6..94f529d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "172b16ed3092399b49bbafa10c659b57", + "content-hash": "662e391c32aaad092924fa2cdacf1122", "packages": [ { "name": "dangoodman/composer-for-wordpress", @@ -152,16 +152,16 @@ }, { "name": "shinsenter/defer.php", - "version": "dev-develop", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/shinsenter/defer.php.git", - "reference": "97b36b97d81d546a3bc025905640a9cd3e7ee2b2" + "reference": "bc19edb18916d984c5d3e7912aad9e404a367d2b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/shinsenter/defer.php/zipball/97b36b97d81d546a3bc025905640a9cd3e7ee2b2", - "reference": "97b36b97d81d546a3bc025905640a9cd3e7ee2b2", + "url": "https://api.github.com/repos/shinsenter/defer.php/zipball/bc19edb18916d984c5d3e7912aad9e404a367d2b", + "reference": "bc19edb18916d984c5d3e7912aad9e404a367d2b", "shasum": "" }, "require": { @@ -181,6 +181,9 @@ "ext-mbstring": "*" }, "type": "library", + "extra": { + "branch-alias": [] + }, "autoload": { "psr-4": { "AppSeeds\\": "src/" @@ -241,7 +244,7 @@ "type": "paypal" } ], - "time": "2021-03-27T05:15:26+00:00" + "time": "2021-04-01T04:02:58+00:00" }, { "name": "symfony/css-selector", @@ -1711,9 +1714,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "shinsenter/defer.php": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/defer-wordpress.php b/defer-wordpress.php index e97e4dc..8d4f427 100644 --- a/defer-wordpress.php +++ b/defer-wordpress.php @@ -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+ @@ -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); @@ -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.2.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'); @@ -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() { diff --git a/includes/class-defer-wordpress-activator.php b/includes/class-defer-wordpress-activator.php index a4ea4b6..3881fed 100644 --- a/includes/class-defer-wordpress-activator.php +++ b/includes/class-defer-wordpress-activator.php @@ -31,7 +31,7 @@ class Defer_Wordpress_Activator * * Long Description. * - * @since 2.0.0 + * @since 2.0 */ public static function activate() { diff --git a/includes/class-defer-wordpress-deactivator.php b/includes/class-defer-wordpress-deactivator.php index 16f11fa..71efee7 100644 --- a/includes/class-defer-wordpress-deactivator.php +++ b/includes/class-defer-wordpress-deactivator.php @@ -31,7 +31,7 @@ class Defer_Wordpress_Deactivator * * Long Description. * - * @since 2.0.0 + * @since 2.0 */ public static function deactivate() { diff --git a/includes/class-defer-wordpress-i18n.php b/includes/class-defer-wordpress-i18n.php index 581a317..da883bc 100644 --- a/includes/class-defer-wordpress-i18n.php +++ b/includes/class-defer-wordpress-i18n.php @@ -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() { diff --git a/includes/class-defer-wordpress-loader.php b/includes/class-defer-wordpress-loader.php index 2908015..a0356c2 100644 --- a/includes/class-defer-wordpress-loader.php +++ b/includes/class-defer-wordpress-loader.php @@ -30,7 +30,7 @@ class Defer_Wordpress_Loader /** * The array of actions registered with WordPress. * - * @since 2.0.0 + * @since 2.0 * @var array the actions registered with WordPress to fire when the plugin loads */ protected $actions; @@ -38,7 +38,7 @@ class Defer_Wordpress_Loader /** * The array of filters registered with WordPress. * - * @since 2.0.0 + * @since 2.0 * @var array the filters registered with WordPress to fire when the plugin loads */ protected $filters; @@ -46,7 +46,7 @@ class Defer_Wordpress_Loader /** * Initialize the collections used to maintain the actions and filters. * - * @since 2.0.0 + * @since 2.0 */ public function __construct() { @@ -57,7 +57,7 @@ public function __construct() /** * Add a new action to the collection to be registered with WordPress. * - * @since 2.0.0 + * @since 2.0 * @param string $hook the name of the WordPress action that is being registered * @param object $component a reference to the instance of the object on which the action is defined * @param string $callback the name of the function definition on the $component @@ -72,7 +72,7 @@ public function add_action($hook, $component, $callback, $priority = 10, $accept /** * Add a new filter to the collection to be registered with WordPress. * - * @since 2.0.0 + * @since 2.0 * @param string $hook the name of the WordPress filter that is being registered * @param object $component a reference to the instance of the object on which the filter is defined * @param string $callback the name of the function definition on the $component @@ -87,7 +87,7 @@ public function add_filter($hook, $component, $callback, $priority = 10, $accept /** * Register the filters and actions with WordPress. * - * @since 2.0.0 + * @since 2.0 */ public function run() { @@ -104,7 +104,7 @@ public function run() * A utility function that is used to register the actions and hooks into a single * collection. * - * @since 2.0.0 + * @since 2.0 * @param array $hooks the collection of hooks that is being registered (that is, actions or filters) * @param string $hook the name of the WordPress filter that is being registered * @param object $component a reference to the instance of the object on which the filter is defined diff --git a/includes/class-defer-wordpress.php b/includes/class-defer-wordpress.php index 94590d4..7790caa 100644 --- a/includes/class-defer-wordpress.php +++ b/includes/class-defer-wordpress.php @@ -34,7 +34,7 @@ class Defer_Wordpress * The loader that's responsible for maintaining and registering all hooks that power * the plugin. * - * @since 2.0.0 + * @since 2.0 * @var Defer_Wordpress_Loader maintains and registers all hooks for the plugin */ protected $loader; @@ -42,7 +42,7 @@ class Defer_Wordpress /** * The unique identifier of this plugin. * - * @since 2.0.0 + * @since 2.0 * @var string the string used to uniquely identify this plugin */ protected $plugin_name; @@ -50,7 +50,7 @@ class Defer_Wordpress /** * The current version of the plugin. * - * @since 2.0.0 + * @since 2.0 * @var string the current version of the plugin */ protected $version; @@ -62,7 +62,7 @@ class Defer_Wordpress * Load the dependencies, define the locale, and set the hooks for the admin area and * the public-facing side of the site. * - * @since 2.0.0 + * @since 2.0 */ public function __construct() { @@ -78,7 +78,7 @@ public function __construct() /** * Run the loader to execute all of the hooks with WordPress. * - * @since 2.0.0 + * @since 2.0 */ public function run() { @@ -138,7 +138,7 @@ public function get_version() * Create an instance of the loader which will be used to register the hooks * with WordPress. * - * @since 2.0.0 + * @since 2.0 */ private function load_dependencies() { @@ -174,7 +174,7 @@ private function load_dependencies() * Uses the Defer_Wordpress_i18n class in order to set the domain and to register the hook * with WordPress. * - * @since 2.0.0 + * @since 2.0 */ private function set_locale() { @@ -187,7 +187,7 @@ private function set_locale() * Register all of the hooks related to the admin area functionality * of the plugin. * - * @since 2.0.0 + * @since 2.0 */ private function define_admin_hooks() { @@ -205,7 +205,7 @@ private function define_admin_hooks() * Register all of the hooks related to the public-facing functionality * of the plugin. * - * @since 2.0.0 + * @since 2.0 */ private function define_public_hooks() { @@ -220,7 +220,7 @@ private function define_public_hooks() /** * Detect login page * - * @since 2.0.0 + * @since 2.0 */ private function is_wplogin() { diff --git a/package-lock.json b/package-lock.json index 2f147cc..5a26090 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,21 +7,34 @@ "name": "shinsenter/defer-wordpress", "license": "GPL-2.0", "dependencies": { - "@shinsenter/defer.js": "^2.2.0" + "@shinsenter/defer.js": "^2.3.0" } }, "node_modules/@shinsenter/defer.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.2.0.tgz", - "integrity": "sha512-OkA5sY+KbO/PLqVxERzMMghCCB0MTZMF6vSDDGyaKEKslkyJRB0HJUMwvgaxUwtxs+Qt7PlSJFCYtGr75ueAUg==", - "license": "MIT" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.3.0.tgz", + "integrity": "sha512-Hjhe2IPa6B1N01BMA0x5vbcNLSRxIgeUUPNUCnx+59aD/RHzjKoFp/MRjLMqQcVQ0jAfjCw8xczXgJkHpN4n6Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/shinsenter/defer.js/stargazers" + }, + { + "type": "paypal", + "url": "https://www.patreon.com/appseeds" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/shinsenter" + } + ] } }, "dependencies": { "@shinsenter/defer.js": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.2.0.tgz", - "integrity": "sha512-OkA5sY+KbO/PLqVxERzMMghCCB0MTZMF6vSDDGyaKEKslkyJRB0HJUMwvgaxUwtxs+Qt7PlSJFCYtGr75ueAUg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@shinsenter/defer.js/-/defer.js-2.3.0.tgz", + "integrity": "sha512-Hjhe2IPa6B1N01BMA0x5vbcNLSRxIgeUUPNUCnx+59aD/RHzjKoFp/MRjLMqQcVQ0jAfjCw8xczXgJkHpN4n6Q==" } } } diff --git a/package.json b/package.json index a605c9b..a27762a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Mai Nhut Tan ", "license": "GPL-2.0", "dependencies": { - "@shinsenter/defer.js": "^2.2.0" + "@shinsenter/defer.js": "^2.3.0" }, "repository": { "type": "git", diff --git a/public/class-defer-wordpress-public.php b/public/class-defer-wordpress-public.php index 9e417cd..22c95d2 100644 --- a/public/class-defer-wordpress-public.php +++ b/public/class-defer-wordpress-public.php @@ -29,7 +29,7 @@ class Defer_Wordpress_Public /** * The ID of this plugin. * - * @since 2.0.0 + * @since 2.0 * @var string the ID of this plugin */ private $plugin_name; @@ -37,7 +37,7 @@ class Defer_Wordpress_Public /** * The version of this plugin. * - * @since 2.0.0 + * @since 2.0 * @var string the current version of this plugin */ private $version; @@ -45,7 +45,7 @@ class Defer_Wordpress_Public /** * Initialize the class and set its properties. * - * @since 2.0.0 + * @since 2.0 * @param string $plugin_name the name of the plugin * @param string $version the version of this plugin */ @@ -58,7 +58,7 @@ public function __construct($plugin_name, $version) /** * Register the stylesheets for the public-facing side of the site. * - * @since 2.0.0 + * @since 2.0 */ public function enqueue_styles() { @@ -80,7 +80,7 @@ public function enqueue_styles() /** * Register the JavaScript for the public-facing side of the site. * - * @since 2.0.0 + * @since 2.0 */ public function enqueue_scripts() {