Changeset 56527 for trunk/src/wp-includes/blocks.php
- Timestamp:
- 09/06/2023 09:22:28 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks.php
r56455 r56527 151 151 * the parent (template) or child (stylesheet) directory path. 152 152 */ 153 $is_parent_theme_block = str_starts_with( $script_path_norm, $template_path_norm);154 $is_child_theme_block = str_starts_with( $script_path_norm, $stylesheet_path_norm);153 $is_parent_theme_block = str_starts_with( $script_path_norm, trailingslashit( $template_path_norm ) ); 154 $is_child_theme_block = str_starts_with( $script_path_norm, trailingslashit( $stylesheet_path_norm ) ); 155 155 $is_theme_block = ( $is_parent_theme_block || $is_child_theme_block ); 156 156 … … 271 271 // Determine if the block style was registered in a theme, by checking if the script path starts with either 272 272 // the parent (template) or child (stylesheet) directory path. 273 $is_parent_theme_block = str_starts_with( $style_path_norm, $template_path_norm);274 $is_child_theme_block = str_starts_with( $style_path_norm, $stylesheet_path_norm);273 $is_parent_theme_block = str_starts_with( $style_path_norm, trailingslashit( $template_path_norm ) ); 274 $is_child_theme_block = str_starts_with( $style_path_norm, trailingslashit( $stylesheet_path_norm ) ); 275 275 $is_theme_block = ( $is_parent_theme_block || $is_child_theme_block ); 276 276
Note: See TracChangeset
for help on using the changeset viewer.