Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/Divi
File: header.php
<!DOCTYPE html>
[0] Fix | Delete
<html <?php language_attributes(); ?>>
[1] Fix | Delete
<head>
[2] Fix | Delete
<meta charset="<?php bloginfo( 'charset' ); ?>" />
[3] Fix | Delete
<?php
[4] Fix | Delete
elegant_description();
[5] Fix | Delete
elegant_keywords();
[6] Fix | Delete
elegant_canonical();
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Fires in the head, before {@see wp_head()} is called. This action can be used to
[10] Fix | Delete
* insert elements into the beginning of the head before any styles or scripts.
[11] Fix | Delete
*
[12] Fix | Delete
* @since 1.0
[13] Fix | Delete
*/
[14] Fix | Delete
do_action( 'et_head_meta' );
[15] Fix | Delete
[16] Fix | Delete
$template_directory_uri = get_template_directory_uri();
[17] Fix | Delete
?>
[18] Fix | Delete
[19] Fix | Delete
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
[20] Fix | Delete
[21] Fix | Delete
<script type="text/javascript">
[22] Fix | Delete
document.documentElement.className = 'js';
[23] Fix | Delete
</script>
[24] Fix | Delete
[25] Fix | Delete
<?php wp_head(); ?>
[26] Fix | Delete
</head>
[27] Fix | Delete
<body <?php body_class(); ?>>
[28] Fix | Delete
<?php
[29] Fix | Delete
$product_tour_enabled = et_builder_is_product_tour_enabled();
[30] Fix | Delete
$page_container_style = $product_tour_enabled ? ' style="padding-top: 0px;"' : ''; ?>
[31] Fix | Delete
<div id="page-container"<?php echo et_core_intentionally_unescaped( $page_container_style, 'fixed_string' ); ?>>
[32] Fix | Delete
<?php
[33] Fix | Delete
if ( $product_tour_enabled || is_page_template( 'page-template-blank.php' ) ) {
[34] Fix | Delete
return;
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
$et_secondary_nav_items = et_divi_get_top_nav_items();
[38] Fix | Delete
[39] Fix | Delete
$et_phone_number = $et_secondary_nav_items->phone_number;
[40] Fix | Delete
[41] Fix | Delete
$et_email = $et_secondary_nav_items->email;
[42] Fix | Delete
[43] Fix | Delete
$et_contact_info_defined = $et_secondary_nav_items->contact_info_defined;
[44] Fix | Delete
[45] Fix | Delete
$show_header_social_icons = $et_secondary_nav_items->show_header_social_icons;
[46] Fix | Delete
[47] Fix | Delete
$et_secondary_nav = $et_secondary_nav_items->secondary_nav;
[48] Fix | Delete
[49] Fix | Delete
$et_top_info_defined = $et_secondary_nav_items->top_info_defined;
[50] Fix | Delete
[51] Fix | Delete
$et_slide_header = 'slide' === et_get_option( 'header_style', 'left' ) || 'fullscreen' === et_get_option( 'header_style', 'left' ) ? true : false;
[52] Fix | Delete
?>
[53] Fix | Delete
[54] Fix | Delete
<?php if ( $et_top_info_defined && ! $et_slide_header || is_customize_preview() ) : ?>
[55] Fix | Delete
<?php ob_start(); ?>
[56] Fix | Delete
<div id="top-header"<?php echo $et_top_info_defined ? '' : 'style="display: none;"'; ?>>
[57] Fix | Delete
<div class="container clearfix">
[58] Fix | Delete
[59] Fix | Delete
<?php if ( $et_contact_info_defined ) : ?>
[60] Fix | Delete
[61] Fix | Delete
<div id="et-info">
[62] Fix | Delete
<?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
[63] Fix | Delete
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( $et_phone_number ) ); ?></span>
[64] Fix | Delete
<?php endif; ?>
[65] Fix | Delete
[66] Fix | Delete
<?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
[67] Fix | Delete
<a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
[68] Fix | Delete
<?php endif; ?>
[69] Fix | Delete
[70] Fix | Delete
<?php
[71] Fix | Delete
if ( true === $show_header_social_icons ) {
[72] Fix | Delete
get_template_part( 'includes/social_icons', 'header' );
[73] Fix | Delete
} ?>
[74] Fix | Delete
</div> <!-- #et-info -->
[75] Fix | Delete
[76] Fix | Delete
<?php endif; // true === $et_contact_info_defined ?>
[77] Fix | Delete
[78] Fix | Delete
<div id="et-secondary-menu">
[79] Fix | Delete
<?php
[80] Fix | Delete
if ( ! $et_contact_info_defined && true === $show_header_social_icons ) {
[81] Fix | Delete
get_template_part( 'includes/social_icons', 'header' );
[82] Fix | Delete
} else if ( $et_contact_info_defined && true === $show_header_social_icons ) {
[83] Fix | Delete
ob_start();
[84] Fix | Delete
[85] Fix | Delete
get_template_part( 'includes/social_icons', 'header' );
[86] Fix | Delete
[87] Fix | Delete
$duplicate_social_icons = ob_get_contents();
[88] Fix | Delete
[89] Fix | Delete
ob_end_clean();
[90] Fix | Delete
[91] Fix | Delete
printf(
[92] Fix | Delete
'<div class="et_duplicate_social_icons">
[93] Fix | Delete
%1$s
[94] Fix | Delete
</div>',
[95] Fix | Delete
et_core_esc_previously( $duplicate_social_icons )
[96] Fix | Delete
);
[97] Fix | Delete
}
[98] Fix | Delete
[99] Fix | Delete
if ( '' !== $et_secondary_nav ) {
[100] Fix | Delete
echo et_core_esc_wp( $et_secondary_nav );
[101] Fix | Delete
}
[102] Fix | Delete
[103] Fix | Delete
et_show_cart_total();
[104] Fix | Delete
?>
[105] Fix | Delete
</div> <!-- #et-secondary-menu -->
[106] Fix | Delete
[107] Fix | Delete
</div> <!-- .container -->
[108] Fix | Delete
</div> <!-- #top-header -->
[109] Fix | Delete
<?php
[110] Fix | Delete
$top_header = ob_get_clean();
[111] Fix | Delete
[112] Fix | Delete
/**
[113] Fix | Delete
* Filters the HTML output for the top header.
[114] Fix | Delete
*
[115] Fix | Delete
* @since 3.10
[116] Fix | Delete
*
[117] Fix | Delete
* @param string $top_header
[118] Fix | Delete
*/
[119] Fix | Delete
echo et_core_intentionally_unescaped( apply_filters( 'et_html_top_header', $top_header ), 'html' );
[120] Fix | Delete
?>
[121] Fix | Delete
<?php endif; // true ==== $et_top_info_defined ?>
[122] Fix | Delete
[123] Fix | Delete
<?php if ( $et_slide_header || is_customize_preview() ) : ?>
[124] Fix | Delete
<?php ob_start(); ?>
[125] Fix | Delete
<div class="et_slide_in_menu_container">
[126] Fix | Delete
<?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) || is_customize_preview() ) { ?>
[127] Fix | Delete
<span class="mobile_menu_bar et_toggle_fullscreen_menu"></span>
[128] Fix | Delete
<?php } ?>
[129] Fix | Delete
[130] Fix | Delete
<?php
[131] Fix | Delete
if ( $et_contact_info_defined || true === $show_header_social_icons || false !== et_get_option( 'show_search_icon', true ) || class_exists( 'woocommerce' ) || is_customize_preview() ) { ?>
[132] Fix | Delete
<div class="et_slide_menu_top">
[133] Fix | Delete
[134] Fix | Delete
<?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) ) { ?>
[135] Fix | Delete
<div class="et_pb_top_menu_inner">
[136] Fix | Delete
<?php } ?>
[137] Fix | Delete
<?php }
[138] Fix | Delete
[139] Fix | Delete
if ( true === $show_header_social_icons ) {
[140] Fix | Delete
get_template_part( 'includes/social_icons', 'header' );
[141] Fix | Delete
}
[142] Fix | Delete
[143] Fix | Delete
et_show_cart_total();
[144] Fix | Delete
?>
[145] Fix | Delete
<?php if ( false !== et_get_option( 'show_search_icon', true ) || is_customize_preview() ) : ?>
[146] Fix | Delete
<?php if ( 'fullscreen' !== et_get_option( 'header_style', 'left' ) ) { ?>
[147] Fix | Delete
<div class="clear"></div>
[148] Fix | Delete
<?php } ?>
[149] Fix | Delete
<form role="search" method="get" class="et-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
[150] Fix | Delete
<?php
[151] Fix | Delete
printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
[152] Fix | Delete
esc_attr__( 'Search &hellip;', 'Divi' ),
[153] Fix | Delete
get_search_query(),
[154] Fix | Delete
esc_attr__( 'Search for:', 'Divi' )
[155] Fix | Delete
);
[156] Fix | Delete
[157] Fix | Delete
/**
[158] Fix | Delete
* Fires inside the search form element, just before its closing tag.
[159] Fix | Delete
*
[160] Fix | Delete
* @since ??
[161] Fix | Delete
*/
[162] Fix | Delete
do_action( 'et_search_form_fields' );
[163] Fix | Delete
?>
[164] Fix | Delete
<button type="submit" id="searchsubmit_header"></button>
[165] Fix | Delete
</form>
[166] Fix | Delete
<?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
[167] Fix | Delete
[168] Fix | Delete
<?php if ( $et_contact_info_defined ) : ?>
[169] Fix | Delete
[170] Fix | Delete
<div id="et-info">
[171] Fix | Delete
<?php if ( '' !== ( $et_phone_number = et_get_option( 'phone_number' ) ) ) : ?>
[172] Fix | Delete
<span id="et-info-phone"><?php echo et_core_esc_previously( et_sanitize_html_input_text( $et_phone_number ) ); ?></span>
[173] Fix | Delete
<?php endif; ?>
[174] Fix | Delete
[175] Fix | Delete
<?php if ( '' !== ( $et_email = et_get_option( 'header_email' ) ) ) : ?>
[176] Fix | Delete
<a href="<?php echo esc_attr( 'mailto:' . $et_email ); ?>"><span id="et-info-email"><?php echo esc_html( $et_email ); ?></span></a>
[177] Fix | Delete
<?php endif; ?>
[178] Fix | Delete
</div> <!-- #et-info -->
[179] Fix | Delete
[180] Fix | Delete
<?php endif; // true === $et_contact_info_defined ?>
[181] Fix | Delete
<?php if ( $et_contact_info_defined || true === $show_header_social_icons || false !== et_get_option( 'show_search_icon', true ) || class_exists( 'woocommerce' ) || is_customize_preview() ) { ?>
[182] Fix | Delete
<?php if ( 'fullscreen' === et_get_option( 'header_style', 'left' ) ) { ?>
[183] Fix | Delete
</div> <!-- .et_pb_top_menu_inner -->
[184] Fix | Delete
<?php } ?>
[185] Fix | Delete
[186] Fix | Delete
</div> <!-- .et_slide_menu_top -->
[187] Fix | Delete
<?php } ?>
[188] Fix | Delete
[189] Fix | Delete
<div class="et_pb_fullscreen_nav_container">
[190] Fix | Delete
<?php
[191] Fix | Delete
$slide_nav = '';
[192] Fix | Delete
$slide_menu_class = 'et_mobile_menu';
[193] Fix | Delete
[194] Fix | Delete
$slide_nav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'echo' => false, 'items_wrap' => '%3$s' ) );
[195] Fix | Delete
$slide_nav .= wp_nav_menu( array( 'theme_location' => 'secondary-menu', 'container' => '', 'fallback_cb' => '', 'echo' => false, 'items_wrap' => '%3$s' ) );
[196] Fix | Delete
?>
[197] Fix | Delete
[198] Fix | Delete
<ul id="mobile_menu_slide" class="<?php echo esc_attr( $slide_menu_class ); ?>">
[199] Fix | Delete
[200] Fix | Delete
<?php
[201] Fix | Delete
if ( '' === $slide_nav ) :
[202] Fix | Delete
?>
[203] Fix | Delete
<?php if ( 'on' === et_get_option( 'divi_home_link' ) ) { ?>
[204] Fix | Delete
<li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'Divi' ); ?></a></li>
[205] Fix | Delete
<?php }; ?>
[206] Fix | Delete
[207] Fix | Delete
<?php show_page_menu( $slide_menu_class, false, false ); ?>
[208] Fix | Delete
<?php show_categories_menu( $slide_menu_class, false ); ?>
[209] Fix | Delete
<?php
[210] Fix | Delete
else :
[211] Fix | Delete
echo et_core_esc_wp( $slide_nav ) ;
[212] Fix | Delete
endif;
[213] Fix | Delete
?>
[214] Fix | Delete
[215] Fix | Delete
</ul>
[216] Fix | Delete
</div>
[217] Fix | Delete
</div>
[218] Fix | Delete
<?php
[219] Fix | Delete
$slide_header = ob_get_clean();
[220] Fix | Delete
[221] Fix | Delete
/**
[222] Fix | Delete
* Filters the HTML output for the slide header.
[223] Fix | Delete
*
[224] Fix | Delete
* @since 3.10
[225] Fix | Delete
*
[226] Fix | Delete
* @param string $top_header
[227] Fix | Delete
*/
[228] Fix | Delete
echo et_core_intentionally_unescaped( apply_filters( 'et_html_slide_header', $slide_header ), 'html' );
[229] Fix | Delete
?>
[230] Fix | Delete
<?php endif; // true ==== $et_slide_header ?>
[231] Fix | Delete
[232] Fix | Delete
<?php ob_start(); ?>
[233] Fix | Delete
<header id="main-header" data-height-onload="<?php echo esc_attr( et_get_option( 'menu_height', '66' ) ); ?>">
[234] Fix | Delete
<div class="container clearfix et_menu_container">
[235] Fix | Delete
<?php
[236] Fix | Delete
$logo = ( $user_logo = et_get_option( 'divi_logo' ) ) && ! empty( $user_logo )
[237] Fix | Delete
? $user_logo
[238] Fix | Delete
: $template_directory_uri . '/images/logo.png';
[239] Fix | Delete
[240] Fix | Delete
ob_start();
[241] Fix | Delete
?>
[242] Fix | Delete
<div class="logo_container">
[243] Fix | Delete
<span class="logo_helper"></span>
[244] Fix | Delete
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
[245] Fix | Delete
<img src="<?php echo esc_attr( $logo ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>" id="logo" data-height-percentage="<?php echo esc_attr( et_get_option( 'logo_height', '54' ) ); ?>" />
[246] Fix | Delete
</a>
[247] Fix | Delete
</div>
[248] Fix | Delete
<?php
[249] Fix | Delete
$logo_container = ob_get_clean();
[250] Fix | Delete
[251] Fix | Delete
/**
[252] Fix | Delete
* Filters the HTML output for the logo container.
[253] Fix | Delete
*
[254] Fix | Delete
* @since 3.10
[255] Fix | Delete
*
[256] Fix | Delete
* @param string $logo_container
[257] Fix | Delete
*/
[258] Fix | Delete
echo et_core_intentionally_unescaped( apply_filters( 'et_html_logo_container', $logo_container ), 'html' );
[259] Fix | Delete
?>
[260] Fix | Delete
<div id="et-top-navigation" data-height="<?php echo esc_attr( et_get_option( 'menu_height', '66' ) ); ?>" data-fixed-height="<?php echo esc_attr( et_get_option( 'minimized_menu_height', '40' ) ); ?>">
[261] Fix | Delete
<?php if ( ! $et_slide_header || is_customize_preview() ) : ?>
[262] Fix | Delete
<nav id="top-menu-nav">
[263] Fix | Delete
<?php
[264] Fix | Delete
$menuClass = 'nav';
[265] Fix | Delete
if ( 'on' === et_get_option( 'divi_disable_toptier' ) ) $menuClass .= ' et_disable_top_tier';
[266] Fix | Delete
$primaryNav = '';
[267] Fix | Delete
[268] Fix | Delete
$primaryNav = wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => '', 'fallback_cb' => '', 'menu_class' => $menuClass, 'menu_id' => 'top-menu', 'echo' => false ) );
[269] Fix | Delete
if ( empty( $primaryNav ) ) :
[270] Fix | Delete
?>
[271] Fix | Delete
<ul id="top-menu" class="<?php echo esc_attr( $menuClass ); ?>">
[272] Fix | Delete
<?php if ( 'on' === et_get_option( 'divi_home_link' ) ) { ?>
[273] Fix | Delete
<li <?php if ( is_home() ) echo( 'class="current_page_item"' ); ?>><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php esc_html_e( 'Home', 'Divi' ); ?></a></li>
[274] Fix | Delete
<?php }; ?>
[275] Fix | Delete
[276] Fix | Delete
<?php show_page_menu( $menuClass, false, false ); ?>
[277] Fix | Delete
<?php show_categories_menu( $menuClass, false ); ?>
[278] Fix | Delete
</ul>
[279] Fix | Delete
<?php
[280] Fix | Delete
else :
[281] Fix | Delete
echo et_core_esc_wp( $primaryNav );
[282] Fix | Delete
endif;
[283] Fix | Delete
?>
[284] Fix | Delete
</nav>
[285] Fix | Delete
<?php endif; ?>
[286] Fix | Delete
[287] Fix | Delete
<?php
[288] Fix | Delete
if ( ! $et_top_info_defined && ( ! $et_slide_header || is_customize_preview() ) ) {
[289] Fix | Delete
et_show_cart_total( array(
[290] Fix | Delete
'no_text' => true,
[291] Fix | Delete
) );
[292] Fix | Delete
}
[293] Fix | Delete
?>
[294] Fix | Delete
[295] Fix | Delete
<?php if ( $et_slide_header || is_customize_preview() ) : ?>
[296] Fix | Delete
<span class="mobile_menu_bar et_pb_header_toggle et_toggle_<?php echo esc_attr( et_get_option( 'header_style', 'left' ) ); ?>_menu"></span>
[297] Fix | Delete
<?php endif; ?>
[298] Fix | Delete
[299] Fix | Delete
<?php if ( ( false !== et_get_option( 'show_search_icon', true ) && ! $et_slide_header ) || is_customize_preview() ) : ?>
[300] Fix | Delete
<div id="et_top_search">
[301] Fix | Delete
<span id="et_search_icon"></span>
[302] Fix | Delete
</div>
[303] Fix | Delete
<?php endif; // true === et_get_option( 'show_search_icon', false ) ?>
[304] Fix | Delete
[305] Fix | Delete
<?php
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Fires at the end of the 'et-top-navigation' element, just before its closing tag.
[309] Fix | Delete
*
[310] Fix | Delete
* @since 1.0
[311] Fix | Delete
*/
[312] Fix | Delete
do_action( 'et_header_top' );
[313] Fix | Delete
[314] Fix | Delete
?>
[315] Fix | Delete
</div> <!-- #et-top-navigation -->
[316] Fix | Delete
</div> <!-- .container -->
[317] Fix | Delete
<div class="et_search_outer">
[318] Fix | Delete
<div class="container et_search_form_container">
[319] Fix | Delete
<form role="search" method="get" class="et-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
[320] Fix | Delete
<?php
[321] Fix | Delete
printf( '<input type="search" class="et-search-field" placeholder="%1$s" value="%2$s" name="s" title="%3$s" />',
[322] Fix | Delete
esc_attr__( 'Search &hellip;', 'Divi' ),
[323] Fix | Delete
get_search_query(),
[324] Fix | Delete
esc_attr__( 'Search for:', 'Divi' )
[325] Fix | Delete
);
[326] Fix | Delete
[327] Fix | Delete
/**
[328] Fix | Delete
* Fires inside the search form element, just before its closing tag.
[329] Fix | Delete
*
[330] Fix | Delete
* @since ??
[331] Fix | Delete
*/
[332] Fix | Delete
do_action( 'et_search_form_fields' );
[333] Fix | Delete
?>
[334] Fix | Delete
</form>
[335] Fix | Delete
<span class="et_close_search_field"></span>
[336] Fix | Delete
</div>
[337] Fix | Delete
</div>
[338] Fix | Delete
</header> <!-- #main-header -->
[339] Fix | Delete
<?php
[340] Fix | Delete
$main_header = ob_get_clean();
[341] Fix | Delete
[342] Fix | Delete
/**
[343] Fix | Delete
* Filters the HTML output for the main header.
[344] Fix | Delete
*
[345] Fix | Delete
* @since 3.10
[346] Fix | Delete
*
[347] Fix | Delete
* @param string $main_header
[348] Fix | Delete
*/
[349] Fix | Delete
echo et_core_intentionally_unescaped( apply_filters( 'et_html_main_header', $main_header ), 'html' );
[350] Fix | Delete
?>
[351] Fix | Delete
<div id="et-main-area">
[352] Fix | Delete
<?php
[353] Fix | Delete
/**
[354] Fix | Delete
* Fires after the header, before the main content is output.
[355] Fix | Delete
*
[356] Fix | Delete
* @since 3.10
[357] Fix | Delete
*/
[358] Fix | Delete
do_action( 'et_before_main_content' );
[359] Fix | Delete
[360] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function