# customify/trunk/includes/integrations/wp-rocket.php

Customify, version trunk. 32 lines.

- Page: https://pluginprobe.com/plugins/customify/trunk/code/includes/integrations/wp-rocket.php
- Raw: https://pluginprobe.com/plugins/customify/trunk/raw/includes/integrations/wp-rocket.php
- Modified: 2020-05-01T16:30:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/customify/trunk/code/includes/integrations/wp-rocket.php#L10-L20`.

```php
<?php
/**
 * This is logic for integrating with the WP-Rocket plugin.
 *
 * @link https://wp-rocket.me/
 *
 * @see         https://pixelgrade.com
 * @author      Pixelgrade
 * @since       2.7.1
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

// Exclude the webfontloader script and the inline script.
function customify_wp_rocket_exclude_webfontloader_script( $list ) {
	$list[] = rocket_clean_exclude_file( plugins_url( 'js/vendor/webfontloader-1-6-28.min.js', PixCustomifyPlugin()->get_file() ) );

	return $list;
}
add_filter( 'rocket_exclude_js', 'customify_wp_rocket_exclude_webfontloader_script', 10, 1 );
add_filter( 'rocket_exclude_defer_js', 'customify_wp_rocket_exclude_webfontloader_script', 10, 1 );
add_filter( 'rocket_exclude_cache_busting', 'customify_wp_rocket_exclude_webfontloader_script', 10, 1 );

add_filter( 'rocket_excluded_inline_js_content', function( $inline_js ) {
	$webfontloader_inline_script = 'customifyFontLoader = function()';
	$inline_js[] = $webfontloader_inline_script;

	return $inline_js;
}, 10, 1 );

```
