Skip to content

Commit da8e3f6

Browse files
committed
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develop into trac-64108-errors-emitted-during-output-buffer-callback
2 parents 2d9bdd4 + fbef50b commit da8e3f6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public function add_link( $rel, $href, $attributes = array() ) {
7676
*
7777
* @since 4.4.0
7878
*
79-
* @param string $rel Link relation. Either an IANA registered type, or an absolute URL.
80-
* @param string $href Optional. Only remove links for the relation matching the given href.
81-
* Default null.
79+
* @param string $rel Link relation. Either an IANA registered type, or an absolute URL.
80+
* @param string|null $href Optional. Only remove links for the relation matching the given href.
81+
* Default null.
8282
*/
8383
public function remove_link( $rel, $href = null ) {
8484
if ( ! isset( $this->links[ $rel ] ) ) {

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

Lines changed: 8 additions & 8 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 ) {
@@ -655,12 +655,11 @@ public static function get_response_links( $response ) {
655655
}
656656

657657
/**
658-
* Gets the target links for a REST API Link.
658+
* Gets the target hints for a REST API Link.
659659
*
660660
* @since 6.7.0
661661
*
662-
* @param array $link
663-
*
662+
* @param array $link The link to get target hints for.
664663
* @return array|null
665664
*/
666665
protected static function get_target_hints_for_link( $link ) {
@@ -764,6 +763,7 @@ public static function get_compact_response_links( $response ) {
764763
*
765764
* @param array $data Data from the request.
766765
* @param bool|string[] $embed Whether to embed all links or a filtered list of link relations.
766+
* Default true.
767767
* @return array {
768768
* Data with sub-requests embedded.
769769
*

0 commit comments

Comments
 (0)