root/trunk/wp-admin/edit-tag-form.php

Revision 9032, 2.1 kB (checked in by ryan, 2 weeks ago)

h2 removal per wireframes. Props Viper007Bond. see #7552

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Edit tag form for inclusion in administration panels.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 if ( ! empty($tag_ID) ) {
10     /**
11      * @var string
12      */
13     $heading = '';
14     $submit_text = __('Edit Tag');
15     $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
16     $action = 'editedtag';
17     $nonce_action = 'update-tag_' . $tag_ID;
18     do_action('edit_tag_form_pre', $tag);
19 } else {
20     $heading = '<h2>' . __('Add Tag') . '</h2>';
21     $submit_text = __('Add Tag');
22     $form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">';
23     $action = 'addtag';
24     $nonce_action = 'add-tag';
25     do_action('add_tag_form_pre', $tag);
26 }
27 ?>
28
29 <div class="wrap">
30 <?php echo $heading ?>
31 <div id="ajax-response"></div>
32 <?php echo $form ?>
33 <input type="hidden" name="action" value="<?php echo $action ?>" />
34 <input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
35 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
36     <table class="form-table">
37         <tr class="form-field form-required">
38             <th scope="row" valign="top"><label for="name"><?php _e('Tag name') ?></label></th>
39             <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />
40             <p><?php _e('The name is how the tag appears on your site.'); ?></p></td>
41         </tr>
42         <tr class="form-field">
43             <th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th>
44             <td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
45             <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
46         </tr>
47     </table>
48 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
49 <?php do_action('edit_tag_form', $tag); ?>
50 </form>
51 </div>
52
Note: See TracBrowser for help on using the browser.