Exemplo n.º 1
0
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Pages') : $instance['title'], $instance, $this->id_base);
        $sortby = empty($instance['sortby']) ? 'menu_order' : $instance['sortby'];
        $exclude = empty($instance['exclude']) ? '' : $instance['exclude'];
        if ($sortby == 'menu_order') {
            $sortby = 'menu_order, post_title';
        }
        $out = nxt_list_pages(apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude)));
        if (!empty($out)) {
            echo $before_widget;
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            ?>
		<ul>
			<?php 
            echo $out;
            ?>
		</ul>
		<?php 
            echo $after_widget;
        }
    }
    function widget($args, $instance)
    {
        global $nxtdb;
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $title_cats = $instance['title_cats'];
        $title_pages = $instance['title_pages'];
        $title_archive = $instance['title_archive'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
			<ul class="tabs clf">
				<li><a class="btn-small"><span><?php 
        echo $title_cats;
        ?>
</span></a></li>
				<li><a><span><?php 
        echo $title_pages;
        ?>
</span></a></li>
				<li><a><span><?php 
        echo $title_archive;
        ?>
</span></a></li>
			</ul>
			<div class="clear"></div>
			<div class="panes">
				<div class="pane">
					<ul>
					<?php 
        nxt_list_categories('show_count=1&title_li=&orderby=name&depth=1');
        ?>
					</ul>
				</div><!--pane-->
				<div class="pane">
					<ul>
					<?php 
        nxt_list_pages('title_li=&depth=1&');
        ?>
					</ul>
				</div><!--pane-->
				<div class="pane">
					<ul class="archive-item">
					<?php 
        nxt_get_archives('type=monthly&show_post_count=true&format=html');
        ?>
					</ul>
				</div><!--pane-->
			</div><!--panes-->
			<div class="clf"></div>
		<?php 
        echo $after_widget;
    }
Exemplo n.º 3
0
    } else {
        $highlight = 'page_item current_page_item';
    }
    ?>
				<li class="<?php 
    echo $highlight;
    ?>
"><a href="<?php 
    echo home_url('/');
    ?>
"><?php 
    _e('Home', 'woothemes');
    ?>
</a></li>
				<?php 
    nxt_list_pages('sort_column=menu_order&depth=6&title_li=&exclude=');
    ?>
			</ul><!-- /#nav -->
    	    <?php 
}
?>
    	    		
		</nav><!-- /#navigation -->
		
		<?php 
if (isset($woo_options['woo_header_search']) && $woo_options['woo_header_search'] == 'true') {
    ?>
		<div class="search_main fix">
		    <form method="get" class="searchform" action="<?php 
    echo home_url('/');
    ?>
Exemplo n.º 4
0
/**
 * Display or retrieve list of pages with optional home link.
 *
 * The arguments are listed below and part of the arguments are for {@link
 * nxt_list_pages()} function. Check that function for more info on those
 * arguments.
 *
 * <ul>
 * <li><strong>sort_column</strong> - How to sort the list of pages. Defaults
 * to page title. Use column for posts table.</li>
 * <li><strong>menu_class</strong> - Class to use for the div ID which contains
 * the page list. Defaults to 'menu'.</li>
 * <li><strong>echo</strong> - Whether to echo list or return it. Defaults to
 * echo.</li>
 * <li><strong>link_before</strong> - Text before show_home argument text.</li>
 * <li><strong>link_after</strong> - Text after show_home argument text.</li>
 * <li><strong>show_home</strong> - If you set this argument, then it will
 * display the link to the home page. The show_home argument really just needs
 * to be set to the value of the text of the link.</li>
 * </ul>
 *
 * @since 2.7.0
 *
 * @param array|string $args
 */
function nxt_page_menu($args = array())
{
    $defaults = array('sort_column' => 'menu_order, post_title', 'menu_class' => 'menu', 'echo' => true, 'link_before' => '', 'link_after' => '');
    $args = nxt_parse_args($args, $defaults);
    $args = apply_filters('nxt_page_menu_args', $args);
    $menu = '';
    $list_args = $args;
    // Show Home in the menu
    if (!empty($args['show_home'])) {
        if (true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home']) {
            $text = __('Home');
        } else {
            $text = $args['show_home'];
        }
        $class = '';
        if (is_front_page() && !is_paged()) {
            $class = 'class="current_page_item"';
        }
        $menu .= '<li ' . $class . '><a href="' . home_url('/') . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>';
        // If the front page is a page, add it to the exclude list
        if (get_option('show_on_front') == 'page') {
            if (!empty($list_args['exclude'])) {
                $list_args['exclude'] .= ',';
            } else {
                $list_args['exclude'] = '';
            }
            $list_args['exclude'] .= get_option('page_on_front');
        }
    }
    $list_args['echo'] = false;
    $list_args['title_li'] = '';
    $menu .= str_replace(array("\r", "\n", "\t"), '', nxt_list_pages($list_args));
    if ($menu) {
        $menu = '<ul>' . $menu . '</ul>';
    }
    $menu = '<div class="' . esc_attr($args['menu_class']) . '">' . $menu . "</div>\n";
    $menu = apply_filters('nxt_page_menu', $menu, $args);
    if ($args['echo']) {
        echo $menu;
    } else {
        return $menu;
    }
}
Exemplo n.º 5
0
	            	<?php 
    the_content();
    ?>
		            <?php 
}
?>
  

					<div class="fl" style="width:50%">												  
	            	<h3><?php 
_e('Pages', 'woothemes');
?>
</h3>
	            	<ul>
	           	    	<?php 
nxt_list_pages('depth=0&sort_column=menu_order&title_li=');
?>
		
	            	</ul>
	            	</div>				
	    
					<div class="fl" style="width:50%">												  	    
		            <h3><?php 
_e('Categories', 'woothemes');
?>
</h3>
		            <ul>
	    	            <?php 
nxt_list_categories('title_li=&hierarchical=0&show_count=1');
?>
	
Exemplo n.º 6
0
			
			<?php 
        the_content();
        ?>
			<?php 
        nxt_link_pages(array('before' => '<p><strong>' . esc_html__('Pages', 'Modest') . ':</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
        ?>
			
			<div id="sitemap">
				<div class="sitemap-col">
					<h2><?php 
        esc_html_e('Pages', 'Modest');
        ?>
</h2>
					<ul id="sitemap-pages"><?php 
        nxt_list_pages('title_li=');
        ?>
</ul>
				</div> <!-- end .sitemap-col -->
				
				<div class="sitemap-col">
					<h2><?php 
        esc_html_e('Categories', 'Modest');
        ?>
</h2>
					<ul id="sitemap-categories"><?php 
        nxt_list_categories('title_li=');
        ?>
</ul>
				</div> <!-- end .sitemap-col -->
				
Exemplo n.º 7
0
function woo_show_pagemenu($exclude = "")
{
    // Split the featured pages from the options, and put in an array
    if (get_option('woo_ex_featpages')) {
        $menupages = get_option('woo_featpages');
        $exclude = $menupages . ',' . $exclude;
    }
    $pages = nxt_list_pages('sort_column=menu_order&title_li=&echo=0&depth=1&exclude=' . $exclude);
    $pages = preg_replace('%<a ([^>]+)>%U', '<a $1><span>', $pages);
    $pages = str_replace('</a>', '</span></a>', $pages);
    echo $pages;
}
Exemplo n.º 8
0
    function show_page_menu($customClass = 'nav clearfix', $addUlContainer = true, $addHomeLink = true)
    {
        global $shortname, $themename, $exclude_pages, $strdepth, $page_menu, $is_footer;
        //excluded pages
        if (get_option($shortname . '_menupages') != '') {
            $exclude_pages = implode(",", get_option($shortname . '_menupages'));
        }
        //dropdown for pages
        $strdepth = '';
        if (get_option($shortname . '_enable_dropdowns') == 'on') {
            $strdepth = "depth=" . get_option($shortname . '_tiers_shown_pages');
        }
        if ($strdepth == '') {
            $strdepth = "depth=1";
        }
        if ($is_footer) {
            $strdepth = "depth=1";
            $strdepth2 = $strdepth;
        }
        $page_menu = nxt_list_pages("sort_column=" . get_option($shortname . '_sort_pages') . "&sort_order=" . get_option($shortname . '_order_page') . "&" . $strdepth . "&exclude=" . $exclude_pages . "&title_li=&echo=0");
        if ($addUlContainer) {
            echo '<ul class="' . $customClass . '">';
        }
        if (get_option($shortname . '_home_link') == 'on' && $addHomeLink) {
            ?>
 
				<li <?php 
            if (is_front_page() || is_home()) {
                echo 'class="current_page_item"';
            }
            ?>
><a href="<?php 
            echo home_url();
            ?>
"><?php 
            _e('Home', $themename);
            ?>
</a></li>
			<?php 
        }
        echo $page_menu;
        if ($addUlContainer) {
            echo '</ul>';
        }
    }
Exemplo n.º 9
0
            printf(__('You are currently browsing the <a href="%1$s/">%2$s</a> blog archives.'), get_bloginfo('url'), get_bloginfo('name'));
            ?>
</p>

			<?php 
        }
        ?>

			</li>
		<?php 
    }
    ?>
		</ul>
		<ul role="navigation">
			<?php 
    nxt_list_pages('title_li=<h2>' . __('Pages') . '</h2>');
    ?>

			<li><h2><?php 
    _e('Archives');
    ?>
</h2>
				<ul>
				<?php 
    nxt_get_archives(array('type' => 'monthly'));
    ?>
				</ul>
			</li>

			<?php 
    nxt_list_categories(array('show_count' => 1, 'title_li' => '<h2>' . __('Categories') . '</h2>'));
Exemplo n.º 10
0
    /**
     * Display a page menu using a custom page walker
     *
     * @author Marshall Sorenson <*****@*****.**>
     * @package Infinity
     * @subpackage base
     * @see nxt_list_pages()
     */
    function infinity_base_page_menu()
    {
        // open the list
        ?>
		<ul class="sf-menu"><?php 
        nxt_list_pages(array('title_li' => null, 'walker' => new Infinity_Base_Walker_Page_Menu()));
        // close list
        ?>
		</ul><?php 
    }