=== Asset CleanUp Pro: Page Speed Booster === Contributors: gabelivan Tags: minify css, minify javascript, defer css javascript, page speed, dequeue, performance Requires at least: 4.6 Tested up to: 6.5.4 Stable tag: 1.2.5.2 License: Commercial There are often times when you are using a theme and a number of plugins which are enabled and run on the same page. However, you don't need to use all of them and to improve the speed of your website and make the HTML source code cleaner (convenient for debugging purposes), it's better to prevent those styles and scripts from loading. == Changelog == = 1.2.5.2 - 19 Jun 2024 * CSS Minifier Improvement: Specific "var()" statements were minified incorrectly in Bootstrap / more: https://github.com/matthiasmullie/minify/issues/422 * Fix: When CSS files about to be optimised (e.g. minified) contain "@import", make sure the fetching and the combining of the imported CSS files is done properly (e.g. instead of loading five CSS files, only one will load, as the other four will be merged into the main one that had the @import in the first place) * Fix: In some environments that have PHP 8+ installed, when non-admin users were logging-in an error was showing up: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given * FIx: When using WP CLI (or something similar) and PHP 8.1+ is installed, a harmless error is showing up due to the fact that the global $_SERVER variable had missing keys / e.g. $_SERVER['REQUEST_URI'] is not detected, leading to an error such as "rtrim(): Passing null to parameter #1 ($string) of type string is deprecated" = 1.2.5.1 - 15 Jun 2024 * Backend Speed Improvement: The plugin processes its PHP code faster, thus reducing the total processing time by ~40 milliseconds for non-cached pages (e.g. backend speed testing plugins such as "Query Monitor" and "Code Profiler" were used to optimize the PHP code) * "Overview" area: Added the option to clear any rules set for plugins that are deactivated / deleted * Fix: Sometimes rules were applied to hardcoded assets incorrectly as different tags without content were considered to be the same * Fix: Make sure the "Update" button is disabled when submitting the form from the CSS/JS manager * Fix in the "CSS/JS manager" area: If an attribute is set (e.g. "defer') to show "everywhere", make sure that "On this page" is not checked * Fixes in "Overview" area: If an attribute is set (e.g. "defer") to show "everywhere", it shows multiple times (instead of just once) when WPML plugin is enabled; If the path to the site URL was e.g. domain.com/blog, the "href" value from "Overview" was not including the "blog" path, causing "404 Not Found" errors and confusing the administrator = 1.2.5.0 - 11 April 2024 * Added "wp wpacu update" CLI command to be used in updating the plugin, in case the most recent version doesn't show yet in the list from "wp plugin list" (basically, it attempts a "force" download of the latest version) * Fix: "JavaScript" was shown instead of "stylesheet" when specific unload rules were applied * Fix: Make sure the right message is shown to the popup that has a loading spinner (e.g. when the rules from "Plugins Manager" were all turned off, the message from clearing the cache was shown instead) = 1.2.4.9 - 27 February 2024 * "Plugins Manager": Allow the option to unload a plugin depending on the logged-in user role (e.g. for a "subscriber" that has access to the Dashboard, specific plugins that you know are useless for this type of user, could be unloaded to make the Dashboard load faster) * CSS/JS manager: When the "src" of a SCRIPT tag or "href" of a LINK tag starts with "data:text/javascript;base64," and "data:text/css;base64," respectively, a note will be shown with the option to view the decoded CSS/JS code * Improvement: Added the option to change the way the assets are retrieved ("Direct" as if the admin is visiting the page / "WP Remote POST" as if a guest is visiting the page) from the CSS & JS manager within the Dashboard (for convenience, to avoid going through the "Settings" as it was the case so far) * Fix: In some environments, the tags with "as" attribute were not properly detected (e.g. when "DOMDocument" is not enabled by default in the PHP configuration) = 1.2.4.8 - 31 January 2024 * Improvement: Apply "font-display:" CSS property for Google Fonts when they are loaded via Web Font Loader (source: https://github.com/typekit/webfontloader) * Plugin's "License" page: When the information is fetched, make sure the AJAX call is never cached to make sure the latest information is always shown * Higher accuracy in detecting the "type" and "data-alt-type" attribute before determining if an inline SCRIPT tag has to be minified * Fix: Make sure "WP Super Cache" & "W3 Total Cache" plugins are working fine when caching pages if "Smart Slider 3" plugin is enabled = 1.2.4.7 - 9 November 2023 * Rank Math & other SEO plugins compatibility: Prevent Asset CleanUp Pro from triggering, thus saving extra resources, whenever URIs such as /sitemap_index.xml are loaded to avoid altering the XML structure or generate 404 not found errors * Plugins Manager: Make sure the user roles from "If the logged-in user has any of these roles:" are translated into the language chosen for the current admin to avoid any confusion (e.g. if the language chosen in the admin's profile is German, then show "Abonnent" instead of "Subscriber") * CSS/JS Minifier: Prevent calling @is_file() when it's not the case to avoid on specific environments errors such as: "is_file(): open_basedir restriction in effect" = 1.2.4.6 - 28 October 2023 * Preload CSS feature: When a .css file is preloaded (Basic), the "media" attribute is preserved if it's not missing and different than "all" * "Rank Math SEO" & "Premmerce" plugin compatibility: Prevent Asset CleanUp Pro's "Plugins Manager" rules from triggering when the permalinks are updated * Combine CSS Fix / The preload and stylesheet LINK tags had the same "id" attribute which shouldn't be like that as the "id" should be unique for each HTML element * Fix / In rare cases, the following error is printed: 'Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty within the method "cleanerHtmlSource" inside the "OptimizeCommon" class' = 1.2.4.5 - 13 October 2023 * Fix: On some environments, the following error would show up when WP CLI is used: "PHP Fatal error: Uncaught Error: Call to a member function getScriptAttributesToApplyOnCurrentPage() on null" * Fix: When the CSS/JS is managed in the front-end, the styling for the hardcoded assets was broken when the list was sorted via location * Fix: Specific HTML code (unique signatures belonging to Asset CleanUp Pro) that was no longer relevant after optimizing the HTML source was not completely removed as it should be (in order to leave a cleaner HTML source code and not confuse the admin) * Hardcoded assets: When an asset was moved from HEAD to BODY or vice-versa, make sure a notice is placed there in the hardcoded row (when managing the assets) that it had its position changed just like it's done for the enqueued assets * Improvement: Removed unused PHP code from specific files = 1.2.4.4 - 7 October 2023 * Hardcoded assets: They can be moved from
to and vice-versa just like the enqueued assets * Hardcoded assets: Can be preloaded, loaded based on the media query, deferred/asynched just like the enqueued assets (for = 1.2.4.2 - 16 September 2023 * New Option: "Settings" -- "Plugin Usage Preferences" - "Do not load on specific pages" -- "Prevent features of Asset CleanUp Pro from triggering on specific pages"; This allows you to stop triggering specific plugin features on certain pages (e.g. you might want to prevent combining JavaScript files on all /product/ (WooCommerce) pages due to some broken functionality on those specific pages) * Combined CSS/JS improvements: Whenever a file from a plugin or a theme is updated by the developer/admin, there's no need to clear the cache afterwards, as sometimes, users forget about this; the plugin automatically recognizes the change and a new combined CSS/JS is created and re-cached * Improvement: Fallback for clearing CSS/JS cache when using the top admin bar link; it will just trigger by reloading the page if, for any reason, Asset CleanUp Pro functions fail to load there (e.g. in rare cases, plugin/theme developers prevent 3rd party assets to load on their admin pages for various reasons); this fallback is triggering on admin pages unrelated Asset CleanUp Pro's plugin pages (e.g. a settings page of a different plugin) = 1.2.4.1 - 9 September 2023 * "Plugins Manager" - A new option was added to both "IN FRONTEND VIEW (your visitors)" and "IN THE DASHBOARD /wp-admin/" (in case it's activated, as it's a special feature) to disregard all rules from taking effect in case there are issues with any plugin rules for debugging purposes (any rules placed there will be kept as they are; this feature will just instruct Asset CleanUp Pro to not take them into consideration) * Cache Clearing: Whenever the caching is cleared within any plugin page through the available links (from the top admin bar and the top right side of the plugin's area) a notification about the action is shown with a preloader until the cache is cleared (the page doesn't reload as the cache clearing is made in the background) * If "Input Fields Style:" is set to "Standard" (for people having difficulties accessing the fancy input fields) within "Settings" -- "Plugin Usage Preferences" -- "Accessibility", the setting will also apply to jQuery Chosen drop-downs, turning them into regular HTML drop-downs (with either one or multiple options to choose from) * "Settings" -- "Plugin Usage Preferences": Re-organised the tab contents from into multiple sub-tabs for easier access and understanding the options = 1.2.4.0 - 4 September 2023 * Added the option to make the browser download the file only if its current media query is matched (in case the "media" attribute is different from "all") / read more: https://www.assetcleanup.com/docs/?p=1023#case-two = 1.2.3.9.1 - 22 August 2023 * Improvement: In very rare cases in the "options" table, if "page_on_front" has a value and "show_on_front" is set to "posts" (this happens when there's an incomplete update of the settings in the database), it will confuse Asset CleanUp Pro and consider that "Your homepage displays" is actually set to "A static page" which is wrong * Fix: An error was showing when the admin accessed the "License" page = 1.2.3.9 - 18 August 2023 * Improvement: The plugin is optimised to load fewer functions then before (e.g. PHP classes that aren't required on the targeted page) in order to reduce the total front-end optimization time * "WooCommerce" plugin compatibility: Avoid using extra resources in Asset CleanUp Pro to process specific CSS files (they are loading after the latest WooCommerce plugin release) that are already minified * Fix: In specific environments that loaded similar code to the one from Asset CleanUp Pro, errors were showing up, thus more uniqueness had to be added to avoid conflicts such as unique PHP namespaces = 1.2.3.8.1 - 10 August 2023 * "SiteGround Optimizer" plugin compatibility: When enabled, on some environments, errors are triggering if Asset CleanUp Pro's JavaScript minify option is turned on * Fix: When "WP Remote Post" was used as a fetch method of the CSS/JS assets within the Dashboard, information about the targeted URL was showing up twice (e.g. the admin could be confused of viewing redundant text printing out) = 1.2.3.8 - 6 August 2023 * "Plugins Manager": Added option to unload or load as an exception plugins if the current logged-in user has a specific role (e.g. administrator, subscriber, editor, shop manager, etc.) / read more: https://assetcleanup.com/docs/?p=1688 * "GiveWP" plugin compatibility: Prevent Asset CleanUp Pro from loading whenever the URI is like /give/donation-form?giveDonationFormInIframe=1 as the page loaded within the iFrame is already optimized and there are users that had problems when Asset CleanUp Pro was triggering its rules there * "GiveWP" plugin compatibility: Prevent CSS/JS minification as the files are already optimized and there's no point in wasting extra resources * Dashboard: Whenever the clear caching link is used, after the clearance, a notice is shown to the admin about this and the clearance date and time * Fix: Make sure 'post__in' is never empty when called within a WP_Query whenever a post search is made within "CSS & JS Manager" -- "Manage CSS/JS" * Plugin Settings: Replaced text that sometimes caused confusion (e.g. some people didn't notice the small "if" and thought their caching directory is not writable) = 1.2.3.7.1 - 31 July 2023 * Fix: On some environments, FS_CHMOD_DIR and FS_CHMOD_FILE weren't defined, triggering errors such as: Uncaught Error: Undefined constant "WpAssetCleanUp\FS_CHMOD_DIR" = 1.2.3.7 - 30 July 2023 * WordPress 6.3 compatibility: Updated the code to avoid the following notice: "Function WP_Scripts::print_inline_script is deprecated since version 6.3.0" * "WPML Multilingual CMS" plugin compatibility: Whenever "Unload on the homepage" is used in "Plugins Manager" (or a load exception rule), the rule will apply for any language that is set (e.g. www.mydomain.com/es, www.mydomain.com/de, www.mydomain.com/fr) * "Site Kit by Google" plugin compatibility: JavaScript files from this plugin are added to the ignore list to avoid minifying as they are already minified (with just a few extra comments) and minifying them again, due to their particular structure, resulted in JS errors in the browser's console * Improvement: Changed the name of the cached files to make them more unique as sometimes, handles that had UNIX timestamps and random strings (developers use them for various reason, including debugging), were causing lots of redundant files to be generated in the assets' caching directory * Added jQuery Migrate script to the ignore list to avoid minifying it (along with jQuery leave it as it is, if the developer decided to load the large versions of the files, for debugging purposes) * "Plugins Manager": Added extra queries to the ignoring list when unloading (or loading as an exception) the homepage (e.g. www.mysite.com/?utm_source=...&ref=... will be treated like www.mysite.com); If there's a query that is not within the ignore list, the URL won't be considered a homepage: www.mysite.com/?ajax-action=value-here&nocache=... (even if "nocache" is in the ignore list, "ajax-action" isn't and this suggests that an action is taking place and the URL is not actually the regular homepage that is visited) * Fix: Use the same "chmod" values from FS_CHMOD_DIR and FS_CHMOD_FILE (WordPress constants) for all the files and directories from the assets' caching directory when attempting to create a file/directory to avoid permission errors on specific environments = 1.2.3.6 - 26 July 2023 * "WPML Multilingual CMS" compatibility: Syncing post changes on all its associated translated posts / e.g. if you unload an asset on a page level in /contact/ (English) page, it will also be unloaded (synced) in /contacto/ (Spanish) and /kontakt/ (German) pages * "WP Rocket" compatibility: "Settings" -- "Optimize JavaScript" -- "Combine loaded JS (JavaScript) into fewer files" is automatically disabled when the following option is turned on in "WP Rocket": "File Optimization" -- "JavaScript Files" -- "Delay JavaScript execution" * "WP Rocket" compatibility: "Settings" -- "Optimize CSS" -- "Defer CSS Loaded in the (Footer)" is automatically set to "No" whenever the following option is turned on in "WP Rocket": "File Optimization" -- "Optimize CSS delivery" -- "Remove Unused CSS". * "Hide My WP Ghost – Security Plugin" compatibility: Asset CleanUp Pro's HTML alteration is done before the one of the security plugin so minify/combine CSS/JS will work fine * Front-end view: In the "Asset CleanUp Pro" top admin bar menu, a new link is added that goes directly to the manage CSS/JS area for the current visited page for convenience * Remove the usage of "/wp-content/cache/storage/_recent_items" directory from the CSS/JS caching directory as it was redundant to the caching functionality = 1.2.3.5 - 18 July 2023 * "Plugins Manager": Option to unload & load plugins as an exception (from any unload rule) on the following built-in WordPress pages: Search, Author & Date / read more: https://assetcleanup.com/docs/?p=1647 * "Plugins Manager": Option to contract / expand the plugins for easier management, which could be effective when having lots of plugins activated (the contract/expand state is remembered after the click) * Fix: When plugins are unloaded via "Plugins Manager" and flush_rewrite_rules() is called in plugins/themes (which is a rare thing and an expensive operation), the rewrite rules from "wp_options" ('rewrite_rules' option) could be re-updated incompletely (since some plugins that had rules weren't loaded at the time); This sometimes led the website's administrator to go to "Settings" -- "Permalinks" and manually re-update the settings = 1.2.3.4 - 9 July 2023 * "Plugins Manager": Ability to unload plugins (and load them as an exception from any unload rule) on all other taxonomy pages that are detected from other plugins/themes, apart from the default WordPress ones ("category", "post_tag") and some popular ones from WooCommerce: "product_cat" & "product_tag" * Option to skip "Cache Enabler" cache clearing via using the "WPACU_DO_NOT_ALSO_CLEAR_CACHE_ENABLER_CACHE" constant (e.g. set to 'true' in wp-config.php) - read more: https://www.assetcleanup.com/docs/?p=1502#wpacu-cache-enabler * "Knowledge Base for Documents and FAQs" plugin: Do not show the CSS/JS manager at the bottom of the page when "Edit KB Article Page" is ON * New "Brizy - Page Builder" setup: Prevent Asset CleanUp Pro from triggering when the editor is ON * Fix: "Do not load Asset CleanUp Pro on this page (this will disable any functionality of the plugin)" - if turned ON, make sure the hardcoded list loads fine in the front-end view (Manage CSS/JS) = 1.2.3.3 - 1 July 2023 * "Overview" area: Added notifications about deleted posts, post types, taxonomies and users, making the admin aware that some rules might not be relevant anymore (e.g. the admin uninstalled WooCommerce, but unload rules about "product" post types or a specific product page remained in the database) * Stopped using the "error" class (e.g. on HTML DIV elements) and renamed it to "wpacu-error" as some plugins/themes sometimes interfere with it (e.g. not showing the error at all, thus confusing the admin) * Keep the same strict standard for the values within the following HTML attributes: "id", "for" to prevent any errors by avoiding any interferences with other plugins * Fix: Some rules were not fully exported & imported (e.g. the rules from "termmeta" and "usermeta" tables) * PHP 8.2.7 compatibility = 1.2.3.2 - 11 May 2023 * New Option: Contract / Expand All Assets within an area (e.g. from a plugin) * Improvement: Offer a fallback method to fetch the author's information on the author archive page (when unload rules are set within archive author pages) * Improvement: Only print the notice (as an HTML comment) about the "photoswipe" unload to the administrator (it's a special case where the HTML has to be hidden in case the CSS file gets unloaded) * Fix: In specific WordPress environments, when rules in "Plugins Manager" are used related to the page type (e.g. unload on all pages belonging to a specific post), the permalinks are not working as expected and they have to be resaved within the Dashboard * Fix: 'PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in [...]/pro/early-triggers-pro.php' = 1.2.3.1 - 2 March 2023 * Improvement: Avoid deprecated errors related to PHP 8+ (although harmless, they are annoying to notice in the error_log files) * Improvement: When using plugins such as "Learndash", the post types weren't detected in the permalinks structure when plugin unload rules had to be applied * Fix / PHP Warning: Undefined array key "script_src_or_inline_and_noscript_inline_tags" in [...]/templates/meta-box-loaded-assets/view-hardcoded-default.php / Sometimes, if there are no STYLES OR SCRIPTS to be detected on a specific page (it rarely happens), the list of assets will not be fetched in PHP 8+ * Fix: Plugin unload & load exception rules weren't working on specific environments within "Plugins Manager" * In case a RegEx rule is invalid (e.g. set incorrectly by the admin in "Plugins Manager"), it will be recorded as an error and should be visible in the error_log files for debugging (e.g. good when using a plugin such as "Error Log Monitor") = 1.2.3.0 - 6 February 2023 * Improvement: Make sure the plugin unload rules by page type are always triggering in any WordPress setup, disregarding the post status (if the page is only for administrators, the rule will take effect) * WPML Fix: Prevent Asset CleanUp Pro from triggering whenever /?wpml-app=ate-widget is loaded (in some environments, the content returned was empty and the automatic translation area was not loading) * PHP 8+ Fix / Sometimes when "Manage in the Front-end view" is enabled, the following error shows up when managing assets: Uncaught Error: json_decode(): Argument #1 ($json) must be of type string, array given in [...]/classes/Main.php * PHP 8+ Fix / The following notice triggers when WP_DEBUG is enabled - Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in [...]/classes/OptimiseAssets/OptimizeCommon.php = 1.2.2.9 - 18 December 2022 * Sometimes, when "Preview Changes" is used (e.g. when DIVI theme is enabled) from an edit page area, the preview doesn't trigger because of a JS error from script(.min).js * Fix: Prevent undefined errors from the newly added "tag_output" object within the hardcoded assets list = 1.2.2.8 - 4 December 2022 * Added NOSCRIPT tags (usually added after SCRIPT tags) to the hardcoded list of assets (e.g. if you unload a tracking script on a page, you can also unload its NOSCRIPT tag as well, if any was added) * Elementor Templates: Hide "Manage CSS & JS" whenever hovering over a template title as managing the assets is meant for public pages (not templates added to pages) * Fix: Hardcoded assets / When an inline SCRIPT was detected, it was erroneously detected as a SCRIPT with the "src" attribute, if the inline content contained the "src" string (e.g. ) * Fix: If a plugin's option from "options" table had an empty value (e.g. edited manually by a developer for debugging purposes), the plugin was using add_option() to update it instead of update_option() which is the right function to use in this situation = 1.2.2.7 - 22 November 2022 * Preload CSS/JS: If a tag (LINK/SCRIPT) is wrapped by Internet Explorer comments, make sure the wrapping is preserved when the asset is preloaded, otherwise, the preloading would occur in all browsers when its meant to be loaded only by Internet Explorer * CSS/JS manager via "Manage in the front-end view": Make sure to notify the admin about hardcoded assets wrapped by Internet Explorer comments * Hardcoded assets improvement: Use fewer resources when the unloading is triggered * Fix: In rare cases when an option value remained empty in the database (e.g. edited directly through phpMyAdmin), add_option() was used instead of update_option() = 1.2.2.6 - 17 November 2022 * Improvement: Whenever you mark a hardcoded tag as unloaded, it will stay unloaded (the rule will be kept in place) as long as its content or the relative source value will stay the same (e.g. if you unload will be considered the same as ) * Improvement: Better detection of the tags (including the hardcoded ones) when the source of a tag (e.g. "src" or "href") is not wrapped around quotes or even has spaces added after or before the equal sign / e.g. OR * New Option: Added the load exception (if any unload rule is applied) based on the post type for hardcoded assets (e.g. 'On all WooCommerce "Product" pages') * Whenever XML-RPC is completely disabled in 'Settings' -- 'Disable XML-RPC', make sure the following option is automatically turned ON: 'Settings" --- 'HTML Source CleanUp' -- 'Remove "Really Simple Discovery (RSD)" link tag?' * Fix: 'SweetAlert 2' files were missing when 'SCRIPT_DEBUG' was turned OFF (most cases) which sometimes prevented the modal to show with specific information regarding the plugin rules that were used * Fix: The size of an asset loaded locally was not shown when the path to the file was relative and starting with the URI of the WordPress site URL / Example: The WordPress site URL was "https://yoursite.com/blog" and the tag was "" * Fix: "Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in "/wp-content/plugins/wp-asset-clean-up-pro/classes/OptimiseAssets/(OptimizeCss.php and OptimizeJs.php)" * Fix: Exclude from optimisation JS files that contain "/*@cc_on" and "@*/" as they are meant to be loaded by Internet Explorer and not stripped if they only contain commented code = 1.2.2.5 - 6 November 2022 * "CSS/JS Manager": If a handle has inline code associated with it, mention the size (e.g. bytes, KB) of that inlined LINK or SCRIPT (just like it's mentioned for the LINK tags with the "href" attribute and SCRIPT tags with the "src" attribute) * Higher accuracy in detecting (for optimization) the LINK tags that are loading CSS/JS files * Improvement: In case a WordPress installation has a subdirectory (e.g. www.mysite.com/blog), make sure any assets that have relative URIs (e.g. /blog/wp-content/style.css) are all optimized properly = 1.2.2.4 - 30 October 2022 * Improvement: If an asset is an unloaded through the CSS/JS manager and a preload (via LINK tag) was already set through another plugin (e.g. "Pre* Party Resource Hints") or within the theme, for instance in functions.php, make sure to strip the preloading as it's useless if the actual asset is not loaded in the first place * "Plugins Manager" improvement: Compatibility with "Premmerce Permalink Manager for WooCommerce" plugin (if the URL of the product is changed, make sure the rules based on the "product" post type are still applied) * If "SCRIPT_DEBUG" is set to "true", load the non-minified versions of the plugin's assets / read more: https://wordpress.org/support/article/debugging-in-wordpress/#script_debug * Fix: Make sure none of the plugin's assets are included within any combined CSS/JS files (if the options are enabled in "Settings") * Fix: Make sure to offer fallback to "wp_json_file_decode" in case the WordPress version is below 5.9.0 (as compatibility with older WP versions is promised) = 1.2.2.3 - 6 October 2022 * By default, the front-end optimization is not triggered for URIs with query strings (as they are usually not cacheable); Make more exceptions and trigger the optimization when there are common query strings (the page is cacheable) in the URI such as the ones starting with "utm_", "mtm_", "fb_", etc. * Better detection of the homepage in early checks for rules set in "Plugins Manager" by ignoring more common query strings such as the ones starting with "utm_", "mtm_", "fb_", etc. * Higher accuracy in detecting WordPress core files (some of the undetected WP core files used to be shown in the "External 3rd Party" area) * Higher accuracy in detecting a DIVI page builder: Asset CleanUp doesn't load any rules when /wp-admin/admin.php?page=et_theme_builder is loaded unless you want to -- read more: https://www.assetcleanup.com/docs/?p=1260 * Cache Enabler Compatibility: Avoid the deprecated error related to "cache_enabler_before_store" by checking the version of Cache Enabler and using the right filter * Improvement: Make sure all the unload rules from "Overview" are marked with red font as all load exceptions are marked with green font * Fix: PHP 8.1 - Make sure substr() doesn't have any null parameters to avoid any errors * Fix: When editing a post/page and "Classic Editor" plugin is activated (basically when the page looks the same as it used to before Gutenberg editor was implemented in WordPress), the "Preview Changes" button from the top right side box does not work if the CSS/JS manager is loaded = 1.2.2.2 - 30 September 2022 * "CSS & JS Manager" -- ("Posts" | "Pages") -- Notify the admin if there aren't any posts/pages where assets could be managed - e.g. in fresh WordPress installations or when a website just doesn't have articles ("posts") * Make sure Asset CleanUp Pro is not loading by default when DIVI builder previews are triggered (e.g. when the "et_pb_preview" query string is in the URI) * Fix: Make sure the hardcoded assets are printed when managing the assets in the front-end view ("Settings" -- "Plugin Usage Preferences" -- "Manage in the Front-end") * Fix: Added missing link to the special settings documentation post = 1.2.2.1 - 26 September 2022 * Show any special settings in "Overview" -- read more: https://www.assetcleanup.com/docs/?p=1495 * Make sure the plugin unload rules for REST API calls (read more: https://www.assetcleanup.com/docs/?p=1469) apply on AJAX calls as well (e.g. when a plugin uses jQuery AJAX code to fetch information from a REST API call) * Notify the admin when the tracking notice is shown that he/she can manage this option in the "Settings" area (e.g. in case closing the notice box doesn't work because of some JavaScript errors on that page, coming from a different plugin or the theme) * Make sure the user is redirected only once to the "Getting Started" page after the plugin is activated the first time (not after every re-activation as many developers are doing debugging) * Reduce the number of DB calls when visiting the "Plugins" page within the Dashboard and the "License" page from Asset CleanUp Pro's menu = 1.2.2.0 - 17 September 2022 * Option to unload plugins via "Plugins Manager" when REST API calls are made via define('WPACU_LOAD_ON_REST_CALLS', true); that can be set in wp-config.php / read more: https://www.assetcleanup.com/docs/?p=1469 * "Test Mode" now applies within the Dashboard as well (if there are unloading rules in 'PLUGINS MANAGER' -- 'IN THE DASHBOARD /wp-admin/') in case the logged-in user is NOT an administrator * Do extra checks to avoid calling get_transient() when it's not needed on specific pages (to reduce the number of DB calls) * Code that triggered anywhere now gets triggered on the front-end view as it's only needed there * DB calls related only to the "Overview" page were triggered on all plugin's pages (avoid that) = 1.2.1.9 - 10 September 2022 * On pages without any unloading rules, do not make any DB calls or trigger extra PHP code to retrieve any load exceptions as they are irrelevant in this situation since the assets are loaded anyway * Optimised the code to avoid triggering DB calls to the "options" table to check specific transient values * Remove extra DB queries related to "post_format" as this taxonomy is irrelevant for managing in Asset CleanUp Pro * When Asset CleanUp Pro is prevented from loading via the rules from "Settings" -- "Plugin Usage Preferences" -- "Do not load the plugin on certain pages" OR from "Do not load Asset CleanUp Pro on this page (this will disable any functionality of the plugin)" within "Page Options" area (when managing assets for a specific page), make sure the checking is done earlier to avoid an extra DB query that would become irrelevant if the plugin would not be loaded on that page = 1.2.1.8 - 5 September 2022 * Optimisation: Reduce the number of queries made to the database & trigger fewer code during early code loaded in Asset CleanUp Pro's MU plugin (e.g. to determine if the URI is a homepage, to determine the page type based on the URI) * "Plugins Manager": Make sure the green font shows for any load exception rule that is chosen * "Plugins Manager" Fix: When non-Latin characters were used in the URI, some plugin unload/load exception rules were not working such as the ones based on the post type (e.g. post, page, product, tag) and taxonomy (e.g. category, tag, product category, product tag) * "Plugins Manager" Fix: The load exception rule was not applied for plugins on taxonomy pages ('category', 'post_tag', 'product_cat', 'product_tag') when set using the following option: "On the following taxonomy pages:" = 1.2.1.7 - 2 September 2022 * Bricks builder edit mode: Allow Asset CleanUp Pro to trigger plugin & CSS/JS unload rules when the page editor is in use to make the editor load faster via define('WPACU_LOAD_ON_BRICKS_BUILDER', true); that can be set in wp-config.php / read more: https://www.assetcleanup.com/docs/?p=1450 * Compatibility with the "WordPress Popular Posts" plugin & other plugins (when optimizing the JavaScript code) that change the type of inline script tags to "application/json" (having a JSON string that is later read by the plugin's script) * Fix: "Plugins Manager" -- The unload rule wasn't working for built-in "category" pages = 1.2.1.6 - 19 August 2022 * Updated T-Regx PHP library (for handling specific regular expressions) to v0.34.2 * Escaped PHP-echoed variables/constants by using functions such as esc_attr() or esc_html_e() * Minify CSS Fix: If there are new lines within calc(), the content minified ends up without spaces between the operators (e.g. the plus sign), which breaks the CSS code * Fix: On some servers, PHP warning are shown on all taxonomy pages (e.g. 'Undefined array key "unload_via_tax"', 'Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given') = 1.2.1.5 - 4 August 2022 * Flush "W3 Total Cache" (if the plugin is activated) object cache whenever the list of CSS/JS files is fetched by Asset CleanUp Pro to avoid retrieving the previous configuration after changes are made to the CSS/JS manager * Improvement: Add more uniqueness to the plugin's JS code deferring the CSS to avoid any conflicts with other similar codes * Fix: The requested URI was sometimes wrongly detected as the homepage, if some common query strings (e.g. "utm_source") were in the URI = 1.2.1.4 - 18 June 2022 * "Plugins Manager": Ability to unload plugins (and load them as an exception from any unload rule) on any taxonomy page * "Bricks – Visual Site Builder for WordPress": Do not trigger Asset CleanUp Pro whenever the page builder is used * Fix: Better RegEx for detecting "@import" within CSS comments when optimizing the CSS, thus avoiding useless attempts to fetch the information from the @import locations, since they are commented and not needed in the final CSS version = 1.2.1.3 - 28 May 2022 * "Plugins Manager": Ability to unload plugins (and load them as an exception from any unload rule) on the homepage (no more complex RegEx required) & on all "Category" and "Tag" pages (the default WordPress taxonomies) * Fix: "Google Fonts" -- "Apply font-display: CSS property value" was not applying for hardcoded LINK tags when the Google fonts were not combined * Fix: "Plugin Usage Preferences" -- "Manage in the Dashboard" -- "Fetch the assets on a button click": if the user updates a post (when Gutenberg editor is used), the CSS/JS manager loads, when it shouldn't as the admin never used the button to fetch the CSS/JS list in the first place = 1.2.1.2 - 3 May 2022 * "Plugins Manager": Ability to unload plugins (and load them as an exception from any unload rule) in the front-end view on all pages belonging to specific post types * New option in the settings' vertical menu: "Disable RSS Feed" * Fix: Improved the quality of the code behind the snippet for the "wpacu_critical_css" filter; Show all the code without the need to scroll the textarea = 1.2.1.1 - 20 April 2022 * Fix: 'PHP Warning: Undefined array key "site_url" in [...]/templates/_admin-pages-critical-css/common/_applies-to.php on line 11' * Fix: Load exceptions via RegEx for CSS/JS weren't always matched in PHP 7.1+ = 1.2.1.0 - 18 April 2022 * PHP (up to) 8.0.17 compatibility: Make sure no deprecated notices are shown when WP_DEBUG is ON due to older PHP code that is still compatible with PHP 5.6 * Make sure the list of unloaded assets/plugins from the top admin bar is not broken due to the theme used that might have CSS interfering with Asset CleanUp Pro's one * Reduce the total plugin's size by compressing some of its images * "Transliterator - WordPress Transliteration" compatibility: Avoid breaking the HTML content in Asset CleanUp's admin pages = 1.2.0.9 - 17 March 2022 * Added "wpacu_print_info_comments_in_cached_assets" filter hook for the option to avoid printing by default of plugin's comments in the CSS/JS files (e.g. the relative path to the file) * Fix: Make sure that jQuery Chosen (the nice looking drop-down) is loaded and applied to elements (e.g. taxonomies list) within the CSS/JS manager if loaded from the Dashboard via "WP Remote Post" * Fix: Preloading (basic/async) stopped working in the previous version * Fix: Premium unload/load exceptions rules were not always applying if there were no basic ("Lite" version related) rules applied (which is irrelevant as the user can only apply premium rules if he/she prefers) * UI fix: Async/Defer on this page was not taken into consideration as an applied rule when using the following layout: "Grouped by having at least one rule & no rules" = 1.2.0.8 - 24 February 2022 * Fix: When a static page is set as a homepage in "Settings" - "Reading", any load exceptions set as "On this page" would not take effect for the homepage = 1.2.0.7 - 23 February 2022 * Reduced the total number of template files (e.g. some were redundant) * Reduced the size of plugin's images * Higher accuracy in detecting Zion Page Builder to prevent Asset CleanUp Pro from triggering when the page builder is used * "Overview" improvement: Make sure the unloaded CSS/JS from inactive themes is highlighted to alert the admin that the rules might never be needed and can be safely removed * "Overview" fix: The confirmation for clearing rules belonging to inactive CSS/JS wasn't always showing the right handle, thus confusing the admin when confirming the action * Fix: When CSS content gets cached, make sure to avoid altering incorrectly the "url" value when it starts with # - e.g. clip-path: url(#elementIdHere); * Fix: Sometimes when a static page was set as the homepage in "Settings" - "Reading" and then unset, the CSS/JS manager was not showing up and the "Page Options" was shown instead = 1.2.0.6 - 1 February 2022 * Fix: Make sure all load exceptions for any unload rule are included in "Tools" -> "Import & Export" * Fix: PHP Warning: in_array() expects parameter 2 to be array, null given in /classes/Main.php on line 931 * Fix: Whenever unloading on all [taxonomy type] pages was enabled the following type of message wasn't showing in the CSS/JS manager: "This stylesheet is unloaded on all category taxonomy pages." * Avoid notice errors regarding taxonomies that do not exist anymore when having WP_DEBUG turned on by using term_exists() = 1.2.0.5 - 28 January 2022 * New Feature: Unload (or load as an exception) CSS/JS on all pages of a post type (posts, pages, WooCommerce products, etc.) when specific taxonomies (categories, tags, etc.) are set (read more: https://www.assetcleanup.com/docs/?p=1415) * Fix: The list "Grouped by loaded or unloaded status" was sometimes showing unloaded assets as "loaded", confusing the admin = 1.2.0.4 - 11 January 2022 * Improvement: Load jQuery UI files locally, thus removing any unnecessary dependency on another site (e.g. not from "ajax.googleapis.com") * Improvement: Escape as late as possible all variables when echoed * Improvement: Replaced json_encode() with wp_json_encode() for better security * Fix: When a word containing "calc" (e.g. calculation) was included in CSS comments, sometimes, the code following the comment was stripped = 1.2.0.3 - 30 November 2021 * PHP 8 Fix: 'PHP Warning: Undefined array key "critical_css_disabled"' in /templates/admin-page-overview.php * Fix: 'Error: The security check has failed.0' when loading the CSS/JS list via the 'Direct' method within the Dashboard = 1.2.0.2 - 23 November 2021 * Added the "wpacu_settings" filter - add_filter() - so the plugin's "Settings" can be altered via code (e.g. adding if clauses programmatically to alter the value of a certain textarea or have an option disabled on specific pages) when necessary * Prevent the following option from being accidentally disabled: 'Ignore dependency rule and keep the "children" loaded' (e.g. in rare cases, some CSS/JS have dependencies on certain pages only) * Fix: Added nonce checks for every WordPress AJAX call to improve security = 1.2.0.1 - 14 September 2021 * Automatically preload any combined JS files within the BODY tag (that do not have any "defer" or "async" attribute) to improve the Google PageSpeed Insights score for the following: "Preload key requests" * Reorganised the layout for "Manage in the Dashboard" from "Settings" -> "Plugin Usage Preferences" * Fix: When minifying CSS content, do not strip the extra calc() when something like the following is used: "calc( 50% - 22px ) calc( 50% - 22px )" * Fix: When Gutenberg editor is used and the post is updated, sometimes the CSS/JS manager is reloaded BEFORE the changes are saved showing the same state as it used to be confusing the admin that the changes weren't applied = 1.2.0.0 - 29 August 2021 * If the security nonce is expired or not sent when certain forms are submitted, show an error message about the potential problems and how to fix them without showing the standard "Link has expired" error * Added the plugin version under the "Pro" text next to the logo * WPML Fix: Load the combined CSS/JS files from the right domain to avoid any CORS policy issues (in case there are multiple domains for each language) * Fix: The CSS/JS manager form wasn't submitting when "Do not load Asset CleanUp Pro on this page (this will disable any functionality of the plugin)" was enabled * Fix: Make sure the loading exception rule if the user is logged-in is saving correctly * Fix: Do not show the "loading based on screen size" area if there is no SRC attached to the handle (e.g. "woocommerce-inline" handle) * Fix: Do not print anything whenever a cron job is triggered (this is only for debugging) * Fix: Assets' position was not shown correctly within the Dashboard (HEAD instead of BODY) * Fix: Do not trigger any cache clearing and page preloading if the post status is "draft" (after the post is saved) * Fix: Avoid changing the update plugin link as "Plugin failed" should not be a problem anymore = 1.1.9.9 - 31 July 2021 * Compatibility with FlyWheel hosting accounts (and other hosting accounts using the same pattern): The WordPress root directory is different than the ABSPATH one in relation to the "wp-content" directory where all or most of the CSS/JS files are located (e.g. the file size wasn't calculated for the static files before this change, which is needed for certain plugin functionality such as calculating small files for inlining) * Compatibility fix: Whenever the 'active_plugins' option is updated incorrectly by another plugin, it might contain the filtered list done via "option_active_plugins" and not the original list; Put back the missing plugins to avoid ending up with site-wide deactivated plugins (the ones with unloading rules in "Plugins Manager") * Avoid the same database query to be called more than once within the assetCleanUpHasNoLoadMatches() function * Limit the number of fields that are submitted whenever CSS/JS manager is used by re-organizing the fields' structure; Disable certain inputs that are at the time irrelevant for submitting (it helps if max_input_vars from php.ini is set to the default 1000 which is a low number for large forms) * "Overview" page change: Highlight posts that are not "publish" or "private" within the "Page Options" area * Do not add any CSS/JS manager link to the post's actions if the post is not "publish" or "private" (within "All Posts" page - /wp-admin/edit.php) * Order in alphabetical order the unloaded plugins from the top admin bar "Asset CleanUp Pro" menu = 1.1.9.8 - 25 July 2021 * Cached the plugin filtering (in case there are plugin unload rules) to decrease the total page loading time whenever a non-cached page is visited * Limit the number of fields that are submitted whenever CSS/JS manager is used (it helps if max_input_vars from php.ini is set to the default 1000 which is a low number for large forms): Whenever "+" or "-" is used to change the state of the asset row, the change is done asynchronously via an AJAX call * Avoid any errors related to parse_str() (e.g. when the string is too long) * Whenever plugin filtering from the Dashboard is used ("Plugin Manager" -> "IN THE DASHBOARD /wp-admin/"), do not trigger any plugin unload rules in Asset CleanUp's pages (e.g. to avoid showing incomplete custom post types) and in the following admin pages: /plugins.php, /plugin-install.php, /plugin-editor.php, /update-core.php = 1.1.9.7 - 15 July 2021 * "Plugins Manager" Multisite compatibility: Make sure network-activated plugins are fully manageable (e.g. only plugins activated per site were showing) * If "Contract All Groups" & "Expand All Groups" buttons are used, make sure the state (contracted or expanded) whenever the admin manages the assets again (the following option is updated in the background: "Settings" -> "Plugin Usage Preferences" -> "On Assets List Layout Load, keep the groups:") * Fix: "Uncaught ReferenceError: wpacuLoadCSS is not defined" was sometimes showing. It's been fixed by updating the fallback script needed for CSS async preloading (e.g. for browsers that do not support it by default) * Fix: "Warning: Constant WPACU_PREVENT_ANY_FRONTEND_OPTIMIZATION already defined" = 1.1.9.6 - 3 July 2021 * The meta box "Asset CleanUp Pro: Page Options" has had its contents moved to the "Page Options" area from the CSS/JS manager in any location the assets are managed * Added "Page Options" for the homepage as well (e.g. latest posts) besides posts, pages, and any public custom post types (e.g. WooCommerce product pages) * Prevent the plugin from triggering when WooCommerce API calls are made * Make no PHP errors are logged due to $allEnabledLocations not being initially declared as an empty array * When checking if critical CSS is enabled for any custom taxonomy/post type, make sure to ignore the inactive ones (e.g. a taxonomy that is not used anymore) * Make sure the following option works well when non-Latin characters are in the URI: "Do not load the plugin on certain page" * Fix: When hovering over the post's title in the Dashboard's posts list (either post, page, or custom post type), make sure "Manage CSS & JS" is only shown to the right admins to avoid any confusion * Fix: When assets' list is fetched, WP Rocket was disabled which made some plugins/themes that are directly calling WP Rocket functions to generate fatal errors * Fix: Make sure the handles with the following option always get unloaded: 'Ignore dependency rule and keep the "children" loaded' * Fix: Fatal error: Cannot redeclare assetCleanUpClearAutoptimizeCache() - if both plugins (Lite & Pro) are activated = 1.1.9.5 - 26 May 2021 * Make sure the plugin can be updated via WP CLI (so far, the update was visible within the Dashboard in /wp-admin/) * Option to skip Autoptimize cache clearing via using the "WPACU_DO_NOT_ALSO_CLEAR_AUTOPTIMIZE_CACHE" constant (e.g. set to 'true' in wp-config.php) * Fix: Make sure that applying to unload on all pages of a certain post type works from "CSS & JS MANAGER" (which is the new place for managing CSS/JS files within the Dashboard, outside the edit post/page area) * Fix: Manage assets didn't work on "CSS & JS MANAGER" -> "Homepage" tab if the actual page was a static one set in "Settings" -> "Reading" = 1.1.9.4 - 16 May 2021 * New Option: Manage assets loading for posts, pages, and custom post types within "CSS & JS MANAGER" -> "MANAGE CSS/JS" without the need to go to edit post/page area which is often bulky and could have too many fields from the theme & other plugins leading to a higher number than the one set in php.ini for "max_input_vars" * Higher accuracy in preventing the plugin from triggering when there are REST requests * Fix: Make sure RegEx rules for unloading plugins/assets are working well when non-latin characters are in the URI * Fix: Make sure the plugin works well (e.g. without any PHP errors) if the plugins' directory is changed (e.g. from "plugins" to "plugins-custom-name") * Fix: Critical CSS was not showing in the front-end view for all page type * Debugging purposes: Prevent CSS/JS from loading based on the media query via /?wpacu_no_media_query_load_for_css & /?wpacu_no_media_query_load_for_js = 1.1.9.3 - 25 April 2021 * Option to manage critical CSS (in "CSS & JS Manager" » "Manage Critical CSS") from the Dashboard (add/update/delete), while keeping the option to use the "wpacu_critical_css" hook for custom/singular pages * Improvement: Make sure "&display=" is added (if enabled) to Google Fonts links if their URL is changed to fit in JSON formats or JavaScript variables * Fix: Make sure managing CSS/JS for taxonomies from the Dashboard (e.g. when editing a category) works 100% * Fix: Clearing load exceptions from "Overview" didn't work for all pages of a certain post type = 1.1.9.2 - 16 April 2021 * Divi builder edit mode: Allow Asset CleanUp Pro to trigger plugin & CSS/JS unload rules when the page editor is on to make the editor load faster via define('WPACU_LOAD_ON_DIVI_BUILDER_EDIT', true); that can be set in wp-config.php / read more: https://www.assetcleanup.com/docs/?p=1260 * Cache Enabler (compatibility with older versions): Make sure the deprecated "cache_enabler_before_store" hook is in use * Unload "photoswipe" fix: If WooCommerce's PhotoSwipe was unloaded, empty dots were printed at the bottom of the page from unused/unneeded HTML (hide it by marking the DIV with the "pswp" class as hidden) * Improvement: Only use 'type="text/css"' when it's needed (e.g. an older theme is used that doesn't support HTML5) * Improvement: Make SweetAlert2 independent (styling, functionality) from other SweetAlert scripts that might be loaded from other plugins/themes (e.g. "WooCommerce Quickbooks Connector" export in an edit product page was not working) * Fix: Better detection for the homepage (e.g. the latest posts page was mistaken with the homepage in the front-end view of the CSS/JS manager) * Fix: Better detection for the singular page; Make sure the latest posts page such as the "Blog" one is also checked) * Fix: Make sure the license deactivation works even if the license is not valid so that it could be replaced with a valid one (e.g. a null version was initially used) = 1.1.9.1 - 1 April 2021 * Minify CSS/JS improvement: From now on, the minification can be either applied to files, inline JS code, or both (before, the files minification had to be enabled to files first and then to inline JS code; sometimes, users just wanted to minify inline code and leave the files untouched) * Fix: On some WordPress installations, the plugin's menu icon from the Dashboard's sidebar was not showing properly (the height was too large) * Fix: If there are too many assets/plugins unloaded, when showing up in the top admin bar menu, the list was not scrollable (e.g. only 20 out of 40 assets were shown because the height of the browser's window wasn't large enough which can not be expanded on smaller devices) * Fix: If the current theme supports HTML5, the 'type="text/javascript"' attribute is not added any more to altered SCRIPT tags by Asset CleanUp, thus avoiding any errors from W3C validators * Fix: When "Move All