wp_typography_get_preset_inline_style_value example

array(
                'size' => $custom_font_size,
            )
        );
    }

    if ( $has_font_family_support && ! $should_skip_font_family ) {
        $preset_font_family                    = array_key_exists( 'fontFamily', $block_attributes )
            ? "var:preset|font-family|{$block_attributes['fontFamily']}"
            : null;
        $custom_font_family                    = isset( $block_attributes['style']['typography']['fontFamily'] )
            ? wp_typography_get_preset_inline_style_value( $block_attributes['style']['typography']['fontFamily'], 'font-family' )
            : null;
        $typography_block_styles['fontFamily'] = $preset_font_family ? $preset_font_family : $custom_font_family;
    }

    if (
        $has_font_style_support &&
        ! $should_skip_font_style &&
        isset( $block_attributes['style']['typography']['fontStyle'] )
    ) {
        $typography_block_styles['fontStyle'] = wp_typography_get_preset_inline_style_value(
            $block_attributes['style']['typography']['fontStyle'],
            
Home | Imprint | This part of the site doesn't use cookies.