diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 75b92889e7..dfa0e416c5 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -1256,7 +1256,7 @@ function do_accordion_sections( $screen, $context, $object ) {
$page = $screen->id;
- $hidden = get_hidden_meta_boxes( $screen );
+ $hidden = get_hidden_meta_boxes( $screen );
?>
diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php
index fb44261cf1..fbacf869ae 100644
--- a/wp-includes/media-template.php
+++ b/wp-includes/media-template.php
@@ -96,7 +96,7 @@ function wp_underscore_video_template() {
<# if ( w ) { #>width="{{ w }}"<# } #>
<# if ( h ) { #>height="{{ h }}"<# } #>
'',
'preload' => 'metadata',
);
diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
index e317f523aa..4707dd4a62 100644
--- a/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
+++ b/wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php
@@ -375,7 +375,12 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
// Wrap the data in a response object.
$response = rest_ensure_response( $data );
- $response->add_links( $links );
+
+ foreach ( $links as $rel => $rel_links ) {
+ foreach ( $rel_links as $link ) {
+ $response->add_link( $rel, $link['href'], $link['attributes'] );
+ }
+ }
/**
* Filters an attachment returned from the REST API.
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 6d2e0135d2..807054b506 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
-$wp_version = '5.1-alpha-43678';
+$wp_version = '5.1-alpha-43973';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.