mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 16:51:32 +01:00
Clean up gallery-mode toggling in post-formats.js and make sure it is set on first load.
see #24062 git-svn-id: http://core.svn.wordpress.org/trunk@24088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1f6d2f796a
commit
601c0c2e52
@ -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
Block a user