WordPress 提供了两个核心 API 来简化管理界面的构建,确保安全性和与 WordPress 管理设计的一致性。Settings API 专注于为开发者提供创建表单和管理表单数据的方法,而 Options 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.
See the complete example of building a custom settings page using the Settings API and Options API.