]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/options-permalink.php
Wordpress 3.3-scripts
[autoinstalls/wordpress.git] / wp-admin / options-permalink.php
index e5f9a751936768c9f11ac72cf20c7ff5687c383f..7db14487f12bebbe9f7c01944ce18c0f872e3a3a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Permalink settings administration panel.
+ * Permalink Settings Administration Screen.
  *
  * @package WordPress
  * @subpackage Administration
@@ -15,15 +15,33 @@ if ( ! current_user_can( 'manage_options' ) )
 $title = __('Permalink Settings');
 $parent_file = 'options-general.php';
 
-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>' .
+get_current_screen()->add_help_tab( array(
+       'id'      => 'overview',
+       'title'   => __('Overview'),
+       'content' => '<p>' . __('Permalinks are the permanent URLs to your individual pages and blog posts, as well as your category and tag archives. A permalink is the web address used to link to your content. The URL to each post should be permanent, and never change &#8212; hence the name permalink.') . '</p>' .
+               '<p>' . __('This screen allows you to choose your default permalink structure. You can choose from common settings or create custom URL structures.') . '</p>' .
+               '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+) );
+
+get_current_screen()->add_help_tab( array(
+       'id'      => 'common-settings',
+       'title'   => __('Common Settings'),
+       'content' => '<p>' . __('Many people choose to use &#8220;pretty permalinks,&#8221; URLs that contain useful information such as the post title rather than generic post ID numbers. You can choose from any of the permalink formats under Common Settings, or can craft your own if you select Custom 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>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
+) );
+
+get_current_screen()->add_help_tab( array(
+       'id'      => 'custom-structures',
+       'title'   => __('Custom Structures'),
+       'content' => '<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>',
+) );
+
+get_current_screen()->set_help_sidebar(
        '<p><strong>' . __('For more information:') . '</strong></p>' .
-       '<p>' . __('<a href="http://codex.wordpress.org/Settings_Permalinks_SubPanel" target="_blank">Documentation on Permalinks Settings</a>') . '</p>' .
+       '<p>' . __('<a href="http://codex.wordpress.org/Settings_Permalinks_Screen" target="_blank">Documentation on Permalinks Settings</a>') . '</p>' .
        '<p>' . __('<a href="http://codex.wordpress.org/Using_Permalinks" target="_blank">Documentation on Using Permalinks</a>') . '</p>' .
        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
 );
@@ -32,7 +50,7 @@ add_contextual_help($current_screen,
  * Display JavaScript on the page.
  *
  * @package WordPress
- * @subpackage Permalink_Settings_Panel
+ * @subpackage Permalink_Settings_Screen
  */
 function add_js() {
        ?>
@@ -165,13 +183,14 @@ if ( is_multisite() && !is_subdomain_install() && is_main_site() ) {
 }
 
 $structures = array(
-       '',
-       $prefix . '/%year%/%monthnum%/%day%/%postname%/',
-       $prefix . '/%year%/%monthnum%/%postname%/',
-       $prefix . '/archives/%post_id%'
-       );
+       0 => '',
+       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>
+<h3><?php _e('Common Settings'); ?></h3>
 <table class="form-table">
        <tr>
                <th><label><input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> <?php _e('Default'); ?></label></th>
@@ -179,15 +198,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>