| Server IP : 108.167.142.43 / Your IP : 216.73.217.58 Web Server : Apache System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : delarice ( 2406) PHP Version : 8.3.36 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/delarice/public_html/wp-content/plugins/elementor/modules/system-info/rest/ |
Upload File : |
<?php
namespace Elementor\Modules\System_Info\Rest;
use Elementor\Core\Utils\Api\Response_Builder;
use Elementor\Plugin;
use WP_REST_Server;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Rest_Api {
const API_NAMESPACE = 'elementor/v1';
const API_BASE = 'system-info';
public function register_routes(): void {
register_rest_route( self::API_NAMESPACE, '/' . self::API_BASE, [
'methods' => WP_REST_Server::READABLE,
'callback' => [ $this, 'get_system_info' ],
'permission_callback' => [ $this, 'check_permission' ],
] );
}
public function check_permission(): bool {
return current_user_can( 'manage_options' );
}
public function get_system_info() {
return Response_Builder::make( Plugin::$instance->system_info->get_reports_data() )->build();
}
}