[wp-trac] [WordPress Trac] #54910: 5.9 Bug - Blank Home Page

WordPress Trac noreply at wordpress.org
Fri Jan 28 15:02:55 UTC 2022


#54910: 5.9 Bug - Blank Home Page
----------------------------------------+------------------------------
 Reporter:  cantuaria                   |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Themes                      |     Version:  5.9
 Severity:  major                       |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------

Comment (by costdev):

 > it is unexpected to require some random contents just to be able to
 start with the theme, and switch to it :D

 Very important point. The theme author won't be able to start with a blank
 file and build it out in the Editor. As @youknowriad said:

   the goal is make themes easy to create and also make them serializable
 (**you can create without writing code**)

 So we would have to implement a way to tell the difference between an
 empty `templates/index.html` file in a classic/hybrid theme, and a block
 theme that is only starting development. Without being able to identify a
 theme as a skeleton theme, we would need a different approach here.

 Regarding flipping the approach to non-block theme detection, I can't
 think of something that ''definitely won't'' be in a block theme, but
 ''definitely will'' be in classic/hybrid themes.

 So, some thoughts:
 - `Tag: full-site-editing` exists for `style.css`. If a theme provides
 this, then `WP_Theme::is_block_theme()` should return `true`. While we're
 steering away from `style.css` as a requirement in the future,
 `theme.json` is currently optional.
 - If a theme uses `theme.json`, I can't think of an existing way to
 definitely identify a block theme. Maybe something like
 `settings.isBlockTheme: true` would be beneficial here.

 I see @greenshady also mentioned an `isBlockTheme` flag in `theme.json`. I
 know we're trying to avoid asking theme authors to make a change to their
 themes, but at the same time, I wonder if we're at such an early stage of
 block themes, that changing this now will have the most minimal impact vs
 maybe needing it later.

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


More information about the wp-trac mailing list