WordPress教程:输出Bootstrap结构的导航栏菜单

前端之家收集整理的这篇文章主要介绍了WordPress教程:输出Bootstrap结构的导航栏菜单前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

站长朋友们在使用的过程中,当做成自适应网站,引入Bootstrap框架的时候,希望可以输出Bootstrap结构的导航栏菜单,这样就够利用Bootstrap提供的样式进行菜单的显示。这篇WordPress教程里我们就向大家介绍一下如何在wordpress网站中输出Bootstrap结构的菜单。

我们先来看一下Bootstrap导航栏结构HTML代码:

Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-4">Crayon-i "> Crayon-r ">
Crayon-line" id="Crayon-5c891cff2528d566379863-5">Crayon-i "> Crayon-r ">
Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-6">Crayon-i "> Crayon-r ">
    Crayon-e ">classCrayon-o">=Crayon-s ">"nav navbar-nav"
Crayon-line" id="Crayon-5c891cff2528d566379863-7">Crayon-i "> Crayon-r ">
  • Crayon-e ">classCrayon-o">=Crayon-s ">"active"Crayon-r ">Crayon-r ">
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-8">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line" id="Crayon-5c891cff2528d566379863-9">Crayon-i "> Crayon-r ">
  • Crayon-e ">classCrayon-o">=Crayon-s ">"dropdown"
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-10">Crayon-i "> Crayon-r ">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-14">Crayon-i "> Crayon-r ">
      Crayon-e ">classCrayon-o">=Crayon-s ">"dropdown-menu"
    Crayon-line" id="Crayon-5c891cff2528d566379863-15">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-16">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line" id="Crayon-5c891cff2528d566379863-17">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-18">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line" id="Crayon-5c891cff2528d566379863-19">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-20">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line" id="Crayon-5c891cff2528d566379863-21">Crayon-i "> Crayon-r ">
  • Crayon-r ">Crayon-r ">
  • Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-22">Crayon-i "> Crayon-r ">
    Crayon-line" id="Crayon-5c891cff2528d566379863-23">Crayon-i "> Crayon-r ">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-24">Crayon-i "> Crayon-r ">
    Crayon-line" id="Crayon-5c891cff2528d566379863-25">Crayon-i "> Crayon-r ">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2528d566379863-26">Crayon-r ">

    wordpress一般采用wp_nav_menu函数输出导航栏菜单,而通过该函数输出菜单是得不到上述的html结构的。可喜的是wp_nav_menu函数支持自定义输出html结构。

    wordpress中wp_nav_menu函数的参数如下所示:

    Crayon-5c891cff25298031844818" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
    Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">
    Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-mixed-highlight" title="Contains Mixed Languages">
    Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
    Crayon-button-icon">
    Crayon-button Crayon-plain-button" title="Toggle Plain Code">
    Crayon-button-icon">
    Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
    Crayon-button-icon">
    Crayon-button Crayon-expand-button" title="Expand Code">
    Crayon-button-icon">
    Crayon-button Crayon-copy-button" title="Copy">
    Crayon-button-icon">
    Crayon-button Crayon-popup-button" title="Open Code In New Window">
    Crayon-button-icon">
    Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
    Crayon-plain-wrap">
    Crayon-main" style="">Crayon-table">Crayon-row">
    Crayon-nums " data-settings="show">
    Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
    Crayon-num" data-line="Crayon-5c891cff25298031844818-1">1
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-2">2
    Crayon-num" data-line="Crayon-5c891cff25298031844818-3">3
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-4">4
    Crayon-num" data-line="Crayon-5c891cff25298031844818-5">5
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-6">6
    Crayon-num" data-line="Crayon-5c891cff25298031844818-7">7
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-8">8
    Crayon-num" data-line="Crayon-5c891cff25298031844818-9">9
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-10">10
    Crayon-num" data-line="Crayon-5c891cff25298031844818-11">11
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-12">12
    Crayon-num" data-line="Crayon-5c891cff25298031844818-13">13
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-14">14
    Crayon-num" data-line="Crayon-5c891cff25298031844818-15">15
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-16">16
    Crayon-num" data-line="Crayon-5c891cff25298031844818-17">17
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-18">18
    Crayon-num" data-line="Crayon-5c891cff25298031844818-19">19
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff25298031844818-20">20
    Crayon-num" data-line="Crayon-5c891cff25298031844818-21">21
    Crayon-code">
    Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
    Crayon-line" id="Crayon-5c891cff25298031844818-1">Crayon-ta">PHPCrayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-2">Crayon-h"> Crayon-v">$defaultsCrayon-h"> Crayon-o">=Crayon-h"> Crayon-t">arrayCrayon-sy">(Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-3">Crayon-h"> Crayon-s">'theme_location'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-4">Crayon-h"> Crayon-s">'menu'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-5">Crayon-h"> Crayon-s">'container'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'div'Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-6">Crayon-h"> Crayon-s">'container_class'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-7">Crayon-h"> Crayon-s">'container_id'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-8">Crayon-h"> Crayon-s">'menu_class'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">'menu'Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-9">Crayon-h"> Crayon-s">'menu_id'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-10">Crayon-h"> Crayon-s">'echo'Crayon-h">Crayon-o">=Crayon-h"> Crayon-t">trueCrayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-11">Crayon-h"> Crayon-s">'fallback_cb'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'wp_page_menu'Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-12">Crayon-h"> Crayon-s">'before'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-13">Crayon-h"> Crayon-s">'after'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-14">Crayon-h"> Crayon-s">'link_before'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-15">Crayon-h"> Crayon-s">'link_after'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-16">Crayon-h"> Crayon-s">'items_wrap'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">'
      'Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-17">Crayon-h"> Crayon-s">'depth'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-cn">0Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-18">Crayon-h"> Crayon-s">'walker'Crayon-h">Crayon-o">=Crayon-h"> Crayon-s">''Crayon-h">
    Crayon-line" id="Crayon-5c891cff25298031844818-19">Crayon-h"> Crayon-sy">)Crayon-sy">;Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff25298031844818-20">Crayon-h"> Crayon-e">wp_nav_menuCrayon-sy">(Crayon-h"> Crayon-v">$defaultsCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff25298031844818-21">

    我们要修改的是walker参数。

    1. 切换到主题目录,打开functions.PHP文件,加入以下代码

    Crayon-5c891cff2529a927894366" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
    Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">functions.PHP
    Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
    Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
    Crayon-button-icon">
    Crayon-button Crayon-plain-button" title="Toggle Plain Code">
    Crayon-button-icon">
    Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
    Crayon-button-icon">
    Crayon-button Crayon-expand-button" title="Expand Code">
    Crayon-button-icon">
    Crayon-button Crayon-copy-button" title="Copy">
    Crayon-button-icon">
    Crayon-button Crayon-popup-button" title="Open Code In New Window">
    Crayon-button-icon">
    Crayon-language">PHP
    Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
    Crayon-plain-wrap">
    'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-56">Crayon-h"> Crayon-sy">}Crayon-h"> Crayon-st">elseCrayon-h"> Crayon-sy">{
    Crayon-line" id="Crayon-5c891cff2529a927894366-57">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-58">Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-59">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-60">Crayon-h"> Crayon-v">$classesCrayon-h"> Crayon-o">=Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">classesCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-t">arrayCrayon-sy">(Crayon-sy">)Crayon-h"> Crayon-o">:Crayon-h"> Crayon-sy">(Crayon-t">arrayCrayon-sy">)Crayon-h"> Crayon-v">$itemCrayon-i">classesCrayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-61">Crayon-h"> Crayon-v">$classesCrayon-sy">[Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'menu-item-'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$itemCrayon-cn">IDCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-62">
    Crayon-line" id="Crayon-5c891cff2529a927894366-63">Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-o">=Crayon-h"> Crayon-e">joinCrayon-sy">(Crayon-h"> Crayon-s">' 'Crayon-sy">,Crayon-h"> Crayon-e">apply_filtersCrayon-sy">(Crayon-h"> Crayon-s">'nav_menu_css_class'Crayon-sy">,Crayon-h"> Crayon-e">array_filterCrayon-sy">(Crayon-h"> Crayon-v">$classesCrayon-h"> Crayon-sy">)Crayon-sy">,Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-64">
    Crayon-line" id="Crayon-5c891cff2529a927894366-65">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$argsCrayon-i">has_childrenCrayon-h"> Crayon-sy">)
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-66">Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' dropdown'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-67">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-68">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-e">in_arrayCrayon-sy">(Crayon-h"> Crayon-s">'current-menu-item'Crayon-sy">,Crayon-h"> Crayon-v">$classesCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-69">Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' active'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-70">
    Crayon-line" id="Crayon-5c891cff2529a927894366-71">Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-sy">?Crayon-h"> Crayon-s">' class="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-e">esc_attrCrayon-sy">(Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-72">
    Crayon-line" id="Crayon-5c891cff2529a927894366-73">Crayon-h"> Crayon-v">$idCrayon-h"> Crayon-o">=Crayon-h"> Crayon-e">apply_filtersCrayon-sy">(Crayon-h"> Crayon-s">'nav_menu_item_id'Crayon-sy">,Crayon-h"> Crayon-s">'menu-item-'Crayon-sy">.Crayon-h"> Crayon-v">$itemCrayon-cn">IDCrayon-sy">,Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-74">Crayon-h"> Crayon-v">$idCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$idCrayon-h"> Crayon-sy">?Crayon-h"> Crayon-s">' id="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-e">esc_attrCrayon-sy">(Crayon-h"> Crayon-v">$idCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-75">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-76">Crayon-h"> Crayon-v">$outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-v">$indentCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$idCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$class_namesCrayon-h"> Crayon-sy">.'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-77">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-78">Crayon-h"> Crayon-v">$attsCrayon-h"> Crayon-o">=Crayon-h"> Crayon-t">arrayCrayon-sy">(Crayon-sy">)Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-79">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'title'Crayon-sy">]Crayon-h">Crayon-o">=Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">titleCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-v">$itemCrayon-i">titleCrayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-80">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'target'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">targetCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-v">$itemCrayon-i">targetCrayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-81">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'rel'Crayon-sy">]Crayon-h">Crayon-o">=Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">xfnCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-v">$itemCrayon-i">xfnCrayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-82">
    Crayon-line" id="Crayon-5c891cff2529a927894366-83">Crayon-h"> Crayon-c">// If item has_children add atts to a.
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-84">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$argsCrayon-i">has_childrenCrayon-h"> Crayon-o">&&Crayon-h"> Crayon-v">$depthCrayon-h"> Crayon-o">===Crayon-h"> Crayon-cn">0Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line" id="Crayon-5c891cff2529a927894366-85">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'href'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'#'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-86">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'data-toggle'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'dropdown'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-87">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'class'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'dropdown-toggle'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-88">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'aria-haspopup'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'true'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-89">Crayon-h"> Crayon-sy">}Crayon-h"> Crayon-st">elseCrayon-h"> Crayon-sy">{
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-90">Crayon-h"> Crayon-v">$attsCrayon-sy">[Crayon-s">'href'Crayon-sy">]Crayon-h"> Crayon-o">=Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">urlCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-v">$itemCrayon-i">urlCrayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-91">Crayon-h"> Crayon-sy">}
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-92">
    Crayon-line" id="Crayon-5c891cff2529a927894366-93">Crayon-h"> Crayon-v">$attsCrayon-h"> Crayon-o">=Crayon-h"> Crayon-e">apply_filtersCrayon-sy">(Crayon-h"> Crayon-s">'nav_menu_link_attributes'Crayon-sy">,Crayon-h"> Crayon-v">$attsCrayon-sy">,Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-94">
    Crayon-line" id="Crayon-5c891cff2529a927894366-95">Crayon-h"> Crayon-v">$attributesCrayon-h"> Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-96">Crayon-h"> Crayon-st">foreachCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$attsCrayon-h"> Crayon-st">asCrayon-h"> Crayon-v">$attrCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line" id="Crayon-5c891cff2529a927894366-97">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-98">Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-o">=Crayon-h"> Crayon-sy">(Crayon-h"> Crayon-s">'href'Crayon-h"> Crayon-o">===Crayon-h"> Crayon-v">$attrCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">?Crayon-h"> Crayon-e">esc_urlCrayon-sy">(Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-o">:Crayon-h"> Crayon-e">esc_attrCrayon-sy">(Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-99">Crayon-h"> Crayon-v">$attributesCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' 'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$attrCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$valueCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-100">Crayon-h"> Crayon-sy">}
    Crayon-line" id="Crayon-5c891cff2529a927894366-101">Crayon-h"> Crayon-sy">}
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-102">
    Crayon-line" id="Crayon-5c891cff2529a927894366-103">Crayon-h"> Crayon-v">$item_outputCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$argsCrayon-i">beforeCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-104">
    Crayon-line" id="Crayon-5c891cff2529a927894366-105">Crayon-h"> Crayon-c">/*
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-106">Crayon-c"> * Glyphicons
    Crayon-line" id="Crayon-5c891cff2529a927894366-107">Crayon-c"> * ===========
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-108">Crayon-c"> * Since the the menu item is NOT a Divider or Header we check the see
    Crayon-line" id="Crayon-5c891cff2529a927894366-109">Crayon-c"> * if there is a value in the attr_title property. If the attr_title
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-110">Crayon-c"> * property is NOT null we apply it as the class name for the glyphicon.
    Crayon-line" id="Crayon-5c891cff2529a927894366-111">Crayon-c"> */
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-112">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$itemCrayon-i">attr_titleCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-113">Crayon-h"> Crayon-v">$item_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' '
    '
    'Crayon-h"> Crayon-o">:Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-119">Crayon-h"> Crayon-v">$item_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-v">$argsCrayon-i">afterCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-120">
    Crayon-line" id="Crayon-5c891cff2529a927894366-121">Crayon-h"> Crayon-v">$outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-e">apply_filtersCrayon-sy">(Crayon-h"> Crayon-s">'walker_nav_menu_start_el'Crayon-sy">,Crayon-h"> Crayon-v">$item_outputCrayon-sy">,Crayon-h"> Crayon-v">$depthCrayon-sy">,Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-122">Crayon-h"> Crayon-sy">}
    Crayon-line" id="Crayon-5c891cff2529a927894366-123">Crayon-h"> Crayon-sy">}
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-124">
    Crayon-line" id="Crayon-5c891cff2529a927894366-125">Crayon-h"> Crayon-c">/**
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-126">Crayon-c"> * Traverse elements to create list from elements.
    Crayon-line" id="Crayon-5c891cff2529a927894366-127">Crayon-c"> *
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-128">Crayon-c"> * Display one element if the element doesn't have any children otherwise,
    Crayon-line" id="Crayon-5c891cff2529a927894366-129">Crayon-c"> * display the element and its children. Will only traverse up to the max
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-130">Crayon-c"> * depth and no ignore elements under that depth.
    Crayon-line" id="Crayon-5c891cff2529a927894366-131">Crayon-c"> *
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-132">Crayon-c"> * This method shouldn't be called directly,use the walk() method instead.
    Crayon-line" id="Crayon-5c891cff2529a927894366-133">Crayon-c"> *
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-134">Crayon-c"> * @see Walker::start_el()
    Crayon-line" id="Crayon-5c891cff2529a927894366-135">Crayon-c"> * @since 2.5.0
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-136">Crayon-c"> *
    Crayon-line" id="Crayon-5c891cff2529a927894366-137">Crayon-c"> * @param object $element Data object
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-138">Crayon-c"> * @param array $children_elements List of elements to continue traversing.
    Crayon-line" id="Crayon-5c891cff2529a927894366-139">Crayon-c"> * @param int $max_depth Max depth to traverse.
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-140">Crayon-c"> * @param int $depth Depth of current element.
    Crayon-line" id="Crayon-5c891cff2529a927894366-141">Crayon-c"> * @param array $args
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-142">Crayon-c"> * @param string $output Passed by reference. Used to append additional content.
    Crayon-line" id="Crayon-5c891cff2529a927894366-143">Crayon-c"> * @return null Null on failure with no changes to parameters.
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-144">Crayon-c"> */
    Crayon-line" id="Crayon-5c891cff2529a927894366-145">Crayon-h"> Crayon-m">publicCrayon-h"> Crayon-t">functionCrayon-h"> Crayon-e">display_elementCrayon-sy">(Crayon-h"> Crayon-v">$elementCrayon-sy">,Crayon-h"> Crayon-o">&Crayon-v">$children_elementsCrayon-sy">,Crayon-h"> Crayon-v">$max_depthCrayon-sy">,Crayon-h"> Crayon-v">$argsCrayon-sy">,Crayon-h"> Crayon-o">&Crayon-v">$outputCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-146">Crayon-h">Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-o">!Crayon-h"> Crayon-v">$elementCrayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-147">Crayon-h">Crayon-k ">returnCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-148">
    Crayon-line" id="Crayon-5c891cff2529a927894366-149">Crayon-h">Crayon-v">$id_fieldCrayon-h"> Crayon-o">=Crayon-h"> Crayon-v">$thisCrayon-i">db_fieldsCrayon-sy">[Crayon-s">'id'Crayon-sy">]Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-150">
    Crayon-line" id="Crayon-5c891cff2529a927894366-151">Crayon-h">Crayon-c">// Display this element.
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-152">Crayon-h">Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-e">is_objectCrayon-sy">(Crayon-h"> Crayon-v">$argsCrayon-sy">[Crayon-cn">0Crayon-sy">]Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-153">Crayon-h"> Crayon-v">$argsCrayon-sy">[Crayon-cn">0Crayon-sy">]Crayon-i">has_childrenCrayon-h"> Crayon-o">=Crayon-h"> Crayon-o">!Crayon-h"> Crayon-k ">emptyCrayon-sy">(Crayon-h"> Crayon-v">$children_elementsCrayon-sy">[Crayon-h"> Crayon-v">$elementCrayon-v">$id_fieldCrayon-h"> Crayon-sy">]Crayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-154">
    Crayon-line" id="Crayon-5c891cff2529a927894366-155">Crayon-h">Crayon-r">parentCrayon-o">::Crayon-e">display_elementCrayon-sy">(Crayon-h"> Crayon-v">$elementCrayon-sy">,Crayon-h"> Crayon-v">$children_elementsCrayon-sy">,Crayon-h"> Crayon-v">$outputCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-156">Crayon-h">Crayon-sy">}
    Crayon-line" id="Crayon-5c891cff2529a927894366-157">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-158">Crayon-h"> Crayon-c">/**
    Crayon-line" id="Crayon-5c891cff2529a927894366-159">Crayon-c"> * Menu Fallback
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-160">Crayon-c"> * =============
    Crayon-line" id="Crayon-5c891cff2529a927894366-161">Crayon-c"> * If this function is assigned to the wp_nav_menu's fallback_cb variable
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-162">Crayon-c"> * and a manu has not been assigned to the theme location in the wordpress
    Crayon-line" id="Crayon-5c891cff2529a927894366-163">Crayon-c"> * menu manager the function with display nothing to a non-logged in user,
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-164">Crayon-c"> * and will add a link to the wordpress menu manager if logged in as an admin.
    Crayon-line" id="Crayon-5c891cff2529a927894366-165">Crayon-c"> *
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-166">Crayon-c"> * @param array $args passed from the wp_nav_menu function.
    Crayon-line" id="Crayon-5c891cff2529a927894366-167">Crayon-c"> *
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-168">Crayon-c"> */
    Crayon-line" id="Crayon-5c891cff2529a927894366-169">Crayon-h"> Crayon-m">publicCrayon-h"> Crayon-m">staticCrayon-h"> Crayon-t">functionCrayon-h"> Crayon-e">fallbackCrayon-sy">(Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-170">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-e">current_user_canCrayon-sy">(Crayon-h"> Crayon-s">'manage_options'Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line" id="Crayon-5c891cff2529a927894366-171">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-172">Crayon-h"> Crayon-e">extractCrayon-sy">(Crayon-h"> Crayon-v">$argsCrayon-h"> Crayon-sy">)Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-173">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-174">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-o">=Crayon-h"> Crayon-t">nullCrayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-175">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-176">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$containerCrayon-h"> Crayon-sy">)Crayon-h"> Crayon-sy">{
    Crayon-line" id="Crayon-5c891cff2529a927894366-177">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'<'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$containerCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-178">
    Crayon-line" id="Crayon-5c891cff2529a927894366-179">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$container_idCrayon-h"> Crayon-sy">)
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-180">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' id="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$container_idCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-181">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-182">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$container_classCrayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-183">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' class="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$container_classCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-184">
    Crayon-line" id="Crayon-5c891cff2529a927894366-185">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> 'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-186">Crayon-h"> Crayon-sy">}
    Crayon-line" id="Crayon-5c891cff2529a927894366-187">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-188">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-189">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-190">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$menu_idCrayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-191">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' id="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$menu_idCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-192">
    Crayon-line" id="Crayon-5c891cff2529a927894366-193">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$menu_classCrayon-h"> Crayon-sy">)
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-194">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">' class="'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$menu_classCrayon-h"> Crayon-sy">.Crayon-h"> Crayon-s">'"'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-195">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-196">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> 'Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-197">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">'
  • '
    Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-198">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">''Crayon-sy">;
    Crayon-line" id="Crayon-5c891cff2529a927894366-199">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-200">Crayon-h"> Crayon-st">ifCrayon-h"> Crayon-sy">(Crayon-h"> Crayon-v">$containerCrayon-h"> Crayon-sy">)
    Crayon-line" id="Crayon-5c891cff2529a927894366-201">Crayon-h"> Crayon-v">$fb_outputCrayon-h"> Crayon-sy">.Crayon-o">=Crayon-h"> Crayon-s">'Crayon-h"> Crayon-sy">.Crayon-h"> Crayon-v">$containerCrayon-h"> Crayon-sy">.Crayon-h"> 'Crayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-202">
    Crayon-line" id="Crayon-5c891cff2529a927894366-203">Crayon-h"> Crayon-k ">echoCrayon-h"> Crayon-v">$fb_outputCrayon-sy">;
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-204">Crayon-h"> Crayon-sy">}
    Crayon-line" id="Crayon-5c891cff2529a927894366-205">Crayon-h"> Crayon-sy">}
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529a927894366-206">Crayon-sy">}

    2. 在需要的地方(header.PHP文件中)通过如下代码输出导航栏菜单

    Crayon-5c891cff2529c774914483" class="Crayon-Syntax Crayon-theme-classic Crayon-font-monaco Crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouSEOver" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
    Crayon-toolbar" data-settings=" mouSEOver overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-title">header.PHP
    Crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">Crayon-mixed-highlight" title="Contains Mixed Languages">
    Crayon-button Crayon-nums-button" title="Toggle Line Numbers">
    Crayon-button-icon">
    Crayon-button Crayon-plain-button" title="Toggle Plain Code">
    Crayon-button-icon">
    Crayon-button Crayon-wrap-button" title="Toggle Line Wrap">
    Crayon-button-icon">
    Crayon-button Crayon-expand-button" title="Expand Code">
    Crayon-button-icon">
    Crayon-button Crayon-copy-button" title="Copy">
    Crayon-button-icon">
    Crayon-button Crayon-popup-button" title="Open Code In New Window">
    Crayon-button-icon">
    Crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
    Crayon-plain-wrap">
    Crayon-main" style="">Crayon-table">Crayon-row">
    Crayon-nums " data-settings="show">
    Crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-1">1
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-2">2
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-3">3
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-4">4
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-5">5
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-6">6
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-7">7
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-8">8
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-9">9
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-10">10
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-11">11
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-12">12
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-13">13
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-14">14
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-15">15
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-16">16
    Crayon-num" data-line="Crayon-5c891cff2529c774914483-17">17
    Crayon-num Crayon-striped-num" data-line="Crayon-5c891cff2529c774914483-18">18
    Crayon-code">
    Crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
    Crayon-line" id="Crayon-5c891cff2529c774914483-1">Crayon-o"><Crayon-e">nav Crayon-t">classCrayon-o">=Crayon-s">"navbar navbar-default"Crayon-h"> Crayon-v">roleCrayon-o">=Crayon-s">"navigation"
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-2">Crayon-h"> Crayon-o"><Crayon-e">div Crayon-t">classCrayon-o">=Crayon-s">"navbar-header"
    Crayon-line" id="Crayon-5c891cff2529c774914483-3">Crayon-h"> Crayon-o"><Crayon-i">aCrayon-h"> Crayon-t">classCrayon-o">=Crayon-s">"navbar-brand"Crayon-h"> Crayon-v">hrefCrayon-o">=Crayon-s">"#"Crayon-e">TENNFYCrayon-h"> Crayon-e">WUCrayon-o"><Crayon-o">/Crayon-e">a
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-4">Crayon-h"> Crayon-o"><Crayon-o">/Crayon-e">div
    Crayon-line" id="Crayon-5c891cff2529c774914483-5">Crayon-h"> Crayon-o"><Crayon-e">div
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-6">Crayon-h"> Crayon-ta">PHPCrayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-7">Crayon-h"> Crayon-e">wp_nav_menuCrayon-sy">(Crayon-h"> Crayon-t">arrayCrayon-sy">(Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-8">Crayon-h"> Crayon-s">'theme_location'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'cat_nav'Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-9">Crayon-h"> Crayon-s">'depth'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-cn">2Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-10">Crayon-h"> Crayon-s">'container'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-t">falseCrayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-11">Crayon-h"> Crayon-s">'menu_class'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'nav navbar-nav'Crayon-sy">,Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-12">Crayon-h"> Crayon-s">'fallback_cb'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-s">'wp_page_menu'Crayon-sy">,Crayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-13">Crayon-h"> Crayon-c">//添加或更改walker参数
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-14">Crayon-h"> Crayon-s">'walker'Crayon-h"> Crayon-o">=Crayon-h"> Crayon-r">newCrayon-h"> Crayon-e">wp_bootstrap_navwalkerCrayon-sy">(Crayon-sy">)Crayon-sy">)Crayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-15">Crayon-h"> Crayon-sy">)Crayon-sy">;Crayon-h">
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-16">Crayon-h">
    Crayon-line" id="Crayon-5c891cff2529c774914483-17">Crayon-h"> Crayon-o"><Crayon-o">/Crayon-v">div
    Crayon-line Crayon-striped-line" id="Crayon-5c891cff2529c774914483-18">Crayon-o"><Crayon-o">/Crayon-v">nav

    原文链接:https://www.f2er.com/wordpress/238430.html

    猜你在找的wordpress相关文章