maybe_render_placeholder();
if ( is_active_sidebar( 'sidebar-top-bar' ) ) {
?>
top_bar_has_placeholder() ) {
$menu_class .= ' col-md-6 top-widgets-placeholder';
} else {
$menu_class .= ' col-md-12';
}
return $menu_class;
}
/**
* Get top bar style from customizer controls.
*
* @since 1.1.48
*/
private function top_bar_css() {
$custom_css = '';
$hestia_top_bar_background = get_theme_mod( 'hestia_top_bar_background_color', '#363537' );
if ( ! empty( $hestia_top_bar_background ) ) {
$custom_css .= '.hestia-top-bar, .hestia-top-bar .widget.widget_shopping_cart .cart_list {
background-color: ' . esc_html( $hestia_top_bar_background ) . '
}
.hestia-top-bar .widget .label-floating input[type=search]:-webkit-autofill {
-webkit-box-shadow: inset 0 0 0px 9999px ' . esc_html( $hestia_top_bar_background ) . '
}';
}
$hestia_top_bar_text_color = get_theme_mod( 'hestia_top_bar_text_color', '#ffffff' );
if ( ! empty( $hestia_top_bar_background ) ) {
$custom_css .= '.hestia-top-bar, .hestia-top-bar .widget .label-floating input[type=search], .hestia-top-bar .widget.widget_search form.form-group:before, .hestia-top-bar .widget.widget_product_search form.form-group:before, .hestia-top-bar .widget.widget_shopping_cart:before {
color: ' . esc_html( $hestia_top_bar_text_color ) . '
}
.hestia-top-bar .widget .label-floating input[type=search]{
-webkit-text-fill-color:' . esc_html( $hestia_top_bar_text_color ) . ' !important
}
.hestia-top-bar div.widget.widget_shopping_cart:before, .hestia-top-bar .widget.widget_product_search form.form-group:before, .hestia-top-bar .widget.widget_search form.form-group:before{
background-color: ' . esc_html( $hestia_top_bar_text_color ) . '
}';
}
$hestia_top_bar_link_color = get_theme_mod( 'hestia_top_bar_link_color', '#ffffff' );
if ( ! empty( $hestia_top_bar_link_color ) ) {
$custom_css .= '.hestia-top-bar a, .hestia-top-bar .top-bar-nav li a {
color: ' . esc_html( $hestia_top_bar_link_color ) . '
}
.hestia-top-bar ul li a[href*="mailto:"]:before, .hestia-top-bar ul li a[href*="tel:"]:before{
background-color: ' . esc_html( $hestia_top_bar_link_color ) . '
}
';
}
$hestia_top_bar_link_color_hover = get_theme_mod( 'hestia_top_bar_link_color_hover', '#eeeeee' );
if ( ! empty( $hestia_top_bar_link_color_hover ) ) {
$custom_css .= '.hestia-top-bar a:hover, .hestia-top-bar .top-bar-nav li a:hover {
color: ' . esc_html( $hestia_top_bar_link_color_hover ) . '
}
.hestia-top-bar ul li:hover a[href*="mailto:"]:before, .hestia-top-bar ul li:hover a[href*="tel:"]:before{
background-color: ' . esc_html( $hestia_top_bar_link_color_hover ) . '
}
';
}
return $custom_css;
}
/**
* Add top bar style.
*/
public function top_bar_style() {
wp_add_inline_style( 'hestia_style', $this->top_bar_css() );
}
}