Inline documentation for hooks in wp-admin/edit-tag-form.php.

Props nicolealleyinteractivecom, kpdesign.
Fixes #25448.

Built from https://develop.svn.wordpress.org/trunk@26895


git-svn-id: http://core.svn.wordpress.org/trunk@26778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2014-01-02 04:02:10 +00:00
parent fa271ded20
commit da7a2421a3

View File

@ -18,18 +18,63 @@ if ( empty($tag_ID) ) { ?>
// Back compat hooks
if ( 'category' == $taxonomy ) {
/**
* Fires before the Edit Category form.
*
* @since 2.1.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current category term object.
*/
do_action( 'edit_category_form_pre', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/**
* Fires before the Edit Link Category form.
*
* @since 2.3.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current link category term object.
*/
do_action( 'edit_link_category_form_pre', $tag );
} else {
/**
* Fires before the Edit Tag form.
*
* @since 2.5.0
* @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead.
*
* @param object $tag Current tag term object.
*/
do_action( 'edit_tag_form_pre', $tag );
}
/**
* Fires before the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current $taxonomy slug.
*/
do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
<div class="wrap">
<h2><?php echo $tax->labels->edit_item; ?></h2>
<div id="ajax-response"></div>
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>>
<?php
/**
* Fires inside the Edit Term form tag.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* the taxonomy slug.
*
* @since 3.7.0
*/
?>
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( "{$taxonomy}_term_edit_form_tag" ); ?>>
<input type="hidden" name="action" value="editedtag" />
<input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" />
<input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" />
@ -43,7 +88,16 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
<?php if ( !global_terms_enabled() ) { ?>
<tr class="form-field">
<th scope="row" valign="top"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th>
<td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
<?php
/**
* Filter the editable term slug.
*
* @since 2.6.0
*
* @param string $slug The current term slug.
*/
?>
<td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr( apply_filters( 'editable_slug', $tag->slug ) ); ?>" size="40" />
<p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
</tr>
<?php } ?>
@ -65,26 +119,81 @@ do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>
</tr>
<?php
// Back compat hooks
if ( 'category' == $taxonomy )
do_action('edit_category_form_fields', $tag);
elseif ( 'link_category' == $taxonomy )
do_action('edit_link_category_form_fields', $tag);
else
do_action('edit_tag_form_fields', $tag);
do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy);
if ( 'category' == $taxonomy ) {
/**
* Fires after the Edit Category form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current category term object.
*/
do_action( 'edit_category_form_fields', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/**
* Fires after the Edit Link Category form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current link category term object.
*/
do_action( 'edit_link_category_form_fields', $tag );
} else {
/**
* Fires after the Edit Tag form fields are displayed.
*
* @since 2.9.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
*
* @param object $tag Current tag term object.
*/
do_action( 'edit_tag_form_fields', $tag );
}
/**
* Fires after the Edit Term form fields are displayed.
*
* The dynamic portion of the hook name, $taxonomy, refers to
* the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current taxonomy slug.
*/
do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
?>
</table>
<?php
// Back compat hooks
if ( 'category' == $taxonomy )
do_action('edit_category_form', $tag);
elseif ( 'link_category' == $taxonomy )
do_action('edit_link_category_form', $tag);
else
do_action('edit_tag_form', $tag);
do_action($taxonomy . '_edit_form', $tag, $taxonomy);
if ( 'category' == $taxonomy ) {
/** This action is documented in wp-admin/edit-tags.php */
do_action( 'edit_category_form', $tag );
} elseif ( 'link_category' == $taxonomy ) {
/** This action is documented in wp-admin/edit-tags.php */
do_action( 'edit_link_category_form', $tag );
} else {
/**
* Fires at the end of the Edit Term form.
*
* @since 2.5.0
* @deprecated 3.0.0 Use {$taxonomy}_edit_form instead.
*
* @param object $tag Current taxonomy term object.
*/
do_action( 'edit_tag_form', $tag );
}
/**
* Fires at the end of the Edit Term form for all taxonomies.
*
* The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
*
* @since 3.0.0
*
* @param object $tag Current taxonomy term object.
* @param string $taxonomy Current taxonomy slug.
*/
do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
submit_button( __('Update') );
?>