Ejemplo n.º 1
0
 /**
  * Outputs the content of the widget.
  *
  * @param array args  The array of form elements
  * @param array instance The current instance of the widget
  */
 public function widget($args, $instance)
 {
     extract($args, EXTR_SKIP);
     echo $before_widget;
     extract(wp_parse_args((array) $instance, array('config_id' => 'main', 'theme_location' => 0, 'menu_id' => 0)));
     if ($theme_location) {
         wp_nav_menu(array('theme_location' => $theme_location));
     } else {
         if ($menu_id) {
             ubermenu($config_id, array('menu' => $menu_id));
         } else {
             ubermenu($config_id);
         }
     }
     echo $after_widget;
 }
Ejemplo n.º 2
0
/** Shortcodes **/
function ubermenu_shortcode($atts)
{
    extract(shortcode_atts(array('instance_id' => '', 'config_id' => 'main', 'theme_location' => '', 'menu' => ''), $atts));
    //If an instance_id (deprecated) was passed, use it as the config_id
    if ($instance_id != '') {
        $config_id = $instance_id;
    }
    $args = array('echo' => false);
    if ($theme_location) {
        $args['theme_location'] = $theme_location;
    }
    if ($menu) {
        $args['menu'] = $menu;
    }
    return ubermenu($config_id, $args);
}
Ejemplo n.º 3
0
function uberMenu_easyIntegrate($config_id = 'main', $args = array())
{
    //Check that Easy Integration is enabled
    if (ubermenu_op('ubermenu_theme_location', 'general') != 'on') {
        $msg = 'To use Easy Integration, please enable the <strong>Register Easy Integration UberMenu Theme Location</strong> setting in the <a target="_blank" href="' . admin_url('themes.php?page=ubermenu-settings') . '">UberMenu Control Panel > General Settings > Advanced</a> and <a target="_blank" href="' . admin_url('nav-menus.php?action=locations') . '">assign a menu</a> to the <strong>UberMenu [Easy Integration]</strong> theme locaiton';
        ubermenu_admin_notice($msg);
        return;
    } else {
        if (!has_nav_menu('ubermenu')) {
            $msg = 'To use Easy Integration, please <a target="_blank" href="' . admin_url('nav-menus.php?action=locations') . '">assign a menu</a> to the <strong>UberMenu [Easy Integration]</strong> theme location';
            ubermenu_admin_notice($msg);
            return;
        }
    }
    //$args = array();
    $args['theme_location'] = 'ubermenu';
    return ubermenu($config_id, $args);
}
Ejemplo n.º 4
0
    ?>
</p>
			<?php 
}
?>
		</div><!-- .site-branding -->

		<nav id="site-navigation" class="main-navigation" role="navigation">




		</nav><!-- #site-navigation -->

		<?php 
ubermenu('main', array('theme_location' => 'primary'));
?>
		
	</header><!-- #masthead -->

	<div id="content" class="site-content">









Ejemplo n.º 5
0
            <div class="navbar-collapse <?php 
if (!function_exists('ubermenu')) {
    echo 'collapse';
}
?>
">


                <?php 
if (has_nav_menu('header-menu')) {
    ?>
              <?php 
    if (function_exists('ubermenu')) {
        ?>
              	<?php 
        ubermenu('main', array('theme_location' => 'header-menu'));
        ?>
			  <?php 
    } else {
        ?>
              <?php 
        wp_nav_menu(array('theme_location' => 'header-menu', 'depth' => 0, 'sort_column' => 'menu_order', 'items_wrap' => '<ul  class="nav navbar-nav">%3$s</ul>', 'walker' => new crystalskull_Walker_Quickstart_Menu()));
        ?>
                <?php 
    }
    ?>

                <?php 
} else {
    ?>
                   <ul  class="nav"><li>
Ejemplo n.º 6
0
function ubermenu_direct_injection()
{
    if (ubermenu_op('direct_inject', 'main') == 'on') {
        if (has_nav_menu('ubermenu-direct-inject')) {
            ubermenu('main', array('theme_location' => 'ubermenu-direct-inject'));
        } else {
            echo '<div class="ubermenu ubermenu-loc-ubermenu-direct-inject">';
            ubermenu_admin_notice('Please <a target="_blank" href="' . admin_url('nav-menus.php?action=locations') . '">assign a menu</a> to the <strong>UberMenu [Direct Injection]</strong> theme location');
            echo '</div>';
        }
    }
}
Ejemplo n.º 7
0


</div>




	


<div class="custom-header-wrap">


<?php 
ubermenu('main');
?>


<div class="custom-header">




<span class="custom-logo">

<a href="<?php 
echo get_site_url();
?>
"><img src="<?php 
echo get_site_url();
Ejemplo n.º 8
0
}
?>

        </div>
    </div>

    <?php 
if (has_nav_menu('secondary_menu')) {
    ?>
        <?php 
    if (function_exists('ubermenu')) {
        ?>
            <div class="site-navigation-megamenu-wrap">
                <div class="container-wrap">
                <?php 
        ubermenu('main', array('theme_location' => 'secondary_menu'));
        ?>
                </div>
            </div>
        <?php 
    } else {
        ?>
            <div class="site-navigation-wrap">
                <div class="container-wrap">
                    <nav role="navigation" class="site-navigation">
                        <?php 
        $secondary_args = array('theme_location' => 'secondary_menu', 'depth' => 3, 'container' => false, 'menu_class' => 'site-navigation-menu', 'menu_id' => 'site-navigation-menu');
        wp_nav_menu($secondary_args);
        ?>

                    </nav>
Ejemplo n.º 9
0
/library/images/rethink-solutions-logo.png" width="175" height="48" alt="Rethink Solutions Inc. Logo">
						</picture>
                    
                    </a>
                   <!-- <img src="<?php 
echo get_stylesheet_directory_uri();
?>
/library/images/rethink-solutions-logo.png" width="178" height="60" alt=""/></a></p> -->

					<?php 
// if you'd like to use the site description you can un-comment it below
?>
					<?php 
// bloginfo('description');
?>
					<nav role="navigation" itemscope itemtype="http://schema.org/SiteNavigationElement">
						<?php 
wp_nav_menu(array('container' => false, 'container_class' => 'menu', 'menu' => __('The Main Menu', 'bonestheme'), 'menu_class' => 'nav top-nav cf', 'theme_location' => 'main-nav', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'fallback_cb' => ''));
?>

					</nav> 

					<?php 
ubermenu('main', array('menu' => 2));
?>
			

				</div>

			</header>
Ejemplo n.º 10
0
        function block($instance)
        {
            extract($instance);
            global $hb_menu_selected;
            if ($align == 0) {
                $align = 'headerLeft';
            } else {
                if ($align == 1) {
                    $align = 'headerCenter';
                } else {
                    $align = 'headerRight';
                }
            }
            $nav_menus = wp_get_nav_menus(array('orderby' => 'name'));
            $nav_menus_names = array();
            foreach ($nav_menus as $key => $value) {
                //array_push($nav_menus_names,$value->name);
                $nav_menus_names[$value->term_id] = $value->name;
            }
            $hb_menu_selected = $menu_select;
            if ($search_icon) {
                add_filter('wp_nav_menu_items', array($this, 'circleflip_search_icon'), 10, 2);
            }
            ?>
			<!-- Menu -->
			<div class="<?php 
            echo $responsive_menu ? '' : 'responsiveCheck ';
            echo $toggled_menu ? 'toggledMenu ' : 'headerMenu ';
            echo $align;
            if (is_user_logged_in()) {
                echo ' adminTop';
            }
            ?>
">
				<div class="toggleMenuBtn"><span class="icon-menu"></span></div>
				<div class="menuWrapper">
					<div class="closeMenu"><span class="icon-cancel"></span></div>
					<?php 
            if ($uber_menu == 0) {
                wp_nav_menu(array('menu' => $menu_select, 'menu_class' => 'clearfix menuContent', 'theme_location' => 'primary', 'depth' => 13, 'fallback_cb' => false, 'walker' => new Circleflip_Nav_Walker()));
            } else {
                if (function_exists('ubermenu')) {
                    ubermenu('main', array('menu' => $menu_select));
                }
            }
            ?>
				</div>
			</div>
			<!-- Menu End -->
			<?php 
        }
Ejemplo n.º 11
0
    <?php 
responsive_in_header();
// header hook
?>


<?php 
// Fix menu overlap bug..
if (is_admin_bar_showing()) {
    echo '<div class="wpadminbar-bump"></div>';
}
?>
 
 
<?php 
ubermenu('main', array('theme_location' => 'top-bar'));
?>
 
 <!-- <?php 
echo do_shortcode('[supermenu]');
?>
 -->
            
 
    </header><!-- end of header -->
    <?php 
responsive_header_end();
// after header hook
?>
    
	<?php