You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the recommended best practice for pulling in customizer styles with WP_Rig 2.0?
In WP_Rig 1.x, I built a function which referenced the theme mods and output the user determined global typography, color settings into the global styles file using wp_add_inline_style.
In Wp_Rig 2.0, I've tried to do the same within inc/Styles/Component.php, but it does not work. When I used this technique in WP_Rig 1.x it worked well. Maybe I am doing it wrong, but I didn't see anything in the documentation regarding the best practice to output css back into the wp-rig-global-css styles from the customizer.
inc/Styles/Component.php
What is the recommended best practice for pulling in customizer styles with WP_Rig 2.0?
In WP_Rig 1.x, I built a function which referenced the theme mods and output the user determined global typography, color settings into the global styles file using wp_add_inline_style.
In Wp_Rig 2.0, I've tried to do the same within inc/Styles/Component.php, but it does not work. When I used this technique in WP_Rig 1.x it worked well. Maybe I am doing it wrong, but I didn't see anything in the documentation regarding the best practice to output css back into the wp-rig-global-css styles from the customizer.
WP add inline styles from manual
`
public function action_enqueue_styles() {
// Enqueue Google Fonts.
$google_fonts_url = $this->get_google_fonts_url();
if ( ! empty( $google_fonts_url ) ) {
wp_enqueue_style( 'wp-rig-fonts', $google_fonts_url, [], null ); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
}
`
The text was updated successfully, but these errors were encountered: