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
169       * @return mixed WP_User object if authentication passed, false otherwise
170       */
171      function login( $username, $password ) {
172           // Respect any old filters against get_option() for 'enable_xmlrpc'.
173           $enabled = apply_filters( 'pre_option_enable_xmlrpc', false ); // Deprecated
174           if ( false === $enabled )
175                $enabled = apply_filters( 'option_enable_xmlrpc', true ); // Deprecated
176
177           // Proper filter for turning off XML-RPC. It is on by default.
178           $enabled = apply_filters( 'xmlrpc_enabled', $enabled );
179
180           if ( ! $enabled ) {
181                $this->error = new IXR_Error( 405, sprintf( __( 'XML-RPC services are disabled on this site.' ) ) );
182                return false;
183           }
184
185           $user = wp_authenticate($username, $password);
186
187           if (is_wp_error($user)) {