~canonical-sysadmins/wordpress/4.1.3

« back to all changes in this revision

Viewing changes to wp-admin/edit-tag-form.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:05:37 UTC
  • mfrom: (1.1.1 wp4-upstream)
  • Revision ID: nick.moffitt@canonical.com-20150115110537-8bp1y42eyg0jsa7c
Tags: 4.1
MergeĀ upstreamĀ versionĀ 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
/**
52
52
 * Fires before the Edit Term form for all taxonomies.
53
53
 *
54
 
 * The dynamic portion of the hook name, $taxonomy, refers to
 
54
 * The dynamic portion of the hook name, `$taxonomy`, refers to
55
55
 * the taxonomy slug.
56
56
 *
57
57
 * @since 3.0.0
64
64
<div class="wrap">
65
65
<h2><?php echo $tax->labels->edit_item; ?></h2>
66
66
<div id="ajax-response"></div>
 
67
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"
67
68
<?php
68
69
/**
69
70
 * Fires inside the Edit Term form tag.
70
71
 *
71
 
 * The dynamic portion of the hook name, $taxonomy, refers to
 
72
 * The dynamic portion of the hook name, `$taxonomy`, refers to
72
73
 * the taxonomy slug.
73
74
 *
74
75
 * @since 3.7.0
75
76
 */
76
 
?>
77
 
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_edit_form_tag" ); ?>>
 
77
do_action( "{$taxonomy}_term_edit_form_tag" );
 
78
?>>
78
79
<input type="hidden" name="action" value="editedtag" />
79
80
<input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" />
80
81
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" />
81
82
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?>
82
83
        <table class="form-table">
83
 
                <tr class="form-field form-required">
84
 
                        <th scope="row"><label for="name"><?php _ex('Name', 'Taxonomy Name'); ?></label></th>
 
84
                <tr class="form-field form-required term-name-wrap">
 
85
                        <th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th>
85
86
                        <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />
86
87
                        <p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td>
87
88
                </tr>
88
89
<?php if ( !global_terms_enabled() ) { ?>
89
 
                <tr class="form-field">
90
 
                        <th scope="row"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th>
 
90
                <tr class="form-field term-slug-wrap">
 
91
                        <th scope="row"><label for="slug"><?php _e( 'Slug' ); ?></label></th>
91
92
                        <?php
92
93
                        /**
93
94
                         * Filter the editable term slug.
102
103
                </tr>
103
104
<?php } ?>
104
105
<?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
105
 
                <tr class="form-field">
106
 
                        <th scope="row"><label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label></th>
 
106
                <tr class="form-field term-parent-wrap">
 
107
                        <th scope="row"><label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label></th>
107
108
                        <td>
108
109
                                <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
109
110
                                <?php if ( 'category' == $taxonomy ) : ?>
112
113
                        </td>
113
114
                </tr>
114
115
<?php endif; // is_taxonomy_hierarchical() ?>
115
 
                <tr class="form-field">
116
 
                        <th scope="row"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
117
 
                        <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea><br />
118
 
                        <span class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></span></td>
 
116
                <tr class="form-field term-description-wrap">
 
117
                        <th scope="row"><label for="description"><?php _e( 'Description' ); ?></label></th>
 
118
                        <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $tag->description; // textarea_escaped ?></textarea>
 
119
                        <p class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p></td>
119
120
                </tr>
120
121
                <?php
121
122
                // Back compat hooks
153
154
                /**
154
155
                 * Fires after the Edit Term form fields are displayed.
155
156
                 *
156
 
                 * The dynamic portion of the hook name, $taxonomy, refers to
 
157
                 * The dynamic portion of the hook name, `$taxonomy`, refers to
157
158
                 * the taxonomy slug.
158
159
                 *
159
160
                 * @since 3.0.0
186
187
/**
187
188
 * Fires at the end of the Edit Term form for all taxonomies.
188
189
 *
189
 
 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
 
190
 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
190
191
 *
191
192
 * @since 3.0.0
192
193
 *
199
200
?>
200
201
</form>
201
202
</div>
 
203
 
 
204
<?php if ( ! wp_is_mobile() ) : ?>
202
205
<script type="text/javascript">
203
206
try{document.forms.edittag.name.focus();}catch(e){}
204
207
</script>
 
208
<?php endif;