当前位置: 首页>>代码示例>>PHP>>正文


PHP Redux_Helpers::isTheme方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:websideas,项目名称:Mondova,代码行数:11,代码来源:data-options.php

示例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);
     }
 }
开发者ID:rinodung,项目名称:wordpress-demo,代码行数:12,代码来源:redux.php

示例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);
     }
 }
开发者ID:estrategasdigitales,项目名称:flazam,代码行数:12,代码来源:options-init.php

示例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'));
 }
开发者ID:wpdesign,项目名称:Radix,代码行数:13,代码来源:redux-config.php

示例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'));
     }
 }
开发者ID:de190909,项目名称:WPTest,代码行数:15,代码来源:options.php

示例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'));
         }
开发者ID:justinwool,项目名称:vortago,代码行数:67,代码来源:framework.php

示例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);
         }
开发者ID:BearsTheme,项目名称:leonard,代码行数:67,代码来源:framework.php


注:本文中的Redux_Helpers::isTheme方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。