HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //home/globfdxw/www/wp-content/plugins/the-events-calendar/src/Tribe/Integrations/WP_Rocket.php
<?php
/**
 * Handles compatibility with WP Rocket plugin.
 *
 * @package Tribe\Events\Integrations
 * @since 5.0.0.2
 */
namespace Tribe\Events\Integrations;

/**
 * Integrations with WP Rocket plugin.
 *
 * @package Tribe\Events\Integrations
 * @since 5.0.0.2
 */
class WP_Rocket {

	/**
	 * Hooks all the required methods for WP_Rocket usage on our code.
	 *
	 * @since 5.0.0.2
	 */
	public function hook() {
		if ( ! tribe_events_views_v2_is_enabled() ) {
			return;
		}
		add_filter( 'rocket_excluded_inline_js_content', [ $this, 'filter_excluded_inline_js_concat' ] );
	}

	/**
	 * Filters the content of the WP Rocket excluded inline JS concat.
	 *
	 * @since 5.0.0.2
	 *
	 * @param array $excluded_inline Items to be excluded by WP Rocket.
	 *
	 * @return array Excluded inline scripts after adding the breakpoint code.
	 */
	public function filter_excluded_inline_js_concat( array $excluded_inline ) {
		$excluded_inline[] = 'data-view-breakpoint-pointer';
		return $excluded_inline;
	}
}