Advertisement
geminilabs

[site-reviews] prevent autoptimize from messing up the js

Mar 9th, 2019
362
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Prevents Autoptimize from moving the Site Reviews javascript file before the inline script
  3.  * Paste this in your active theme's functions.php file.
  4.  * @param array $exclude
  5.  * @return array
  6.  * @link https://wordpress.org/plugins/autoptimize/
  7.  */
  8. add_filter( 'autoptimize_filter_js_dontmove', function( $exclude ) {
  9.     $exclude[] = 'site-reviews.js';
  10.     return $exclude;
  11. });
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement