HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/Shortcode.php.tar
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Shortcode.php000064400000007124151537436350026563 0ustar00<?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;
	}

}
www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Shortcodes/Shortcode.php000064400000013273151543126540030615 0ustar00var<?php
/**
 * Shortcode class.
 *
 * @since 2.6.9
 *
 * @package OMAPI
 * @author  Justin Sternberg
 */

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

/**
 * Shortcode class.
 *
 * @since 2.6.9
 */
class OMAPI_Shortcodes_Shortcode {

	/**
	 * Holds the base class object.
	 *
	 * @since 2.6.9
	 *
	 * @var object
	 */
	public $base;

	/**
	 * Shortcode attributes.
	 *
	 * @since 2.6.9
	 *
	 * @var array
	 */
	public $atts = array();

	/**
	 * The shortcode campaign identifier, slug (or ID for legacy/back-compat).
	 *
	 * @since 2.6.9
	 *
	 * @var string|int
	 */
	public $identifier = '';

	/**
	 * The global post object.
	 *
	 * @since 2.6.9
	 *
	 * @var WP_Post
	 */
	public $post = null;

	/**
	 * The OM campaign post object.
	 *
	 * @since 2.6.9
	 *
	 * @var WP_Post
	 */
	public $campaign = null;

	/**
	 * Class constructor.
	 *
	 * @param array  $atts Array of shortcode attributes.
	 * @param object $post The post object to check against.
	 *
	 * @since 2.6.9
	 */
	public function __construct( $atts, $post ) {
		$this->atts = $atts;
		$this->post = $post;
		$this->base = OMAPI::get_instance();
	}

	/**
	 * Sends the shortcode html.
	 *
	 * @uses wp_validate_boolean
	 *
	 * @since 2.6.9
	 *
	 * @return string The shortcode HTML output.
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function handle() {
		return $this
			->check_amp()
			->set_atts(
				array(
					'slug'        => '',
					'followrules' => 'false',
					// id attribute is deprecated.
					'id'          => '',
				),
				'optin-monster'
			)
			->set_identifier()
			->set_campaign_object()
			->validate_rules()
			->get_campaign_html();
	}

	/**
	 * Sends the inline-campaign shortcode html.
	 *
	 * @since 2.6.9
	 *
	 * @return string The shortcode HTML output.
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function handle_inline() {
		return $this
			->check_amp()
			->set_atts(
				array(
					'slug' => '',
				),
				'optin-monster-inline'
			)
			->set_identifier()
			->set_campaign_object()
			->validate_rules( true )
			->get_campaign_html();
	}

	/**
	 * Checking if AMP is enabled.
	 *
	 * @since 2.6.9
	 *
	 * @return OMAPI_Shortcodes_Shortcode
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function check_amp() {
		if ( OMAPI_Utils::is_amp_enabled() ) {
			throw new OMAPI_Shortcodes_Exception( 'Amp enabled' );
		}

		return $this;
	}

	/**
	 * Set the attributes array using shortcode_atts function.
	 *
	 * @since 2.6.9
	 *
	 * @uses shortcode_atts
	 *
	 * @param array  $defaults       Array of default attributes.
	 * @param string $shortcode_name The shortcode name.
	 *
	 * @return OMAPI_Shortcodes_Shortcode
	 */
	public function set_atts( $defaults, $shortcode_name ) {

		// Merge default attributes with passed attributes.
		$this->atts = shortcode_atts( $defaults, $this->atts, $shortcode_name );

		return $this;
	}

	/**
	 * Set the campaign identifier from the given attributes, either ID or slug.
	 *
	 * @since 2.6.9
	 *
	 * @return OMAPI_Shortcodes_Shortcode
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function set_identifier() {
		$identifier = false;

		if ( ! empty( $this->atts['slug'] ) ) {
			$identifier = $this->atts['slug'];
		}

		if ( ! empty( $this->atts['id'] ) ) {
			$identifier = $this->atts['id'];
		}

		if ( empty( $identifier ) ) {
			// A custom attribute must have been passed. Allow it to be filtered to grab the campaign ID from a custom source.
			$identifier = apply_filters( 'optin_monster_api_custom_optin_id', false, $this->atts, $this->post );
		}

		// Allow the campaign ID to be filtered before it is stored and used to create the campaign output.
		$identifier = apply_filters( 'optin_monster_api_pre_optin_id', $identifier, $this->atts, $this->post );

		// If there is no identifier, do nothing.
		if ( empty( $identifier ) ) {
			throw new OMAPI_Shortcodes_Exception( 'Missing identifier in attributes' );
		}

		$this->identifier = $identifier;

		return $this;
	}

	/**
	 * Set the campaign object, from the ID/slug.
	 *
	 * @since 2.6.9
	 *
	 * @return OMAPI_Shortcodes_Shortcode
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function set_campaign_object() {
		$campaign = ctype_digit( (string) $this->identifier )
			? $this->base->get_optin( absint( $this->identifier ) )
			: $this->base->get_optin_by_slug( sanitize_text_field( $this->identifier ) );

		// If no campaign found, do nothing.
		if ( empty( $campaign ) ) {
			throw new OMAPI_Shortcodes_Exception( 'Could not find campaign object for identifier' );
		}

		$this->campaign = $campaign;

		return $this;
	}

	/**
	 * Checks the given campaign against the output settings rules.
	 *
	 * @since 2.6.9
	 *
	 * @return OMAPI_Shortcodes_Shortcode
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function validate_rules( $force = false ) {
		$should_check = $force || wp_validate_boolean( $this->atts['followrules'] );

		if (
			$should_check
			// Do OMAPI Output rules check.
			&& ! OMAPI_Rules::check_shortcode( $this->campaign, $this->post->ID )
		) {
			throw new OMAPI_Shortcodes_Exception( 'Failed the WordPress rules' );
		}

		return $this;
	}

	/**
	 * Sends the campaign html, passed through optin_monster_shortcode_output filter.
	 *
	 * @since 2.6.9
	 *
	 * @return string Campaign html.
	 * @throws OMAPI_Shortcodes_Exception
	 */
	public function get_campaign_html() {
		// Try to grab the stored HTML.
		$html = $this->base->output->prepare_campaign( $this->campaign );
		if ( ! $html ) {
			throw new OMAPI_Shortcodes_Exception( 'Optin object missing campaign html in post_content' );
		}

		// Make sure to apply shortcode filtering.
		$this->base->output->set_slug( $this->campaign );

		// Return the HTML.
		return apply_filters( 'optin_monster_shortcode_output', $html, $this->campaign, $this->atts );
	}

}
httpdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Breadcrumbs/Shortcode.php000064400000001037151547123440032761 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
namespace AIOSEO\Plugin\Common\Breadcrumbs;

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

/**
 * Class Shortcode.
 *
 * @since 4.1.1
 */
class Shortcode {
	/**
	 * Shortcode constructor.
	 *
	 * @since 4.1.1
	 */
	public function __construct() {
		add_shortcode( 'aioseo_breadcrumbs', [ $this, 'display' ] );
	}

	/**
	 * Shortcode callback.
	 *
	 * @since 4.1.1
	 *
	 * @return string|void The breadcrumb html.
	 */
	public function display() {
		return aioseo()->breadcrumbs->frontend->display( false );
	}
}httpdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Sitemap/Html/Shortcode.php000064400000001336151550152100033025 0ustar00var/www/vhosts/uyarreklam.com.tr<?php
namespace AIOSEO\Plugin\Common\Sitemap\Html;

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

/**
 * Handles the HTML sitemap shortcode.
 *
 * @since 4.1.3
 */
class Shortcode {
	/**
	 * Class constructor.
	 *
	 * @since 4.1.3
	 */
	public function __construct() {
		add_shortcode( 'aioseo_html_sitemap', [ $this, 'render' ] );
	}

	/**
	 * Shortcode callback.
	 *
	 * @since 4.1.3
	 *
	 * @param  array       $attributes The shortcode attributes.
	 * @return string|void             The HTML sitemap.
	 */
	public function render( $attributes ) {
		$attributes = aioseo()->htmlSitemap->frontend->getAttributes( $attributes );

		return aioseo()->htmlSitemap->frontend->output( false, $attributes );
	}
}