Ejemplo n.º 1
0
    /**
     * Define the callback menu, if there is no custom menu.
     * This menu automatically lists all Pages as menu items, including their direct
     * direct descendant, which will only be displayed for the current parent.
    */
    function graphene_default_menu()
    {
        global $graphene_settings;
        ?>
	<ul id="header-menu" class="<?php 
        echo graphene_get_menu_class('menu clearfix default-menu');
        ?>
">
		<?php 
        if (get_option('show_on_front') == 'posts') {
            ?>
		<li <?php 
            if (is_single() || is_front_page()) {
                echo 'class="current_page_item current-menu-item"';
            }
            ?>
>
			<a href="<?php 
            echo get_home_url();
            ?>
">
				<?php 
            if (!$graphene_settings['disable_menu_desc']) {
                echo '<strong>';
            }
            ?>
				<?php 
            _e('Home', 'graphene');
            ?>
				<?php 
            if (!$graphene_settings['disable_menu_desc']) {
                echo '</strong>';
            }
            ?>
				<?php 
            if ($graphene_settings['navmenu_home_desc']) {
                echo '<span class="desc">' . $graphene_settings['navmenu_home_desc'] . '</span>';
            }
            ?>
			</a>
		</li>
		<?php 
        }
        ?>
		<?php 
        $args = array('echo' => 1, 'depth' => 5, 'title_li' => '', 'walker' => new Graphene_Walker_Page());
        add_filter('page_css_class', 'graphene_page_ancestor_class', 10, 4);
        wp_list_pages(apply_filters('graphene_default_menu_args', $args));
        remove_filter('page_css_class', 'graphene_page_ancestor_class', 10, 4);
        ?>
	</ul>
	<?php 
        do_action('graphene_default_menu');
    }
Ejemplo n.º 2
0
        <?php 
}
?>
        
		<?php 
do_action('graphene_header');
?>
    </div>
    <div id="nav">
        <?php 
/* The navigation menu */
?>
        <div id="header-menu-wrap" class="clearfix">
			<?php 
/* Header menu */
$args = array('container' => '', 'menu_id' => 'header-menu', 'menu_class' => graphene_get_menu_class('menu clearfix'), 'fallback_cb' => 'graphene_default_menu', 'depth' => 5, 'theme_location' => 'Header Menu');
if (!$graphene_settings['disable_menu_desc']) {
    $args = array_merge($args, array('walker' => new Graphene_Description_Walker()));
}
wp_nav_menu(apply_filters('graphene_header_menu_args', $args));
?>
            
            <div class="clear"></div>
            
			<?php 
if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'nav_bar') {
    ?>
                <div id="top_search" class="grid_4">
                    <?php 
    get_search_form();
    ?>