我想要一个array
作为新插件的一部分,从我新创建的菜单中删除,但结果是非常棘手的。
为什么我会得到布尔值false
为了一切(object
, array
, items
) 除了wp_nav_menu()
?
<?php
add_action( \'init\', \'register_omaha_menu\' );
function register_omaha_menu() {
register_nav_menu( \'omahamenu\', __( \'Omaha Menu\' ) );
}
add_action( \'wp_footer\', \'get_link_to_pages\' );
function get_link_to_pages() {
wp_nav_menu( array( \'menu\' => \'omahamenu\' ) ); // This is working. Output: Omaha Menu
$menuooo = wp_get_nav_menu_items( \'Omaha Menu\' ); // Not working. Why? Output: /srv/www/.../web/app/plugins/omaha/omaha.php:--:boolean false
var_dump( $menuooo ); // Not working. Why? Output: /srv/www/.../web/app/plugins/omaha/omaha.php:--:boolean false
var_dump( wp_get_nav_menu_object( \'omahamenu\' ) ); // Not working. Why? Output: /srv/www/.../web/app/plugins/omaha/omaha.php:--:boolean false
var_dump( get_term_by( \'omahamenu\', NULL, \'nav_menu\' ) ); // Not working. Why? Output: /srv/www/.../web/app/plugins/omaha/omaha.php:--:boolean false
}
提前谢谢你。