protected function __construct($id, $slug) { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $slug . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_slug = $slug; $this->_id = $id; $this->load(); }
/** * @author Vova Feldman (@svovaf) * @since 1.1.3 * * @param string $id */ private function __construct($id) { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_logger->entrance(); $this->_logger->log('id = ' . $id); $this->_options = FS_Option_Manager::get_manager($id, true); }
protected function __construct($plugin_identifier, $fs = null) { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $plugin_identifier . '_' . $this->entry_id(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_fs = $fs; $this->_plugin_identifier = $plugin_identifier; $this->load(); }
public static function instance() { if (!isset(self::$_instance)) { self::$_instance = new FS_Security(); self::$_logger = FS_Logger::get_logger(WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); } return self::$_instance; }
/** * @author Vova Feldman (@svovaf) * @since 1.0.3 * * @param string $id * @param bool $load */ private function __construct($id, $load = false) { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_opt_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_logger->entrance(); $this->_logger->log('id = ' . $id); $this->_id = $id; if ($load) { $this->load(); } }
private function __construct() { $rw_account = rw_account(); if ($rw_account->has_public_key() && !$rw_account->has_secret_key()) { // Try to claim for a secret key. $this->claim_secret_key(); } $this->reload(); $this->_logger = FS_Logger::get_logger(WP_RW__ID . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); }
function __construct(Freemius $fs) { $this->_fs = $fs; $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $fs->get_slug() . '_info', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); // Remove default plugin information action. remove_all_actions('install_plugins_pre_plugin-information'); // Override action with custom plugins function for add-ons. add_action('install_plugins_pre_plugin-information', array(&$this, 'install_plugin_information')); // Override request for plugin information for Add-ons. add_filter('fs_plugins_api', array(&$this, '_get_addon_info_filter'), WP_FS__DEFAULT_PRIORITY, 3); }
protected function __construct($slug, $title = '') { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $slug . '_data', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_slug = $slug; $this->_title = !empty($title) ? $title : ''; $this->_sticky_storage = FS_Key_Value_Storage::instance('admin_notices', $this->_slug); if (is_admin()) { if (0 < count($this->_sticky_storage)) { // If there are sticky notices for the current slug, add a callback // to the AJAX action that handles message dismiss. add_action("wp_ajax_{$slug}_dismiss_notice_action", array(&$this, 'dismiss_notice_ajax_callback')); foreach ($this->_sticky_storage as $id => $msg) { // Add admin notice. $this->add($msg['message'], $msg['title'], $msg['type'], true, $msg['all'], $msg['id'], false); } } } }
/** * @param string $id * @param bool $prefix_slug * * @return FS_Logger */ function get_logger($id = '', $prefix_slug = true) { return FS_Logger::get_logger(($prefix_slug ? $this->_slug : '') . (!$prefix_slug || empty($id) ? '' : '_') . $id); }
function __construct(Freemius $freemius) { $this->_fs = $freemius; $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $freemius->get_slug() . '_updater', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_filters(); }
protected function __construct($plugin_slug) { $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $plugin_slug . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); $this->_plugin_slug = $plugin_slug; }
/** * @param string $slug * @param string $scope 'app', 'developer', 'user' or 'install'. * @param number $id Element's id. * @param string $public_key Public key. * @param bool|string $secret_key Element's secret key. * @param bool $is_sandbox */ private function __construct($slug, $scope, $id, $public_key, $secret_key, $is_sandbox) { $this->_api = new Freemius_Api($scope, $id, $public_key, $secret_key, $is_sandbox); $this->_slug = $slug; $this->_logger = FS_Logger::get_logger(WP_FS__SLUG . '_' . $slug . '_api', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); }
<?php /** * @package Freemius * @copyright Copyright (c) 2015, Freemius, Inc. * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.0.3 */ if (!defined('ABSPATH')) { exit; } global $fs_core_logger; $fs_core_logger = FS_Logger::get_logger(WP_FS__SLUG . '_core', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK); if (!function_exists('fs_dummy')) { function fs_dummy() { } } /* Url. --------------------------------------------------------------------------------------------*/ function fs_get_url_daily_cache_killer() { return date('\\YY\\Mm\\Dd'); } /* Templates / Views. --------------------------------------------------------------------------------------------*/ if (!function_exists('fs_get_template_path')) { function fs_get_template_path($path) { return WP_FS__DIR_TEMPLATES . '/' . trim($path, '/'); }