本文整理汇总了PHP中Redux_Helpers::isTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP Redux_Helpers::isTheme方法的具体用法?PHP Redux_Helpers::isTheme怎么用?PHP Redux_Helpers::isTheme使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Redux_Helpers
的用法示例。
在下文中一共展示了Redux_Helpers::isTheme方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
if (!class_exists('ReduxFramework')) {
return;
}
if (true == Redux_Helpers::isTheme(__FILE__)) {
$this->initSettings();
} else {
add_action('plugins_loaded', array($this, 'initSettings'), 10);
}
}
示例2: __construct
public function __construct()
{
if (!class_exists('ReduxFramework')) {
return;
}
// This is needed. Bah WordPress bugs. ;)
if (true == Redux_Helpers::isTheme(__FILE__) || true == Redux_Helpers::isTheme(get_template_directory() . '/inc/plugins/redux.php')) {
$this->initSettings();
} else {
add_action('plugins_loaded', array($this, 'initSettings'), 10);
}
}
示例3: __construct
public function __construct()
{
if (!class_exists('ReduxFramework')) {
return;
}
// This is needed. Bah WordPress bugs. ;)
if (TRUE == Redux_Helpers::isTheme(__FILE__)) {
$this->initSettings();
} else {
add_action('plugins_loaded', array($this, 'initSettings'), 10);
}
}
示例4: __construct
public function __construct()
{
if (!class_exists('ReduxFramework')) {
return;
}
// This is needed. Bah WordPress bugs. ;)
if (true == Redux_Helpers::isTheme(__FILE__)) {
$this->initSettings();
} else {
add_action('plugins_loaded', array($this, 'initSettings'), 10);
}
add_action('redux/page/ro_settings/enqueue', array($this, 'redux_custom_css'));
}
示例5: __construct
public function __construct()
{
if (!class_exists('ReduxFramework')) {
return;
}
if (true == Redux_Helpers::isTheme(__FILE__)) {
$this->initSettings();
add_action('init', array($this, 'onUpdated'), 10);
} else {
add_action('plugins_loaded', array($this, 'initSettings'), 10);
}
if (is_admin() && isset($_GET['page']) && $_GET['page'] == 'theme-options') {
add_action('admin_enqueue_scripts', array($this, 'load_scripts'));
}
}
示例6: __construct
//.........这里部分代码省略.........
$this->sections = apply_filters('redux-sections', $sections);
// REMOVE LATER
/**
* filter 'redux-sections-{opt_name}'
*
* @deprecated
*
* @param array $sections field option sections
*/
$this->sections = apply_filters("redux-sections-{$this->args['opt_name']}", $this->sections);
// REMOVE LATER
/**
* filter 'redux/options/{opt_name}/sections'
*
* @param array $sections field option sections
*/
$this->sections = apply_filters("redux/options/{$this->args['opt_name']}/sections", $this->sections);
/**
* Construct hook
* action 'redux/construct'
*
* @param object $this ReduxFramework
*/
do_action('redux/construct', $this);
// Set the default values
$this->_default_cleanup();
// Internataionalization
$this->_internationalization();
// Register extra extensions
$this->_register_extensions();
// Grab database values
$this->get_options();
// Tracking
if (true != Redux_Helpers::isTheme(__FILE__) || true == Redux_Helpers::isTheme(__FILE__) && !$this->args['disable_tracking']) {
$this->_tracking();
}
//DOVY!! HERE!!!
// Getting started page
// if ( is_admin () && $this->args['dev_mode'] ) {
//
// if ( isset($_GET['page']) && ($_GET['page'] == 'redux-about' || $_GET['page'] == 'redux-getting-started' || $_GET['page'] == 'redux-credits' || $_GET['page'] == 'redux-changelog' )) {
// //logconsole('inc');
// require_once( dirname( __FILE__ ) . '/inc/welcome.php' );
// } else {
// //logconsole('compare');
// if (isset($_GET['page']) && $_GET['page'] == $this->args['page_slug']) {
// $saveVer = get_option('redux_version_upgraded_from');
// $curVer = self::$_version;
//
// if (empty($saveVer)) {
// //logconsole('redir');
// wp_safe_redirect ( admin_url ( 'index.php?page=redux-getting-started' ) );
// exit;
// } else if (version_compare($curVer, $saveVer, '>')) {
// wp_safe_redirect ( admin_url ( 'index.php?page=redux-about' ) );
// exit;
// }
// }
// }
// }
// Options page
add_action('admin_menu', array($this, '_options_page'));
// Add a network menu
if ($this->args['database'] == "network" && $this->args['network_admin']) {
add_action('network_admin_menu', array($this, '_options_page'));
}
示例7: __construct
//.........这里部分代码省略.........
* filter 'redux-sections-{opt_name}'
*
* @deprecated
*
* @param array $sections field option sections
*/
$this->sections = apply_filters("redux-sections-{$this->args['opt_name']}", $this->sections);
// REMOVE LATER
/**
* filter 'redux/options/{opt_name}/sections'
*
* @param array $sections field option sections
*/
$this->sections = apply_filters("redux/options/{$this->args['opt_name']}/sections", $this->sections);
/**
* Construct hook
* action 'redux/construct'
*
* @param object $this ReduxFramework
*/
do_action('redux/construct', $this);
// Set the default values
$this->_default_cleanup();
// Internataionalization
$this->_internationalization();
$this->filesystem = Redux_Filesystem::get_instance($this);
//set redux upload folder
$this->set_redux_content();
// Register extra extensions
$this->_register_extensions();
// Grab database values
$this->get_options();
// Tracking
if (isset($this->args['allow_tracking']) && $this->args['allow_tracking'] && Redux_Helpers::isTheme(__FILE__)) {
$this->_tracking();
}
// Options page
add_action('admin_menu', array($this, '_options_page'));
// Add a network menu
if ($this->args['database'] == "network" && $this->args['network_admin']) {
add_action('network_admin_menu', array($this, '_options_page'));
}
// Admin Bar menu
add_action('admin_bar_menu', array($this, '_admin_bar_menu'), $this->args['admin_bar_priority']);
// Register setting
add_action('admin_init', array($this, '_register_settings'));
// Display admin notices in dev_mode
if (true == $this->args['dev_mode']) {
if (true == $this->args['update_notice']) {
add_action('admin_init', array($this, '_update_check'));
}
}
// Display admin notices
add_action('admin_notices', array($this, '_admin_notices'), 99);
// Check for dismissed admin notices.
add_action('admin_init', array($this, '_dismiss_admin_notice'), 9);
// Enqueue the admin page CSS and JS
if (isset($_GET['page']) && $_GET['page'] == $this->args['page_slug']) {
add_action('admin_enqueue_scripts', array($this, '_enqueue'), 1);
}
// Output dynamic CSS
// Frontend: Maybe enqueue dynamic CSS and Google fonts
if (empty($this->args['output_location']) || in_array('frontend', $this->args['output_location'])) {
add_action('wp_head', array(&$this, '_output_css'), 150);
add_action('wp_enqueue_scripts', array(&$this, '_enqueue_output'), 150);
}