PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
optinmonster
/
OMAPI
<?php /** * Ajax class. * * @since 1.0.0 * * @package OMAPI * @author Thomas Griffin */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Ajax class. * * @since 1.0.0 */ class OMAPI_Ajax { /** * Holds the class object. * * @since 1.0.0 * * @var object */ public static $instance; /** * Path to the file. * * @since 1.0.0 * * @var string */ public $file = __FILE__; /** * Holds the base class object. * * @since 1.0.0 * * @var object */ public $base; /** * Primary class constructor. * * @since 1.0.0 */ public function __construct() { // Set our object. $this->set(); // Load non-WordPress style ajax requests. // phpcs:ignore Generic.Commenting.Todo.TaskFound // TODO move all of this to RestApi, and use rest api for these requests! if ( isset( $_REQUEST['optin-monster-ajax-route'] ) && $_REQUEST['optin-monster-ajax-route'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( isset( $_REQUEST['action'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended add_action( 'init', array( $this, 'ajax' ), 999 ); } } } /** * Sets our object instance and base class instance. * * @since 1.0.0 */ public function set() { self::$instance = $this; $this->base = OMAPI::get_instance(); } /** * Callback to process external ajax requests. * * @since 1.0.0 */ public function ajax() { switch ( $_REQUEST['action'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended case 'mailpoet': $this->base->mailpoet->handle_ajax_call(); break; default: break; } } }
[-] WooCommerce.php
[edit]
[-] AssetLoader.php
[edit]
[-] Validate.php
[edit]
[-] TrustPulse.php
[edit]
[-] ApiKey.php
[edit]
[-] Welcome.php
[edit]
[-] Review.php
[edit]
[-] Pages.php
[edit]
[+]
..
[-] Urls.php
[edit]
[-] Type.php
[edit]
[-] InstallSkinCompat.php
[edit]
[-] MailPoet.php
[edit]
[-] Plugins.php
[edit]
[-] ClassicEditor.php
[edit]
[-] Api.php
[edit]
[-] Support.php
[edit]
[-] Actions.php
[edit]
[-] Utils.php
[edit]
[-] RestApi.php
[edit]
[-] Blocks.php
[edit]
[-] Save.php
[edit]
[-] Notifications.php
[edit]
[-] Ajax.php
[edit]
[-] WpErrorException.php
[edit]
[-] Rules.php
[edit]
[-] ConstantContact.php
[edit]
[-] Elementor.php
[edit]
[-] Widget.php
[edit]
[-] InstallSkin.php
[edit]
[-] Sites.php
[edit]
[-] Menu.php
[edit]
[-] Partners.php
[edit]
[+]
Elementor
[-] Refresh.php
[edit]
[-] Output.php
[edit]
[-] Inserter.php
[edit]
[-] Shortcode.php
[edit]