Media: When printing a gallery shortcode, hide the implicit orderby value. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22507 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-09 12:14:48 +00:00
parent cc58e827f3
commit 199edff3b4
1 changed files with 5 additions and 0 deletions

View File

@ -639,6 +639,11 @@ window.wp = window.wp || {};
attrs.ids = attachments.pluck('id');
// If the `ids` attribute is set and `orderby` attribute
// is the default value, clear it for cleaner output.
if ( attrs.ids && 'post__in' === attrs.orderby )
delete attrs.orderby;
shortcode = new wp.shortcode({
tag: 'gallery',
attrs: attrs,