swift_performance_ajaxify

This filter will be applied on array of ajaxify CSS selectors.

Parameters

$selectors

array of CSS selectors

Return

array


Example

// Disable AJAXIFY on specific pages
add_filter('swift_performance_ajaxify', function($selectors){
	$pages = array(
		'', // use empty for homepage
		'/page-1',
		'/another-page',
	);
    if (isset($_SERVER['REQUEST_URI']) && in_array(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), $pages)){
        return array();
    }
    return $selectors;
});