Make WordPress Core


Ignore:
Timestamp:
10/25/2008 08:01:37 AM (16 years ago)
Author:
azaozz
Message:

2 column Tags page, needs more styling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tag-form.php

    r9032 r9339  
    77 */
    88
    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);
     9if ( empty($tag_ID) ) { ?>
     10    <div id="message" class="updated fade"><p><strong><?php _e('A tag was not selected for editing.'); ?></strong></p></div>
     11<?php
     12    return;
    2613}
    27 ?>
     14
     15do_action('edit_tag_form_pre', $tag); ?>
    2816
    2917<div class="wrap">
    30 <?php echo $heading ?>
     18<h2><?php _e('Edit Tag'); ?></h2>
    3119<div id="ajax-response"></div>
    32 <?php echo $form ?>
    33 <input type="hidden" name="action" value="<?php echo $action ?>" />
     20<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">
     21<input type="hidden" name="action" value="editedtag" />
    3422<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); ?>
     23<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?>
    3624    <table class="form-table">
    3725        <tr class="form-field form-required">
     
    4634        </tr>
    4735    </table>
    48 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
     36<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Edit Tag'); ?>" /></p>
    4937<?php do_action('edit_tag_form', $tag); ?>
    5038</form>
Note: See TracChangeset for help on using the changeset viewer.