[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Save.php
<?php /** * WPForms Save class. * * @since 2.9.0 * * @package OMAPI * @author Eduardo Nakatsuka */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * WPForms Save class. * * @since 2.9.0 */ class OMAPI_WPForms_Save { /** * Holds save error. * * @since 2.9.0 * * @var mixed */ public $error = null; /** * Holds the base class object. * * @since 2.9.0 * * @var OMAPI */ public $base; /** * Primary class constructor. * * @since 2.9.0 */ public function __construct() { $this->base = OMAPI::get_instance(); } /** * Helper method to handle connecting WPForms to OptinMonster. * * @since 2.9.0 * * @return void */ public function connect() { $this->update_connection(); } /** * Helper method to handle disconnecting WPForms to OptinMonster. * * @since 2.9.0 * * @return void */ public function disconnect() { $this->update_connection( false ); } /** * Handles connecting or disconnecting WPForms to OptinMonster. * * @since 2.9.0 * * @param bool $connect True to connect, false to disconnect. * * @return void */ public function update_connection( $connect = true ) { $creds = $this->base->get_api_credentials(); if ( empty( $creds['apikey'] ) && empty( $creds['user'] ) && empty( $creds['key'] ) ) { return; } // Make a connection request. $action = $connect ? 'connect' : 'disconnect'; $api = new OMAPI_Api( 'wpforms/' . $action, $creds, 'POST', 'v2' ); $response = $api->request( OMAPI_Api::get_url_args() ); if ( is_wp_error( $response ) ) { $message = $connect /* translators: %s - Error message found while connecting to OptinMonster. */ ? esc_html__( 'WPForms could not be connected to OptinMonster. The OptinMonster API returned with the following response: %s', 'optin-monster-api' ) /* translators: %s - Error message found while disconnecting to OptinMonster. */ : esc_html__( 'WPForms could not be disconnected from OptinMonster. The OptinMonster API returned with the following response: %s', 'optin-monster-api' ); $this->error = sprintf( $message, $response->get_error_message() ); } } }
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.28 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