diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 57e330ecf4..1b0269d854 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2659,7 +2659,7 @@ function meta_box_prefs($page) { continue; $box_id = $box['id']; echo '\n"; } } diff --git a/wp-admin/js/postbox.js b/wp-admin/js/postbox.js index 9814446fee..9a76896d1b 100644 --- a/wp-admin/js/postbox.js +++ b/wp-admin/js/postbox.js @@ -4,11 +4,24 @@ $('.postbox h3').click( function() { $($(this).parent().get(0)).toggleClass('closed'); postboxes.save_state(page); - }); + } ); $('.postbox h3 a').click( function(e) { e.stopPropagation(); } ); + $('.hide-postbox-tog').click( function() { + var box = jQuery(this).val(); + if ( jQuery(this).attr('checked') ) { + jQuery('#' + box).show(); + if ( $.isFunction( postboxes.onShow ) ) { + postboxes.onShow( box ); + } + } else { + jQuery('#' + box).hide(); + } + postboxes.save_state(page); + } ); + if ( $.browser.msie ) { $('#side-sortables').append( '
' ); } else {