X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8a06f4f9392d1ac373442f82ee40428a3cb81395..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-admin/edit-tag-form.php diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index de0f6c8f..d233b309 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -1,41 +1,265 @@ '; - $action = 'editedtag'; - $nonce_action = 'update-tag_' . $tag_ID; - do_action('edit_tag_form_pre', $tag); +/** + * Edit tag form for inclusion in administration panels. + * + * @package WordPress + * @subpackage Administration + */ + +// don't load directly +if ( ! defined( 'ABSPATH' ) ) { + die( '-1' ); +} + +// 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 { - $heading = __('Add Tag'); - $submit_text = __('Add Tag'); - $form = '
'; - $action = 'addtag'; - $nonce_action = 'add-tag'; - do_action('add_tag_form_pre', $tag); + /** + * 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 ); } -?> + +/** + * Use with caution, see https://codex.wordpress.org/Function_Reference/wp_reset_vars + */ +wp_reset_vars( array( 'wp_http_referer' ) ); + +$wp_http_referer = remove_query_arg( array( 'action', 'message', 'tag_ID' ), $wp_http_referer ); + +/** Also used by Edit Tags */ +require_once( ABSPATH . 'wp-admin/includes/edit-tag-messages.php' ); + +/** + * 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 ); ?>
-

+

labels->edit_item; ?>

+ + + + +
- - - - + +> + + + + - - - + + + + + + + + slug ) ? apply_filters( 'editable_slug', $tag->slug, $tag ) : ''; + ?> + + + + + + + - - - + + + + +
-

+

+

+ 0, + 'hide_if_empty' => false, + 'taxonomy' => $taxonomy, + 'name' => 'parent', + 'orderby' => 'name', + 'selected' => $tag->parent, + 'exclude_tree' => $tag->term_id, + 'hierarchical' => true, + 'show_option_none' => __( 'None' ), + ); + + /** This filter is documented in wp-admin/edit-tags.php */ + $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' ); + wp_dropdown_categories( $dropdown_args ); ?> + +

+ +
-

+

-

- +
+ + + +