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

git-svn-id: http://core.svn.wordpress.org/trunk@22507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-09 12:14:48 +00:00
parent db30495fcd
commit adf0c7e1a7
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,