Function Reference/add options page

本文将指导您如何使用PHP创建一个自定义的选项页面,用于添加子菜单到WordPress的设置菜单中,包括参数说明、功能调用及返回值解释。

Description

Add sub menu page to the Settings menu.

Usage

 <?php
add_options_page
$page_title$menu_title$capability$menu_slug$function);
?>

Parameters

  • $page_title

  • (string) (required) The text to be displayed in the title tags of the page when the menu is selected

    • Default: None

  • $menu_title

  • (string) (required) The text to be used for the menu

    • Default: None

  • $capability

  • (string) (required) The capability required for this menu to be displayed to the user.

    • Default: None

  • $menu_slug

  • (string) (required) The slug name to refer to this menu by (should be unique for this menu).

    • Default: None

  • $function

  • (callback) (optional) The function to be called to output the content for this page.

    • Default: ' '

Return Values

转载于:https://my.oschina.net/ajian2014/blog/309184

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值