[wp-trac] [WordPress Trac] #54829: Allow classic themes to be optionally block themes if 'templates' and 'parts' folders exists

WordPress Trac noreply at wordpress.org
Tue Sep 13 08:02:24 UTC 2022


#54829: Allow classic themes to be optionally block themes if 'templates' and
'parts' folders exists
-------------------------------------------------+-------------------------
 Reporter:  exstheme                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Themes                               |     Version:  5.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing 2nd-opinion early                      |
-------------------------------------------------+-------------------------

Comment (by exstheme):

 Replying to [comment:17 poena]:
 > @exstheme I don't understand what that is an image of.

 Sorry, my bad. This is a screenshot of underlying method that is inside
 'wp_is_block_theme' function.
 And there is no changes here. No additional 'apply_filters' that we could
 hook to.
 So if the file 'index.html' exists inside 'theme_root/templates/' or
 'theme_root/block-templates' (this one is for back compatibility) - the
 theme will be treated as a block theme. Else - theme is no block theme. So
 still there is no ability to modify this behavior.

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


More information about the wp-trac mailing list