diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 7cf931d7d3..c977df6324 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -434,7 +434,7 @@ wp_nonce_field( 'get-comments', 'add_comment_nonce', false );
\n"; @@ -2798,7 +2798,7 @@ function meta_box_prefs($page) { if ( empty($wp_meta_boxes[$page]) ) return; - $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); + $hidden = get_hidden_meta_boxes($page); foreach ( array_keys($wp_meta_boxes[$page]) as $context ) { foreach ( array_keys($wp_meta_boxes[$page][$context]) as $priority ) { @@ -2817,6 +2817,20 @@ function meta_box_prefs($page) { } } +function get_hidden_meta_boxes($page) { + $hidden = (array) get_user_option( "meta-box-hidden_$page", 0, false ); + + // Hide slug boxes by default + if ( empty($hidden[0]) ) { + if ( 'page' == $page ) + $hidden = array('pageslugdiv'); + elseif ( 'post' == $page ) + $hidden = array('slugdiv'); + } + + return $hidden; +} + /** * Add a new section to a settings page. * diff --git a/wp-admin/js/page.js b/wp-admin/js/page.js index 6da0ebd835..943c1de96b 100644 --- a/wp-admin/js/page.js +++ b/wp-admin/js/page.js @@ -7,9 +7,6 @@ jQuery(document).ready( function($) { jQuery('#title').blur( function() { if ( (jQuery("#post_ID").val() > 0) || (jQuery("#title").val().length == 0) ) return; autosave(); } ); - // hide advanced slug field - jQuery('#pageslugdiv').hide(); - var stamp = $('#timestamp').html(); var visibility = $('#post-visibility-display').html(); diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index dbee07e939..fc03119440 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -107,9 +107,6 @@ jQuery(document).ready( function($) { // Editable slugs make_slugedit_clickable(); - // hide advanced slug field - jQuery('#slugdiv').hide(); - jQuery('#tags-input').hide(); tag_update_quickclicks(); // add the quickadd form diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index d3c055cb2d..a68f858af2 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -173,7 +173,7 @@ function wp_default_scripts( &$scripts ) { 'save' => __('Save'), 'cancel' => __('Cancel') ) ); - $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20081112b' ); + $scripts->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20081128' ); $scripts->localize( 'post', 'postL10n', array( 'tagsUsed' => __('Tags used on this post:'), 'add' => attribute_escape(__('Add')), @@ -198,7 +198,7 @@ function wp_default_scripts( &$scripts ) { 'privatelyPublished' => __('Privately Published'), 'published' => __('Published') ) ); - $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'wp-lists', 'postbox'), '20081112' ); + $scripts->add( 'page', '/wp-admin/js/page.js', array('jquery', 'slug', 'wp-lists', 'postbox'), '20081128' ); $scripts->localize( 'page', 'postL10n', array( 'cancel' => __('Cancel'), 'edit' => __('Edit'),