Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_enabled

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
256            *     add_filter( 'xmlrpc_enabled', '__return_false' );
257            *
258            * For more granular control over all XML-RPC methods and requests, see the {@see 'xmlrpc_methods'}
259            * and {@see 'xmlrpc_element_limit'} hooks.
260            *
261            * @since 3.5.0
262            *
263            * @param bool $enabled Whether XML-RPC is enabled. Default true.
264            */
265           $enabled = apply_filters( 'xmlrpc_enabled', $enabled );
266
267           if ( ! $enabled ) {
268                $this->error = new IXR_Error( 405, sprintf( __( 'XML-RPC services are disabled on this site.' ) ) );
269                return false;
270           }
271
272           if ( $this->auth_failed ) {
273                $user = new WP_Error( 'login_prevented' );
274           } else {