=== Optimize Scripts & Styles === Contributors: seismicpixels Donate link: http://www.seismicpixels.com/coffee.html Tags: scripts, styles, optimize, optimization, minify, compress, seo Requires at least: 4.0 Tested up to: 4.9.6 Requires PHP: 5.6 Stable tag: 1.8.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Optimize Scripts & Styles combines scripts and styles on your site, minifies them and provides cachable versions for improved site performance. == Description == Optimize Scripts & Styles combines scripts and styles on your site, minifies them and provides cachable versions. This will help your site's overall performance and user experience. For developers, this allows you to maintain uncompressed versions for development themes or plugins, while compressing them for a production environment. For you SEO buffs, it also cleans up the number of scripts that get included and downloaded to your site visitors, helping your overall PageSpeed scrore. Header and footer script locations are maintained as well as any localized data used for the scripts and the minified files are stored in the /cache folder, making it friendly for plugins like WP Super Cache. Media attributes are also maintained for print stylesheets. == Installation == 1. Upload the plugin files to the /plugins/ directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the 'Plugins' screen in WordPress == Frequently Asked Questions == = Will this work with caching plugins? = This plugin was born out of a frustration with the method of combining scripts in W3 Total Cache. Simply disable the minification portion of W3 and use this plugin to manage it instead. Clearing the cache will also clear these scripts for you. It has also been tested with WP Super Cache. When you clear the cache in WP Super Cache, the contents of the optimized scripts and styles folders are also removed, triggering the creation of new versions. = How are scripts and styles found in the site? = All local scripts and styles registered via wp_register_script, wp_enqueue_script, wp_register_style, wp_enqueue_style will be included in the optimized and versions. Plugins or themes that add scripts directly will not have their scripts or styles included. This plugin ignores off-site scripts and styles. Those will load as they normally would. = Can I ignore certain scripts or styles? = Yes! You can provide a comma separated list of script or style handles to ignore them. View the Cached files section to get the handles you need. jQuery is always ignored as many components rely on jQuery being available. = Where can I see what scripts are included? = Each file that is generated has a matching .txt file in the cache folder which gives details about what was included. = Does this plugin combine and minimize Admin scripts? = No. = Why does this not work while logged in? = Optimization may be disabled for logged in users. Check your plugin settings. == Changelog == = 1.8.2 = * Optimize Scripts & Styles now has an admin screen under Settings! * On/off for scripts optimization * On/off for styles optimization * On/off to enable optimization for logged in users * On/off to show the Clear Optimized Scripts quick link in the admin header * Added the ability to ignore specific scripts * Added the ability to ignore specific styles * The admin page has a Delete Cache button * Added a section to view cached scripts for debug & fine-tuning * Added a section to view cached styles for debug & fine-tuning * Removed gzip - this should be done in the .htaccess file if possible * Removed a default exclusion of a Visual Composer stylesheet * Added a check for all styles being ignored. A flag file will no longer be generated = 1.8.1 = * Changed absolute paths to use WordPress' built in features * Added better cache clearing for W3 Total Cache & WP Super Cache = 1.8 = * Major update in the way header/footer scripts are managed * Much more reliable in making sure everything gets loaded in the right place * Added .txt to flag files to make it easier to open them * Added comment to footer when not logged in = 1.7 = * Added comment to footer when logged in * Changed script version in wp_register to match filemtime to encourage caching/refreshing in browsers = 1.6 = * Disabled for logged in users * Fixed an issue where the script wasn't ignoring css files that were in $ignore * Added js_composer_front to ignore since it's causing an issue with minification = 1.5 = * Major update * Added better support to catch javascript in the footer via two separate functions/hooks = 1.4 = * Cleaned up files * Added minify! (always on) * Added gzip (turned off - still testing) = 1.3 = Added check for file_get_contents http wrapper = 1.2 = Added in support for conditional stylesheets == Upgrade Notice == = 1.8 = This update fixes the way the plugin keeps track of already processed scripts. You should be using at least this version.