本文整理汇总了PHP中PucFactory::buildUpdateChecker方法的典型用法代码示例。如果您正苦于以下问题:PHP PucFactory::buildUpdateChecker方法的具体用法?PHP PucFactory::buildUpdateChecker怎么用?PHP PucFactory::buildUpdateChecker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PucFactory
的用法示例。
在下文中一共展示了PucFactory::buildUpdateChecker方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_up_auto_updater
function set_up_auto_updater()
{
$forceUpdate = get_option('force-jetpack-update');
if ($forceUpdate != get_current_jetpack_version()) {
update_option('force-jetpack-update', 'just-updated');
}
$beta_type = get_option('jp_beta_type');
if ($beta_type == 'rc_only') {
$json_url = 'http://betadownload.jetpack.me/rc/rc.json';
} else {
$json_url = 'http://betadownload.jetpack.me/jetpack-bleeding-edge.json';
}
do_action('add_debug_info', $json_url, 'json_url');
require 'plugin-updates/plugin-update-checker.php';
$JetpackBeta = PucFactory::buildUpdateChecker($json_url, WP_PLUGIN_DIR . '/jetpack/jetpack.php', 'jetpack', '0.01');
// Allows us to update the Jetpack Beta tool by updating GitHub
$className = PucFactory::getLatestClassVersion('PucGitHubChecker');
$myUpdateChecker = new $className('https://github.com/Automattic/jetpack-beta/', __FILE__, 'master');
$jp_beta_autoupdate = get_option('jp_beta_autoupdate');
if ($jp_beta_autoupdate != 'no') {
function auto_update_jetpack_beta($update, $item)
{
// Array of plugin slugs to always auto-update
$plugins = array('jetpack');
if (in_array($item->slug, $plugins)) {
return true;
// Always update plugins in this array
} else {
return $update;
// Else, use the normal API response to decide whether to update or not
}
}
add_filter('auto_update_plugin', 'auto_update_jetpack_beta', 10, 2);
}
}
示例2: __construct
public function __construct()
{
if (is_admin()) {
$this->loadSettings();
}
//Capture request arguments before WP has had a chance to apply magic quotes.
$this->get = $_GET;
$this->post = $this->originalPost = $_POST;
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$this->post = stripslashes_deep($this->post);
$this->get = stripslashes_deep($this->get);
}
add_action('wp_before_admin_bar_render', array($this, 'filterAdminBar'), self::ADMIN_BAR_FILTER_PRIORITY);
add_action('admin_menu', array($this, 'addEditorPage'));
if (!defined('IS_DEMO_MODE') && !defined('IS_MASTER_MODE')) {
//Add-ons are updated separately from the main plugin, but use the same license details.
require WS_ADMIN_BAR_EDITOR_DIR . '/includes/plugin-updates/plugin-update-checker.php';
$this->updateChecker = PucFactory::buildUpdateChecker('http://adminmenueditor.com/?get_metadata_for=wp-toolbar-editor', WS_ADMIN_BAR_EDITOR_FILE, 'wp-toolbar-editor', 12, 'ws_abe_external_updates');
if (isset($GLOBALS['ameProLicenseManager'])) {
$this->ameLicenseManager = $GLOBALS['ameProLicenseManager'];
$this->updateChecker->addQueryArgFilter(array($this, 'filterUpdateChecks'));
$downloadFilter = array($this, 'filterUpdateDownloadUrl');
$this->updateChecker->addFilter('request_info_result', $downloadFilter, 20);
$this->updateChecker->addFilter('pre_inject_update', $downloadFilter);
$this->updateChecker->addFilter('pre_inject_info', $downloadFilter);
}
}
}
示例3: check_for_updates
/**
* Checks for plugin updates.
*/
public function check_for_updates($plugin_file, $plugin_slug = null)
{
if (empty($plugin_slug)) {
$plugin_slug = static::$plugin_slug;
}
// Debug
//var_dump($this->path('vendor') . '/yahnis-elsts/plugin-update-checker/plugin-update-checker.php');die();
require_once $this->path('vendor') . '/yahnis-elsts/plugin-update-checker/plugin-update-checker.php';
$MyUpdateChecker = \PucFactory::buildUpdateChecker($this->get_update_url($plugin_slug), $plugin_file, $plugin_slug);
}
示例4: __construct
public function __construct($slug, $dir, $file, $debug = false)
{
$this->slug = $slug;
$this->debug = $debug;
$this->license_server_url = 'http://lic.codemshop.com/manager_' . $this->rev;
$this->update_server_url = 'http://lic.codemshop.com/update';
require 'plugin-updates/plugin-update-checker.php';
$license_info = get_option('msl_license_' . $this->slug, null);
if ($license_info) {
$license_info = json_decode($license_info);
}
$this->update_checker = PucFactory::buildUpdateChecker($this->update_server_url . '?action=get_metadata&slug=' . $this->slug . '&license_key=' . ($license_info ? $license_info->license_key : '') . '&activation_key=' . ($license_info ? $license_info->activation_key : '') . '&domain=' . ($license_info ? $license_info->site_url : ''), $file, $this->slug);
add_action("in_plugin_update_message-" . basename($dir) . '/' . basename($file), array($this, "in_plugin_update_message"), 10, 2);
add_action('wp_ajax_msl_activation_' . $this->slug, array(&$this, 'msl_activation'));
add_action('wp_ajax_msl_verify_' . $this->slug, array(&$this, 'msl_verify'));
add_action('wp_ajax_msl_reset_' . $this->slug, array(&$this, 'msl_reset'));
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
}
示例5: __construct
/**
* Init the plugin
*/
function __construct()
{
// Pagination settings. Not a public setting.
define('WPVQ_QUIZ_PER_PAGE', 25);
// Default Settings
// No i18n outside this function, defines need to be here.
define('WPVQ_PROGRESSBAR_COLOR', "#2bc253");
define('WPVQ_WAIT_TRIVIA_PAGE', 1000);
define('WPVQ_TWITTER_HASHTAG', '#wpquiz');
define('WPVQ_SCROLL_OFFSET', 0);
define('WPVQ_SCROLL_SPEED', 750);
define('WPVQ_SHARE_PERSO_LOCAL', __("I'm %%personality%%", 'wpvq'));
define('WPVQ_SHARE_PERSO_SIMPLE', __("I'm %%personality%%, and you ?", 'wpvq'));
define('WPVQ_SHARE_PERSO_FB_TITLE', __("I'm %%personality%%, and you ?", 'wpvq'));
define('WPVQ_SHARE_PERSO_FB_DESC', "%%details%%");
define('WPVQ_SHARE_TRIVIA_LOCAL', __("I got %%score%% of %%total%% right", 'wpvq'));
define('WPVQ_SHARE_TRIVIA_SIMPLE', __("I got %%score%% of %%total%% right, and you ?", 'wpvq'));
define('WPVQ_SHARE_TRIVIA_FB_TITLE', __("I got %%score%% of %%total%% right, and you ?", 'wpvq'));
define('WPVQ_SHARE_TRIVIA_FB_DESC', "%%details%%");
// Admin Notice for ADDONS PAGE
// Created on WPVQInitController.php
if (!get_option('wpvq_notice_addons_1') == 1) {
add_action('admin_notices', 'wpvq_notice_addons_1');
}
function wpvq_notice_addons_1()
{
?>
<div class="updated wpvq-wpvq_notice_addons_1">
<h3><?php
_e("SOMETHING NEW is happening with WP Viral Quiz !", 'wpvq');
?>
</h3>
<p>
<?php
_e("Discover the <strong>new \"Awesome Addons\" page</strong>, and add new features to your quizzes.", 'wpvq');
?>
</p>
<p>
<a href="<?php
echo admin_url('admin.php?page=wp-viral-quiz-addons');
?>
">
<button class="button button-primary"><?php
_e("Cool, hide this message and show me !", 'wpvq');
?>
</button>
</a>
</p>
</div>
<?php
}
// Update mechanism
$updateChecker = PucFactory::buildUpdateChecker('http://wpvq.institut-pandore.com/update.php', __FILE__, 'wp-viral-quiz', 24);
$updateChecker->addQueryArgFilter(array($this, 'addSecretKeyForUpdate'));
// Admin Menu Page
add_action('admin_menu', array($this, 'options_pages'));
// Install + Uninstall
register_activation_hook(__FILE__, array($this, 'install'));
register_uninstall_hook(__FILE__, array('WPViralQuiz', 'uninstall'));
// Custom script JS
add_action('admin_enqueue_scripts', array($this, 'load_custom_wpviral_script'));
// Create Shortcode
add_shortcode('viralQuiz', array('WPVQShortcode', 'viralQuiz'));
add_shortcode('viralQuizResults', array('WPVQShortcodeResults', 'viralQuizResults'));
add_shortcode('viralQuizAnalytics', array('WPVQShortcodeAnalytics', 'viralQuizAnalytics'));
add_action('init', array('WPVQShortcode', 'register_scripts'));
add_action('wp_footer', array('WPVQShortcode', 'print_scripts'));
add_action('init', array('WPVQShortcodeResults', 'register_scripts'));
add_action('wp_footer', array('WPVQShortcodeResults', 'print_scripts'));
// — Ajax Shortcode
add_action('wp_ajax_choose_truefalse', array('WPVQShortcode', 'chooseTrueFalse'));
add_action('wp_ajax_nopriv_choose_truefalse', array('WPVQShortcode', 'chooseTrueFalse'));
add_action('wp_ajax_get_truefalse_appreciation', array('WPVQShortcode', 'getTrueFalseAppreciation'));
add_action('wp_ajax_nopriv_get_truefalse_appreciation', array('WPVQShortcode', 'getTrueFalseAppreciation'));
add_action('wp_ajax_choose_personality', array('WPVQShortcode', 'choosePersonality'));
add_action('wp_ajax_nopriv_choose_personality', array('WPVQShortcode', 'choosePersonality'));
add_action('wp_ajax_submit_informations', array('WPVQShortcode', 'submitInformations'));
add_action('wp_ajax_nopriv_submit_informations', array('WPVQShortcode', 'submitInformations'));
// - Ajax for quiz import
add_action('wp_ajax_wpvq_import_quiz', array('WPVQGame', 'ajaxImport'));
// - Ajax for Aweber creds
add_action('wp_ajax_wpvq_generate_aweber_creds', array('WPVQMailingAPI', 'generateAweberCreds'));
// i18n support
add_action('plugins_loaded', array($this, 'wpvq_load_textdomain'));
// Image Size for Answer
add_action('after_setup_theme', array($this, 'wpvq_create_thumbnail'));
// Image Size for Answer
add_action('init', array($this, 'wpvq_update_sql'));
// Settings Page
add_action('admin_init', 'wpvq_settings_init');
// Prevent from rocketload / minification
$options = get_option('wpvq_settings');
if (!isset($options['wpvq_checkbox_do_minify'])) {
add_filter('clean_url', array($this, 'rocket_loader_attributes'), 11, 1);
}
// Create new post with quiz shortcode
add_filter('default_content', array($this, 'wpvq_default_editor_content_shortcode'));
//.........这里部分代码省略.........
示例6: slate_pro_plugins_loaded
function slate_pro_plugins_loaded()
{
global $slate_pro_settings;
// Translations
load_plugin_textdomain('slate-pro', false, dirname(plugin_basename(__FILE__)) . '/languages/');
// Update DB
slate_pro_check_db();
// Update Version
slate_pro_check_version();
// Auto Update
require __DIR__ . '/inc/plugin-update-checker.php';
$slateUpdateCheck = PucFactory::buildUpdateChecker('http://updates.sevenbold.com/update.php', __FILE__);
function slate_license_key($query)
{
if (is_multisite() && is_plugin_active_for_network('slate-pro-admin/slate-pro-admin.php')) {
$slate_pro_license = get_site_option('slate_pro_license');
} else {
$slate_pro_license = get_option('slate_pro_license');
}
$query['key'] = esc_attr($slate_pro_license['licenseKey']);
$query['email'] = get_bloginfo('admin_email');
$query['website'] = home_url();
return $query;
}
$slateUpdateCheck->addQueryArgFilter('slate_license_key');
// Admin Menu Permissions
$menu_permission = slate_pro_get_user_permission();
if (!empty($menu_permission)) {
if (!empty($slate_pro_settings['adminMenuPermissions'][$menu_permission]) && 'on' === $slate_pro_settings['adminMenuPermissions'][$menu_permission]) {
add_action('admin_menu', 'slate_pro_hide_admin_menus', 999);
}
}
// Slate Pro Plugin Permissions
$plugin_permission = slate_pro_get_user_permission();
if (!empty($plugin_permission)) {
if (!empty($slate_pro_settings['userPermissions'][$plugin_permission]) && 'on' === $slate_pro_settings['userPermissions'][$plugin_permission]) {
add_action('admin_menu', 'slate_pro_hide_plugin_menu');
add_action('admin_head', 'slate_pro_hide_plugin');
}
}
}
示例7: define
define('IS_ADMIN', is_admin());
}
define('IS_NOT_ADMIN', !IS_ADMIN);
// Define paths
define('AERIA_DIR', rtrim(plugin_dir_path(__FILE__), '/') . '/');
define('AERIA_URL', rtrim(plugins_url('aeria'), '/') . '/');
define('AERIA_HOME_URL', home_url('/'));
define('AERIA_RESOURCE_DIR', AERIA_DIR . 'resources/');
define('AERIA_PLUGINS_URL', AERIA_DIR . 'plugins/');
define('AERIA_RESOURCE_URL', AERIA_URL . 'resources/');
define('THEME_DIR', get_stylesheet_directory() . '/');
// Polyfills
include AERIA_DIR . 'lib/legacy.php';
// Autoupdate
include __DIR__ . '/lib/plugin-update-checker.php';
PucFactory::buildUpdateChecker('https://raw.githubusercontent.com/CaffeinaLab/aeria/master/metadata.json', __FILE__, 'aeria');
// Register autoloader
spl_autoload_register(function ($class) {
return is_file($class_file = AERIA_DIR . 'classes/' . $class . '.php') ? include $class_file : false;
});
// Tools: Icon
function icon($name)
{
return strpos($name, 'http') === 0 ? $name : AERIA_RESOURCE_URL . 'icons/' . $name . '.png';
}
// Create ralations table on register
register_activation_hook(__FILE__, function () {
global $wpdb;
$table_name = $wpdb->prefix . 'aeria_relations';
$wpdb->query("CREATE TABLE IF NOT EXISTS {$table_name} (\n\t\t`id_1` int(11) unsigned NOT NULL,\n\t\t`id_2` int(11) unsigned NOT NULL,\n\t\t`type` VARCHAR(50) NOT NULL,\n\t\tPRIMARY KEY (id_1,id_2,type)\n\t) DEFAULT CHARSET=utf8;");
});
示例8: gc_php_version_notice
}
}
function gc_php_version_notice()
{
echo '<div class="error">';
echo '<p>' . __('Your version of PHP is below the minimum version of PHP required by Gold Cart. Please contact your host and request that your version be upgraded to 5.3 or later.', 'wpsc_gold_cart') . '</p>';
echo '</div>';
}
//
//check if newer version is available
$license_key = get_option('activation_key');
$license_key = !empty($license_key) ? trim($license_key) : false;
if ($license_key) {
// setup the updater
require 'plugin-update/plugin-update-checker.php';
$MyUpdateChecker = PucFactory::buildUpdateChecker('http://updates.wpecommerce.org/?action=get_metadata&slug=gold-cart', __FILE__);
//Add the license key to query arguments.
$MyUpdateChecker->addQueryArgFilter('gc_filter_update_checks');
function gc_filter_update_checks($queryArgs)
{
global $license_key;
$license_name = get_option('activation_name');
$queryArgs = array('activation_key' => $license_key, 'activation_name' => $license_name);
return $queryArgs;
}
}
//
/**
* Tell people to register Gold Cart after activation
*/
if ($gold_shpcrt_active == 'false') {
示例9: defined
<?php
/**
* Plugin Name: Mondo Booking
* Plugin URI:
* Description: Mondo Booking plugin.
* Version: 0.3
* Author: Oscar Heller
* Author URI: http://mondomediaworks.com
* License: GPL2
*/
defined('ABSPATH') or die('Access denied.');
require 'plugin-updates/plugin-update-checker.php';
$MyUpdateChecker = PucFactory::buildUpdateChecker('http://srmeowmeow.github.io/metadata.json', __FILE__);
include dirname(__FILE__) . '/includes/widgets.php';
示例10: License
/*
Plugin Name: Ridiculously Responsive Social Sharing Buttons
Plugin URI: https://github.com/ericakfranz/rrssb/
Description: Ridiculously Responsive Social Sharing Buttons adapted from https://github.com/kni-labs/rrssb.
Version: 2.2.1
Author: Erica Franz
Author URI: https://fatpony.me/
Date: 23 August 2015
License: GNU General Public License (GPL) version 3
License URI: https://www.gnu.org/licenses/gpl.html
*/
include 'rrssb_admin.php';
/* Automatic Plugin Update Checker */
require 'plugin-update-checker/plugin-update-checker.php';
$myUpdateChecker = PucFactory::buildUpdateChecker('https://github.com/ericakfranz/rrssb/metadata.json', __FILE__, 'rrssb');
/* On Activation & Decativation */
function activate_rrssb()
{
add_option('show_twitter', 1);
add_option('show_facebook', 1);
add_option('show_google', 1);
add_option('show_github', 1);
add_option('show_email', 1);
add_option('show_linkedin', 0);
add_option('show_reddit', 0);
add_option('show_pocket', 0);
add_option('show_instagram', 0);
add_option('show_pinterest', 0);
add_option('show_tumblr', 0);
add_option('show_youtube', 0);
示例11: plugin_dir_path
require_once plugin_dir_path(__FILE__) . 'includes/class-ktzagcplugin-deactivator.php';
Ktzagcplugin_Deactivator::deactivate();
}
register_activation_hook(__FILE__, 'activate_ktzagcplugin');
register_deactivation_hook(__FILE__, 'deactivate_ktzagcplugin');
/**
* The core plugin class that is used to define internationalization,
* admin-specific hooks, and public-facing site hooks.
*/
require plugin_dir_path(__FILE__) . 'includes/class-ktzagcplugin.php';
/**
* Automatic Update With Self Hosting
* http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-plugin/
*/
require plugin_dir_path(__FILE__) . 'update/plugin-update-checker.php';
$MyUpdateChecker = PucFactory::buildUpdateChecker('http://www.kentooz.com/files/ktzagcplugin/ktzagcplgnautomaticly.json', __FILE__, 'ktzagcplugin');
/**
* Begins execution of the plugin.
*
* Since everything within the plugin is registered via hooks,
* then kicking off the plugin from this point in the file does
* not affect the page life cycle.
*
* @since 1.0.0
*/
function run_ktzagcplugin()
{
$plugin = new Ktzagcplugin();
$plugin->run();
}
run_ktzagcplugin();
示例12: ciSlidesRegisterMetaBoxes
<?php
/*
Plugin Name: Slides Custom Post Type
Plugin URI: http://conversioninsights.net
Description: Adds a "Slides" post type to be used in the theme.
Version: 2.04
Author: Tyler Young
Author URI: http://conversioninsights.net
*/
require_once 'plugin-updates/plugin-update-checker.php';
require_once 'lib/constants.php';
require_once 'lib/utils.php';
require_once 'lib/createPostType.php';
require_once 'lib/displayPostType.php';
$UpdateChecker = PucFactory::buildUpdateChecker('http://ci-modern-accounting-firm.mystagingwebsite.com/downloads/plugins/slides-cpt_version_metadata.json', __FILE__, 'ci-slides-cpt', 720);
add_filter('rwmb_meta_boxes', 'ciSlidesRegisterMetaBoxes');
function ciSlidesRegisterMetaBoxes($meta_boxes)
{
/**
* Prefix of meta keys (optional)
* Use underscore (_) at the beginning to make keys hidden
* Alt.: You also can make prefix empty to disable it
*/
// Better has an underscore as last sign
$prefix = (defined('CI_THEME_PREFIX') ? CI_THEME_PREFIX : 'ci') . '_';
// Meta box for the slides custom post type
$meta_boxes[] = array('id' => 'slides-only', 'title' => __('Slide options', 'conversion-insights-shared'), 'pages' => array(CI_SLIDE_TYPE), 'context' => 'normal', 'priority' => 'high', 'autosave' => true, 'fields' => array(array('name' => __('Position of caption:', 'conversion-insights-shared'), 'id' => "{$prefix}caption_position", 'type' => 'select', 'options' => array('center' => __('Center', 'conversion-insights-shared'), 'left' => __('Left', 'conversion-insights-shared'), 'right' => __('Right', 'conversion-insights-shared'), 'none' => __('Not displayed', 'conversion-insights-shared')), 'multiple' => false, 'std' => 'center', 'desc' => __('<strong>Note:</strong> On very small screens, all captions will be centered, with a transparent background.', 'conversion-insights-shared')), array('name' => __('Caption background color', 'conversion-insights-shared'), 'id' => "{$prefix}caption_bg", 'type' => 'color', 'desc' => __('<strong>Only</strong> applies to left- or right-positioned captions. Defaults to the secondary background color.', 'conversion-insights-shared')), array('name' => __('Darken slide image?', 'conversion-insights-shared'), 'id' => "{$prefix}darken_slide", 'desc' => __('If checked, image will be darkened 30% (useful for making white text readable over bright images)', 'conversion-insights-shared'), 'type' => 'checkbox', 'std' => 1), array('name' => __('Link slide to this URL:', 'conversion-insights-shared'), 'id' => "{$prefix}link", 'desc' => __('Leave blank for no link.', 'conversion-insights-shared'), 'type' => 'text', 'std' => '', 'clone' => false)));
return $meta_boxes;
}
示例13: UTM
<?php
/**
* @package gUtmWp
* @author Grom <grom@revolife.com>
* @version 1.0
*/
/*
Plugin Name: Google UTM WP
Plugin URI: https://github.com/Revolife/gUtmWp
Description: Determine the Google UTM (Urchin Tracking Module) tails.
Version: 1.0.1
Author: Grom
Author URI: https://revolife.com
License: GPL2
*/
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
defined('gUtmpWp_PLUG_PATH') or define('gUtmpWp_PLUG_PATH', dirname(__FILE__));
require gUtmpWp_PLUG_PATH . DS . 'plugin-update-checker' . DS . 'plugin-update-checker.php';
$MyUpdateChecker = PucFactory::buildUpdateChecker('http://update.wp.alphaspace.pro/?action=get_metadata§ion=plugin&slug=' . basename(dirname(__FILE__)), __FILE__, basename(dirname(__FILE__)));
require_once gUtmpWp_PLUG_PATH . DS . 'core' . DS . 'gutm.php';
require_once gUtmpWp_PLUG_PATH . DS . 'core' . DS . 'gutmwp.php';
gUtmWp::start();
示例14: defined
<?php
/*
Plugin Name: Spit It Out
Description: Provides different ways to display various developer-useful information about the theme page
Version: 2.2
Author: Christy.pw
Author URI: http://christy.pw
Plugin URI: http://christy.pw/web-mobile/wordpress-plugins/spit-it-out/
*/
defined('ABSPATH') or die('No script kiddies please!');
/////////////////////////////////////////////////////////////////////
//region updater service
require 'plugin-updates/plugin-update-checker.php';
$ExampleUpdateChecker = PucFactory::buildUpdateChecker('http://wpplugs.stellarstudios.net/spit-it-out/info.json', __FILE__);
//endregion
// the options we want to offer
// they will be stored in the database as an array under 'spititout' in the options table
// the descriptions are for the settings page
// the stored array will actually resemble:
/*
array (
'active' -> '1',
'templatefile' -> '0'
)
*/
global $spittio_save_as;
// the `option_name` field in the `wp_options` table
$spittio_save_as = 'spititout';
global $spitio_option_list;
$spitio_option_list = array(array('description' => 'Spit It Out Overlay Active', 'db_name' => 'active', 'init' => '0'), array('description' => 'Current Template File Name', 'db_name' => 'templatefile', 'init' => '0'), array('description' => 'Current Query', 'db_name' => 'currentquery', 'init' => '1'), array('description' => '$wp_rewrite->rules', 'db_name' => 'rewriterules', 'init' => '1'), array('description' => '$_SERVER', 'db_name' => 'server', 'init' => '0'), array('description' => '$_REQUEST', 'db_name' => 'request', 'init' => '0'), array('description' => '$_FILES', 'db_name' => 'files', 'init' => '0'), array('description' => '$_SESSION', 'db_name' => 'session', 'init' => '0'), array('description' => 'Last Error that Occurred', 'db_name' => 'error', 'init' => '0'));
示例15: define
define('WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins');
}
$wp_dir = __FILE__;
$wp_dir = str_replace("\\", "/", $wp_dir);
$wp_dir = explode("/", $wp_dir);
$index = count($wp_dir) - 2;
$pluginfolder = $wp_dir[$index];
$url = WP_PLUGIN_URL;
if (substr_count(admin_url(), "https://") > 0 && substr_count($url, "https://") <= 0) {
$url = str_replace("http://", "https://", $url);
}
define('IMSCPB_SLUG', $pluginfolder);
define('IMSCPB_DIR', WP_PLUGIN_DIR . "/" . $pluginfolder);
define('IMSCPB_URL', $url . "/" . $pluginfolder);
require_once 'functions/plugin-update-checker.php';
$imscpb_uc = PucFactory::buildUpdateChecker('http://wpprofitbuilder.com/download/profit_builder_lite/profit_builder_lite.json', IMSCPB_FILE, 'profit-builder-lite', 12);
global $pbuilder;
$pbuilder = new ProfitBuilder(IMSCPB_FILE);
class ProfitBuilder
{
var $main, $path, $name, $url, $menu_controls, $row_controls, $shortcodes, $rows, $icons, $showall, $yoast, $hideifs, $groups;
var $standard_fonts = array("Arial", "Arial+Black", "Tahoma", "Trebuchet+MS", "Verdana", "Century+Gothic", "Geneva", "Lucida", "Lucida+Sans", "Lucida+Grande", "Courier", "Courier+New", "Georgia", "Times", "Times+New+Roman", "MS+Serif", "New+York", "Palatino", "Palatino+Linotype", "Courier", "Courier+New", "Lucida+Console", "Monaco", "Helvetica", "Impact");
var $standard_fonts_variants = array("regular", "italic");
function __construct($file)
{
$this->main = $file;
$this->set_memory_limit();
$this->init();
return $this;
}
function init()