WordPress.org

Make WordPress Core

Ticket #12171: 12171.2.diff

File 12171.2.diff, 776 bytes (added by nacin, 6 years ago)

Better patch.

  • wp-admin/edit-tags.php

     
    329329</div> 
    330330 
    331331<?php  
    332 if ( 'category' == $taxonomy )  
    333         do_action('add_category_form_fields'); 
    334 else 
    335         do_action('add_tag_form_fields', $taxonomy); 
    336 do_action('add_' . $taxonomy . '_form_fields', $taxonomy); 
     332if ( 'category' != $taxonomy ) 
     333        do_action('add_tag_form_fields', $taxonomy); // back compat. 
     334if ( 'tag' != $taxonomy ) // prevent back compat hook from running again. 
     335        do_action('add_' . $taxonomy . '_form_fields', $taxonomy); 
    337336?> 
    338337 
    339338<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>