Tribe__Customizer::print_css_template()
Print the CSS for the customizer on wp_print_footer_scripts
Return
(void)
Source
File: src/Tribe/Customizer.php
public function print_css_template() {
//Only load in Customizer
if ( ! is_customize_preview() ) {
return false;
}
/**
* Use this filter to add more CSS, using Underscore Template style
*
* @deprecated
* @since 4.0
*
* @link http://underscorejs.org/#template
*
* @param string $template
*/
$css_template = trim( apply_filters( 'tribe_events_pro_customizer_css_template', '' ) );
/**
* Use this filter to add more CSS, using Underscore Template style
*
* @since 4.4
*
* @link http://underscorejs.org/#template
*
* @param string $template
*/
$css_template = trim( apply_filters( 'tribe_customizer_css_template', $css_template ) );
// If we don't have anything on the customizer don't print empty styles
// On Customize Page, we don't care we need this
if ( ! is_customize_preview() && empty( $css_template ) ) {
return false;
}
// All sections should use this action to print their template
echo '<script type="text/css" id="' . esc_attr( 'tmpl-' . $this->ID . '_css' ) . '">';
echo $css_template;
echo '</script>';
// Place where the template will be rendered to
echo '<style type="text/css" id="' . esc_attr( $this->ID . '_css' ) . '">';
echo $this->parse_css_template( $css_template );
echo '</style>';
}
Changelog
| Version | Description |
|---|---|
| 4.12.6 | Introduced. |