[wp-trac] [WordPress Trac] #57566: Issue registering blocks within a parent theme
WordPress Trac
noreply at wordpress.org
Mon Jul 10 06:34:53 UTC 2023
#57566: Issue registering blocks within a parent theme
-----------------------------------------------+-----------------------
Reporter: jacknotman | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: Editor | Version: 6.1.1
Severity: major | Resolution: fixed
Keywords: has-patch has-testing-info commit | Focuses:
-----------------------------------------------+-----------------------
Changes (by audrasjb):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"56183" 56183]:
{{{
#!CommitTicketReference repository="" revision="56183"
Editor: Ensure blocks registered within parent theme are available when
child theme is activated.
This changeset fixes both `register_block_script_handle()` and
`register_block_style_handle()` functions, allowing for child themes to
access and utilise
blocks defined in parent themes.
Previously these functions could not handle blocks registered in Parent
themes. This changeset fixes the issue by determining whether the given
asset path
belongs to either of the template or stylesheet directories (Parent and
Child themes respectively) as opposed to just checking using
`get_theme_file_path('')`.
Props jacknotman, Levdbas, audrasjb, guillaumeturpin, leprincenoir, whaze,
isabel_brison.
Fixes #57566.
--Cette ligne, et les suivantes ci-dessous, seront ignorées--
M trunk/src/wp-includes/blocks.php
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57566#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list