Hooks::customizer_inline_stylesheets( TribeEventsProViewsV2array $sheets, string $css_template )

Add views stylesheets to customizer styles array to check.

Remove unused legacy stylesheets.


Parameters #

$sheets

(<span class="TribeEventsProViewsV2array">TribeEventsProViewsV2array) (Required) Array of sheets to search for.

$css_template

(string) (Required) String containing the inline css to add.


Top ↑

Return #

(array) Modified array of sheets to search for.


Top ↑

Source #

File: src/Tribe/Views/V2/Hooks.php

	public function customizer_inline_stylesheets( $sheets, $css_template ) {
		$v2_sheets = [
			'tribe-events-pro-views-v2-skeleton',
			'tribe-events-pro-views-v2-full'
		];

		// Unenqueue legacy sheets.
		$keys = array_keys( $sheets, 'tribe-events-calendar-pro-style' );
		if ( ! empty( $keys ) ) {
			foreach ( $keys as $key ) {
				unset( $sheets[ $key ] );
			}
		}

		return array_merge( $sheets, $v2_sheets );
	}