php 移动菜单扩展沃克 - PHP

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 移动菜单扩展沃克 - PHP相关的知识,希望对你有一定的参考价值。

class FDT_Arrow_Walker_List_Pages extends Walker_Page {
  function start_lvl( &$output, $depth=0, $args = array() ) {
    $indent = str_repeat("\t", $depth);
    $output .='<span class="ExpandMenuBtn"> > </span>';
    $output .= "\n$indent<ul class=\"SubMenu\">\n";
  }
}

class FDT_Arrow_Walker_Nav_Menu extends Walker_Nav_Menu {
  function start_lvl( &$output, $depth=0, $args = array() ) {
    $indent = str_repeat("\t", $depth);
    $output .='<span class="ExpandMenuBtn"> > </span>';
    $output .= "\n$indent<ul class=\"SubMenu\">\n";
  }
}

// ************ Register Menu ****************

function Walker_Nav( $theme_location, $class ){
  if( has_nav_menu( $theme_location ) ) {
    $menu = wp_nav_menu( array(
    'container' => false,
    'theme_location'  => $theme_location,
    'menu_class'  => $class . '  nav  cf',
    'echo'  => 0,
    'walker'=> new FDT_Arrow_Walker_Nav_Menu()
    ) );
  }
  echo $menu;
}

//*********add to Nav Registration
'mobile-menu' => 'Mobile Menu',           // Mobile Menu

// ************ Output Menu ****************
<?php Walker_Nav( 'mobile-menu', 'MobileMenu' ); // Adjust using Menus in WordPress Admin ?>

以上是关于php 移动菜单扩展沃克 - PHP的主要内容,如果未能解决你的问题,请参考以下文章

PHP 菜单沃克在Wordpress主题中的顶栏(Zurb基金会)

php 沃克评论

PHP Drupal - Fieldset菜单总是扩展,菜单标题字段的最大长度不同

php 从移动导航中删除单词菜单

windows下网站怎么开启memcache

在折叠移动显示所有引导子菜单为打开