本文整理汇总了PHP中op_get_option函数的典型用法代码示例。如果您正苦于以下问题:PHP op_get_option函数的具体用法?PHP op_get_option怎么用?PHP op_get_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了op_get_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initializes client object and fetches API KEY
*/
public function __construct()
{
/*
* Fetching API key from the wp_options table
*/
$this->apiKey = op_get_option(self::OPTION_NAME_API_KEY);
}
示例2: __construct
function __construct()
{
global $wpdb;
if (op_get_option('installed') == 'Y') {
require_once OP_ASSETS . 'default.php';
// This isn't used but it is causing unnecessary DB request
// $assets = $wpdb->get_col( "SELECT name FROM `{$wpdb->prefix}optimizepress_assets`" );
// if($assets){
// foreach($assets as $asset){
// $this->load_addon($asset);
// }
// }
add_action('wp_ajax_' . OP_SN . '-assets-folder-list', array($this, 'folder_list'));
/*
* Email marketing services integration hooks
*/
add_action('wp_ajax_' . OP_SN . '-email-provider-list', array($this, 'providerList'));
add_action('wp_ajax_' . OP_SN . '-email-provider-enabled', array($this, 'providerEnabled'));
add_action('wp_ajax_' . OP_SN . '-email-provider-details', array($this, 'providerDetails'));
add_action('wp_ajax_' . OP_SN . '-email-provider-items', array($this, 'providerItems'));
add_action('wp_ajax_' . OP_SN . '-email-provider-item-fields', array($this, 'providerItemFields'));
/**
* Live search hooks
*/
add_action('wp_ajax_' . OP_SN . '-live-search', array($this, 'liveSearch'));
add_action('wp_ajax_nopriv_' . OP_SN . '-live-search', array($this, 'liveSearch'));
add_action('the_content', array($this, 'removeContentFromSearchResults'));
add_filter('the_content', array($this, 'fixptag'));
/*
* Content template
*/
add_action('wp_ajax_' . OP_SN . '-content-layout-delete', array($this, 'deleteContentLayout'));
}
}
示例3: initalize_theme
function initalize_theme()
{
$pages = array(OP_SN, OP_SN . '-setup-wizard');
$reinit_theme = $reinit_page_theme = false;
$disable_theme = false;
if (isset($_GET['page'])) {
if ($_GET['page'] == OP_SN || $_GET['page'] == OP_SN . '-setup-wizard') {
$cur = op_get_option('theme', 'dir');
if (isset($_GET['theme_switch']) && $_GET['theme_switch'] != $cur && ($conf = op_load_theme_config($_GET['theme_switch'])) !== false) {
$theme = array('name' => $conf['name'], 'screenshot' => $conf['screenshot'], 'screenshot_thumbnail' => $conf['screenshot_thumbnail'], 'description' => $conf['description'], 'dir' => $_GET['theme_switch']);
op_update_option('theme', $theme);
$reinit_theme = true;
}
} elseif ($_GET['page'] == OP_SN . '-page-builder') {
$disable_theme = true;
}
} elseif (defined('DOING_AJAX')) {
$action = '';
if (!($action = op_get('action'))) {
$action = op_post('action');
}
$chk = OP_SN . '-live-editor';
if (is_string($action) && substr($action, 0, strlen($chk)) == $chk) {
$disable_theme = true;
}
}
if ($disable_theme === false) {
op_init_theme();
define('OP_REINIT_THEME', $reinit_theme);
if ($reinit_theme) {
define('OP_SHOW_THEME_MSG', $cur !== false);
do_action(OP_SN . '-reinit_theme');
}
}
}
示例4: __construct
/**
* Constructor, initializes $accessToken, $organizerKey and creates $client
*/
public function __construct()
{
/*
* Fetching values from wp_options table
*/
$this->enabled = (bool) op_get_option(self::OPTION_NAME_ENABLED);
}
示例5: __construct
function __construct()
{
global $wpdb;
if (op_get_option('installed') == 'Y') {
require_once OP_ASSETS . 'default.php';
$assets = $wpdb->get_col("SELECT name FROM `{$wpdb->prefix}optimizepress_assets`");
if ($assets) {
foreach ($assets as $asset) {
$this->load_addon($asset);
}
}
add_action('wp_ajax_' . OP_SN . '-assets-folder-list', array($this, 'folder_list'));
/*
* Email marketing services integration hooks
*/
add_action('wp_ajax_' . OP_SN . '-email-provider-list', array($this, 'providerList'));
add_action('wp_ajax_' . OP_SN . '-email-provider-details', array($this, 'providerDetails'));
/**
* Live search hooks
*/
add_action('wp_ajax_' . OP_SN . '-live-search', array($this, 'liveSearch'));
add_action('wp_ajax_nopriv_' . OP_SN . '-live-search', array($this, 'liveSearch'));
add_filter('the_content', array($this, 'fixptag'));
}
}
示例6: __construct
/**
* Initializes client object and fetches API KEY
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
$this->apiKey = op_get_option(self::OPTION_NAME_API_KEY);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例7: __construct
/**
* Constructor, initializes $username and $password
*/
public function __construct()
{
/*
* Fetching values from wp_options table
*/
$this->username = op_get_option(self::OPTION_NAME_USERNAME);
$this->password = op_get_option(self::OPTION_NAME_PASSWORD);
}
示例8: __construct
/**
* Constructor, initializes $accessToken, $organizerKey and creates $client
*/
public function __construct()
{
/*
* Fetching values from wp_options table
*/
$this->accessToken = op_get_option(self::OPTION_NAME_OAUTH_ACCESS_TOKEN);
$this->organizerKey = op_get_option(self::OPTION_NAME_OAUTH_ORGANIZER_KEY);
$this->apiKey = op_get_option(self::OPTION_NAME_OAUTH_API_KEY);
}
示例9: __construct
/**
* Initializes client object and fetches API KEY
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
$this->accountID = op_get_option(self::OPTION_NAME_ACCOUNT_ID);
$this->publicKey = op_get_option(self::OPTION_NAME_PUBLIC_KEY);
$this->privateKey = op_get_option(self::OPTION_NAME_PRIVATE_KEY);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例10: __construct
/**
* Constructor
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
/*
* Fetching values from wp_options table
*/
$this->enabled = (bool) op_get_option(self::OPTION_NAME_ENABLED);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例11: __construct
/**
* Constructor, initializes $username and $password
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
/*
* Fetching values from wp_options table
*/
$this->username = op_get_option(self::OPTION_NAME_USERNAME);
$this->password = op_get_option(self::OPTION_NAME_PASSWORD);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例12: __construct
/**
* Initializes client object and fetches API KEY
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
/*
* Fetching API key from the wp_options table
*/
$this->accountId = op_get_option(self::OPTION_NAME_ACCOUNT_ID);
$this->authToken = op_get_option(self::OPTION_NAME_AUTH_TOKEN);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例13: __construct
/**
* Initializes client object and fetches API KEY
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
/*
* Fetching API key from the wp_options table
*/
$this->apiKey = op_get_option(self::OPTION_NAME_API_KEY);
$this->apiUrl = op_get_option(self::OPTION_NAME_API_URL);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例14: __construct
/**
* Constructor, initializes $accessToken, $organizerKey and creates $client
*/
public function __construct(OptimizePress_Modules_Email_LoggerInterface $logger)
{
/*
* Fetching values from wp_options table
*/
$this->accessToken = op_get_option(self::OPTION_NAME_OAUTH_ACCESS_TOKEN);
$this->organizerKey = op_get_option(self::OPTION_NAME_OAUTH_ORGANIZER_KEY);
$this->apiKey = op_get_option(self::OPTION_NAME_OAUTH_API_KEY);
/*
* Initializing logger
*/
$this->logger = $logger;
}
示例15: _e
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf">
<label class="form-title"><?php
_e('AWeber API connection', 'optimizepress');
?>
</label>
<?php
if (op_get_option('aweber_access_token') === false || op_get_option('aweber_access_secret') === false) {
?>
<p class="op-micro-copy"><?php
_e('AWeber is disconnected.', 'optimizepress');
?>
<a href="<?php
echo admin_url('admin.php?action=' . OP_AWEBER_AUTH_URL);
?>
"><?php
_e('Connect', 'optimizepress');
?>
</a></p>
<?php
} else {
?>
<p class="op-micro-copy"><?php
_e('AWeber is connected.', 'optimizepress');
?>
<a href="<?php
echo admin_url('admin.php?action=' . OP_AWEBER_AUTH_URL);
?>
&disconnect=1"><?php
_e('Disconnect', 'optimizepress');
?>
</a></p>