wp_get_global_styles_svg_filters example

/* * When calling via the in_admin_header action, we only want to render the * SVGs on block editor pages. */
    if (
        is_admin() &&
        ! get_current_screen()->is_block_editor()
    ) {
        return;
    }

    $filters = wp_get_global_styles_svg_filters();
    if ( ! empty( $filters ) ) {
        echo $filters;
    }
}

/** * Build an array with CSS classes and inline styles defining the colors * which will be applied to the navigation markup in the front-end. * * @since 5.9.0 * @deprecated 6.3.0 This was removed from the Navigation Submenu block in favour of `wp_apply_colors_support()`. * `wp_apply_colors_support()` returns an array with similar class and style values, * but with different keys: `class` and `style`. * * @param array $context Navigation block context. * @param array $attributes Block attributes. * @param bool $is_sub_menu Whether the block is a sub-menu. * @return array Colors CSS classes and inline styles. */
Home | Imprint | This part of the site doesn't use cookies.