[wp-trac] [WordPress Trac] #54910: 5.9 Bug - Blank Home Page
WordPress Trac
noreply at wordpress.org
Sat Jan 29 08:54:19 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 has-unit-tests | Focuses:
--------------------------------------+------------------------------
Comment (by manfcarlo):
Replying to [comment:42 costdev]:
> Can you identify the areas that are difficult to make sense of so that I
can make it clearer?
Just the way that 5 different checks plus a caching mechanism are
required, simply to determine whether a theme is a block theme or not.
Intuitively, I would think it can't possibly be that hard.
My suggestion, which may not work, but assuming it does, would make for
simpler and more readable code. It would only need to perform `scandir`,
check whether all the file names end in `.html`, and check whether one of
them is called `index.html`. It wouldn't need to parse blocks, check
substrings, check the file content, check the theme tags or check for
theme support.
I think you also misread my point about the `full-site-editing` tag, or
maybe quoted the wrong part. In the part that you quoted, I was saying
that if some hypothetical theme from 2012 happens to have the `full-site-
editing` tag for some reason, maybe one that is outside of the theme
directory, it would be interpreted as a block theme, despite being made 10
years before block themes were supported. That is not only unwanted, but
the exact same problem as the current approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54910#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list