Add postname to Settings > Permalinks and remove the help text talking about permalink performance. Make the slugs (and /archives/ rewrite base) translatable. see #18541.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-08-14 22:23:22 +00:00
parent 35838967a7
commit 02831e8b84
1 changed files with 12 additions and 9 deletions

View File

@ -19,7 +19,6 @@ add_contextual_help($current_screen,
'<p>' . __('This screen provides some common options for your default permalinks URL structure.') . '</p>' .
'<p>' . __('If you pick an option other than Default, your general URL path with structure tags, terms surrounded by <code>%</code>, will also appear in the custom structure field and your path can be further modified there.') . '</p>' .
'<p>' . __('When you assign multiple categories or tags to a post, only one can show up in the permalink: the lowest numbered category. This applies if your custom structure includes <code>%category%</code> or <code>%tag%</code>.') . '</p>' .
'<p>' . __('Note that permalinks beginning with the category, tag, author or postname structure tags require more advanced server resources. Double-check your hosting details to make sure those are in place or start your permalinks with other structure tags.') . '</p>' .
'<p>' . __('The Optional fields let you customize the &#8220;category&#8221; and &#8220;tag&#8221; base names that will appear in archive URLs. For example, the page listing all posts in the &#8220;Uncategorized&#8221; category could be <code>/topics/uncategorized</code> instead of <code>/category/uncategorized</code>.') . '</p>' .
'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' .
'<p><strong>' . __('For more information:') . '</strong></p>' .
@ -165,11 +164,11 @@ if ( is_multisite() && !is_subdomain_install() && is_main_site() ) {
}
$structures = array(
'',
$prefix . '/%year%/%monthnum%/%day%/%postname%/',
$prefix . '/%year%/%monthnum%/%postname%/',
$prefix . '/archives/%post_id%'
);
1 => $prefix . '/%year%/%monthnum%/%day%/%postname%/',
2 => $prefix . '/%year%/%monthnum%/%postname%/',
3 => $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/%post_id%',
4 => $prefix . '/%postname%/',
);
?>
<h3><?php _e('Common settings'); ?></h3>
<table class="form-table">
@ -179,15 +178,19 @@ $structures = array(
</tr>
<tr>
<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[1]); ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> <?php _e('Day and name'); ?></label></th>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></td>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
</tr>
<tr>
<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[2]); ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> <?php _e('Month and name'); ?></label></th>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/sample-post/'; ?></code></td>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
</tr>
<tr>
<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[3]); ?>" class="tog" <?php checked($structures[3], $permalink_structure); ?> /> <?php _e('Numeric'); ?></label></th>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix; ?>/archives/123</code></td>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/123'; ?></code></td>
</tr>
<tr>
<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[4]); ?>" class="tog" <?php checked($structures[4], $permalink_structure); ?> /> <?php _e('Post name'); ?></label></th>
<td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
</tr>
<tr>
<th>