/** * Add custom styles to the <head> section. * * This is used on the wp_head action. * * @return void * @since 1.2.0 */ function charitable_template_custom_styles() { $styles = get_transient('charitable_custom_styles'); if (false === $styles) { ob_start(); charitable_template('custom-styles.css.php'); $styles = ob_get_clean(); $styles = charitable_compress_css($styles); set_transient('charitable_custom_styles', $styles, 0); } echo $styles; }
/** * Add custom styles to the <head> section. * * This is used on the wp_head action. * * @return void * @since 1.2.0 */ function charitable_template_custom_styles() { if (!apply_filters('charitable_add_custom_styles', true)) { return; } $styles = get_transient('charitable_custom_styles'); if (false === $styles) { ob_start(); charitable_template('custom-styles.css.php'); $styles = ob_get_clean(); $styles = charitable_compress_css($styles); set_transient('charitable_custom_styles', $styles, 0); } echo $styles; }