2008-01-25 19:29:01 +00:00
< ? php
2008-08-16 07:27:34 +00:00
/**
* Edit tag form for inclusion in administration panels .
*
* @ package WordPress
* @ subpackage Administration
*/
2008-01-25 19:29:01 +00:00
if ( ! empty ( $tag_ID ) ) {
2008-08-16 07:27:34 +00:00
/**
* @ var string
*/
2008-01-25 19:29:01 +00:00
$heading = __ ( 'Edit Tag' );
2008-02-20 19:30:55 +00:00
$submit_text = __ ( 'Edit Tag' );
2008-03-18 19:20:18 +00:00
$form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">' ;
2008-01-25 19:29:01 +00:00
$action = 'editedtag' ;
$nonce_action = 'update-tag_' . $tag_ID ;
do_action ( 'edit_tag_form_pre' , $tag );
} else {
$heading = __ ( 'Add Tag' );
2008-02-20 19:30:55 +00:00
$submit_text = __ ( 'Add Tag' );
2008-03-18 19:20:18 +00:00
$form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">' ;
2008-01-25 19:29:01 +00:00
$action = 'addtag' ;
$nonce_action = 'add-tag' ;
do_action ( 'add_tag_form_pre' , $tag );
}
?>
< div class = " wrap " >
< h2 >< ? php echo $heading ?> </h2>
< div id = " ajax-response " ></ div >
< ? php echo $form ?>
< input type = " hidden " name = " action " value = " <?php echo $action ?> " />
< input type = " hidden " name = " tag_ID " value = " <?php echo $tag->term_id ?> " />
2008-03-26 21:54:02 +00:00
< ? php wp_original_referer_field ( true , 'previous' ); wp_nonce_field ( $nonce_action ); ?>
2008-02-24 04:33:10 +00:00
< table class = " form-table " >
2008-01-25 19:29:01 +00:00
< tr class = " form-field form-required " >
2008-02-20 20:30:39 +00:00
< th scope = " row " valign = " top " >< label for = " name " >< ? php _e ( 'Tag name' ) ?> </label></th>
2008-05-04 21:28:12 +00:00
< td >< input name = " name " id = " name " type = " text " value = " <?php echo attribute_escape( $tag->name ); ?> " size = " 40 " aria - required = " true " />
2008-03-11 07:23:07 +00:00
< p >< ? php _e ( 'The name is how the tag appears on your site.' ); ?> </p></td>
2008-01-25 19:29:01 +00:00
</ tr >
< tr class = " form-field " >
2008-02-20 20:30:39 +00:00
< th scope = " row " valign = " top " >< label for = " slug " >< ? php _e ( 'Tag slug' ) ?> </label></th>
2008-05-05 17:08:13 +00:00
< td >< input name = " slug " id = " slug " type = " text " value = " <?php echo attribute_escape(apply_filters('editable_slug', $tag->slug )); ?> " size = " 40 " />
2008-03-11 07:23:07 +00:00
< p >< ? php _e ( 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' ); ?> </p></td>
2008-01-25 19:29:01 +00:00
</ tr >
</ table >
2008-02-21 00:27:23 +00:00
< p class = " submit " >< input type = " submit " class = " button " name = " submit " value = " <?php echo $submit_text ?> " /></ p >
2008-01-25 19:29:01 +00:00
< ? php do_action ( 'edit_tag_form' , $tag ); ?>
</ form >
</ div >