File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/Base.php.tar
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-includes/SimplePie/Cache/Base.php 0000644 00000006533 15154201122 0023422 0 ustar 00 <?php
/**
* SimplePie
*
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
* Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* * Neither the name of the SimplePie Team nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
* AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
* @author Sam Sneddon
* @author Ryan McCue
* @link http://simplepie.org/ SimplePie
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
/**
* Base for cache objects
*
* Classes to be used with {@see SimplePie_Cache::register()} are expected
* to implement this interface.
*
* @package SimplePie
* @subpackage Caching
*/
interface SimplePie_Cache_Base
{
/**
* Feed cache type
*
* @var string
*/
const TYPE_FEED = 'spc';
/**
* Image cache type
*
* @var string
*/
const TYPE_IMAGE = 'spi';
/**
* Create a new cache object
*
* @param string $location Location string (from SimplePie::$cache_location)
* @param string $name Unique ID for the cache
* @param string $type Either TYPE_FEED for SimplePie data, or TYPE_IMAGE for image data
*/
public function __construct($location, $name, $type);
/**
* Save data to the cache
*
* @param array|SimplePie $data Data to store in the cache. If passed a SimplePie object, only cache the $data property
* @return bool Successfulness
*/
public function save($data);
/**
* Retrieve the data saved to the cache
*
* @return array Data for SimplePie::$data
*/
public function load();
/**
* Retrieve the last modified time for the cache
*
* @return int Timestamp
*/
public function mtime();
/**
* Set the last modified time to the current time
*
* @return bool Success status
*/
public function touch();
/**
* Remove the cache
*
* @return bool Success status
*/
public function unlink();
}
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Rules/Base.php 0000644 00000003323 15154234220 0026554 0 ustar 00 <?php
/**
* Rules Base class.
*
* @since 2.13.0
*
* @package OMAPI
* @author Jutin Sternberg
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* OMAPI_Rules_Base class.
*
* @since 2.13.0
*/
abstract class OMAPI_Rules_Base {
/**
* Holds the meta fields used for checking output statuses.
*
* @since 2.13.0
*
* @var array
*/
protected $fields = array();
/**
* Holds the main Rules class instance.
*
* @since 2.13.0
*
* @var OMAPI_Rules
*/
public $rules;
/**
* Initiates hooks
*
* @since 2.13.0
*/
public function init_hooks() {
add_filter( 'optin_monster_api_output_fields', array( $this, 'merge_fields' ), 9 );
add_action( 'optinmonster_campaign_should_output_plugin_checks', array( $this, 'set_rules_and_run_checks' ), 9 );
}
/**
* Getter for fields property
*
* @since 2.13.0
*
* @return array
*/
public function get_fields() {
return $this->fields;
}
/**
* Merge fields array with the fields for this rules object.
*
* @since 2.13.0
*
* @param array $fields The meta fields used for checking output statuses.
*
* @return array
*/
public function merge_fields( $fields = array() ) {
return array_merge( $fields, $this->get_fields() );
}
/**
* Sets the rules object, then runs rule checks.
*
* @since 2.13.0
*
* @param OMAPI_Rules $rules The OMAPI_Rules object.
*
* @throws OMAPI_Rules_False|OMAPI_Rules_True
* @return void
*/
public function set_rules_and_run_checks( $rules ) {
$this->rules = $rules;
$this->run_checks();
}
/**
* Runs rule checks.
*
* @since 2.13.0
*
* @throws OMAPI_Rules_False|OMAPI_Rules_True
* @return void
*/
abstract public function run_checks();
}
www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Integrations/Base.php 0000644 00000003433 15154254523 0030063 0 ustar 00 var <?php
/**
* Base Plugin Integration Class, extend this if implementing a plugin integration class.
*
* @since 2.13.0
*
* @package OMAPI
* @author Gabriel Oliveira and Eduardo Nakatsuka
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Base Plugin Integration class.
*
* @since 2.13.0
*/
abstract class OMAPI_Integrations_Base {
/**
* Holds the class object.
*
* @since 2.13.0
*
* @var static
*/
public static $instance;
/**
* The Base OMAPI Object
*
* @since 2.13.0
*
* @var OMAPI
*/
protected $base;
/**
* The minimum Plugin version required.
*
* @since 2.13.0
*
* @var string
*/
const MINIMUM_VERSION = '0.0.0';
/**
* Build our object.
*
* @since 2.13.0
*/
public function __construct() {
$this->base = OMAPI::get_instance();
static::$instance = $this;
}
/**
* Return the plugin version string.
*
* @since 2.13.0
*
* @return string
*/
abstract public static function version();
/**
* Determines if the passed version string passes the operator compare
* against the currently installed version of plugin.
*
* Defaults to checking if the current plugin version is greater than
* the passed version.
*
* @since 2.13.0
*
* @param string $version The version to check.
* @param string $operator The operator to use for comparison.
*
* @return string
*/
public static function version_compare( $version = '', $operator = '>=' ) {
return version_compare( static::version(), $version, $operator );
}
/**
* Determines if the current WooCommerce version meets the minimum version
* requirement.
*
* @since 2.13.0
*
* @return boolean
*/
public static function is_minimum_version() {
return static::version_compare( static::MINIMUM_VERSION );
}
}
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-content/plugins/optinmonster/OMAPI/Promos/Base.php 0000644 00000006170 15154254544 0026757 0 ustar 00 <?php
/**
* Base Promos class.
*
* @since 2.10.0
*
* @package OMAPI
* @author Justin Sternberg
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Base Promos class.
*
* @since 2.10.0
*/
abstract class OMAPI_Promos_Base {
/**
* Holds the class object.
*
* @since 2.10.0
*
* @var object
*/
public static $instance;
/**
* Holds the base class object.
*
* @since 2.10.0
*
* @var object
*/
public $base;
/**
* Holds the welcome slug.
*
* @since 2.10.0
*
* @var string
*/
public $hook;
/**
* SeedProd plugin data.
*
* @since 2.10.0
*
* @var array
*/
public $plugin_data = array();
/**
* The promo id.
*
* @since 2.10.0
*
* @var string
*/
protected $promo = '';
/**
* The plugin id (from OMAPI_Plugins).
*
* @since 2.10.0
*
* @var string
*/
protected $plugin_id = '';
/**
* OMAPI_Plugins_Plugin instance.
*
* @since 2.10.0
*
* @var OMAPI_Plugins_Plugin
*/
public $plugin;
/**
* Primary class constructor.
*
* @since 2.10.0
*/
public function __construct() {
// If we are not in admin or admin ajax, return.
if ( ! is_admin() ) {
return;
}
// If user is in admin ajax or doing cron, return.
if ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
return;
}
// If user is not logged in, return.
if ( ! is_user_logged_in() ) {
return;
}
// return;
// If user cannot manage_options, return.
if ( ! OMAPI::get_instance()->can_access( $this->promo ) ) {
return;
}
// Set our object.
$this->set();
// Register the menu item.
add_action( 'admin_menu', array( $this, '_register_page' ) );
}
/**
* Sets our object instance and base class instance.
*
* @since 2.10.0
*/
public function set() {
self::$instance = $this;
$this->base = OMAPI::get_instance();
$this->plugin = OMAPI_Plugins_Plugin::get( $this->plugin_id );
}
/**
* Loads the OptinMonster admin menu and page.
*
* @since 2.10.0
*/
abstract protected function register_page();
/**
* Loads the OptinMonster admin menu and page.
*
* @since 2.10.0
*/
public function _register_page() {
$hook = $this->register_page();
// If SeedProd is active, we want to redirect to its own landing page.
if ( ! empty( $this->plugin['active'] ) ) {
add_action( 'load-' . $hook, array( $this, 'redirect_plugin' ) );
}
// Load settings page assets.
add_action( 'load-' . $hook, array( $this, 'assets' ) );
}
/**
* Redirects to the seedprod admin page.
*
* @since 2.10.0
*/
abstract public function redirect_plugin();
/**
* Outputs the OptinMonster settings page.
*
* @since 2.10.0
*/
abstract public function display_page();
/**
* Loads assets for the settings page.
*
* @since 2.10.0
*/
public function assets() {
add_filter( 'admin_body_class', array( $this, 'add_body_classes' ) );
$this->base->menu->styles();
$this->base->menu->scripts();
}
/**
* Add body classes.
*
* @since 2.10.0
*/
public function add_body_classes( $classes ) {
$classes .= " omapi-{$this->promo} ";
return $classes;
}
}
httpdocs/wp-content/plugins/all-in-one-seo-pack/app/Common/Standalone/PageBuilders/Base.php 0000644 00000012307 15155163074 0034111 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
namespace AIOSEO\Plugin\Common\Standalone\PageBuilders;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Base class for each of our page builder integrations.
*
* @since 4.1.7
*/
abstract class Base {
/**
* The plugin files we can integrate with.
*
* @since 4.1.7
*
* @var array
*/
public $plugins = [];
/**
* The themes names we can integrate with.
*
* @since 4.1.7
*
* @var array
*/
public $themes = [];
/**
* The integration slug.
*
* @since 4.1.7
*
* @var string
*/
public $integrationSlug = '';
/**
* Class constructor.
*
* @since 4.1.7
*
* @return void
*/
public function __construct() {
// We need to delay it to give other plugins a chance to register custom post types.
add_action( 'init', [ $this, '_init' ], PHP_INT_MAX );
}
/**
* The internal init function.
*
* @since 4.1.7
*
* @return void
*/
public function _init() {
// Check if we do have an integration slug.
if ( empty( $this->integrationSlug ) ) {
return;
}
// Check if the plugin or theme to integrate with is active.
if ( ! $this->isPluginActive() && ! $this->isThemeActive() ) {
return;
}
// Check if we can proceed with the integration.
if ( apply_filters( 'aioseo_page_builder_integration_disable', false, $this->integrationSlug ) ) {
return;
}
$this->init();
}
/**
* The init function.
*
* @since 4.1.7
*
* @return void
*/
public function init() {}
/**
* Check if the integration is active.
*
* @since 4.4.8
*
* @return bool Whether or not the integration is active.
*/
public function isActive() {
return $this->isPluginActive() || $this->isThemeActive();
}
/**
* Check whether or not the plugin is active.
*
* @since 4.1.7
*
* @return bool Whether or not the plugin is active.
*/
public function isPluginActive() {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
$plugins = apply_filters( 'aioseo_page_builder_integration_plugins', $this->plugins, $this->integrationSlug );
foreach ( $plugins as $basename ) {
if ( is_plugin_active( $basename ) ) {
return true;
}
}
return false;
}
/**
* Check whether or not the theme is active.
*
* @since 4.1.7
*
* @return bool Whether or not the theme is active.
*/
public function isThemeActive() {
$themes = apply_filters( 'aioseo_page_builder_integration_themes', $this->themes, $this->integrationSlug );
$theme = wp_get_theme();
foreach ( $themes as $name ) {
if ( $name === $theme->stylesheet || $name === $theme->template ) {
return true;
}
}
return false;
}
/**
* Enqueue the scripts and styles.
*
* @since 4.1.7
*
* @return void
*/
public function enqueue() {
$integrationSlug = $this->integrationSlug;
aioseo()->core->assets->load( "src/vue/standalone/page-builders/$integrationSlug/main.js", [], aioseo()->helpers->getVueData( 'post', $this->getPostId(), $integrationSlug ) );
aioseo()->core->assets->enqueueCss( 'src/vue/assets/scss/integrations/main.scss' );
aioseo()->admin->addAioseoModalPortal();
aioseo()->main->enqueueTranslations();
}
/**
* Get the post ID.
*
* @since 4.1.7
*
* @return int|null The post ID or null.
*/
public function getPostId() {
// phpcs:disable HM.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Recommended
foreach ( [ 'id', 'post', 'post_id' ] as $key ) {
if ( ! empty( $_GET[ $key ] ) ) {
return (int) sanitize_text_field( wp_unslash( $_GET[ $key ] ) );
}
}
// phpcs:enable
if ( ! empty( $GLOBALS['post'] ) ) {
return (int) $GLOBALS['post']->ID;
}
return null;
}
/**
* Returns the page builder edit url for the given Post ID.
*
* @since 4.3.1
*
* @param int $postId The Post ID.
* @return string The Edit URL.
*/
public function getEditUrl( $postId ) { // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return '';
}
/**
* Returns whether or not the given Post ID was built with the Page Builder.
*
* @since 4.1.7
*
* @param int $postId The Post ID.
* @return boolean Whether or not the Post was built with the Page Builder.
*/
public function isBuiltWith( $postId ) { // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return false;
}
/**
* Checks whether or not we should prevent the date from being modified.
*
* @since 4.5.2
*
* @param int $postId The Post ID.
* @return bool Whether or not we should prevent the date from being modified.
*/
public function limitModifiedDate( $postId ) { // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
return false;
}
/**
* Returns the processed page builder content.
*
* @since 4.5.2
*
* @param int $postId The post id.
* @param string $content The raw content.
* @return string The processed content.
*/
public function processContent( $postId, $content = '' ) {
if ( empty( $content ) ) {
$post = get_post( $postId );
if ( is_a( $post, 'WP_Post' ) ) {
$content = $post->post_content;
}
}
if ( aioseo()->helpers->isAjaxCronRestRequest() ) {
return apply_filters( 'the_content', $content );
}
return $content;
}
}