option_enable_xmlrpc
Filter HookDescription
Sets wp_xmlrpc_server::$is_enabled property. Determines whether the xmlrpc server is enabled on this WordPress install and set the is_enabled property accordingly. / private function set_is_enabled() { /* Respect old get_option() filters left for back-compat when the 'enable_xmlrpc' option was deprecated in 3.5.0. Use the {@see 'xmlrpc_enabled'} hook instead.Hook Information
File Location |
wp-includes/class-wp-xmlrpc-server.php
View on GitHub
|
Hook Type | Filter |
Line Number | 196 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into option_enable_xmlrpc
add_filter('option_enable_xmlrpc', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-includes/class-wp-xmlrpc-server.php:196
- How this hook is used in WordPress core
<?php
191 * Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
192 * option was deprecated in 3.5.0. Use the {@see 'xmlrpc_enabled'} hook instead.
193 */
194 $is_enabled = apply_filters( 'pre_option_enable_xmlrpc', false );
195 if ( false === $is_enabled ) {
196 $is_enabled = apply_filters( 'option_enable_xmlrpc', true );
197 }
198
199 /**
200 * Filters whether XML-RPC methods requiring authentication are enabled.
201 *
PHP Documentation
<?php
/**
* Sets wp_xmlrpc_server::$is_enabled property.
*
* Determines whether the xmlrpc server is enabled on this WordPress install
* and set the is_enabled property accordingly.
*
* @since 5.7.3
*/
private function set_is_enabled() {
/*
* Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
* option was deprecated in 3.5.0. Use the {@see 'xmlrpc_enabled'} hook instead.
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-includes/class-wp-xmlrpc-server.php
Related Hooks
Related hooks will be displayed here in future updates.