Force gallery state for gallery post format.
props lessbloat, wonderboymusic. fixes #24062. git-svn-id: http://core.svn.wordpress.org/trunk@24087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
window.wp = window.wp || {};
|
||||
|
||||
(function($) {
|
||||
var container, $container, mediaFrame, lastMimeType, mediaPreview, lastHeight = 360, content,
|
||||
var container, $container, mediaFrame, lastMimeType, mediaPreview, lastHeight = 360, content, insertMediaButton,
|
||||
initialFormat = 'standard',
|
||||
shortClass = 'short-format',
|
||||
shortContentFormats = ['status', 'aside'],
|
||||
@@ -92,10 +92,19 @@ window.wp = window.wp || {};
|
||||
}
|
||||
}
|
||||
|
||||
postFormats.currentPostFormat = format;
|
||||
}
|
||||
// If gallery, force it to open to gallery state
|
||||
if ( 'gallery' === format )
|
||||
insertMediaButton.addClass( 'gallery' );
|
||||
else
|
||||
insertMediaButton.removeClass( 'gallery' );
|
||||
|
||||
postFormats.currentPostFormat = format;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
insertMediaButton = $( '#insert-media-button' );
|
||||
$container = $( '.post-formats-fields' );
|
||||
|
||||
initialFormat = $( '.post-format-options .active' ).data( 'wp-format' );
|
||||
|
||||
Reference in New Issue
Block a user