WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/09/2010 10:56:39 AM (10 years ago)
Author:
dd32
Message:

Rename new taxonomy page hooks to prevent hook conflicts. See #12171

File:
1 edited

Legend:

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

    r13025 r13035  
    291291<?php if ( current_user_can($tax->edit_cap) ) {
    292292    if ( 'category' == $taxonomy )
    293         do_action('add_category_form_pre', (object)array('parent' => 0) );
     293        do_action('add_category_form_pre', (object)array('parent' => 0) );  // Back compat hook. Deprecated in preference to $taxonomy_pre_add_form
    294294    else
    295         do_action('add_tag_form_pre', $taxonomy);
    296     do_action('add_' . $taxonomy . '_form_pre', $taxonomy);
     295        do_action('add_tag_form_pre', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
     296    do_action($taxonomy . '_pre_add_form', $taxonomy);
    297297?>
    298298
     
    329329</div>
    330330
     331<?php
     332if ( ! is_taxonomy_hierarchical($taxonomy) )
     333    do_action('add_tag_form_fields', $taxonomy);
     334do_action($taxonomy . '_add_form_fields', $taxonomy);
     335?>
     336
     337<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
    331338<?php
    332339if ( 'category' == $taxonomy )
    333     do_action('add_category_form_fields');
     340    do_action('edit_category_form', (object)array('parent' => 0) );  // Back compat hook. Deprecated in preference to $taxonomy_add_form
    334341else
    335     do_action('add_tag_form_fields', $taxonomy);
    336 do_action('add_' . $taxonomy . '_form_fields', $taxonomy);
    337 ?>
    338 
    339 <p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
    340 <?php
    341 if ( 'category' == $taxonomy )
    342     do_action('edit_category_form', (object)array('parent' => 0) );
    343 else
    344     do_action('add_tag_form', $taxonomy);
    345 do_action('add_' . $taxonomy . '_form', $taxonomy);
     342    do_action('add_tag_form', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
     343do_action($taxonomy . '_add_form', $taxonomy);
    346344?>
    347345</form></div>
Note: See TracChangeset for help on using the changeset viewer.