xmlrpc_methods
Filter HookDescription
Filters the methods exposed by the XML-RPC server. This filter can be used to add new methods, and remove built-in methods.Hook Information
File Location |
wp-includes/class-wp-xmlrpc-server.php
View on GitHub
|
Hook Type | Filter |
Line Number | 176 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$methods
|
An array of XML-RPC methods, keyed by their methodName. |
Usage Examples
Basic Usage
<?php
// Hook into xmlrpc_methods
add_filter('xmlrpc_methods', 'my_custom_filter', 10, 1);
function my_custom_filter($methods) {
// Your custom filtering logic here
return $methods;
}
Source Code Context
wp-includes/class-wp-xmlrpc-server.php:176
- How this hook is used in WordPress core
<?php
171 *
172 * @since 1.5.0
173 *
174 * @param string[] $methods An array of XML-RPC methods, keyed by their methodName.
175 */
176 $this->methods = apply_filters( 'xmlrpc_methods', $this->methods );
177
178 $this->set_is_enabled();
179 }
180
181 /**
PHP Documentation
<?php
/**
* Filters the methods exposed by the XML-RPC server.
*
* This filter can be used to add new methods, and remove built-in methods.
*
* @since 1.5.0
*
* @param string[] $methods An array of XML-RPC methods, keyed by their methodName.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-xmlrpc-server.php
Related Hooks
Related hooks will be displayed here in future updates.