Make WordPress Core


Ignore:
Timestamp:
11/30/2021 05:30:22 PM (3 years ago)
Author:
spacedmonkey
Message:

Site Editor: Add site export REST API endpoint.

Add a REST API to export site templates and template part as html files. When the REST API is requested, it responds by downloading a single ZIP file and exits early, without completing full request. To create the exported zip, the ZipArchive class is required. If this class is not present then the export will gracefully fail, returning a WP_Error object and 500 status error code.

Props spacedmonkey, youknowriad, Mamaduka, walbo, peterwilsoncc.
Fixes #54448 .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r52272 r52286  
    276276require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-plugins-controller.php';
    277277require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-block-directory-controller.php';
     278require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-edit-site-export-controller.php';
    278279require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-pattern-directory-controller.php';
    279280require ABSPATH . WPINC . '/rest-api/endpoints/class-wp-rest-application-passwords-controller.php';
Note: See TracChangeset for help on using the changeset viewer.