| Server IP : 162.214.67.83 / Your IP : 216.73.217.9 Web Server : Apache System : Linux dedi-13542965.clustter.com.br 5.14.0-687.20.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jun 30 06:22:49 EDT 2026 x86_64 User : pjacortinas ( 1096) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/pjacortinas/www/wp-content/themes/betheme/includes/ |
Upload File : |
<?php
global $woocommerce;
// WooCommerce Cart
$show_cart = trim( mfn_opts_get( 'shop-cart' ) );
if( $show_cart == 1 ) $show_cart = 'icon-bag-fine';
$has_cart = ( $woocommerce && $show_cart ) ? true : false;
// Search
$header_search = mfn_opts_get( 'header-search' );
// Action Button
$action_link = mfn_opts_get( 'header-action-link' );
// WPML Icon
if( has_nav_menu( 'lang-menu' ) ){
$wpml_icon = true;
} elseif( function_exists( 'icl_get_languages' ) && mfn_opts_get( 'header-wpml' ) != 'hide' ){
$wpml_icon = true;
} else {
$wpml_icon = false;
}
if( $has_cart || $header_search || $action_link || $wpml_icon ){
echo '<div class="top_bar_right">';
echo '<div class="top_bar_right_wrapper">';
// WooCommerce Cart
if( $has_cart ){
echo '<a id="header_cart" href="'. esc_url( wc_get_cart_url() ) .'"><i class="'. $show_cart .'"></i><span>'. $woocommerce->cart->cart_contents_count .'</span></a>';
}
// Search Icon
if( $header_search == 'input' ){
$translate[ 'search-placeholder' ] = mfn_opts_get( 'translate' ) ? mfn_opts_get( 'translate-search-placeholder', 'Enter your search' ) : __( 'Enter your search', 'betheme' );
echo '<a id="search_button" class="has-input">';
echo '<form method="get" id="searchform" action="'. esc_url( home_url( '/' ) ) .'">';
echo '<i class="icon-search-fine"></i>';
echo '<input type="text" class="field" name="s" placeholder="'. $translate['search-placeholder'] .'" />';
echo '<input type="submit" class="submit" value="" style="display:none;" />';
echo '</form>';
echo '</a>';
} elseif( $header_search ){
echo '<a id="search_button" href="#"><i class="icon-search-fine"></i></a>';
}
// Languages menu
get_template_part( 'includes/include', 'wpml' );
// Action Button
if( $action_link ){
$action_options = mfn_opts_get( 'header-action-target' );
if( isset( $action_options['target'] ) ){
$action_target = 'target="_blank"';
} else {
$action_target = false;
}
if( isset( $action_options['scroll'] ) ){
$action_class = ' scroll';
} else {
$action_class = false;
}
echo '<a href="'. $action_link .'" class="action_button'. $action_class .'" '. $action_target .'>'. mfn_opts_get( 'header-action-title' ) .'</a>';
}
echo '</div>';
echo '</div>';
}