wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php:55Checks whether a given request has permission to export.
true|WP_Error public function permissions_check() { if ( current_user_can( 'edit_theme_options' ) ) { return true; } return new WP_Error( 'rest_cannot_export_templates', __( 'Sorry, you are not allowed to export templates and template parts.' ), array( 'status' => rest_authorization_required_code() ) ); }Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.