RestApi.php in FileBird – WordPress Media Library Folders & File Manager 6.3.4, at includes/Rest/RestApi.php
| 1 | <?php |
| 2 | namespace FileBird\Rest; |
| 3 | |
| 4 | use FileBird\Utils\Singleton; |
| 5 | |
| 6 | |
| 7 | defined( 'ABSPATH' ) || exit; |
| 8 | |
| 9 | class RestApi { |
| 10 | use Singleton; |
| 11 | |
| 12 | public function __construct() { |
| 13 | add_action( 'rest_api_init', array( $this, 'rest_api_init' ) ); |
| 14 | } |
| 15 | |
| 16 | public function rest_api_init() { |
| 17 | $rest_apis = array( |
| 18 | new FolderApi(), |
| 19 | new PublicApi(), |
| 20 | new SettingApi(), |
| 21 | new SyncApi(), |
| 22 | ); |
| 23 | |
| 24 | foreach ( $rest_apis as $rest_api ) { |
| 25 | $rest_api->register_rest_routes(); |
| 26 | } |
| 27 | } |
| 28 | } |