| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template for the panel header area. |
| 4 |
* Override this template by specifying the path where it is stored (templates_path) in your Redux config. |
| 5 |
* |
| 6 |
* @author Redux Framework |
| 7 |
* @package ReduxFrameworkLegacy/Templates |
| 8 |
* @version: 3.5.4.18 |
| 9 |
*/ |
| 10 |
|
| 11 |
$tip_title = __( 'Developer Mode Enabled', 'redux-framework' ); |
| 12 |
|
| 13 |
if ( $this->parent->dev_mode_forced ) { |
| 14 |
$is_debug = false; |
| 15 |
$is_localhost = false; |
| 16 |
|
| 17 |
$debug_bit = ''; |
| 18 |
if ( ReduxLegacy_Helpers::isWpDebug() ) { |
| 19 |
$is_debug = true; |
| 20 |
$debug_bit = __( 'WP_DEBUG is enabled', 'redux-framework' ); |
| 21 |
} |
| 22 |
|
| 23 |
$localhost_bit = ''; |
| 24 |
if ( ReduxLegacy_Helpers::isLocalHost() ) { |
| 25 |
$is_localhost = true; |
| 26 |
$localhost_bit = __( 'you are working in a localhost environment', 'redux-framework' ); |
| 27 |
} |
| 28 |
|
| 29 |
$conjunction_bit = ''; |
| 30 |
if ( $is_localhost && $is_debug ) { |
| 31 |
$conjunction_bit = ' ' . __( 'and', 'redux-framework' ) . ' '; |
| 32 |
} |
| 33 |
|
| 34 |
$tip_msg = __( 'This has been automatically enabled because', 'redux-framework' ) . ' ' . $debug_bit . $conjunction_bit . $localhost_bit . '.'; |
| 35 |
} else { |
| 36 |
$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' ); |
| 37 |
} |
| 38 |
|
| 39 |
?> |
| 40 |
<div id="redux-header"> |
| 41 |
<?php if ( ! empty( $this->parent->args['display_name'] ) ) { ?> |
| 42 |
<div class="display_header"> |
| 43 |
|
| 44 |
<?php if ( isset( $this->parent->args['dev_mode'] ) && $this->parent->args['dev_mode'] ) { ?> |
| 45 |
<div class="redux-dev-mode-notice-container redux-dev-qtip" |
| 46 |
qtip-title="<?php echo esc_attr( $tip_title ); ?>" |
| 47 |
qtip-content="<?php echo esc_attr( $tip_msg ); ?>"> |
| 48 |
<span |
| 49 |
class="redux-dev-mode-notice"><?php _e( 'Developer Mode Enabled', 'redux-framework' ); ?></span> |
| 50 |
</div> |
| 51 |
<?php } elseif ( isset( $this->parent->args['forced_dev_mode_off'] ) && $this->parent->args['forced_dev_mode_off'] == true ) { ?> |
| 52 |
<?php $tip_title = 'The "forced_dev_mode_off" argument has been set to true.'; ?> |
| 53 |
<?php $tip_msg = 'Support options are not available while this argument is enabled. You will also need to switch this argument to false before deploying your project. If you are a user of this product and you are seeing this message, please contact the author of this theme/plugin.'; ?> |
| 54 |
<div class="redux-dev-mode-notice-container redux-dev-qtip" |
| 55 |
qtip-title="<?php echo esc_attr( $tip_title ); ?>" |
| 56 |
qtip-content="<?php echo esc_attr( $tip_msg ); ?>"> |
| 57 |
<span |
| 58 |
class="redux-dev-mode-notice" style="background-color: #FF001D;"><?php _e( 'FORCED DEV MODE OFF ENABLED', 'redux-framework' ); ?></span> |
| 59 |
</div> |
| 60 |
|
| 61 |
<?php } ?> |
| 62 |
|
| 63 |
<h2><?php echo wp_kses_post( $this->parent->args['display_name'] ); ?></h2> |
| 64 |
|
| 65 |
<?php if ( ! empty( $this->parent->args['display_version'] ) ) { ?> |
| 66 |
<span><?php echo wp_kses_post( $this->parent->args['display_version'] ); ?></span> |
| 67 |
<?php } ?> |
| 68 |
|
| 69 |
</div> |
| 70 |
<?php } ?> |
| 71 |
|
| 72 |
<div class="clear"></div> |
| 73 |
</div> |
| 74 |
|