wpseek.com
WordPress开发者和主题制作者的搜索引擎



walker_nav_menu_start_el › WordPress过滤钩子

Since3.0.0
已弃用n/a
apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args )
参数: (4)
  • (string) $item_output The menu item's starting HTML output.
    Required: Yes
  • (WP_Post) $menu_item Menu item data object.
    Required: Yes
  • (int) $depth Depth of menu item. Used for padding.
    Required: Yes
  • (stdClass) $args An object of wp_nav_menu() arguments.
    Required: Yes
定义在:
文档:

Filters a menu item's starting output.

The menu item's starting output only includes $args->before, the opening <a>, the menu item's title, the closing </a>, and $args->after. Currently, there is no filter for modifying the opening and closing <li> for a menu item.





源码

$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $menu_item, $depth, $args );