Ticket #27506: 27506.6.diff
File 27506.6.diff, 1.8 KB (added by , 11 years ago) |
---|
-
src/wp-includes/class-wp-xmlrpc-server.php
180 180 * @return mixed WP_User object if authentication passed, false otherwise 181 181 */ 182 182 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. 192 186 */ 193 187 $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 ) { 204 189 $enabled = apply_filters( 'option_enable_xmlrpc', true ); 190 } 205 191 206 192 /** 207 193 * Filter whether XML-RPC is enabled. … … 1533 1519 $password = $args[2]; 1534 1520 $post_id = (int) $args[3]; 1535 1521 1536 if ( isset( $args[4] ) ) 1522 if ( isset( $args[4] ) ) { 1537 1523 $fields = $args[4]; 1538 else 1539 1524 } else { 1540 1525 /** 1541 1526 * Filter the list of post query fields used by the given XML-RPC method. 1542 1527 * … … 1546 1531 * @param string $method Method name. 1547 1532 */ 1548 1533 $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' ); 1534 } 1549 1535 1550 1536 if ( ! $user = $this->login( $username, $password ) ) 1551 1537 return $this->error;