yanknudtskov
12/4/2016 - 1:40 PM

Exclude an RUL pattern from Autoptimize

Exclude an RUL pattern from Autoptimize

<?php

  /**
	 * Exclude WooCommerce Point of Sale from Autoptimize
	 */
	
	add_filter( 'autoptimize_filter_noptimize', 'yanco_exclude_autoptimize', 10, 0);
	function yanco_exclude_autoptimize() {
		if ( strpos( $_SERVER['REQUEST_URI'], 'pattern-in-url' ) !== false ) {
			return true;
		} else {
			return false;
		}
	}