當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Redux_Helpers::isWpDebug方法代碼示例

本文整理匯總了PHP中Redux_Helpers::isWpDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP Redux_Helpers::isWpDebug方法的具體用法?PHP Redux_Helpers::isWpDebug怎麽用?PHP Redux_Helpers::isWpDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Redux_Helpers的用法示例。


在下文中一共展示了Redux_Helpers::isWpDebug方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _default_cleanup

 /**
  * Set default options on admin_init if option doesn't exist
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 private function _default_cleanup()
 {
     // Fix the global variable name
     if ($this->args['global_variable'] == "" && $this->args['global_variable'] !== false) {
         $this->args['global_variable'] = str_replace('-', '_', $this->args['opt_name']);
     }
     // Force dev_mode on WP_DEBUG = true and if it's a local server
     if (Redux_Helpers::isLocalHost() || Redux_Helpers::isWpDebug()) {
         if ($this->args['dev_mode'] != true) {
             $this->args['update_notice'] = false;
         }
         $this->dev_mode_forced = true;
         $this->args['dev_mode'] = true;
     }
     // Auto create the page_slug appropriately
     if (empty($this->args['page_slug'])) {
         if (!empty($this->args['display_name'])) {
             $this->args['page_slug'] = sanitize_html_class($this->args['display_name']);
         } else {
             if (!empty($this->args['page_title'])) {
                 $this->args['page_slug'] = sanitize_html_class($this->args['page_title']);
             } else {
                 if (!empty($this->args['menu_title'])) {
                     $this->args['page_slug'] = sanitize_html_class($this->args['menu_title']);
                 } else {
                     $this->args['page_slug'] = str_replace('-', '_', $this->args['opt_name']);
                 }
             }
         }
     }
 }
開發者ID:Makenrro,項目名稱:repos,代碼行數:38,代碼來源:framework.php

示例2: _default_cleanup

 /**
  * Set default options on admin_init if option doesn't exist
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 private function _default_cleanup()
 {
     // Fix the global variable name
     if ($this->args['global_variable'] == "" && $this->args['global_variable'] !== false) {
         $this->args['global_variable'] = str_replace('-', '_', $this->args['opt_name']);
     }
     // Force dev_mode on WP_DEBUG = true and if it's a local server
     if (Redux_Helpers::isLocalHost() || Redux_Helpers::isWpDebug()) {
         if ($this->args['dev_mode'] != true) {
             $this->args['update_notice'] = false;
         }
         $this->dev_mode_forced = true;
         $this->args['dev_mode'] = true;
         if (isset($this->args['forced_dev_mode_off']) && $this->args['forced_dev_mode_off'] == true) {
             $this->dev_mode_forced = false;
             $this->args['dev_mode'] = false;
         }
     }
     // Auto create the page_slug appropriately
     if (empty($this->args['page_slug'])) {
         if (!empty($this->args['display_name'])) {
             $this->args['page_slug'] = sanitize_html_class($this->args['display_name']);
         } else {
             if (!empty($this->args['page_title'])) {
                 $this->args['page_slug'] = sanitize_html_class($this->args['page_title']);
             } else {
                 if (!empty($this->args['menu_title'])) {
                     $this->args['page_slug'] = sanitize_html_class($this->args['menu_title']);
                 } else {
                     $this->args['page_slug'] = str_replace('-', '_', $this->args['opt_name']);
                 }
             }
         }
     }
     if (isset($this->args['customizer_only']) && $this->args['customizer_only'] == true) {
         $this->args['menu_type'] = 'hidden';
         $this->args['customizer'] = true;
         $this->args['admin_bar'] = false;
         $this->args['allow_sub_menu'] = false;
     }
     // Check if the Airplane Mode plugin is installed
     if (class_exists('Airplane_Mode_Core')) {
         $airplane = Airplane_Mode_Core::getInstance();
         if (method_exists($airplane, 'enabled')) {
             if ($airplane->enabled()) {
                 $this->args['use_cdn'] = false;
             }
         } else {
             if ($airplane->check_status() == 'on') {
                 $this->args['use_cdn'] = false;
             }
         }
     }
 }
開發者ID:BearsTheme,項目名稱:leonard,代碼行數:61,代碼來源:framework.php

示例3: __

<?php

/**
 * The template for the panel header area.
 * Override this template by specifying the path where it is stored (templates_path) in your Redux config.
 *
 * @author      Redux Framework
 * @package     ReduxFramework/Templates
 * @version:    3.5.4.18
 */
$tip_title = __('Developer Mode Enabled', 'redux-framework');
if ($this->parent->dev_mode_forced) {
    $is_debug = false;
    $is_localhost = false;
    $debug_bit = '';
    if (Redux_Helpers::isWpDebug()) {
        $is_debug = true;
        $debug_bit = __('WP_DEBUG is enabled', 'redux-framework');
    }
    $localhost_bit = '';
    if (Redux_Helpers::isLocalHost()) {
        $is_localhost = true;
        $localhost_bit = __('you are working in a localhost environment', 'redux-framework');
    }
    $conjunction_bit = '';
    if ($is_localhost && $is_debug) {
        $conjunction_bit = ' ' . __('and', 'redux-framework') . ' ';
    }
    $tip_msg = __('This has been automatically enabled because', 'redux-framework') . ' ' . $debug_bit . $conjunction_bit . $localhost_bit . '.';
} else {
    $tip_msg = __('If you are not a developer, your theme/plugin author shipped with developer mode enabled. Contact them directly to fix it.', 'redux-framework');
開發者ID:danipolo,項目名稱:agroturismomenorca,代碼行數:31,代碼來源:header.tpl.php


注:本文中的Redux_Helpers::isWpDebug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。