[wp-trac] [WordPress Trac] #54552: Consider consolidating wp_is_block_template_theme() and WP_Theme::is_block_based()

WordPress Trac noreply at wordpress.org
Wed Dec 1 21:48:41 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          |   Keywords:
  Focuses:                  |
----------------------------+--------------------
 We have two pretty similar methods for determining if the active theme is
 a block theme:


 {{{
 wp_get_theme()→is_block_based()
 }}}

 {{{
 wp_is_block_template_theme()
 }}}

 Both were added in WP 5.9 so it's now or never if we want to simplify this
 API.

 - Should we have one and not the other?
 - Should we rename `wp_is_block_template_theme` to
 `wp_is_block_based_theme` so that the two methods are aligned?

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


More information about the wp-trac mailing list