本文整理汇总了PHP中woo_custom_navigation_output函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_custom_navigation_output函数的具体用法?PHP woo_custom_navigation_output怎么用?PHP woo_custom_navigation_output使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woo_custom_navigation_output函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: woo_nav_inside
?>
</a></h3>
<div id="navigation" class="">
<?php
woo_nav_inside();
?>
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fr', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="main-nav" class="nav fr">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output('name=Woo Menu 1');
}
} else {
?>
<?php
if (is_page()) {
$highlight = 'page_item';
} else {
$highlight = 'page_item current_page_item';
}
?>
<li class="<?php
echo esc_attr($highlight);
?>
"><a href="<?php
开发者ID:stevehanlon,项目名称:WooThemes-Canvas-Foundation-Zombie,代码行数:31,代码来源:header.php
示例2: wp_nav_menu
</div><!--header-->
<div id="nav">
<div class="container_12">
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
wp_nav_menu(array('depth' => 1, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'navigation', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="navigation">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output('desc=1');
}
} else {
?>
<li><a <?php
if (is_home()) {
?>
class="current_page_item"<?php
}
?>
href="<?php
bloginfo('url');
?>
">
<?php
_e('Home', woothemes);
开发者ID:rosshettel,项目名称:Northern-Star-Blogs,代码行数:30,代码来源:header.php
示例3: widget
function widget($args, $instance)
{
$navmenu = $instance['navmenu'];
$navtitle = $instance['navtitle'];
$navdeveloper = strtolower($instance['navdeveloper']);
if (isset($instance['navdiv'])) {
$navdiv = strtolower($instance['navdiv']);
} else {
$navdiv = 'no';
}
if (isset($instance['navul'])) {
$navul = strtolower($instance['navul']);
} else {
$navul = 'no';
}
if (isset($instance['navwidgetdescription'])) {
$navwidgetdescription = strtolower($instance['navwidgetdescription']);
} else {
$navwidgetdescription = '2';
}
$menuexists = false;
global $wpdb;
//GET menu name
if ($navmenu > 0) {
$table_name_menus = $wpdb->prefix . "woo_custom_nav_menus";
$woo_result = $wpdb->get_results("SELECT menu_name FROM " . $table_name_menus . " WHERE id='" . $navmenu . "'");
$woo_custom_nav_menu_name = $woo_result[0]->menu_name;
$menuexists = true;
} else {
$menuexists = false;
}
?>
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes') {
//DISPLAY Custom DIV
if ($navdiv == 'yes') {
?>
<div class="widget block">
<?php
} else {
}
} else {
?>
<div class="widget block">
<?php
}
?>
<h3><?php
echo $navtitle;
?>
</h3>
<?php
if ($menuexists) {
?>
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes') {
//DISPLAY Custom UL
if ($navul == 'yes') {
?>
<ul class="custom-nav">
<?php
} else {
}
} else {
?>
<ul class="custom-nav">
<?php
}
?>
<?php
//DISPLAY custom navigation menu
if (get_option('woo_custom_nav_menu') == 'true') {
woo_custom_navigation_output('name=' . $woo_custom_nav_menu_name . '&desc=' . $navwidgetdescription);
}
?>
<?php
//DEVELOPER settings enabled
if ($navdeveloper == 'yes') {
//DISPLAY Custom UL
if ($navul == 'yes') {
?>
</ul>
<?php
} else {
//.........这里部分代码省略.........
开发者ID:rongandat,项目名称:sallumeh,代码行数:101,代码来源:admin-custom-nav.php
示例4: woo_nav
function woo_nav()
{
global $woo_options;
woo_nav_before();
?>
<nav id="navigation" class="col-full" role="navigation">
<section class="menus">
<?php
woo_nav_inside();
?>
<a href="<?php
echo home_url();
?>
" class="nav-home"><span><?php
_e('Home', 'woothemes');
?>
</span></a>
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
echo '<h3>' . woo_get_menu_name('primary-menu') . '</h3>';
wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="main-nav" class="nav fl">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output('name=Woo Menu 1');
}
} else {
?>
<?php
if (is_page()) {
$highlight = 'page_item';
} else {
$highlight = 'page_item current_page_item';
}
?>
<li class="<?php
echo esc_attr($highlight);
?>
"><a href="<?php
echo esc_url(home_url('/'));
?>
"><?php
_e('Home', 'woothemes');
?>
</a></li>
<?php
wp_list_pages('sort_column=menu_order&depth=6&title_li=&exclude=');
?>
<?php
}
?>
</ul><!-- /#nav -->
<?php
}
?>
</section><!-- /.menus -->
<a href="#top" class="nav-close"><span><?php
_e('Return to Content', 'woothemes');
?>
</span></a>
</nav>
<?php
woo_nav_after();
}
开发者ID:jospintedjou,项目名称:wordpress,代码行数:74,代码来源:theme-actions.php
示例5: woo_nav_before
<?php
woo_nav_before();
?>
<div id="navigation" class="col-full">
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
wp_nav_menu(array('depth' => 6, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="main-nav" class="nav fl">
<?php
if (wootique_get_woo_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output();
}
} else {
?>
<?php
if (is_page()) {
$highlight = "page_item";
} else {
$highlight = "page_item current_page_item";
}
?>
<li class="<?php
echo $highlight;
?>
"><a href="<?php
echo home_url('/');
开发者ID:Recongt,项目名称:www-ecommerce-,代码行数:30,代码来源:header.php
示例6: nxt_nav_menu
</span>
</div><!-- /#logo -->
<div id="navigation" class="fr">
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
nxt_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav fl', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="main-nav" class="nav fl">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output("name=Woo Menu 1");
}
} else {
?>
<?php
if (is_page()) {
$highlight = "page_item";
} else {
$highlight = "page_item current_page_item";
}
?>
<li class="<?php
echo $highlight;
?>
"><a href="<?php
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:header.php
示例7: wp_nav_menu
?>
</span>
</div><!-- /#logo -->
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
wp_nav_menu(array('depth' => 4, 'sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'nav', 'menu_class' => 'fr', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="nav" class="fr">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output('depth=4');
}
} else {
?>
<?php
if (is_page() || is_archive() || is_single() || is_tag()) {
$highlight = "page_item";
} else {
$highlight = "page_item current_page_item";
}
?>
<li class="<?php
echo $highlight;
?>
home_link"><a href="<?php
开发者ID:aozora,项目名称:arashi,代码行数:31,代码来源:header.php
示例8: woo_custom_navigation_output
include TEMPLATEPATH . '/includes/page-nav.php';
}
?>
<div id="cat-nav">
<div class="col-full">
<ul id="secnav" class="fl">
<?php
if (get_option('woo_custom_nav_menu') == 'true' && function_exists('woo_custom_navigation_output')) {
if (get_option('woo_menu_desc') == "true") {
$desc = 1;
}
woo_custom_navigation_output("name=Woo Menu 2&desc=" . $desc);
} else {
?>
<?php
foreach (get_categories('hide_empty=0&exclude=' . get_option('woo_nav_exclude')) as $category) {
if ($category->category_parent == '0') {
?>
<li>
<a href="<?php
echo get_category_link($category->cat_ID);
?>
"><?php
echo $category->cat_name;
if ($GLOBALS[desc]) {
开发者ID:juslee,项目名称:e27,代码行数:31,代码来源:header.php
示例9: woo_nav
function woo_nav()
{
global $woo_options;
woo_nav_before();
?>
<div id="navigation" class="col-md-9 col-sm-9">
<?php
if (function_exists('has_nav_menu') && has_nav_menu('primary-menu')) {
?>
<ul style="float:left; z-index:10000;" class="nav">
<?php
global $woocommerce;
$shop_page_url = get_permalink(woocommerce_get_page_id('shop'));
?>
<li class="menu-item-cat menu-item-type-post_type menu-item-object-page"><a href="<?php
echo $shop_page_url;
?>
">Shop</a><ul class="menu-cat-woo hidden-xs">
<div class="ctitle">
<h4>Categories</h4>
</div>
<?php
$taxonomy = 'product_cat';
$orderby = 'name';
$show_count = 0;
// 1 for yes, 0 for no
$pad_counts = 0;
// 1 for yes, 0 for no
$hierarchical = 1;
// 1 for yes, 0 for no
$title = '';
$empty = 0;
$args = array('taxonomy' => $taxonomy, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty);
$all_categories = get_categories($args);
//print_r($all_categories);
foreach ($all_categories as $cat) {
//print_r($cat);
if ($cat->category_parent == 0) {
$category_id = $cat->term_id;
echo '<li><a href="' . get_term_link($cat->slug, 'product_cat') . '">' . $cat->name . '</a></li>';
$args2 = array('taxonomy' => $taxonomy, 'child_of' => 0, 'parent' => $category_id, 'orderby' => $orderby, 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'title_li' => $title, 'hide_empty' => $empty);
$sub_cats = get_categories($args2);
if ($sub_cats) {
foreach ($sub_cats as $sub_category) {
echo $sub_category->name;
}
}
}
}
?>
</ul></li>
</ul>
<?php
wp_nav_menu(array('sort_column' => 'menu_order', 'container' => 'ul', 'menu_id' => 'main-nav', 'menu_class' => 'nav', 'theme_location' => 'primary-menu'));
} else {
?>
<ul id="main-nav" class="nav fl">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output('name=Woo Menu 1');
}
} else {
?>
<?php
if (is_page()) {
$highlight = 'page_item';
} else {
$highlight = 'page_item current_page_item';
}
?>
<li class="<?php
echo esc_attr($highlight);
?>
"><a href="<?php
echo esc_url(home_url('/'));
?>
"><?php
_e('Home', 'woothemes');
?>
</a></li>
<?php
}
?>
</ul>
<?php
}
?>
<form role="search" method="get" id="w-searchform" action="<?php
//.........这里部分代码省略.........
开发者ID:juandanceswild,项目名称:aomp-backup,代码行数:101,代码来源:theme-actions.php
示例10: tc_logo_title_display
/**
* The template for displaying the logo (text or img)
*
*
* @package Customizr
* @since Customizr 3.0
*/
function tc_logo_title_display()
{
//declare useful vars
$logo_src = apply_filters('tc_logo_src', esc_url(tc__f('__get_option', 'tc_logo_upload')));
$logo_resize = esc_attr(tc__f('__get_option', 'tc_logo_resize'));
$accepted_formats = array('jpg', 'jpeg', 'png', 'gif');
$filetype = wp_check_filetype($logo_src);
$logo_class = apply_filters('tc_logo_class', 'brand span3');
?>
<?php
if (!empty($logo_src) && in_array($filetype['ext'], $accepted_formats)) {
?>
<?php
//filter args
$filter_args = array('logo_src' => $logo_src, 'logo_resize' => $logo_resize, 'logo_class' => $logo_class);
ob_start();
$width = '';
$height = '';
//gets height and width from image, we check if getimagesize can be used first with the error control operator
if (@getimagesize($logo_src)) {
list($width, $height) = getimagesize($logo_src);
}
?>
<div class="<?php
echo $logo_class;
?>
">
<?php
do_action('__before_logo');
printf('<a class="site-logo" href="%1$s" title="%2$s | %3$s"><img src="%4$s" alt="%5$s" width="%6$s" height="%7$s" %8$s /></a>', apply_filters('tc_logo_link_url', esc_url(home_url('/'))), apply_filters('tc_site_name_text', __(esc_attr(get_bloginfo('name')))), apply_filters('tc_tagline_text', __(esc_attr(get_bloginfo('description')))), $logo_src, __('Back Home', 'customizr'), $width, $height, 1 == $logo_resize ? sprintf('style="max-width:%1$spx;max-height:%2$spx"', apply_filters('__max_logo_width', 250), apply_filters('__max_logo_height', 100)) : '');
do_action('__after_logo');
?>
</div> <!-- brand span3 -->
<?php
$html = ob_get_contents();
if ($html) {
ob_end_clean();
}
echo apply_filters('tc_logo_img_display', $html, $filter_args);
?>
<?php
} else {
?>
<?php
ob_start();
?>
<div class="<?php
echo $logo_class;
?>
pull-left">
<?php
do_action('__before_logo');
printf('<%1$s><a class="site-title" href="%2$s" title="%3$s | %4$s">%3$s</a></%1$s>', apply_filters('tc_site_title_tag', 'h1'), apply_filters('tc_logo_link_url', esc_url(home_url('/'))), apply_filters('tc_site_name_text ', __(esc_attr(get_bloginfo('name')))), apply_filters('tc_tagline_text ', __(esc_attr(get_bloginfo('description')))));
do_action('__after_logo');
?>
</div> <!-- brand span3 pull-left -->
<?php
$html = ob_get_contents();
if ($html) {
ob_end_clean();
}
echo apply_filters('tc_logo_text_display', $html, $logo_class);
?>
<?php
}
?>
<div class="nav1">
<ul id="main-nav" class="nav fl">
<?php
if (get_option('woo_custom_nav_menu') == 'true') {
if (function_exists('woo_custom_navigation_output')) {
woo_custom_navigation_output("name=Woo Menu 1");
}
} else {
?>
//.........这里部分代码省略.........
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:101,代码来源:class-header-header_main.php
注:本文中的woo_custom_navigation_output函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论