[wp-trac] [WordPress Trac] #62053: Warn logged in users when rendering empty template in the front end
WordPress Trac
noreply at wordpress.org
Wed Oct 2 02:58:48 UTC 2024
#62053: Warn logged in users when rendering empty template in the front end
-------------------------+------------------------------
Reporter: vcanales | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
-------------------------+------------------------------
Comment (by peterwilsoncc):
While testing, I noticed that the editor falls back to the version of
templates included in the theme if they are emptied in the site editor.
In the screen shot above, the left window is viewing the home page (after
emptying it) while logged in and the right window is while logged out.
I like the idea for templates that aren't in the theme but for templates
that are, it would be good to show what the logged out users view.
To reproduce the screen shot:
1. Activate 2025
2. Open the site editor
3. Edit the blog home page
4. Switch to the code editor
5. Delete all markup and save
6. View the site while logged in
7. View the site using a private/incognito window
I did confirm the warning only shows if the template is empty, it doesn't
show for empty template-parts. So the code is a good starting point.
I'll leave some notes on the PR too for code related issues.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62053#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list