
跨版本PHP代码转换终极教程
apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id )
page_menu_link_attributes: 这是一个过滤钩,允许你为页面的导航菜单中使用的锚定标签添加自定义属性。它通常用于为链接添加自定义的类名或ID,这可以用于样式设计的目的。
这个过滤器在wp-includes/class-walker-page.php中有记录。
$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id );