| Server IP : 62.72.47.131 / Your IP : 216.73.217.34 Web Server : Apache/2.4.66 (Debian) System : Linux 975cdb959a49 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : ( 501) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/themes/flatsome/inc/integrations/ubermenu/ |
Upload File : |
<?php
/**
* Ubermenu plugin integration
*/
/**
* Adds a extra separate full width menu header bar with Ubermenu.
* Renders: Main menu for desktop and mobile menu (if set) on tablet/mobile.
*/
function flatsome_uber_menu() {
if ( ! get_theme_mod( 'flatsome_uber_menu', 1 ) ) {
return;
}
$has_mobile_menu = has_nav_menu( 'primary_mobile' );
$hide_for_medium = $has_mobile_menu ? 'hide-for-medium' : '';
?>
<div id="flatsome-uber-menu" class="header-ubermenu-nav relative <?php echo $hide_for_medium; ?>" style="z-index: 9">
<div class="full-width">
<?php ubermenu( 'main', array( 'theme_location' => 'primary' ) ); ?>
</div>
</div>
<?php if ( $has_mobile_menu ) : ?>
<div id="flatsome-uber-menu" class="header-ubermenu-nav relative show-for-medium" style="z-index: 9">
<div class="full-width">
<?php ubermenu( 'main', array( 'theme_location' => 'primary_mobile' ) ); ?>
</div>
</div>
<?php endif; ?>
<?php
}
add_action( 'flatsome_after_header_bottom', 'flatsome_uber_menu', 10 );