Changeset 56931
- Timestamp:
- 10/13/2023 04:44:09 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-patterns.php
r56771 r56931 351 351 } 352 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 353 369 // The actual pattern content is the output of the file. 354 370 ob_start(); 355 include $ dirpath . $file;371 include $; 356 372 $pattern_data['content'] = ob_get_clean(); 357 373 if ( ! $pattern_data['content'] ) { … … 409 425 $can_use_cached = ! wp_is_development_mode( 'theme' ); 410 426 411 if ( $can_use_cached ) {412 $pattern_data = $theme->get_pattern_cache();413 if ( is_array( $pattern_data )) {427 428 429 if ( ) { 414 430 return $pattern_data; 415 431 } 432 433 416 434 } 417 435 -
trunk/tests/phpunit/tests/blocks/wpGetBlockPatterns.php
r56771 r56931 19 19 * @param string $theme The theme's slug. 20 20 * @param array $expected The expected pattern data. 21 22 21 */ 23 22 public function test_should_return_block_patterns( $theme, $expected ) { … … 119 118 ); 120 119 } 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 121 153 }
Note: See TracChangeset
for help on using the changeset viewer.