插件开发文档

💡 云策文档标注

概述

WordPress 提供了两个核心 API 来简化管理界面的构建,确保安全性和与 WordPress 管理设计的一致性。Settings API 专注于为开发者提供创建表单和管理表单数据的方法,而 Options API 专注于使用简单的键/值系统管理数据。

关键要点

  • Settings API 用于创建表单和管理表单数据,便于构建自定义设置页面。
  • Options API 用于通过键/值系统管理数据,提供数据存储和检索功能。
  • 这两个 API 共同确保管理界面的易用性、安全性和设计一致性。

📄 原文内容

WordPress provides two core APIs to make the administrative interfaces easy to build, secure, and consistent with the design of WordPress Administration.

The Settings API focuses on providing a way for developers to create forms and manage form data.

The Options API focuses on managing data using a simple key/value system.

Quick Reference

See the complete example of building a custom settings page using the Settings API and Options API.