]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/edit-tags.php
WordPress 4.2.3
[autoinstalls/wordpress.git] / wp-admin / edit-tags.php
1 <?php
2 /**
3  * Edit Tags Administration Screen.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /** WordPress Administration Bootstrap */
10 require_once( dirname( __FILE__ ) . '/admin.php' );
11
12 if ( ! $taxnow )
13         wp_die( __( 'Invalid taxonomy' ) );
14
15 $tax = get_taxonomy( $taxnow );
16
17 if ( ! $tax )
18         wp_die( __( 'Invalid taxonomy' ) );
19
20 if ( ! current_user_can( $tax->cap->manage_terms ) )
21         wp_die( __( 'Cheatin&#8217; uh?' ), 403 );
22
23 // $post_type is set when the WP_Terms_List_Table instance is created
24 global $post_type;
25
26 $wp_list_table = _get_list_table('WP_Terms_List_Table');
27 $pagenum = $wp_list_table->get_pagenum();
28
29 $title = $tax->labels->name;
30
31 if ( 'post' != $post_type ) {
32         $parent_file = ( 'attachment' == $post_type ) ? 'upload.php' : "edit.php?post_type=$post_type";
33         $submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
34 } elseif ( 'link_category' == $tax->name ) {
35         $parent_file = 'link-manager.php';
36         $submenu_file = 'edit-tags.php?taxonomy=link_category';
37 } else {
38         $parent_file = 'edit.php';
39         $submenu_file = "edit-tags.php?taxonomy=$taxonomy";
40 }
41
42 add_screen_option( 'per_page', array( 'default' => 20, 'option' => 'edit_' . $tax->name . '_per_page' ) );
43
44 $location = false;
45
46 switch ( $wp_list_table->current_action() ) {
47
48 case 'add-tag':
49
50         check_admin_referer( 'add-tag', '_wpnonce_add-tag' );
51
52         if ( !current_user_can( $tax->cap->edit_terms ) )
53                 wp_die( __( 'Cheatin&#8217; uh?' ), 403 );
54
55         $ret = wp_insert_term( $_POST['tag-name'], $taxonomy, $_POST );
56         $location = 'edit-tags.php?taxonomy=' . $taxonomy;
57         if ( 'post' != $post_type )
58                 $location .= '&post_type=' . $post_type;
59
60         if ( $referer = wp_get_original_referer() ) {
61                 if ( false !== strpos( $referer, 'edit-tags.php' ) )
62                         $location = $referer;
63         }
64
65         if ( $ret && !is_wp_error( $ret ) )
66                 $location = add_query_arg( 'message', 1, $location );
67         else
68                 $location = add_query_arg( array( 'error' => true, 'message' => 4 ), $location );
69
70         break;
71
72 case 'delete':
73         $location = 'edit-tags.php?taxonomy=' . $taxonomy;
74         if ( 'post' != $post_type )
75                 $location .= '&post_type=' . $post_type;
76         if ( $referer = wp_get_referer() ) {
77                 if ( false !== strpos( $referer, 'edit-tags.php' ) )
78                         $location = $referer;
79         }
80
81         if ( ! isset( $_REQUEST['tag_ID'] ) ) {
82                 break;
83         }
84
85         $tag_ID = (int) $_REQUEST['tag_ID'];
86         check_admin_referer( 'delete-tag_' . $tag_ID );
87
88         if ( !current_user_can( $tax->cap->delete_terms ) )
89                 wp_die( __( 'Cheatin&#8217; uh?' ), 403 );
90
91         wp_delete_term( $tag_ID, $taxonomy );
92
93         $location = add_query_arg( 'message', 2, $location );
94
95         break;
96
97 case 'bulk-delete':
98         check_admin_referer( 'bulk-tags' );
99
100         if ( !current_user_can( $tax->cap->delete_terms ) )
101                 wp_die( __( 'Cheatin&#8217; uh?' ), 403 );
102
103         $tags = (array) $_REQUEST['delete_tags'];
104         foreach ( $tags as $tag_ID ) {
105                 wp_delete_term( $tag_ID, $taxonomy );
106         }
107
108         $location = 'edit-tags.php?taxonomy=' . $taxonomy;
109         if ( 'post' != $post_type )
110                 $location .= '&post_type=' . $post_type;
111         if ( $referer = wp_get_referer() ) {
112                 if ( false !== strpos( $referer, 'edit-tags.php' ) )
113                         $location = $referer;
114         }
115
116         $location = add_query_arg( 'message', 6, $location );
117
118         break;
119
120 case 'edit':
121         $title = $tax->labels->edit_item;
122
123         $tag_ID = (int) $_REQUEST['tag_ID'];
124
125         $tag = get_term( $tag_ID, $taxonomy, OBJECT, 'edit' );
126         if ( ! $tag )
127                 wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
128         require_once( ABSPATH . 'wp-admin/admin-header.php' );
129         include( ABSPATH . 'wp-admin/edit-tag-form.php' );
130         include( ABSPATH . 'wp-admin/admin-footer.php' );
131
132         exit;
133
134 case 'editedtag':
135         $tag_ID = (int) $_POST['tag_ID'];
136         check_admin_referer( 'update-tag_' . $tag_ID );
137
138         if ( !current_user_can( $tax->cap->edit_terms ) )
139                 wp_die( __( 'Cheatin&#8217; uh?' ), 403 );
140
141         $tag = get_term( $tag_ID, $taxonomy );
142         if ( ! $tag )
143                 wp_die( __( 'You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?' ) );
144
145         $ret = wp_update_term( $tag_ID, $taxonomy, $_POST );
146
147         $location = 'edit-tags.php?taxonomy=' . $taxonomy;
148         if ( 'post' != $post_type )
149                 $location .= '&post_type=' . $post_type;
150
151         if ( $referer = wp_get_original_referer() ) {
152                 if ( false !== strpos( $referer, 'edit-tags.php' ) )
153                         $location = $referer;
154         }
155
156         if ( $ret && !is_wp_error( $ret ) )
157                 $location = add_query_arg( 'message', 3, $location );
158         else
159                 $location = add_query_arg( array( 'error' => true, 'message' => 5 ), $location );
160         break;
161 }
162
163 if ( ! $location && ! empty( $_REQUEST['_wp_http_referer'] ) ) {
164         $location = remove_query_arg( array('_wp_http_referer', '_wpnonce'), wp_unslash($_SERVER['REQUEST_URI']) );
165 }
166
167 if ( $location ) {
168         if ( ! empty( $_REQUEST['paged'] ) ) {
169                 $location = add_query_arg( 'paged', (int) $_REQUEST['paged'], $location );
170         }
171         wp_redirect( $location );
172         exit;
173 }
174
175 $wp_list_table->prepare_items();
176 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
177
178 if ( $pagenum > $total_pages && $total_pages > 0 ) {
179         wp_redirect( add_query_arg( 'paged', $total_pages ) );
180         exit;
181 }
182
183 wp_enqueue_script('admin-tags');
184 if ( current_user_can($tax->cap->edit_terms) )
185         wp_enqueue_script('inline-edit-tax');
186
187 if ( 'category' == $taxonomy || 'link_category' == $taxonomy || 'post_tag' == $taxonomy  ) {
188         $help ='';
189         if ( 'category' == $taxonomy )
190                 $help = '<p>' . sprintf(__( 'You can use categories to define sections of your site and group related posts. The default category is &#8220;Uncategorized&#8221; until you change it in your <a href="%s">writing settings</a>.' ) , 'options-writing.php' ) . '</p>';
191         elseif ( 'link_category' == $taxonomy )
192                 $help = '<p>' . __( 'You can create groups of links by using Link Categories. Link Category names must be unique and Link Categories are separate from the categories you use for posts.' ) . '</p>';
193         else
194                 $help = '<p>' . __( 'You can assign keywords to your posts using <strong>tags</strong>. Unlike categories, tags have no hierarchy, meaning there&#8217;s no relationship from one tag to another.' ) . '</p>';
195
196         if ( 'link_category' == $taxonomy )
197                 $help .= '<p>' . __( 'You can delete Link Categories in the Bulk Action pull-down, but that action does not delete the links within the category. Instead, it moves them to the default Link Category.' ) . '</p>';
198         else
199                 $help .='<p>' . __( 'What&#8217;s the difference between categories and tags? Normally, tags are ad-hoc keywords that identify important information in your post (names, subjects, etc) that may or may not recur in other posts, while categories are pre-determined sections. If you think of your site like a book, the categories are like the Table of Contents and the tags are like the terms in the index.' ) . '</p>';
200
201         get_current_screen()->add_help_tab( array(
202                 'id'      => 'overview',
203                 'title'   => __('Overview'),
204                 'content' => $help,
205         ) );
206
207         if ( 'category' == $taxonomy || 'post_tag' == $taxonomy ) {
208                 if ( 'category' == $taxonomy )
209                         $help = '<p>' . __( 'When adding a new category on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
210                 else
211                         $help = '<p>' . __( 'When adding a new tag on this screen, you&#8217;ll fill in the following fields:' ) . '</p>';
212
213                 $help .= '<ul>' .
214                 '<li>' . __( '<strong>Name</strong> - The name is how it appears on your site.' ) . '</li>';
215
216                 if ( ! global_terms_enabled() )
217                         $help .= '<li>' . __( '<strong>Slug</strong> - The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ) . '</li>';
218
219                 if ( 'category' == $taxonomy )
220                         $help .= '<li>' . __( '<strong>Parent</strong> - Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have child categories for Bebop and Big Band. Totally optional. To create a subcategory, just choose another category from the Parent dropdown.' ) . '</li>';
221
222                 $help .= '<li>' . __( '<strong>Description</strong> - The description is not prominent by default; however, some themes may display it.' ) . '</li>' .
223                 '</ul>' .
224                 '<p>' . __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.' ) . '</p>';
225
226                 get_current_screen()->add_help_tab( array(
227                         'id'      => 'adding-terms',
228                         'title'   => 'category' == $taxonomy ? __( 'Adding Categories' ) : __( 'Adding Tags' ),
229                         'content' => $help,
230                 ) );
231         }
232
233         $help = '<p><strong>' . __( 'For more information:' ) . '</strong></p>';
234
235         if ( 'category' == $taxonomy )
236                 $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Categories_Screen" target="_blank">Documentation on Categories</a>' ) . '</p>';
237         elseif ( 'link_category' == $taxonomy )
238                 $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Links_Link_Categories_Screen" target="_blank">Documentation on Link Categories</a>' ) . '</p>';
239         else
240                 $help .= '<p>' . __( '<a href="https://codex.wordpress.org/Posts_Tags_Screen" target="_blank">Documentation on Tags</a>' ) . '</p>';
241
242         $help .= '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>';
243
244         get_current_screen()->set_help_sidebar( $help );
245
246         unset( $help );
247 }
248
249 require_once( ABSPATH . 'wp-admin/admin-header.php' );
250
251 if ( !current_user_can($tax->cap->edit_terms) )
252         wp_die( __('You are not allowed to edit this item.') );
253
254 $messages = array();
255 $messages['_item'] = array(
256         0 => '', // Unused. Messages start at index 1.
257         1 => __( 'Item added.' ),
258         2 => __( 'Item deleted.' ),
259         3 => __( 'Item updated.' ),
260         4 => __( 'Item not added.' ),
261         5 => __( 'Item not updated.' ),
262         6 => __( 'Items deleted.' )
263 );
264 $messages['category'] = array(
265         0 => '', // Unused. Messages start at index 1.
266         1 => __( 'Category added.' ),
267         2 => __( 'Category deleted.' ),
268         3 => __( 'Category updated.' ),
269         4 => __( 'Category not added.' ),
270         5 => __( 'Category not updated.' ),
271         6 => __( 'Categories deleted.' )
272 );
273 $messages['post_tag'] = array(
274         0 => '', // Unused. Messages start at index 1.
275         1 => __( 'Tag added.' ),
276         2 => __( 'Tag deleted.' ),
277         3 => __( 'Tag updated.' ),
278         4 => __( 'Tag not added.' ),
279         5 => __( 'Tag not updated.' ),
280         6 => __( 'Tags deleted.' )
281 );
282
283 /**
284  * Filter the messages displayed when a tag is updated.
285  *
286  * @since 3.7.0
287  *
288  * @param array $messages The messages to be displayed.
289  */
290 $messages = apply_filters( 'term_updated_messages', $messages );
291
292 $message = false;
293 if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) {
294         if ( isset( $messages[ $taxonomy ][ $msg ] ) )
295                 $message = $messages[ $taxonomy ][ $msg ];
296         elseif ( ! isset( $messages[ $taxonomy ] ) && isset( $messages['_item'][ $msg ] ) )
297                 $message = $messages['_item'][ $msg ];
298 }
299
300 $class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
301 ?>
302
303 <div class="wrap nosubsub">
304 <h2><?php echo esc_html( $title );
305 if ( !empty($_REQUEST['s']) )
306         printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( wp_unslash($_REQUEST['s']) ) ); ?>
307 </h2>
308
309 <?php if ( $message ) : ?>
310 <div id="message" class="<?php echo $class; ?> notice is-dismissible"><p><?php echo $message; ?></p></div>
311 <?php $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'message', 'error' ), $_SERVER['REQUEST_URI'] );
312 endif; ?>
313 <div id="ajax-response"></div>
314
315 <form class="search-form" method="get">
316 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
317 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
318
319 <?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
320
321 </form>
322 <br class="clear" />
323
324 <div id="col-container">
325
326 <div id="col-right">
327 <div class="col-wrap">
328 <form id="posts-filter" method="post">
329 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
330 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
331
332 <?php $wp_list_table->display(); ?>
333
334 <br class="clear" />
335 </form>
336
337 <?php if ( 'category' == $taxonomy ) : ?>
338 <div class="form-wrap">
339 <p>
340         <?php
341         /** This filter is documented in wp-includes/category-template.php */
342         printf( __( '<strong>Note:</strong><br />Deleting a category does not delete the posts in that category. Instead, posts that were only assigned to the deleted category are set to the category <strong>%s</strong>.' ), apply_filters( 'the_category', get_cat_name( get_option( 'default_category') ) ) );
343         ?>
344 </p>
345 <?php if ( current_user_can( 'import' ) ) : ?>
346 <p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'import.php') ?></p>
347 <?php endif; ?>
348 </div>
349 <?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
350 <div class="form-wrap">
351 <p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.'), 'import.php') ;?></p>
352 </div>
353 <?php endif;
354
355 /**
356  * Fires after the taxonomy list table.
357  *
358  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
359  *
360  * @since 3.0.0
361  *
362  * @param string $taxonomy The taxonomy name.
363  */
364 do_action( "after-{$taxonomy}-table", $taxonomy );
365 ?>
366
367 </div>
368 </div><!-- /col-right -->
369
370 <div id="col-left">
371 <div class="col-wrap">
372
373 <?php
374
375 if ( !is_null( $tax->labels->popular_items ) ) {
376         if ( current_user_can( $tax->cap->edit_terms ) )
377                 $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
378         else
379                 $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
380
381         if ( $tag_cloud ) :
382         ?>
383 <div class="tagcloud">
384 <h3><?php echo $tax->labels->popular_items; ?></h3>
385 <?php echo $tag_cloud; unset( $tag_cloud ); ?>
386 </div>
387 <?php
388 endif;
389 }
390
391 if ( current_user_can($tax->cap->edit_terms) ) {
392         if ( 'category' == $taxonomy ) {
393                 /**
394                  * Fires before the Add Category form.
395                  *
396                  * @since 2.1.0
397                  * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
398                  *
399                  * @param object $arg Optional arguments cast to an object.
400                  */
401                 do_action( 'add_category_form_pre', (object) array( 'parent' => 0 ) );
402         } elseif ( 'link_category' == $taxonomy ) {
403                 /**
404                  * Fires before the link category form.
405                  *
406                  * @since 2.3.0
407                  * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
408                  *
409                  * @param object $arg Optional arguments cast to an object.
410                  */
411                 do_action( 'add_link_category_form_pre', (object) array( 'parent' => 0 ) );
412         } else {
413                 /**
414                  * Fires before the Add Tag form.
415                  *
416                  * @since 2.5.0
417                  * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead.
418                  *
419                  * @param string $taxonomy The taxonomy slug.
420                  */
421                 do_action( 'add_tag_form_pre', $taxonomy );
422         }
423
424         /**
425          * Fires before the Add Term form for all taxonomies.
426          *
427          * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
428          *
429          * @since 3.0.0
430          *
431          * @param string $taxonomy The taxonomy slug.
432          */
433         do_action( "{$taxonomy}_pre_add_form", $taxonomy );
434 ?>
435
436 <div class="form-wrap">
437 <h3><?php echo $tax->labels->add_new_item; ?></h3>
438 <form id="addtag" method="post" action="edit-tags.php" class="validate"
439 <?php
440 /**
441  * Fires at the beginning of the Add Tag form.
442  *
443  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
444  *
445  * @since 3.7.0
446  */
447 do_action( "{$taxonomy}_term_new_form_tag" );
448 ?>>
449 <input type="hidden" name="action" value="add-tag" />
450 <input type="hidden" name="screen" value="<?php echo esc_attr($current_screen->id); ?>" />
451 <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
452 <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
453 <?php wp_nonce_field('add-tag', '_wpnonce_add-tag'); ?>
454
455 <div class="form-field form-required term-name-wrap">
456         <label for="tag-name"><?php _ex( 'Name', 'term name' ); ?></label>
457         <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
458         <p><?php _e('The name is how it appears on your site.'); ?></p>
459 </div>
460 <?php if ( ! global_terms_enabled() ) : ?>
461 <div class="form-field term-slug-wrap">
462         <label for="tag-slug"><?php _e( 'Slug' ); ?></label>
463         <input name="slug" id="tag-slug" type="text" value="" size="40" />
464         <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>
465 </div>
466 <?php endif; // global_terms_enabled() ?>
467 <?php if ( is_taxonomy_hierarchical($taxonomy) ) : ?>
468 <div class="form-field term-parent-wrap">
469         <label for="parent"><?php _ex( 'Parent', 'term parent' ); ?></label>
470         <?php
471         $dropdown_args = array(
472                 'hide_empty'       => 0,
473                 'hide_if_empty'    => false,
474                 'taxonomy'         => $taxonomy,
475                 'name'             => 'parent',
476                 'orderby'          => 'name',
477                 'hierarchical'     => true,
478                 'show_option_none' => __( 'None' ),
479         );
480
481         /**
482          * Filter the taxonomy parent drop-down on the Edit Term page.
483          *
484          * @since 3.7.0
485          * @since 4.2.0 Added `$context` parameter.
486          *
487          * @param array  $dropdown_args {
488          *     An array of taxonomy parent drop-down arguments.
489          *
490          *     @type int|bool $hide_empty       Whether to hide terms not attached to any posts. Default 0|false.
491          *     @type bool     $hide_if_empty    Whether to hide the drop-down if no terms exist. Default false.
492          *     @type string   $taxonomy         The taxonomy slug.
493          *     @type string   $name             Value of the name attribute to use for the drop-down select element.
494          *                                      Default 'parent'.
495          *     @type string   $orderby          The field to order by. Default 'name'.
496          *     @type bool     $hierarchical     Whether the taxonomy is hierarchical. Default true.
497          *     @type string   $show_option_none Label to display if there are no terms. Default 'None'.
498          * }
499          * @param string $taxonomy The taxonomy slug.
500          * @param string $context  Filter context. Accepts 'new' or 'edit'.
501          */
502         $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' );
503
504         wp_dropdown_categories( $dropdown_args );
505         ?>
506         <?php if ( 'category' == $taxonomy ) : // @todo: Generic text for hierarchical taxonomies ?>
507                 <p><?php _e('Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.'); ?></p>
508         <?php endif; ?>
509 </div>
510 <?php endif; // is_taxonomy_hierarchical() ?>
511 <div class="form-field term-description-wrap">
512         <label for="tag-description"><?php _e( 'Description' ); ?></label>
513         <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
514         <p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
515 </div>
516
517 <?php
518 if ( ! is_taxonomy_hierarchical( $taxonomy ) ) {
519         /**
520          * Fires after the Add Tag form fields for non-hierarchical taxonomies.
521          *
522          * @since 3.0.0
523          *
524          * @param string $taxonomy The taxonomy slug.
525          */
526         do_action( 'add_tag_form_fields', $taxonomy );
527 }
528
529 /**
530  * Fires after the Add Term form fields.
531  *
532  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
533  *
534  * @since 3.0.0
535  *
536  * @param string $taxonomy The taxonomy slug.
537  */
538 do_action( "{$taxonomy}_add_form_fields", $taxonomy );
539
540 submit_button( $tax->labels->add_new_item );
541
542 if ( 'category' == $taxonomy ) {
543         /**
544          * Fires at the end of the Edit Category form.
545          *
546          * @since 2.1.0
547          * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
548          *
549          * @param object $arg Optional arguments cast to an object.
550          */
551         do_action( 'edit_category_form', (object) array( 'parent' => 0 ) );
552 } elseif ( 'link_category' == $taxonomy ) {
553         /**
554          * Fires at the end of the Edit Link form.
555          *
556          * @since 2.3.0
557          * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
558          *
559          * @param object $arg Optional arguments cast to an object.
560          */
561         do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) );
562 } else {
563         /**
564          * Fires at the end of the Add Tag form.
565          *
566          * @since 2.7.0
567          * @deprecated 3.0.0 Use {$taxonomy}_add_form instead.
568          *
569          * @param string $taxonomy The taxonomy slug.
570          */
571         do_action( 'add_tag_form', $taxonomy );
572 }
573
574 /**
575  * Fires at the end of the Add Term form for all taxonomies.
576  *
577  * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
578  *
579  * @since 3.0.0
580  *
581  * @param string $taxonomy The taxonomy slug.
582  */
583 do_action( "{$taxonomy}_add_form", $taxonomy );
584 ?>
585 </form></div>
586 <?php } ?>
587
588 </div>
589 </div><!-- /col-left -->
590
591 </div><!-- /col-container -->
592 </div><!-- /wrap -->
593
594 <?php if ( ! wp_is_mobile() ) : ?>
595 <script type="text/javascript">
596 try{document.forms.addtag['tag-name'].focus();}catch(e){}
597 </script>
598 <?php
599 endif;
600
601 $wp_list_table->inline_edit();
602
603 include( ABSPATH . 'wp-admin/admin-footer.php' );