X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-includes/rest-api/endpoints
home
/
hamdjcne
/
public_html
/
wp-includes
/
rest-api
/
endpoints
/
ðŸ“
..
📄
class-wp-rest-application-passwords-controller.php
(23.59 KB)
📄
class-wp-rest-attachments-controller.php
(47.86 KB)
📄
class-wp-rest-autosaves-controller.php
(14.88 KB)
📄
class-wp-rest-block-directory-controller.php
(9.71 KB)
📄
class-wp-rest-block-pattern-categories-controller.php
(4.7 KB)
📄
class-wp-rest-block-patterns-controller.php
(9.08 KB)
📄
class-wp-rest-block-renderer-controller.php
(5.7 KB)
📄
class-wp-rest-block-types-controller.php
(26.25 KB)
📄
class-wp-rest-blocks-controller.php
(3.1 KB)
📄
class-wp-rest-comments-controller.php
(56.99 KB)
📄
class-wp-rest-controller.php
(18.62 KB)
📄
class-wp-rest-edit-site-export-controller.php
(2.06 KB)
📄
class-wp-rest-font-collections-controller.php
(10.4 KB)
📄
class-wp-rest-font-faces-controller.php
(29.11 KB)
📄
class-wp-rest-font-families-controller.php
(17.1 KB)
📄
class-wp-rest-global-styles-controller.php
(20.7 KB)
📄
class-wp-rest-global-styles-revisions-controller.php
(12.38 KB)
📄
class-wp-rest-menu-items-controller.php
(32.49 KB)
📄
class-wp-rest-menu-locations-controller.php
(8.75 KB)
📄
class-wp-rest-menus-controller.php
(16.68 KB)
📄
class-wp-rest-navigation-fallback-controller.php
(5.05 KB)
📄
class-wp-rest-pattern-directory-controller.php
(12.64 KB)
📄
class-wp-rest-plugins-controller.php
(27.86 KB)
📄
class-wp-rest-post-statuses-controller.php
(10.07 KB)
📄
class-wp-rest-post-types-controller.php
(13.95 KB)
📄
class-wp-rest-posts-controller.php
(99.67 KB)
📄
class-wp-rest-revisions-controller.php
(25.93 KB)
📄
class-wp-rest-search-controller.php
(11.21 KB)
📄
class-wp-rest-settings-controller.php
(10.11 KB)
📄
class-wp-rest-sidebars-controller.php
(15.82 KB)
📄
class-wp-rest-site-health-controller.php
(9.61 KB)
📄
class-wp-rest-taxonomies-controller.php
(13.69 KB)
📄
class-wp-rest-template-autosaves-controller.php
(7.64 KB)
📄
class-wp-rest-template-revisions-controller.php
(8.52 KB)
📄
class-wp-rest-templates-controller.php
(37.41 KB)
📄
class-wp-rest-terms-controller.php
(34.5 KB)
📄
class-wp-rest-themes-controller.php
(22.46 KB)
📄
class-wp-rest-url-details-controller.php
(20.07 KB)
📄
class-wp-rest-users-controller.php
(48.41 KB)
📄
class-wp-rest-widget-types-controller.php
(18.78 KB)
📄
class-wp-rest-widgets-controller.php
(26.26 KB)
Editing: class-wp-rest-edit-site-export-controller.php
<?php /** * REST API: WP_REST_Edit_Site_Export_Controller class * * @package WordPress * @subpackage REST_API */ /** * Controller which provides REST endpoint for exporting current templates * and template parts. * * @since 5.9.0 * * @see WP_REST_Controller */ class WP_REST_Edit_Site_Export_Controller extends WP_REST_Controller { /** * Constructor. * * @since 5.9.0 */ public function __construct() { $this->namespace = 'wp-block-editor/v1'; $this->rest_base = 'export'; } /** * Registers the site export route. * * @since 5.9.0 */ public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base, array( array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'export' ), 'permission_callback' => array( $this, 'permissions_check' ), ), ) ); } /** * Checks whether a given request has permission to export. * * @since 5.9.0 * * @return true|WP_Error True if the request has access, or WP_Error object. */ public function permissions_check() { if ( current_user_can( 'export' ) ) { 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() ) ); } /** * Output a ZIP file with an export of the current templates * and template parts from the site editor, and close the connection. * * @since 5.9.0 * * @return void|WP_Error */ public function export() { // Generate the export file. $filename = wp_generate_block_templates_export_file(); if ( is_wp_error( $filename ) ) { $filename->add_data( array( 'status' => 500 ) ); return $filename; } $theme_name = basename( get_stylesheet() ); header( 'Content-Type: application/zip' ); header( 'Content-Disposition: attachment; filename=' . $theme_name . '.zip' ); header( 'Content-Length: ' . filesize( $filename ) ); flush(); readfile( $filename ); unlink( $filename ); exit; } }
Upload File
Create Folder