Index: wp-includes/js/autosave.js =================================================================== --- wp-includes/js/autosave.js (revision 6954) +++ wp-includes/js/autosave.js (working copy) @@ -12,6 +12,12 @@ jQuery("#post #submit").click(function() { jQuery.cancel(autosavePeriodical); }); jQuery("#post #publish").click(function() { jQuery.cancel(autosavePeriodical); }); jQuery("#post #deletepost").click(function() { jQuery.cancel(autosavePeriodical); }); + + // Autosave early on for a new post + jQuery("#content").keypress(function() { + if ( 1 === ( jQuery(this).val().length % 15 ) && 1 > parseInt(jQuery("#post_ID").val(),10) ) + setTimeout(autosave, 5000); + }); } addLoadEvent(autosave_start_timer) @@ -132,6 +138,8 @@ } post_data["content"] = jQuery("#content").val(); + if ( jQuery('#post_name').val() ) + post_data["post_name"] = jQuery('#post_name').val(); if(post_data["post_title"].length==0 || post_data["content"].length==0 || post_data["post_title"] + post_data["content"] == autosaveLast) { return; Index: wp-includes/link-template.php =================================================================== --- wp-includes/link-template.php (revision 6954) +++ wp-includes/link-template.php (working copy) @@ -63,7 +63,7 @@ if ( empty($post->ID) ) return FALSE; if ( $post->post_type == 'page' ) - return get_page_link($post->ID); + return get_page_link($post->ID, $leavename); elseif ($post->post_type == 'attachment') return get_attachment_link($post->ID); @@ -118,7 +118,7 @@ } // Respects page_on_front. Use this one. -function get_page_link($id = false) { +function get_page_link($id = false, $leavename = false) { global $post; $id = (int) $id; @@ -128,13 +128,13 @@ if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) $link = get_option('home'); else - $link = _get_page_link( $id ); + $link = _get_page_link( $id , $leavename ); return apply_filters('page_link', $link, $id); } // Ignores page_on_front. Internal use only. -function _get_page_link( $id = false ) { +function _get_page_link( $id = false, $leavename = false ) { global $post, $wp_rewrite; if ( !$id ) @@ -146,7 +146,7 @@ if ( '' != $pagestruct && isset($post->post_status) && 'draft' != $post->post_status ) { $link = get_page_uri($id); - $link = str_replace('%pagename%', $link, $pagestruct); + $link = ( $leavename ) ? $pagestruct : str_replace('%pagename%', $link, $pagestruct); $link = get_option('home') . "/$link"; $link = user_trailingslashit($link, 'page'); } else { Index: wp-includes/script-loader.php =================================================================== --- wp-includes/script-loader.php (revision 6954) +++ wp-includes/script-loader.php (working copy) @@ -44,7 +44,7 @@ $this->add( 'autosave', '/wp-includes/js/autosave.js', array('jquery', 'schedule'), '20080221'); $this->localize( 'autosave', 'autosaveL10n', array( - 'autosaveInterval' => apply_filters('autosave_interval', '120'), + 'autosaveInterval' => apply_filters('autosave_interval', '60'), 'errorText' => __('Error: %response%'), 'failText' => __('Error: Autosave Failed.'), 'previewPageText' => __('Preview this Page'), @@ -148,7 +148,7 @@ 'save' => __('Save'), 'cancel' => __('Cancel'), ) ); - $this->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080128' ); + $this->add( 'post', '/wp-admin/js/post.js', array('suggest', 'jquery-ui-tabs', 'wp-lists', 'postbox', 'slug'), '20080221' ); $this->localize( 'post', 'postL10n', array( 'tagsUsed' => __('Tags used on this post:'), 'add' => attribute_escape(__('Add')), Index: wp-admin/includes/post.php =================================================================== --- wp-admin/includes/post.php (revision 6954) +++ wp-admin/includes/post.php (working copy) @@ -593,7 +593,7 @@ function get_sample_permalink_html($id, $new_slug=null) { $post = &get_post($id); list($permalink, $post_name) = get_sample_permalink($post->ID, $new_slug); - if (false === strpos($permalink, '%postname%')) { + if (false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%')) { return ''; } $title = __('Click to edit this part of the permalink'); @@ -603,7 +603,7 @@ $post_name_abridged = $post_name; } $post_name_html = ''.$post_name_abridged.''.$post_name.''; - $display_link = str_replace('%postname%', $post_name_html, $permalink); + $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); $return = '' . __('Permalink:') . "\n" . '' . $display_link . "\n"; $return .= ' \n"; return $return; Index: wp-admin/js/post.js =================================================================== --- wp-admin/js/post.js (revision 6954) +++ wp-admin/js/post.js (working copy) @@ -68,6 +68,10 @@ // Editable slugs make_slugedit_clickable(); + + // hide advanced slug field + jQuery('#pageslugdiv').hide(); + jQuery('#slugdiv').hide(); jQuery('#tags-input').hide(); tag_update_quickclicks(); Index: wp-admin/edit-page-form.php =================================================================== --- wp-admin/edit-page-form.php (revision 6954) +++ wp-admin/edit-page-form.php (working copy) @@ -51,6 +51,12 @@