Skip to content

Commit 4cf0fcd

Browse files
Docs: Correct the type for some method parameters in WP_REST_Server class.
Follow-up to [34928]. Props dilipbheda, mukesh27, kirasong, shailu25, khushdoms, welcher, audrasjb, SergeyBiryukov. See #63249. git-svn-id: https://develop.svn.wordpress.org/trunk@61113 602fd350-edb4-49c9-b593-d223f7449a82
1 parent bafd51b commit 4cf0fcd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wp-includes/rest-api/class-wp-rest-server.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ protected function error_to_response( $error ) {
224224
*
225225
* @since 4.4.0
226226
*
227-
* @param string $code WP_Error-style code.
228-
* @param string $message Human-readable message.
229-
* @param int $status Optional. HTTP status code to send. Default null.
227+
* @param string $code WP_Error-style code.
228+
* @param string $message Human-readable message.
229+
* @param int|null $status Optional. HTTP status code to send. Default null.
230230
* @return string JSON representation of the error
231231
*/
232232
protected function json_error( $code, $message, $status = null ) {
@@ -278,8 +278,8 @@ protected function get_json_encode_options( WP_REST_Request $request ) {
278278
*
279279
* @global WP_User $current_user The currently authenticated user.
280280
*
281-
* @param string $path Optional. The request route. If not set, `$_SERVER['PATH_INFO']` will be used.
282-
* Default null.
281+
* @param string|null $path Optional. The request route. If not set, `$_SERVER['PATH_INFO']` will be used.
282+
* Default null.
283283
* @return null|false Null if not served and a HEAD request, false otherwise.
284284
*/
285285
public function serve_request( $path = null ) {

0 commit comments

Comments
 (0)