SILENT KILLERPanel

Current Path: > home > codekrsu > > escapematrixonline.com > wp-content > plugins > optinmonster > > > OMAPI


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//escapematrixonline.com/wp-content/plugins/optinmonster///OMAPI

NameTypeSizeLast ModifiedActions
EasyDigitalDownloads Directory - -
Elementor Directory - -
Integrations Directory - -
MemberPress Directory - -
Plugins Directory - -
Promos Directory - -
Rules Directory - -
Shortcodes Directory - -
WPForms Directory - -
WooCommerce Directory - -
Actions.php File 7126 bytes February 25 2025 01:06:30.
Ajax.php File 1494 bytes November 17 2021 04:02:26.
Api.php File 14508 bytes February 25 2025 01:06:30.
ApiAuth.php File 2463 bytes October 07 2021 23:34:50.
ApiKey.php File 5205 bytes July 01 2024 22:14:00.
AssetLoader.php File 5721 bytes April 01 2021 19:57:40.
BaseRestApi.php File 6807 bytes October 15 2024 19:52:30.
Blocks.php File 13118 bytes March 26 2025 18:07:30.
ClassicEditor.php File 7085 bytes July 19 2022 01:42:26.
ConstantContact.php File 7602 bytes July 01 2024 22:14:00.
Debug.php File 4453 bytes July 01 2024 22:14:00.
EasyDigitalDownloads.php File 9553 bytes July 01 2024 22:14:00.
Elementor.php File 5493 bytes January 18 2023 22:34:56.
Inserter.php File 11562 bytes September 14 2022 06:35:44.
InstallSkin.php File 1386 bytes January 20 2021 22:11:00.
InstallSkinCompat.php File 1395 bytes January 20 2021 22:11:00.
MailPoet.php File 13680 bytes July 01 2024 22:14:00.
MemberPress.php File 4216 bytes June 23 2023 01:24:22.
Menu.php File 15787 bytes November 27 2024 23:45:46.
Notifications.php File 18910 bytes October 15 2024 19:52:30.
OmuApi.php File 4122 bytes October 27 2021 22:35:34.
Output.php File 24860 bytes September 16 2024 23:28:26.
Pages.php File 17172 bytes March 31 2025 18:30:04.
Partners.php File 4805 bytes July 01 2024 22:14:00.
Plugins.php File 24923 bytes April 23 2024 17:54:30.
Promos.php File 1132 bytes September 14 2022 06:35:44.
Refresh.php File 5891 bytes March 31 2025 18:30:04.
RestApi.php File 39506 bytes October 15 2024 19:52:30.
RevenueAttribution.php File 3037 bytes May 17 2022 18:55:22.
Review.php File 1482 bytes September 08 2021 19:22:54.
Rules.php File 24003 bytes July 01 2024 22:14:00.
Save.php File 11057 bytes October 13 2023 01:19:08.
Shortcode.php File 3668 bytes November 30 2021 23:04:18.
Sites.php File 8554 bytes July 01 2024 22:14:00.
Support.php File 8446 bytes February 25 2025 01:06:30.
Type.php File 2496 bytes February 11 2023 00:30:54.
Urls.php File 8996 bytes November 13 2024 02:13:58.
Utils.php File 7590 bytes March 31 2025 18:30:04.
Validate.php File 9280 bytes February 22 2024 23:03:38.
WPForms.php File 2666 bytes July 27 2023 00:06:52.
Welcome.php File 4930 bytes November 17 2021 04:02:26.
Widget.php File 6652 bytes November 17 2021 04:02:26.
WooCommerce.php File 20046 bytes July 01 2024 22:14:00.
Wordfence.php File 5606 bytes October 09 2024 11:38:44.
WpErrorException.php File 714 bytes November 17 2020 01:51:02.

Reading File: /home/codekrsu//escapematrixonline.com/wp-content/plugins/optinmonster///OMAPI/Widget.php

<?php
/**
 * Widget class.
 *
 * @since 1.0.0
 *
 * @package OMAPI
 * @author  Thomas Griffin
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Widget class.
 *
 * @since 1.0.0
 */
class OMAPI_Widget extends WP_Widget {

	/**
	 * 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;

	/**
	 * Constructor. Sets up and creates the widget with appropriate settings.
	 *
	 * @since 1.0.0
	 */
	public function __construct() {

		// Load the base class object.
		$this->base = OMAPI::get_instance();

		$widget_ops = apply_filters(
			'optin_monster_api_widget_ops',
			array(
				'classname'   => 'optin-monster-api',
				'description' => esc_html__( 'Place an OptinMonster campaign into a widgetized area.', 'optin-monster-api' ),
			)
		);

		$control_ops = apply_filters(
			'optin_monster_api_widget_control_ops',
			array(
				'id_base' => 'optin-monster-api',
				'height'  => 350,
				'width'   => 225,
			)
		);

		parent::__construct(
			'optin-monster-api',
			apply_filters( 'optin_monster_api_widget_name', esc_html__( 'OptinMonster', 'optin-monster-api' ) ),
			$widget_ops,
			$control_ops
		);

	}

	/**
	 * Outputs the widget within the widgetized area.
	 *
	 * @since 1.0.0
	 *
	 * @param array $args     The default widget arguments.
	 * @param array $instance The input settings for the current widget instance.
	 *
	 * @return void
	 */
	public function widget( $args, $instance ) {

		$title    = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );
		$optin_id = isset( $instance['optin_monster_id'] ) ? $instance['optin_monster_id'] : 0;

		do_action( 'optin_monster_api_widget_before_output', $args, $instance );

		echo $args['before_widget'];

		do_action( 'optin_monster_api_widget_before_title', $args, $instance );

		// If a title exists, output it.
		if ( $title ) {
			echo $args['before_title'] . $title . $args['after_title'];
		}

		do_action( 'optin_monster_api_widget_before_optin', $args, $instance );

		// If a optin has been selected, output it.
		if ( $optin_id ) {
			// Grab the optin object. If it does not exist, return early.
			$optin = absint( $optin_id ) ? $this->base->get_optin( $optin_id ) : $this->base->get_optin_by_slug( $optin_id );
			if ( ! $optin ) {
				return;
			}

			// If in test mode but not logged in, skip over the optin.
			$test = (bool) get_post_meta( $optin->ID, '_omapi_test', true );
			if ( $test && ! is_user_logged_in() ) {
				return;
			}

			// Load the optin.
			optin_monster(
				$optin->ID,
				'id',
				array(
					'followrules' => ! empty( $instance['followrules'] ) ? 'true' : 'false',
				)
			);
		}

		do_action( 'optin_monster_api_widget_after_optin', $args, $instance );

		echo $args['after_widget'];

		do_action( 'optin_monster_api_widget_after_output', $args, $instance );

	}

	/**
	 * Sanitizes and updates the widget.
	 *
	 * @since 1.0.0
	 *
	 * @param array $new_instance The new input settings for the current widget instance.
	 * @param array $old_instance The old input settings for the current widget instance.
	 *
	 * @return array
	 */
	public function update( $new_instance, $old_instance ) {

		// Set $instance to the old instance in case no new settings have been updated for a particular field.
		$instance = $old_instance;

		// Sanitize user inputs.
		$instance['title']            = trim( $new_instance['title'] );
		$instance['followrules']      = ! empty( $new_instance['followrules'] );
		$instance['optin_monster_id'] = absint( $new_instance['optin_monster_id'] );

		return apply_filters( 'optin_monster_api_widget_update_instance', $instance, $new_instance );

	}

	/**
	 * Outputs the widget form where the user can specify settings.
	 *
	 * @since 1.0.0
	 *
	 * @param array $instance The input settings for the current widget instance.
	 *
	 * @return void
	 */
	public function form( $instance ) {

		// Get all available optins and widget properties.
		$optins      = $this->base->get_optins();
		$title       = isset( $instance['title'] ) ? $instance['title'] : '';
		$followrules = ! empty( $instance['followrules'] );
		$optin_id    = isset( $instance['optin_monster_id'] ) ? $instance['optin_monster_id'] : false;

		do_action( 'optin_monster_api_widget_before_form', $instance );
		?>
		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title', 'optin-monster-api' ); ?></label>
			<input id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%;" />
		</p>
		<?php do_action( 'optin_monster_api_widget_middle_form', $instance ); ?>
		<p>
			<label for="<?php echo esc_attr( $this->get_field_id( 'optin_monster_id' ) ); ?>"><?php esc_html_e( 'Campaign', 'optin-monster-api' ); ?></label>
			<select id="<?php echo esc_attr( $this->get_field_id( 'optin_monster_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'optin_monster_id' ) ); ?>" style="width: 100%;">
				<?php if ( ! empty( $optins ) ) {
					foreach ( $optins as $optin ) {
						$type    = get_post_meta( $optin->ID, '_omapi_type', true );
						$enabled = (bool) get_post_meta( $optin->ID, '_omapi_enabled', true );

						// Only allow sidebar types.
						if ( 'sidebar' !== $type && 'inline' !== $type ) {
							continue;
						}

						// Display disabled or enabled selection.
						if ( $enabled ) {
							echo '<option value="' . esc_attr( $optin->ID ) . '"' . selected( $optin->ID, $optin_id, false ) . '>' . esc_html( $optin->post_title ) . '</option>';
						} else {
							echo '<option value="' . esc_attr( $optin->ID ) . '" disabled="disabled"' . selected( $optin->ID, $optin_id, false ) . '>' . esc_html( $optin->post_title ) . ' (' . esc_html__( 'Not Enabled', 'optin-monster-api' ) . ')</option>';
						}
					}
				}
				?>
			</select>
		</p>
		<p>
			<input id="<?php echo esc_attr( $this->get_field_id( 'followrules' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'followrules' ) ); ?>" type="checkbox" value="1" <?php checked( $followrules ); ?> />
			<label for="<?php echo esc_attr( $this->get_field_id( 'followrules' ) ); ?>"><?php esc_html_e( 'Apply Advanced Output Settings?', 'optin-monster-api' ); ?></label>
		</p>
		<?php

		do_action( 'optin_monster_api_widget_after_form', $instance );

	}

}

SILENT KILLER Tool