wp_style_is example

$style_handle = $metadata[ $field_name ];
    if ( is_array( $style_handle ) ) {
        if ( empty( $style_handle[ $index ] ) ) {
            return false;
        }
        $style_handle = $style_handle[ $index ];
    }

    $style_handle_name = generate_block_asset_handle( $metadata['name']$field_name$index );
    // If the style handle is already registered, skip re-registering.     if ( wp_style_is( $style_handle_name, 'registered' ) ) {
        return $style_handle_name;
    }

    static $wpinc_path_norm = '';
    if ( ! $wpinc_path_norm ) {
        $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) );
    }

    $is_core_block = isset( $metadata['file'] ) && str_starts_with( $metadata['file']$wpinc_path_norm );
    // Skip registering individual styles for each core block when a bundled version provided.     if ( $is_core_block && ! wp_should_load_separate_core_block_assets() ) {
        
Home | Imprint | This part of the site doesn't use cookies.