Changeset 56776 for branches/6.3/src/wp-includes/blocks.php
- Timestamp:
- 10/04/2023 06:45:16 PM (13 months ago)
- Location:
- branches/6.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
-
branches/6.3/src/wp-includes/blocks.php
r56244 r56776 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 … … 262 262 // Determine if the block style was registered in a theme, by checking if the script path starts with either 263 263 // the parent (template) or child (stylesheet) directory path. 264 $is_parent_theme_block = str_starts_with( $style_path_norm, $template_path_norm);265 $is_child_theme_block = str_starts_with( $style_path_norm, $stylesheet_path_norm);264 $is_parent_theme_block = str_starts_with( $style_path_norm, trailingslashit( $template_path_norm ) ); 265 $is_child_theme_block = str_starts_with( $style_path_norm, trailingslashit( $stylesheet_path_norm ) ); 266 266 $is_theme_block = ( $is_parent_theme_block || $is_child_theme_block ); 267 267
Note: See TracChangeset
for help on using the changeset viewer.