[wp-trac] [WordPress Trac] #54552: Consider consolidating wp_is_block_template_theme() and WP_Theme::is_block_based()
WordPress Trac
noreply at wordpress.org
Thu Dec 2 22:14:52 UTC 2021
#54552: Consider consolidating wp_is_block_template_theme() and
WP_Theme::is_block_based()
----------------------------+---------------------
Reporter: noisysocks | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 5.9
Component: Themes | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
----------------------------+---------------------
Comment (by hellofromTonya):
Replying to [comment:5 antonvlasenko]:
> {{{
> However, the combination of these 2 filters is available through the
'theme_file_path' filter.
> }}}
> I'm sorry, I don't understand what you mean by `available through the
'theme_file_path' filter`.
> Probably I'm missing something.
> I thought that filters are independent of each other.
I'm sorry for the confusion. I'll try to explain. Please excuse me if I
over-explain something that you already know.
`'theme_file_path'` filter event is fired 2 separate places:
`get_theme_file_path()` and the new `WP_Theme::get_file_path()` method.
Either of those filter events will call all callbacks registered/hooked to
it.
What I meant by the "combination of these 2 filters" is this:
`'theme_file_path'` filter exposes the file's path ("combination") whereas
the other 2 filters expose the pieces of the file's path, i.e. the theme's
directory name and the root path to that directory. Using
`'theme_file_path'` gives the ability for plugins and themes to gain
access.
Does that make sense?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54552#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list