Make WordPress Core


Ignore:
Timestamp:
02/04/2010 10:51:58 AM (15 years ago)
Author:
dd32
Message:

Migrate Category Edit UI hooks, Standardise on custom-taxonomies hooks, add custom-fields for taxonomies UI hooks. See #11838, Fixes #11191

File:
1 edited

Legend:

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

    r12835 r12941  
    290290
    291291<?php if ( current_user_can($tax->edit_cap) ) {
    292     do_action('add_tag_form_pre', $taxonomy); ?>
     292    if ( 'category' == $taxonomy )
     293        do_action('add_category_form_pre', (object)array('parent' => 0) );
     294    else
     295        do_action('add_tag_form_pre', $taxonomy);
     296    do_action('add_' . $taxonomy . '_form_pre', $taxonomy);
     297?>
    293298
    294299<div class="form-wrap">
     
    324329</div>
    325330
     331<?php
     332if ( 'category' == $taxonomy )
     333    do_action('add_category_form_fields');
     334else
     335    do_action('add_tag_form_fields', $taxonomy);
     336do_action('add_' . $taxonomy . '_form_fields', $taxonomy);
     337?>
     338
    326339<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
    327 <?php do_action('add_tag_form', $taxonomy); ?>
     340<?php
     341if ( 'category' == $taxonomy )
     342    do_action('edit_category_form', (object)array('parent' => 0) );
     343else
     344    do_action('add_tag_form', $taxonomy);
     345do_action('add_' . $taxonomy . '_form', $taxonomy);
     346?>
    328347</form></div>
    329348<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.