- <p>
- <?php _e('Category base'); ?>: <input name="category_base" type="text" class="code" value="<?php echo $category_base; ?>" size="30" />
- </p>
- <p class="submit">
- <input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" />
- </p>
- </form>
-<?php if ( $permalink_structure && !$usingpi && !$writable ) : ?>
- <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>
+
+<table class="form-table">
+ <tr>
+ <th><label for="category_base"><?php _e('Category base'); ?></label></th>
+ <td><input name="category_base" id="category_base" type="text" value="<?php echo esc_attr($category_base); ?>" class="regular-text code" /></td>
+ </tr>
+ <tr>
+ <th><label for="tag_base"><?php _e('Tag base'); ?></label></th>
+ <td><input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
+ </tr>
+ <?php do_settings_fields('permalink', 'optional'); ?>
+</table>
+
+<?php do_settings_sections('permalink'); ?>
+
+<p class="submit">
+ <input type="submit" name="submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
+</p>
+ </form>
+<?php if ($iis7_permalinks) :
+ if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) : ?>
+<p><?php _e('If your <code>web.config</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/<configuration>/<system.webServer>/<rewrite>/<rules></code> element in <code>web.config</code> file.') ?></p>
+<form action="options-permalink.php" method="post">
+<?php wp_nonce_field('update-permalink') ?>
+ <p><textarea rows="10" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_html($wp_rewrite->iis7_url_rewrite_rules()); ?></textarea></p>
+</form>
+<p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p>
+ <?php endif; ?>
+<?php else :
+ if ( $permalink_structure && ! $usingpi && ! $writable ) : ?>
+<p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">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>