Jonny Harris 8697aee5f9 REST API: Ensure that the export template endpoint returns a valid WP_Error object.
Ensure that the export template endpoint returns a WP_Error object, including code and message, so that the site editor can display an error message. 
Add some basic unit tests to ensure that permission checks are working as expected. 

Follow-up to [52286].

Props Spacedmonkey, dlh, hellofromTonya , Mamaduka, TimothyBlynJacobs.
Fixes #54448.



git-svn-id: https://develop.svn.wordpress.org/trunk@52340 602fd350-edb4-49c9-b593-d223f7449a82
2021-12-07 18:36:29 +00:00
..