Changes in trunk/wp-admin/options-permalink.php [4197:3373]
- File:
-
- 1 edited
-
trunk/wp-admin/options-permalink.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r4197 r3373 42 42 var aInputs = document.getElementsByTagName('input'); 43 43 44 for (var i = 0; i < aInputs.length; i++) { 44 for (var i = 0; i < aInputs.length; i++) { 45 45 aInputs[i].onclick = aInputs[i].onkeyup = upit; 46 46 } … … 58 58 $home_path = get_home_path(); 59 59 60 if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { 61 check_admin_referer('update-permalink'); 62 60 if ( isset($_POST) ) { 63 61 if ( isset($_POST['permalink_structure']) ) { 64 62 $permalink_structure = $_POST['permalink_structure']; … … 67 65 $wp_rewrite->set_permalink_structure($permalink_structure); 68 66 } 69 67 70 68 if ( isset($_POST['category_base']) ) { 71 69 $category_base = $_POST['category_base']; … … 75 73 } 76 74 } 77 78 $permalink_structure = get_ option('permalink_structure');79 $category_base = get_ option('category_base');75 76 $permalink_structure = get_settings('permalink_structure'); 77 $category_base = get_settings('category_base'); 80 78 81 79 if ( (!file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess') ) … … 103 101 <div class="wrap"> 104 102 <h2><?php _e('Customize Permalink Structure') ?></h2> 105 <form name="form" action="options-permalink.php" method="post"> 106 <?php wp_nonce_field('update-permalink') ?> 107 <p class="submit"><input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" /></p> 108 <p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 103 <p><?php _e('By default WordPress uses web URIs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URI structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p> 109 104 110 105 <?php … … 120 115 ); 121 116 ?> 117 <form name="form" action="options-permalink.php" method="post"> 122 118 <h3><?php _e('Common options:'); ?></h3> 123 119 <p> 124 120 <label> 125 121 <input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> 126 <?php _e('Default'); ?><br /> <span> » <code><?php echo get_ option('home'); ?>/?p=123</code></span>122 <?php _e('Default'); ?><br /> <span> » <code><?php echo get_settings('home'); ?>/?p=123</code></span> 127 123 </label> 128 124 </p> … … 130 126 <label> 131 127 <input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> 132 <?php _e('Date and name based'); ?><br /> <span> » <code><?php echo get_ option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span>128 <?php _e('Date and name based'); ?><br /> <span> » <code><?php echo get_settings('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span> 133 129 </label> 134 130 </p> … … 136 132 <label> 137 133 <input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> 138 <?php _e('Numeric'); ?><br /> <span> » <code><?php echo get_ option('home') . $prefix ; ?>/archives/123</code></span>134 <?php _e('Numeric'); ?><br /> <span> » <code><?php echo get_settings('home') . $prefix ; ?>/archives/123</code></span> 139 135 </label> 140 136 </p> … … 146 142 <?php } ?> 147 143 /> 148 <?php _e('Custom, specify below'); ?> 144 <?php _e('Custom, specify below'); ?> 149 145 </label> 150 146 <br /> 151 147 </p> 152 <p id="customstructure"><?php _e('Custom structure'); ?>: <input name="permalink_structure" id="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo wp_specialchars($permalink_structure, 1); ?>" size="50" /></p>148 <p id="customstructure"><?php _e('Custom structure'); ?>: <input name="permalink_structure" id="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo $permalink_structure; ?>" size="50" /></p> 153 149 154 150 <h3><?php _e('Optional'); ?></h3> 155 151 <?php if ($is_apache) : ?> 156 <p><?php _e('If you like, you may enter a custom prefix for your category <abbr title="Universal Resource Locator">URL</abbr>s here. For example, <code>/taxonomy/tags</code> would make your category links like <code>http://example.org/taxonomy/tags/uncategorized/</code>. If you leave this blank the default will be used.') ?></p>152 <p><?php _e('If you like, you may enter a custom prefix for your category URIs here. For example, <code>/taxonomy/tags</code> would make your category links like <code>http://example.org/taxonomy/tags/uncategorized/</code>. If you leave this blank the default will be used.') ?></p> 157 153 <?php else : ?> 158 <p><?php _e('If you like, you may enter a custom prefix for your category <abbr title="Universal Resource Locator">URL</abbr>s here. For example, <code>/index.php/taxonomy/tags</code> would make your category links like <code>http://example.org/index.php/taxonomy/tags/uncategorized/</code>. If you leave this blank the default will be used.') ?></p>154 <p><?php _e('If you like, you may enter a custom prefix for your category URIs here. For example, <code>/index.php/taxonomy/tags</code> would make your category links like <code>http://example.org/index.php/taxonomy/tags/uncategorized/</code>. If you leave this blank the default will be used.') ?></p> 159 155 <?php endif; ?> 160 156 <p> 161 <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code" value="<?php echo wp_specialchars($category_base, 1); ?>" size="30" />157 <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code" value="<?php echo $category_base; ?>" size="30" /> 162 158 </p> 163 159 <p class="submit"> … … 168 164 <p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p> 169 165 <form action="options-permalink.php" method="post"> 170 <?php wp_nonce_field('update-permalink') ?>171 166 <p> 172 167 <textarea rows="5" style="width: 98%;" name="rules"><?php echo $wp_rewrite->mod_rewrite_rules(); ?>
Note: See TracChangeset
for help on using the changeset viewer.