xmlrpc_enabled WordPress Filter Hook

The xmlrpc_enabled hook is used to enable or disable XML-RPC functionality in WordPress. When XML-RPC is enabled, WordPress can communicate with other applications that support the XML-RPC protocol.

apply_filters( 'xmlrpc_enabled', bool $is_enabled ) #

Filters whether XML-RPC methods requiring authentication are enabled.


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.


Top ↑

Parameters

$is_enabled

(bool)Whether XML-RPC is enabled. Default true.


Top ↑

Source

File: wp-includes/class-wp-xmlrpc-server.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More