Screen option for Post Format UI.

props nacin. see #23930.

git-svn-id: http://core.svn.wordpress.org/trunk@24092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Mark Jaquith
2013-04-25 07:28:33 +00:00
parent 3f231a1758
commit 082e067a2d
8 changed files with 185 additions and 127 deletions

View File

@@ -109,6 +109,16 @@ window.wp = window.wp || {};
resizeContent( initialFormat, true );
}
$('#show_post_format_ui').on('change', function() {
$('.wp-post-format-ui').toggleClass('no-ui', ! this.checked );
$.post( ajaxurl, {
action: 'show-post-format-ui',
post_type: $('#post_type').val(),
show: this.checked ? 1 : 0,
nonce: $('#show_post_format_ui_nonce').val()
});
});
$('.post-format-change a').click(function() {
$('.post-formats-fields, .post-format-change').slideUp();
$('.post-format-options').slideDown();