Advertisement
geminilabs

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

Mar 9th, 2019
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement