Changeset 55446 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 03/01/2023 03:56:50 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r55126 r55446 108 108 } 109 109 110 $script_handle = generate_block_asset_handle( $metadata['name'], $field_name, $index ); 111 $script_asset_path = wp_normalize_path( 112 realpath( 113 dirname( $metadata['file'] ) . '/' . 114 substr_replace( $script_path, '.asset.php', - strlen( '.js' ) ) 115 ) 116 ); 117 if ( ! file_exists( $script_asset_path ) ) { 110 $script_asset_raw_path = dirname( $metadata['file'] ) . '/' . substr_replace( $script_path, '.asset.php', - strlen( '.js' ) ); 111 $script_handle = generate_block_asset_handle( $metadata['name'], $field_name, $index ); 112 $script_asset_path = wp_normalize_path( 113 realpath( $script_asset_raw_path ) 114 ); 115 116 if ( empty( $script_asset_path ) ) { 118 117 _doing_it_wrong( 119 118 __FUNCTION__, 120 119 sprintf( 121 /* translators: 1: Field name, 2: Block name. */ 122 __( 'The asset file for the "%1$s" defined in "%2$s" block definition is missing.' ), 120 /* translators: 1: Asset file location, 2: Field name, 3: Block name. */ 121 __( 'The asset file (%1$s) for the "%2$s" defined in "%3$s" block definition is missing.' ), 122 $script_asset_raw_path, 123 123 $field_name, 124 124 $metadata['name']
Note: See TracChangeset
for help on using the changeset viewer.