Media Library: Set max value of columns to 12.

fixes #29275.

git-svn-id: https://develop.svn.wordpress.org/trunk@29547 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-08-20 16:16:44 +00:00
parent 50ba21e179
commit e703e74b2c

View File

@ -5344,7 +5344,7 @@
width = this.$el.width(); width = this.$el.width();
if ( width ) { if ( width ) {
this.columns = Math.round( width / this.options.idealColumnWidth ) || 1; this.columns = Math.min( Math.round( width / this.options.idealColumnWidth ), 12 ) || 1;
if ( ! prev || prev !== this.columns ) { if ( ! prev || prev !== this.columns ) {
this.$el.attr( 'data-columns', this.columns ); this.$el.attr( 'data-columns', this.columns );