当前位置: 首页>>代码示例>>PHP>>正文


PHP Walker_Nav_Menu::start_lvl方法代码示例

本文整理汇总了PHP中Walker_Nav_Menu::start_lvl方法的典型用法代码示例。如果您正苦于以下问题:PHP Walker_Nav_Menu::start_lvl方法的具体用法?PHP Walker_Nav_Menu::start_lvl怎么用?PHP Walker_Nav_Menu::start_lvl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Walker_Nav_Menu的用法示例。


在下文中一共展示了Walker_Nav_Menu::start_lvl方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: start_lvl

 public function start_lvl(&$output, $depth = 0, $args = array())
 {
     $html = '';
     parent::start_lvl($html, $depth, $args);
     $html = str_replace('sub-menu', 'dropdown-menu', $html);
     $output .= $html;
 }
开发者ID:felixarntz,项目名称:wp-starter-theme,代码行数:7,代码来源:BootstrapNavMenu.php

示例2: array

 function start_lvl(&$output, $depth = 0, $args = array())
 {
     if (0 == $depth) {
         return;
     }
     parent::start_lvl($output, $depth, $args);
 }
开发者ID:standrewsdigital,项目名称:wp-peanut-butter-2015,代码行数:7,代码来源:navigation.php

示例3: start_lvl

 /**
  * Overload Walker_Nav_Menu::start_lvl to add the 'dropdown-menu' class
  * so sub-menu items work with Bootstrap out of the box.
  */
 public function start_lvl(&$output, $depth = 0, $args = [])
 {
     parent::start_lvl($output, $depth, $args);
     $args->link_before = '';
     $args->link_after = '';
     $output = preg_replace('/sub-menu/', 'sub-menu dropdown-menu', $output);
 }
开发者ID:skemantix,项目名称:soil,代码行数:11,代码来源:nav-walker.php

示例4:

 function start_lvl(&$output, $depth, $args)
 {
     if (!$args->dropdown) {
         parent::start_lvl($output, $depth, $args);
     } else {
         $indent = str_repeat("\t", $depth);
     }
     // don't output children opening tag (`<ul>`)
 }
开发者ID:johnmanlove,项目名称:Bridgeland,代码行数:9,代码来源:advanced-menu-widget.php

示例5: start_lvl

 public function start_lvl(&$output, $depth = 0, $args = array())
 {
     $item_output = '';
     parent::start_lvl($item_output, $depth, $args);
     if ($this->in_mega_menu) {
         // mega-menu item level greater than 2 - start a default WordPress start_lvl
         if ($depth >= 1) {
             $this->last_lvl .= $item_output;
         }
         return;
     }
     $output .= $item_output;
 }
开发者ID:silverbux,项目名称:smartmag-magazine-wordpress,代码行数:13,代码来源:menu-walker.php

示例6: start_lvl

 /**
  * (non-PHPdoc)
  * @see Walker_Nav_Menu::start_lvl()
  * @param string $output Passed by reference. Used to append additional content.
  * @param int $depth Depth of page. Used for padding.
  */
 public function start_lvl(&$output, $depth)
 {
     parent::start_lvl(&$output, $depth);
     $this->remove_unwanted_chars(&$output);
 }
开发者ID:setola,项目名称:wordpress-theme-utils-classes,代码行数:11,代码来源:RemoveSpacesWalkerNavMenu.class.php

示例7: array

 function start_lvl(&$output, $depth = 0, $args = array())
 {
     parent::start_lvl($output, $depth, $args);
 }
开发者ID:WordPressKC,项目名称:wpkc-theme,代码行数:4,代码来源:functions.php

示例8: array

 function start_lvl(&$output, $depth = 0, $args = array())
 {
     parent::start_lvl($output, $depth, $args);
     $this->level++;
     $this->count[$this->level] = 0;
 }
开发者ID:RRZE-Webteam,项目名称:FAU-Einrichtungen,代码行数:6,代码来源:menu.php

示例9: start_lvl

 /**
  * @see Walker::start_lvl()
  * @since 3.0.0
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param int $depth Depth of page. Used for padding.
  */
 public function start_lvl(&$output, $depth = 0, $args = array())
 {
     parent::start_lvl($output, $depth, $args);
     $pos = strrpos($output, '">', -1);
     $output = substr_replace($output, ' dropdown-menu" role="menu">', $pos);
 }
开发者ID:sinaru,项目名称:Educa,代码行数:13,代码来源:wp_bootstrap_navwalker.php

示例10: array

 /**
  * @see Walker::start_lvl()
  * @since 3.0.0
  *
  * @param string $output Passed by reference. Used to append additional content.
  * @param int $depth Depth of page. Used for padding.
  */
 function start_lvl(&$output, $depth = 0, $args = array())
 {
     if ($this->in_current_menu && $depth > 0) {
         parent::start_lvl($output, $depth, $args);
     }
 }
开发者ID:jackrabbit-design,项目名称:jrd-londoncompany,代码行数:13,代码来源:class-walker-tertiary-menu.php

示例11: array

 function start_lvl(&$output, $depth = 0, $args = array())
 {
     $output .= '<span class="subnav-close"></span>';
     parent::start_lvl($output, $depth, $args);
 }
开发者ID:yemingyuen,项目名称:mingsg,代码行数:5,代码来源:helium-nav-menu.php


注:本文中的Walker_Nav_Menu::start_lvl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。