/
home
/
techb158
/
public_html
/
wp-content
/
plugins
/
optinmonster
/
OMAPI
/
/home/techb158/public_html/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
7970
0666
edit
dl
rm
Ajax.php
1494
0666
edit
dl
rm
Api.php
14507
0666
edit
dl
rm
ApiAuth.php
2463
0666
edit
dl
rm
ApiKey.php
5203
0666
edit
dl
rm
AssetLoader.php
5489
0666
edit
dl
rm
BaseRestApi.php
6889
0666
edit
dl
rm
Blocks.php
13105
0666
edit
dl
rm
ClassicEditor.php
7084
0666
edit
dl
rm
ConstantContact.php
7591
0666
edit
dl
rm
Debug.php
4592
0666
edit
dl
rm
EasyDigitalDownloads.php
9553
0666
edit
dl
rm
Elementor.php
5493
0666
edit
dl
rm
Inserter.php
11571
0666
edit
dl
rm
InstallSkin.php
1386
0666
edit
dl
rm
InstallSkinCompat.php
1395
0666
edit
dl
rm
MailPoet.php
13974
0666
edit
dl
rm
MemberPress.php
4216
0666
edit
dl
rm
Menu.php
17301
0666
edit
dl
rm
Notifications.php
18910
0666
edit
dl
rm
OmuApi.php
4122
0666
edit
dl
rm
Output.php
25848
0666
edit
dl
rm
Pages.php
18019
0666
edit
dl
rm
Partners.php
5557
0666
edit
dl
rm
Plugins.php
24923
0666
edit
dl
rm
Promos.php
1131
0666
edit
dl
rm
Refresh.php
6553
0666
edit
dl
rm
RestApi.php
44190
0666
edit
dl
rm
RevenueAttribution.php
3037
0666
edit
dl
rm
Review.php
1482
0666
edit
dl
rm
Rules.php
24000
0666
edit
dl
rm
Save.php
11999
0666
edit
dl
rm
Shortcode.php
3667
0666
edit
dl
rm
Sites.php
8553
0666
edit
dl
rm
Support.php
9192
0666
edit
dl
rm
Type.php
3722
0666
edit
dl
rm
Urls.php
8951
0666
edit
dl
rm
Utils.php
7589
0666
edit
dl
rm
Validate.php
9266
0666
edit
dl
rm
Welcome.php
4929
0666
edit
dl
rm
Widget.php
6662
0666
edit
dl
rm
WooCommerce.php
20045
0666
edit
dl
rm
WpErrorException.php
714
0666
edit
dl
rm
WPForms.php
2665
0666
edit
dl
rm
Edit:
/home/techb158/public_html/wp-content/plugins/optinmonster/OMAPI/Shortcode.php
(3667B)
<?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