/
home
/
altere25
/
usaigc.com
/
wp-content
/
plugins
/
optinmonster
/
OMAPI
/
/home/altere25/usaigc.com/wp-content/plugins/optinmonster/OMAPI
mkdir
upload
Name
Size
Mode
Actions
EasyDigitalDownloads/
-
0755
rm
Elementor/
-
0755
rm
Integrations/
-
0755
rm
MemberPress/
-
0755
rm
Plugins/
-
0755
rm
Promos/
-
0755
rm
Rules/
-
0755
rm
Shortcodes/
-
0755
rm
WooCommerce/
-
0755
rm
WPForms/
-
0755
rm
Actions.php
7171
0644
edit
dl
rm
Ajax.php
1494
0644
edit
dl
rm
Api.php
14508
0644
edit
dl
rm
ApiAuth.php
2463
0644
edit
dl
rm
ApiKey.php
5205
0644
edit
dl
rm
AssetLoader.php
5721
0644
edit
dl
rm
BaseRestApi.php
6807
0644
edit
dl
rm
Blocks.php
13005
0644
edit
dl
rm
ClassicEditor.php
7085
0644
edit
dl
rm
ConstantContact.php
7602
0644
edit
dl
rm
Debug.php
4453
0644
edit
dl
rm
EasyDigitalDownloads.php
9553
0644
edit
dl
rm
Elementor.php
5493
0644
edit
dl
rm
Inserter.php
11562
0644
edit
dl
rm
InstallSkin.php
1386
0644
edit
dl
rm
InstallSkinCompat.php
1395
0644
edit
dl
rm
MailPoet.php
13680
0644
edit
dl
rm
MemberPress.php
4216
0644
edit
dl
rm
Menu.php
15787
0644
edit
dl
rm
Notifications.php
18910
0644
edit
dl
rm
OmuApi.php
4122
0644
edit
dl
rm
Output.php
24860
0644
edit
dl
rm
Pages.php
17044
0644
edit
dl
rm
Partners.php
4805
0644
edit
dl
rm
Plugins.php
24923
0644
edit
dl
rm
Promos.php
1132
0644
edit
dl
rm
Refresh.php
5683
0644
edit
dl
rm
RestApi.php
39506
0644
edit
dl
rm
RevenueAttribution.php
3037
0644
edit
dl
rm
Review.php
1482
0644
edit
dl
rm
Rules.php
24003
0644
edit
dl
rm
Save.php
11057
0644
edit
dl
rm
Shortcode.php
3668
0644
edit
dl
rm
Sites.php
8554
0644
edit
dl
rm
Support.php
8446
0644
edit
dl
rm
Type.php
2496
0644
edit
dl
rm
Urls.php
8996
0644
edit
dl
rm
Utils.php
5323
0644
edit
dl
rm
Validate.php
9280
0644
edit
dl
rm
Welcome.php
4930
0644
edit
dl
rm
Widget.php
6652
0644
edit
dl
rm
WooCommerce.php
20046
0644
edit
dl
rm
WpErrorException.php
714
0644
edit
dl
rm
WPForms.php
2666
0644
edit
dl
rm
Edit:
/home/altere25/usaigc.com/wp-content/plugins/optinmonster/OMAPI/Shortcode.php
(3668B)
<?php /** * Shortcode class. * * @since 1.0.0 * * @package OMAPI * @author Thomas Griffin */ // Exit if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Shortcode class. * * @since 1.0.0 */ class OMAPI_Shortcode { /** * 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; /** * Holds the OMAPI_Shortcodes_Shortcode object. * * @since 2.6.9 * * @var object */ public $shortcode; /** * Primary class constructor. * * @since 1.0.0 */ public function __construct() { // Set our object. $this->set(); // Load actions and filters. add_shortcode( 'optin-monster', array( $this, 'shortcode' ) ); add_shortcode( 'optin-monster-shortcode', array( $this, 'shortcode_v1' ) ); add_shortcode( 'optin-monster-inline', array( $this, 'inline_campaign_shortcode_with_rules' ) ); add_filter( 'widget_text', 'shortcode_unautop' ); add_filter( 'widget_text', 'do_shortcode' ); } /** * Sets our object instance and base class instance. * * @since 1.0.0 */ public function set() { self::$instance = $this; $this->base = OMAPI::get_instance(); } /** * Creates the shortcode for the plugin. * * @since 1.0.0 * * @global object $post The current post object. * * @param array $atts Array of shortcode attributes. * * @return string The shortcode HTML output. */ public function shortcode( $atts ) { global $post; $this->shortcode = new OMAPI_Shortcodes_Shortcode( $atts, $post ); try { return $this->shortcode->handle(); } catch ( Exception $e ) { } return ''; } /** * Backwards compat shortcode for v1. * * @since 1.0.0 * * @param array $atts Array of shortcode attributes. * * @return string The shortcode HTML output. */ public function shortcode_v1( $atts ) { // Run the v2 implementation. if ( ! empty( $atts['id'] ) ) { $atts['slug'] = $atts['id']; unset( $atts['id'] ); } return $this->shortcode( $atts ); } /** * Creates the inline campaign shortcode, with followrules defaulted to true. * * @since 2.6.8 * * @param array $atts Array of shortcode attributes. * * @return string The shortcode HTML output. */ public function inline_campaign_shortcode_with_rules( $atts = array() ) { global $post; $html = ''; $this->shortcode = new OMAPI_Shortcodes_Shortcode( $atts, $post ); try { add_filter( 'optinmonster_check_should_output', array( $this, 'reject_non_inline_campaigns' ), 10, 2 ); $html = $this->shortcode->handle_inline(); } catch ( Exception $e ) { } remove_filter( 'optinmonster_check_should_output', array( $this, 'reject_non_inline_campaigns' ), 10, 2 ); return $html; } /** * Checks if optin type is inline, and rejects (returns html comment) if not. * * @since 2.6.8 * * @param OMAPI_Rules_Exception $e A rules exception object. * @param OMAPI_Rules $rules The rules object. * * @return OMAPI_Rules_Exception A rules exception object. */ public function reject_non_inline_campaigns( $e, $rules ) { if ( ! empty( $rules->optin->campaign_type ) && ! empty( $rules->optin->ID ) && ! empty( $this->shortcode->optin->ID ) && (int) $this->shortcode->optin->ID === (int) $rules->optin->ID && 'inline' !== $rules->optin->campaign_type ) { $e = new OMAPI_Rules_False( 'campaign not inline for optin-monster-inline shortcode' ); } return $e; } }
Save
cmd:
run