wp_nav_menu_container_allowedtags

过滤钩子


apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' )
参数
  • (string[])
    $tags
    The acceptable HTML tags for use as menu containers.
    Default is array containing ‘div’ and ‘nav’.
    Required:
定义位置
  • wp-includes/nav-menu-template.php
    , line 184
引入
3.0.0
弃用

Filters the list of HTML tags that are valid for use as menu containers.

$allowed_tags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' ) );