Clean up gallery-mode toggling in post-formats.js and make sure it is set on first load.
see #24062 git-svn-id: https://develop.svn.wordpress.org/trunk@24088 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bab5ddd458
commit
77731b116b
|
@ -93,18 +93,15 @@ window.wp = window.wp || {};
|
|||
}
|
||||
|
||||
// If gallery, force it to open to gallery state
|
||||
if ( 'gallery' === format )
|
||||
insertMediaButton.addClass( 'gallery' );
|
||||
else
|
||||
insertMediaButton.removeClass( 'gallery' );
|
||||
insertMediaButton.toggleClass( 'gallery', 'gallery' === format );
|
||||
|
||||
postFormats.currentPostFormat = format;
|
||||
}
|
||||
postFormats.currentPostFormat = format;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
insertMediaButton = $( '#insert-media-button' );
|
||||
insertMediaButton = $( '#insert-media-button' ).toggleClass( 'gallery', 'gallery' === postFormats.currentPostFormat );
|
||||
$container = $( '.post-formats-fields' );
|
||||
|
||||
initialFormat = $( '.post-format-options .active' ).data( 'wp-format' );
|
||||
|
|
Loading…
Reference in New Issue