[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 20:10:30 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 antonvlasenko):

 Thank you for taking the time to explain this, @hellofromTonya ! I should
 have checked the `wp_get_theme` function.
 {{{
 The question then is this: Does any of the Gutenberg code dependent upon
 the 'stylesheet_directory' and/or 'theme_root' filters? Searching the
 codebase, I did not find any code in Core that is hooked into either of
 these filters.
 }}}

 I cannot find any of the Gutenberg code that uses these filters. There is
 only one PHPUnit test that uses `theme_root` filter (I guess we don't care
 about that).
 But there could be some 3rd party plugins that depend on these 2 filters.

 {{{
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54552#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list