38, '2' => 34, '3' => 30, '4' => 26, '5' => 24, '6' => 18, ); $heading = array(); for ($i = 1; $i <= 6; $i++) { $heading[$i] = absint(get_theme_mod('bootstrap_coach_heading_' . $i . '_size', absint($default_size[$i]))); } // Enqueue Google Fonts for block editor wp_enqueue_style( 'bootstrap-coach-editor-googlefonts', 'https://fonts.googleapis.com/css?family=' . esc_attr( $font_family ) . ':100,200,300,400,500,600,700,800,900|' . esc_attr( $heading_font_family ) . ':100,200,300,400,500,600,700,800,900', array(), null ); // Enqueue editor styles CSS file wp_enqueue_style( 'bootstrap-coach-editor-styles', get_template_directory_uri() . '/inc/gutenberg/typography/editor-styles.css', array( 'wp-edit-blocks' ), filemtime( get_template_directory() . '/inc/gutenberg/typography/editor-styles.css' ) ); // Add dynamic font family values as CSS custom properties $custom_css = " :root { --font-family: '{$font_family}'; --heading-font-family: '{$heading_font_family}'; --font-size: {$font_size}; --font-weight: {$font_weight}; --line-height: {$line_height}; --heading-font-weight: {$heading_font_weight}; --text-color: {$text_color}; --heading-title-color: {$dark_color}; --h1-font-size: {$heading[1]}px; --h2-font-size: {$heading[2]}px; --h3-font-size: {$heading[3]}px; --h4-font-size: {$heading[4]}px; --h5-font-size: {$heading[5]}px; --h6-font-size: {$heading[6]}px; }"; wp_add_inline_style( 'bootstrap-coach-editor-styles', $custom_css ); } add_action( 'enqueue_block_assets', 'bootstrap_coach_block_editor_assets' );