Changeset 45687
- Timestamp:
- 07/27/2019 01:43:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/class-wp-rest-server.php
r45611 r45687 104 104 * 105 105 * @since 4.4.0 106 * 106 * @since 5.3.0 Added the `$request` parameter. 107 * 108 * @param WP_REST_Request $request Full data about the request. 107 109 * @return WP_Error|null WP_Error indicates unsuccessful login, null indicates successful 108 110 * or no authentication provided 109 111 */ 110 public function check_authentication( ) {112 public function check_authentication( $request ) { 111 113 /** 112 114 * Filters REST authentication errors. … … 129 131 * 130 132 * @since 4.4.0 131 * 132 * @param WP_Error|null|bool WP_Error if authentication error, null if authentication 133 * method wasn't used, true if authentication succeeded. 134 */ 135 return apply_filters( 'rest_authentication_errors', null ); 133 * @since 5.3.0 Added the `$request` argument. 134 * 135 * @param WP_Error|null|bool $result WP_Error if authentication error, null if authentication 136 * method wasn't used, true if authentication succeeded. 137 * @param WP_REST_Request $request Full data about the request. 138 */ 139 return apply_filters( 'rest_authentication_errors', null, $request ); 136 140 } 137 141 … … 324 328 } 325 329 326 $result = $this->check_authentication( );330 $result = $this->check_authentication( $request ); 327 331 328 332 if ( ! is_wp_error( $result ) ) {
Note: See TracChangeset
for help on using the changeset viewer.