本文整理汇总了PHP中parent::options方法的典型用法代码示例。如果您正苦于以下问题:PHP parent::options方法的具体用法?PHP parent::options怎么用?PHP parent::options使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parent
的用法示例。
在下文中一共展示了parent::options方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
function __construct($plugin_base)
{
if (defined("WP_DEBUG") && WP_DEBUG) {
parent::$minify = "";
}
parent::$basePlugin =& $this;
parent::$plugin_base = $plugin_base;
parent::$base = $plugin_base . '/class';
parent::$base_lang = $plugin_base . '/lang';
parent::$base_url = plugins_url('', dirname(__FILE__));
$this->defaults = array("plugins" => array(), "mail_update" => true);
parent::$options = $this->initOptions();
$wp_upload = wp_upload_dir()["basedir"];
$this->plugin_dir = $wp_upload . "/ithoughts_plugins_statizer";
add_shortcode('update_scores', array($this, 'updateShortcode'));
add_shortcode('plugins_stats', array($this, 'pluginStats'));
add_action('init', array(&$this, 'register_scripts_and_styles'));
add_action('ithoughts_plugins_statizer_cron_hourly', array(&$this, 'refresh_h'));
add_action('ithoughts_plugins_statizer_cron_daily', array(&$this, 'refresh_d'));
add_action('wp_enqueue_scripts', array(&$this, 'wp_enqueue_scripts'));
add_action('wp_ajax_ithoughts_plugins_statizer-get_chart_ajax', array(&$this, 'get_chart_ajax'));
add_action('wp_ajax_nopriv_ithoughts_plugins_statizer-get_chart_ajax', array(&$this, 'get_chart_ajax'));
add_action('plugins_loaded', array(&$this, 'localisation'));
add_action("wp_footer", array(&$this, "footer"));
add_filter("ithoughts_plugins_statizer-crunch_data", array($this, "crunch_datas"), 10, 5);
add_filter("ithoughts_plugins_statizer-format_base_chart", array($this, "format_base_chart"));
require_once parent::$base . '/ithoughts_plugins_statizer-widget.class.php';
add_action('widgets_init', array($this, 'widgets_init'));
}
开发者ID:iThoughts-Informatique,项目名称:iThoughts-Plugins-Statizer,代码行数:29,代码来源:ithoughts_plugins_statizer.class.php
示例2: update_options
public function update_options()
{
if (isset($_POST) && ($data = $_POST)) {
$opts = parent::$options;
if (isset($data["taggles"])) {
$opts["plugins"] = $data["taggles"];
}
if (isset($data["mail_update"])) {
$opts["mail_update"] = $data["mail_update"] === "enabled";
} else {
$opts["mail_update"] = false;
}
update_site_option('ithoughts_plugins_statizer', $opts);
parent::$options = $opts;
$outtxt = '<p>' . __('Options updated', 'ithoughts_plugins_statizer') . '</p>';
die(json_encode(array("text" => $outtxt, "valid" => true)));
} else {
wp_die();
}
}
开发者ID:iThoughts-Informatique,项目名称:iThoughts-Plugins-Statizer,代码行数:20,代码来源:ithoughts_plugins_statizer-admin.class.php