當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。