remove_block_asset_path_prefix example

return false;
    }

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

    $script_path = remove_block_asset_path_prefix( $script_handle );
    if ( $script_handle === $script_path ) {
        return $script_handle;
    }

    $script_asset_raw_path = dirname( $metadata['file'] ) . '/' . substr_replace( $script_path, '.asset.php', - strlen( '.js' ) );
    $script_handle         = generate_block_asset_handle( $metadata['name']$field_name$index );
    $script_asset_path     = wp_normalize_path(
        realpath( $script_asset_raw_path )
    );

    if ( empty( $script_asset_path ) ) {
        
Home | Imprint | This part of the site doesn't use cookies.