Hooks::customizer_inline_stylesheets( TribeEventsViewsV2array $sheets, string $css_template )
Add views stylesheets to customizer styles array to check.
Contents
Remove unused legacy stylesheets.
Parameters
- $sheets
-
(<span class="TribeEventsViewsV2array">TribeEventsViewsV2array) (Required) Array of sheets to search for.
- $css_template
-
(string) (Required) String containing the inline css to add.
Return
(array) Modified array of sheets to search for.
Source
File: src/Tribe/Views/V2/Hooks.php
public function customizer_inline_stylesheets( $sheets, $css_template ) {
$v2_sheets = [
'tribe-events-views-v2-skeleton',
'tribe-events-views-v2-full',
];
// Unenqueue legacy sheets.
$keys = array_keys( $sheets, 'tribe-events-calendar-style' );
if ( ! empty( $keys ) ) {
foreach ( $keys as $key ) {
unset( $sheets[ $key ] );
}
}
return array_merge( $sheets, $v2_sheets );
}
Changelog
| Version | Description |
|---|---|
| 5.1.1 | Introduced. |