WordPress.org

Make WordPress Core

Changeset 18547


Ignore:
Timestamp:
08/14/2011 10:23:22 PM (7 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-permalink.php

    r17748 r18547  
    2020    '<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>' .
    2121    '<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>' .
    22     '<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>' .
    2322    '<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>' .
    2423    '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' .
     
    166165
    167166$structures = array(
    168     '',
    169     $prefix . '/%year%/%monthnum%/%day%/%postname%/',
    170     $prefix . '/%year%/%monthnum%/%postname%/',
    171     $prefix . '/archives/%post_id%'
    172     );
     167    1 => $prefix . '/%year%/%monthnum%/%day%/%postname%/',
     168    2 => $prefix . '/%year%/%monthnum%/%postname%/',
     169    3 => $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/%post_id%',
     170    4 => $prefix . '/%postname%/',
     171);
    173172?>
    174173<h3><?php _e('Common settings'); ?></h3>
     
    180179    <tr>
    181180        <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>
    182         <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></td>
     181        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
    183182    </tr>
    184183    <tr>
    185184        <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>
    186         <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/sample-post/'; ?></code></td>
     185        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
    187186    </tr>
    188187    <tr>
    189188        <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>
    190         <td><code><?php echo get_option('home') . $blog_prefix . $prefix; ?>/archives/123</code></td>
     189        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'archives', 'sample permalink base' ) . '/123'; ?></code></td>
     190    </tr>
     191    <tr>
     192        <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>
     193        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . _x( 'sample-post', 'sample permalink structure' ) . '/'; ?></code></td>
    191194    </tr>
    192195    <tr>
Note: See TracChangeset for help on using the changeset viewer.