-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What problem does this address?
There is always a lot of discussion and concerns with FSE, especially from agencies and developers about content lockdown and removing the ability for clients to break layouts and pages while editing content.
With FSE, the new site editor is almost like a modern day version of the theme file editor that can be turned off by developers to hide this feature under ‘Appearance’ using a constant.
Previously users have been able to edit all theme files and templates using code if DISALLOW_FILE_EDIT wasn’t set to true.
I think now all these templates are editable using the site editor it would be great to have similar functionality where developers could define a constant and turn off the site editor for specific user roles.
This way developers and agencies could lock down that part of the admin area as they have done historically, while still allowing users to edit posts and pages for content as always.
I have searched through open and closed issues but couldn’t find anything relating to this currently.
What is your proposed solution?
I don’t know how the site editor is enabled and what happens under the hood technically when a FSE theme is active but I would love to see something simple like defining a constant to be able to DISALLOW_SITE_EDITOR which would do a couple of things:
- Remove the site editor from the appearance menu in the admin dashboard.
- Remove any links to the site editor from single posts and pages to edit the current template.
This constant could be defined within some sort of conditional check for certain user roles.
This would be a great way to opt-in to locking down the site even further than individual block locking and being opt-in would not affect anyone who didn’t want this feature.