xmlrpc_methods
Filters the methods exposed by the XML-RPC server.
This filter can be used to add new methods, and remove built-in methods.
Использование
add_filter( 'xmlrpc_methods', 'wp_kama_xmlrpc_methods_filter' );
/**
* Function for `xmlrpc_methods` filter-hook.
*
* @param string[] $methods An array of XML-RPC methods, keyed by their methodName.
*
* @return string[]
*/
function wp_kama_xmlrpc_methods_filter( $methods ){
// filter...
return $methods;
}
- $methods(string[])
- An array of XML-RPC methods, keyed by their methodName.
Список изменений
| С версии 1.5.0 | Введена. |
Где вызывается хук
xmlrpc_methods
wp-includes/class-wp-xmlrpc-server.php 176
$this->methods = apply_filters( 'xmlrpc_methods', $this->methods );