admin_url( 'admin-ajax.php' ) ) ); register_setting( 'aj_options', 'aj_enabled' ); register_setting( 'aj_options', 'aj_method' ); register_setting( 'aj_options', 'aj_exclusions' ); register_setting( 'aj_options', 'aj_upgrade_notice' ); register_setting( 'aj_options', 'autoptimize_enabled' ); register_setting( 'aj_options', 'aj_autoptimize_enabled' ); $autoptimize_enabled = get_option( 'autoptimize_enabled' ); $aj_autoptimize_enabled = get_option( 'aj_autoptimize_enabled' ); if ( $autoptimize_enabled !== false && $aj_autoptimize_enabled === false ) { $aj_autoptimize_enabled = $autoptimize_enabled; update_option( 'aj_autoptimize_enabled', $aj_autoptimize_enabled ); delete_option( 'autoptimize_enabled' ); } } /** * async_javascript_menu() * * register admin menu * * @param n/a * @return n/a */ add_action( 'admin_menu', 'async_javascript_menu' ); function async_javascript_menu() { add_submenu_page( 'options-general.php', 'Async JavaScript Admin', 'Async JavaScript', 'manage_options', 'async-javascript', 'async_javascript_admin' ); } /** * async_javascript_admin() * * admin page * * @param n/a * @return n/a */ function async_javascript_admin() { // load settings from database ?>

Async JavaScript Settings

Enable Async JavaScript

When you enable Async JavaScript, when a script is loaded via the 'wp_enqueue_script' method, this plugin will add a 'async' or 'defer' attribute.
This action helps to eliminate render-blocking JavaScript in above-the-fold content. This can also help to increase your pagespeed which in turn will assist in improving your page ranking.
There are several ways an external script can be executed:
  • If async is present: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing)
  • If async is not present and defer is present: The script is executed when the page has finished parsing
  • If neither async or defer is present: The script is fetched and executed immediately, before the browser continues parsing the page
Note: There have been instances where enabling Async JavaScript has 'broken' the javascript delivery. Should this happen to you, I highly recommend installing the Autoptimize plugin which will combine your javascript, further enhancing pagespeed and eliminating this issue.
/>

Async JavaScript Method

Please select the method (async or defer) that you wish to enable:
Method /> Async /> Defer

Script Exclusion


Please list any scripts which you would like excluded from being Async/Defered during page load. (comma seperated list eg: jquery.js,jquery-ui.js)
Exclusions

Async JavaScript For Plugins


Note: This will attempt to add the 'async' or 'defer' attribute to scripts loaded via a plugin (ie, not via 'wp_enqueue_script'). If you have a plugin that you would like added to this list please lodge a ticket at http://cloughit.com.au/support/

Autoptimize -

/>
No supported plugins installed or activated.

Need Some Help?

Lodge a support request at https://cloughit.com.au/support/

' tasks called via wp_enqueue_script using the 'script_loader_tag' filter * * @param string $tag The