wp-admin/edit-tag-form.php


Lines:

1 to 100 of 336
<?php

/**
 * 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 {@see '{$taxonomy}_pre_edit_form'} instead.
 *
 * @param WP_Term $tag Current category term object.
 */
  do_action_deprecated( 'edit_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
} elseif ( 'link_category' === $taxonomy ) {
  
/**
 * Fires before the Edit Link Category form.
 *
 * @since 2.3.0
 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead.
 *
 * @param WP_Term $tag Current link category term object.
 */
  do_action_deprecated( 'edit_link_category_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
} else {
  
/**
 * Fires before the Edit Tag form.
 *
 * @since 2.5.0
 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead.
 *
 * @param WP_Term $tag Current tag term object.
 */
  do_action_deprecated( 'edit_tag_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
}


/**
 * Use with caution, see https://developer.wordpress.org/reference/functions/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.
 *
 * Possible hook names include:
 *
 *  - `category_pre_edit_form`
 *  - `post_tag_pre_edit_form`
 *
 * @since 3.0.0
 *
 * @param WP_Term $tag      Current taxonomy term object.
 * @param string  $taxonomy Current $taxonomy slug.
 */
do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?>

<div class="wrap">
<h1><?php echo $tax->labels->edit_item; ?></h1>

<?php
$class = ( isset( $msg ) && 5 === $msg ) ? 'error' : 'success';

if ( $message ) {
  ?>
<div id="message" class="notice notice-<?php echo $class; ?>">
	<p><strong><?php echo $message; ?></strong></p>
	<?php if ( $wp_http_referer ) { ?>
	<p><a href="<?php echo esc_url( wp_validate_redirect( esc_url_raw( $wp_http_referer ), admin_url( 'term.php?taxonomy=' . $taxonomy ) ) ); ?>">
		<?php echo esc_html( $tax->labels->back_to_items ); ?>
	</a></p>
	<?php } ?>
</div>
	<?php
}
?>

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      API Letters: ,,,,