xmlrpc_methods
云策文档标注
概述
本文档介绍了 WordPress 中的 xmlrpc_methods 过滤器,用于控制 XML-RPC 服务器暴露的方法。开发者可以通过此过滤器添加新方法或移除内置方法。
关键要点
- xmlrpc_methods 是一个过滤器,允许修改 XML-RPC 服务器的方法列表。
- 参数 $methods 是一个数组,键为方法名,用于添加或移除方法。
- 该过滤器在 wp_xmlrpc_server::__construct() 中调用,用于注册 XMLRPC 方法。
- 自 WordPress 1.5.0 版本引入。
原文内容
Filters the methods exposed by the XML-RPC server.
Description
This filter can be used to add new methods, and remove built-in methods.
Parameters
$methodsstring[]-
An array of XML-RPC methods, keyed by their methodName.
Source
$this->methods = apply_filters( 'xmlrpc_methods', $this->methods );
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |