From 891394af7356b2efe86ccfc3c184acfc70bc4d84 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 11 Dec 2018 04:00:37 +0000 Subject: [PATCH] REST API: Persist attributes for attachment links In [43437], the link definition implementation caused attachment links to be unexpectedly nested under an attributes key. This changeset restores the prior behavior. Merges [43681] to trunk. Props TimothyBlynJacobs, danielbachhuber. Fixes #44750. git-svn-id: https://develop.svn.wordpress.org/trunk@43973 602fd350-edb4-49c9-b593-d223f7449a82 --- package-lock.json | 2 +- src/wp-admin/includes/template.php | 2 +- src/wp-includes/media-template.php | 2 +- .../endpoints/class-wp-rest-attachments-controller.php | 7 ++++++- .../phpunit/tests/rest-api/rest-attachments-controller.php | 5 +++++ tests/qunit/fixtures/wp-api-generated.js | 7 +------ 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f81fc78a0..c339d2f7d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "WordPress", - "version": "5.0.0", + "version": "5.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 75b92889e7..dfa0e416c5 100644 --- a/src/wp-admin/includes/template.php +++ b/src/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 ); ?>