Make WordPress Core

Ticket #27506: 27506.6.diff

File 27506.6.diff, 1.8 KB (added by DrewAPicture, 11 years ago)
  • src/wp-includes/class-wp-xmlrpc-server.php

     
    180180         * @return mixed WP_User object if authentication passed, false otherwise
    181181         */
    182182        function login( $username, $password ) {
    183                 // Respect any old filters against get_option() for 'enable_xmlrpc'.
    184 
    185                 /**
    186                  * Filter whether XML-RPC is enabled.
    187                  *
    188                  * @since 3.5.0
    189                  * @deprecated 3.5.0 Use 'xmlrpc_enabled' instead.
    190                  *
    191                  * @param bool $enable Whether to enable XML-RPC. Default false.
     183                /*
     184                 * Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
     185                 * option was deprecated in 3.5.0. Use the 'xmlrpc_enabled' hook instead.
    192186                 */
    193187                $enabled = apply_filters( 'pre_option_enable_xmlrpc', false );
    194                 if ( false === $enabled )
    195 
    196                         /**
    197                          * Filter whether XML-RPC is enabled.
    198                          *
    199                          * @since 3.5.0
    200                          * @deprecated 3.5.0 Use 'xmlrpc_enabled' instead.
    201                          *
    202                          * @param bool $enable Whether to enable XML-RPC. Default true.
    203                          */
     188                if ( false === $enabled ) {
    204189                        $enabled = apply_filters( 'option_enable_xmlrpc', true );
     190                }
    205191
    206192                /**
    207193                 * Filter whether XML-RPC is enabled.
     
    15331519                $password           = $args[2];
    15341520                $post_id            = (int) $args[3];
    15351521
    1536                 if ( isset( $args[4] ) )
     1522                if ( isset( $args[4] ) ) {
    15371523                        $fields = $args[4];
    1538                 else
    1539 
     1524                } else {
    15401525                        /**
    15411526                         * Filter the list of post query fields used by the given XML-RPC method.
    15421527                         *
     
    15461531                         * @param string $method Method name.
    15471532                         */
    15481533                        $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
     1534                }
    15491535
    15501536                if ( ! $user = $this->login( $username, $password ) )
    15511537                        return $this->error;