Changeset 61492 for trunk/src/wp-includes/blocks/index.php
- Timestamp:
- 01/16/2026 10:30:09 AM (7 weeks ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/index.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/index.php
r59159 r61492 14 14 15 15 // Include files required for core blocks registration. 16 require BLOCKS_PATH . 'legacy-widget.php'; 17 require BLOCKS_PATH . 'widget-group.php'; 18 require BLOCKS_PATH . 'require-dynamic-blocks.php'; 16 if ( file_exists( BLOCKS_PATH . 'legacy-widget.php' ) ) { 17 require BLOCKS_PATH . 'legacy-widget.php'; 18 } 19 if ( file_exists( BLOCKS_PATH . 'widget-group.php' ) ) { 20 require BLOCKS_PATH . 'widget-group.php'; 21 } 22 if ( file_exists( BLOCKS_PATH . 'require-dynamic-blocks.php' ) ) { 23 require BLOCKS_PATH . 'require-dynamic-blocks.php'; 24 } 19 25 20 26 /** … … 44 50 static $core_blocks_meta; 45 51 if ( ! $core_blocks_meta ) { 52 if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) { 53 return; 54 } 46 55 $core_blocks_meta = require BLOCKS_PATH . 'blocks-json.php'; 47 56 } … … 151 160 */ 152 161 function register_core_block_types_from_metadata() { 162 if ( ! file_exists( BLOCKS_PATH . 'require-static-blocks.php' ) ) { 163 return; 164 } 153 165 $block_folders = require BLOCKS_PATH . 'require-static-blocks.php'; 154 166 foreach ( $block_folders as $block_folder ) { … … 170 182 */ 171 183 function wp_register_core_block_metadata_collection() { 184 if ( ! file_exists( BLOCKS_PATH . 'blocks-json.php' ) ) { 185 return; 186 } 172 187 wp_register_block_metadata_collection( 173 188 BLOCKS_PATH,
Note: See TracChangeset
for help on using the changeset viewer.