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

git-svn-id: http://svn.automattic.com/wordpress/trunk@13035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-02-09 10:56:39 +00:00
parent 6aabfcb1a8
commit d7f782322a
2 changed files with 14 additions and 16 deletions

View File

@ -23,7 +23,7 @@ if ( 'category' == $taxonomy )
do_action('edit_category_form_pre', $tag );
else
do_action('edit_tag_form_pre', $tag);
do_action('edit_' . $taxonomy . '_form_pre', $tag, $taxonomy); ?>
do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?>
<div class="wrap">
<?php screen_icon(); ?>
@ -65,16 +65,16 @@ do_action('edit_' . $taxonomy . '_form_pre', $tag, $taxonomy); ?>
do_action('edit_category_form_fields', $tag);
else
do_action('edit_tag_form_fields', $tag);
do_action('edit_' . $taxonomy . '_form_fields', $tag, $taxonomy);
do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy);
?>
</table>
<p class="submit"><input type="submit" class="button-primary" name="submit" value="<?php esc_attr_e('Update Tag'); ?>" /></p>
<?php
if ( 'category' == $taxonomy )
do_action('edit_category_form_', $tag);
do_action('edit_category_form', $tag);
else
do_action('edit_tag_form_', $tag);
do_action('edit_' . $taxonomy . '_form', $tag, $taxonomy);
do_action('edit_tag_form', $tag);
do_action($taxonomy . '_edit_form', $tag, $taxonomy);
?>
</form>
</div>

View File

@ -290,10 +290,10 @@ else
<?php if ( current_user_can($tax->edit_cap) ) {
if ( 'category' == $taxonomy )
do_action('add_category_form_pre', (object)array('parent' => 0) );
do_action('add_category_form_pre', (object)array('parent' => 0) ); // Back compat hook. Deprecated in preference to $taxonomy_pre_add_form
else
do_action('add_tag_form_pre', $taxonomy);
do_action('add_' . $taxonomy . '_form_pre', $taxonomy);
do_action('add_tag_form_pre', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
do_action($taxonomy . '_pre_add_form', $taxonomy);
?>
<div class="form-wrap">
@ -328,21 +328,19 @@ else
<p><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></p>
</div>
<?php
if ( 'category' == $taxonomy )
do_action('add_category_form_fields');
else
<?php
if ( ! is_taxonomy_hierarchical($taxonomy) )
do_action('add_tag_form_fields', $taxonomy);
do_action('add_' . $taxonomy . '_form_fields', $taxonomy);
do_action($taxonomy . '_add_form_fields', $taxonomy);
?>
<p class="submit"><input type="submit" class="button" name="submit" id="submit" value="<?php esc_attr_e('Add Tag'); ?>" /></p>
<?php
if ( 'category' == $taxonomy )
do_action('edit_category_form', (object)array('parent' => 0) );
do_action('edit_category_form', (object)array('parent' => 0) ); // Back compat hook. Deprecated in preference to $taxonomy_add_form
else
do_action('add_tag_form', $taxonomy);
do_action('add_' . $taxonomy . '_form', $taxonomy);
do_action('add_tag_form', $taxonomy); // Back compat hook. Applies to all Taxonomies -not- categories
do_action($taxonomy . '_add_form', $taxonomy);
?>
</form></div>
<?php } ?>