当前位置: 首页>>代码示例>>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;未经允许,请勿转载。