menu_page_url()获取后台管理菜单网址

目录

描述

Get the url to access a particular menu page based on the slug it was registered with.

If the slug hasn't been registered properly no url will be returned

menu_page_url() 描述

用法

<?php menu_page_url$menu_slug$echo ); ?>

menu_page_url() 用法

参数

$menu_slug

(string) (必填) The slug name to refer to this menu by (should be unique for this menu)

默认值: None

$echo

(boolean) (可选) Whether or not to echo the url - default is true

默认值: 1

menu_page_url() 参数

返回值

(string

the url

menu_page_url() 返回值

历史

添加于 版本: 3.0

menu_page_url() 历史

源文件

menu_page_url() 函数的代码位于 wp-admin/includes/plugin.php

menu_page_url() 源文件

相关