X7ROOT File Manager
Current Path:
/home/oakwood/public_html/wp-content/plugins/filebird/includes/Rest
home
/
oakwood
/
public_html
/
wp-content
/
plugins
/
filebird
/
includes
/
Rest
/
ðŸ“
..
📄
ApiInteface.php
(133 B)
📄
FolderApi.php
(3.15 KB)
📄
PublicApi.php
(4.16 KB)
📄
RestApi.php
(549 B)
📄
SettingApi.php
(1008 B)
📄
SyncApi.php
(1.14 KB)
Editing: SyncApi.php
<?php namespace FileBird\Rest; defined( 'ABSPATH' ) || exit; use FileBird\Controller\SyncController; class SyncApi { private $controller; public function register_rest_routes() { $this->controller = new SyncController(); register_rest_route( NJFB_REST_URL, 'export-csv', array( 'methods' => \WP_REST_Server::READABLE, 'callback' => array( $this->controller, 'exportCSV' ), 'permission_callback' => array( $this, 'permission_callback' ), ) ); register_rest_route( NJFB_REST_URL, 'import-csv', array( 'methods' => \WP_REST_Server::CREATABLE, 'callback' => array( $this->controller, 'importCSV' ), 'permission_callback' => array( $this, 'permission_callback' ), ) ); register_rest_route( NJFB_REST_URL, 'import-csv-detail', array( 'methods' => \WP_REST_Server::CREATABLE, 'callback' => array( $this->controller, 'getImportCSVDetail' ), 'permission_callback' => array( $this, 'permission_callback' ), ) ); } public function permission_callback() { return current_user_can( 'upload_files' ); } }
Upload File
Create Folder