[wp-trac] [WordPress Trac] #57379: A Way to Disable Export Theme
WordPress Trac
noreply at wordpress.org
Thu Aug 1 06:22:03 UTC 2024
#57379: A Way to Disable Export Theme
----------------------------------------+---------------------
Reporter: unsalkorkmaz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Administration | Version: 6.1.1
Severity: major | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+---------------------
Comment (by Mamaduka):
Using the `export` capability makes sense; a user is exporting Site Editor
content.
The client-side code should also be able to check if a user can perform an
`export` action and show/hide menu items based on this.
This could be done by adding `action` to the theme responses.
Example from posts controller - https://github.com/WordPress/wordpress-
develop/blob/74e03e3cbef2f2565028f446c76acb2dabf749bd/src/wp-includes
/rest-api/endpoints/class-wp-rest-posts-controller.php#L2201-L2203
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57379#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list