插件开发文档

💡 云策文档标注

概述

管理菜单是WordPress后台显示的界面,用于为插件添加选项页面。本文档介绍如何创建和管理顶级菜单与子菜单。

关键要点

  • 管理菜单包括顶级菜单和子菜单,顶级菜单显示在WordPress后台左侧。
  • 建议插件开发者根据需求选择添加顶级菜单或子菜单,单选项页面推荐作为子菜单添加到现有顶级菜单(如Settings或Tools)。
  • 导航菜单相关信息请参考Theme Developer Handbook的Navigation Menus章节。

📄 原文内容

Administration Menus are the interfaces displayed in WordPress Administration. They allow you to add option pages for your plugin.

For information on managing Navigation Menus, see the Navigation Menus chapter of the Theme Developer Handbook.

Top-Level Menus and Sub-Menus

The Top-level menus are rendered along the left side of the WordPress Administration. Each menu may contain a set of Sub-menus.

When deciding between Top-level menus and Sub-menus think carefully about the needs of your plugin as well as the needs of your end users.

We recommend developers with a single option page to add it as Sub-menu to one of the existing Top-level menus; such as Settings or Tools.