cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

Hook into third party plugins to exclude wpp.js from JS optimization / bundling? #389

Closed cabrerahector closed 2 months ago

cabrerahector commented 3 months ago

There's quite often some kind of conflict with third-party plugins (eg. LiteSpeed Cache, SiteGround Optimize/Speed Optimizer, etc.) due to them bundling WPP's JS file while ignoring the various data- properties included with the script, breaking WPP's ability to work as intended.

Some of these plugins though do provide filter hooks (eg. LiteSpeed's litespeed_optimize_js_excludes, Speed Optimizer's sgo_javascript_combine_exclude_ids, etc) that we could rely on to automatically exclude wpp.min.js and wpp.js from their JS bundling / minification process.

cabrerahector commented 2 months ago

Implemented in 2c81553, e919ab0, a406188, cfc7feb, 74deb88, 699dbb4, b5597f3, c8a4fe9, and 5d1332a.