Make WordPress Core

Changeset 13035


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

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

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r13025 r13035  
    2424else
    2525    do_action('edit_tag_form_pre', $tag);
    26 do_action('edit_' . $taxonomy . '_form_pre', $tag, $taxonomy);  ?>
     26do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy);  ?>
    2727
    2828<div class="wrap">
     
    6666        else
    6767            do_action('edit_tag_form_fields', $tag);
    68         do_action('edit_' . $taxonomy . '_form_fields', $tag, $taxonomy);
     68        do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy);
    6969        ?>
    7070    </table>
     
    7272<?php
    7373if ( 'category' == $taxonomy )
    74     do_action('edit_category_form_', $tag);
     74    do_action('edit_category_form', $tag);
    7575else
    76     do_action('edit_tag_form_', $tag);
    77 do_action('edit_' . $taxonomy . '_form', $tag, $taxonomy);
     76    do_action('edit_tag_form', $tag);
     77do_action($taxonomy . '_edit_form', $tag, $taxonomy);
    7878?>
    7979</form>
  • 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.