apply_filters( 'xmlrpc_enabled', bool $is_enabled )
- Since
- 3.5.0
Description
Contrary to the way it's named, this filter does not control whether XML-RPC is fully enabled, rather, it only controls whether XML-RPC methods requiring authentication - such as for publishing purposes - are enabled.
Further, the filter does not control whether pingbacks or other custom endpoints that don't require authentication are enabled. This behavior is expected, and due to how parity was matched with the enable_xmlrpc UI option the filter replaced when it was introduced in 3.5.
To disable XML-RPC methods that require authentication, use:
add_filter( 'xmlrpc_enabled', '__return_false' ); For more granular control over all XML-RPC methods and requests, see the 'xmlrpc_methods' and 'xmlrpc_element_limit' hooks.
Compatibility
- WordPress
- since 3.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$is_enabledbool- Whether XML-RPC is enabled. Default true.
Where this hook fires · 1
wp-includes/class-wp-xmlrpc-server.php:221wp_xmlrpc_server::set_is_enabled()
Source code
* and {@see 'xmlrpc_element_limit'} hooks. * * @since 3.5.0 * * @param bool $is_enabled Whether XML-RPC is enabled. Default true. */ $this->is_enabled = apply_filters( 'xmlrpc_enabled', $is_enabled ); } /** * Makes private/protected methods readable for backward compatibility. * * @since 4.0.0Changelog
Introduced in 3.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.