File ManagerCurrent Directory: wp-content/plugins/wp-migrate-db/class/Common/HttpLinux appserver-0d5e4f1e-php-cc8da225320a42ba9b7d66cba40b1f03 6.6.123+ #1 SMP PREEMPT_DYNAMIC Wed Mar 11 09:04:28 UTC 2026 x86_64Edit File: WPMDBRestAPIServer.php <?php namespace DeliciousBrains\WPMDB\Common\Http; use DeliciousBrains\WPMDB\Common\Properties\Properties; class WPMDBRestAPIServer { /** * @var Properties */ private $props; public function __construct( Properties $props ) { $this->props = $props; } public function permission_callback() { $cap = is_multisite() ? 'manage_network_options' : 'export'; $cap = apply_filters( 'wpmdb_ajax_cap', $cap ); // Restrict endpoint to only users who have the edit_posts capability. if ( ! current_user_can( $cap ) ) { return new \WP_Error( 'rest_forbidden', esc_html__( 'Only authenticated users can access endpoint.', 'wp-migrate-db' ), [ 'status' => 401 ] ); } return true; } public function registerRestRoute( $end_point, $args ) { if ( ! isset( $args['permissions_callback'] ) ) { $args['permission_callback'] = [ $this, 'permission_callback' ]; } register_rest_route( $this->props->rest_api_base, $end_point, $args ); } } Upload File Directory Listing NameTypeSizeActions.. (Parent Directory)DirHelper.phpFile2.20 KB Rename | Delete | EditHttp.phpFile5.35 KB Rename | Delete | EditRemotePost.phpFile19.19 KB Rename | Delete | EditScramble.phpFile2.35 KB Rename | Delete | EditWPMDBRestAPIServer.phpFile968.00 B Rename | Delete | Edit