WordPress.org

Make WordPress Core

Ticket #12171: 12171.4.diff

File 12171.4.diff, 2.5 KB (added by dd32, 8 years ago)
  • wp-admin/edit-tag-form.php

     
    1919        return;
    2020}
    2121
    22 if ( 'category' == $taxonomy )
    23         do_action('edit_category_form_pre', $tag );
    24 else
     22if ( !is_taxonomy_hierarchical($taxonomy) )
    2523        do_action('edit_tag_form_pre', $tag);
    26 do_action('edit_' . $taxonomy . '_form_pre', $tag, $taxonomy);  ?>
     24do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy);  ?>
    2725
    2826<div class="wrap">
    2927<?php screen_icon(); ?>
     
    6563                        do_action('edit_category_form_fields', $tag);
    6664                else
    6765                        do_action('edit_tag_form_fields', $tag);
    68                 do_action('edit_' . $taxonomy . '_form_fields', $tag, $taxonomy);
     66                do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy);
    6967                ?>
    7068        </table>
    7169<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php esc_attr_e('Update Tag'); ?>" /></p>
    7270<?php
    7371if ( 'category' == $taxonomy )
    74         do_action('edit_category_form_', $tag);
     72        do_action('edit_category_form', $tag);
    7573else
    76         do_action('edit_tag_form_', $tag);
    77 do_action('edit_' . $taxonomy . '_form', $tag, $taxonomy);
     74        do_action('edit_tag_form', $tag);
     75do_action($taxonomy . '_edit_form', $tag, $taxonomy);
    7876?>
    7977</form>
    8078</div>
  • wp-admin/edit-tags.php

     
    293293                do_action('add_category_form_pre', (object)array('parent' => 0) );
    294294        else
    295295                do_action('add_tag_form_pre', $taxonomy);
    296         do_action('add_' . $taxonomy . '_form_pre', $taxonomy);
     296        do_action($taxonomy . '_pre_add_form', $taxonomy);
    297297?>
    298298
    299299<div class="form-wrap">
     
    329329</div>
    330330
    331331<?php
    332 if ( 'category' == $taxonomy )
    333         do_action('add_category_form_fields');
    334 else
     332if ( ! is_taxonomy_hierarchical($taxonomy) )
    335333        do_action('add_tag_form_fields', $taxonomy);
    336 do_action('add_' . $taxonomy . '_form_fields', $taxonomy);
     334do_action($taxonomy . '_add_form_fields', $taxonomy);
    337335?>
    338336
    339337<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
     
    342340        do_action('edit_category_form', (object)array('parent' => 0) );
    343341else
    344342        do_action('add_tag_form', $taxonomy);
    345 do_action('add_' . $taxonomy . '_form', $taxonomy);
     343do_action($taxonomy . '_add_form', $taxonomy);
    346344?>
    347345</form></div>
    348346<?php } ?>