wp/wp-admin/edit-tag-form.php
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
--- a/wp/wp-admin/edit-tag-form.php	Tue Oct 22 16:11:46 2019 +0200
+++ b/wp/wp-admin/edit-tag-form.php	Tue Dec 15 13:49:49 2020 +0100
@@ -6,53 +6,53 @@
  * @subpackage Administration
  */
 
-// don't load directly
+// Don't load directly.
 if ( ! defined( 'ABSPATH' ) ) {
 	die( '-1' );
 }
 
-// Back compat hooks
-if ( 'category' == $taxonomy ) {
+// 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.
+	 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead.
 	 *
 	 * @param WP_Term $tag Current category term object.
 	 */
-	do_action( 'edit_category_form_pre', $tag );
-} elseif ( 'link_category' == $taxonomy ) {
+	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 {$taxonomy}_pre_edit_form instead.
+	 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead.
 	 *
 	 * @param WP_Term $tag Current link category term object.
 	 */
-	do_action( 'edit_link_category_form_pre', $tag );
+	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 {$taxonomy}_pre_edit_form instead.
+	 * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead.
 	 *
 	 * @param WP_Term $tag Current tag term object.
 	 */
-	do_action( 'edit_tag_form_pre', $tag );
+	do_action_deprecated( 'edit_tag_form_pre', array( $tag ), '3.0.0', '{$taxonomy}_pre_edit_form' );
 }
 
 /**
- * Use with caution, see https://codex.wordpress.org/Function_Reference/wp_reset_vars
+ * 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' );
+require_once ABSPATH . 'wp-admin/includes/edit-tag-messages.php';
 
 /**
  * Fires before the Edit Term form for all taxonomies.
@@ -177,7 +177,7 @@
 				$dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'edit' );
 				wp_dropdown_categories( $dropdown_args );
 				?>
-				<?php if ( 'category' == $taxonomy ) : ?>
+				<?php if ( 'category' === $taxonomy ) : ?>
 					<p class="description"><?php _e( 'Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional.' ); ?></p>
 				<?php else : ?>
 					<p class="description"><?php _e( 'Assign a parent term to create a hierarchy. The term Jazz, for example, would be the parent of Bebop and Big Band.' ); ?></p>
@@ -191,37 +191,37 @@
 			<p class="description"><?php _e( 'The description is not prominent by default; however, some themes may show it.' ); ?></p></td>
 		</tr>
 		<?php
-		// Back compat hooks
-		if ( 'category' == $taxonomy ) {
+		// Back compat hooks.
+		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.
+			 * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead.
 			 *
 			 * @param WP_Term $tag Current category term object.
 			 */
-			do_action( 'edit_category_form_fields', $tag );
-		} elseif ( 'link_category' == $taxonomy ) {
+			do_action_deprecated( 'edit_category_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' );
+		} 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.
+			 * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead.
 			 *
 			 * @param WP_Term $tag Current link category term object.
 			 */
-			do_action( 'edit_link_category_form_fields', $tag );
+			do_action_deprecated( 'edit_link_category_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' );
 		} else {
 			/**
 			 * Fires after the Edit Tag form fields are displayed.
 			 *
 			 * @since 2.9.0
-			 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead.
+			 * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead.
 			 *
 			 * @param WP_Term $tag Current tag term object.
 			 */
-			do_action( 'edit_tag_form_fields', $tag );
+			do_action_deprecated( 'edit_tag_form_fields', array( $tag ), '3.0.0', '{$taxonomy}_edit_form_fields' );
 		}
 		/**
 		 * Fires after the Edit Term form fields are displayed.
@@ -238,23 +238,23 @@
 		?>
 	</table>
 <?php
-// Back compat hooks
-if ( 'category' == $taxonomy ) {
+// Back compat hooks.
+if ( 'category' === $taxonomy ) {
 	/** This action is documented in wp-admin/edit-tags.php */
-	do_action( 'edit_category_form', $tag );
-} elseif ( 'link_category' == $taxonomy ) {
+	do_action_deprecated( 'edit_category_form', array( $tag ), '3.0.0', '{$taxonomy}_add_form' );
+} elseif ( 'link_category' === $taxonomy ) {
 	/** This action is documented in wp-admin/edit-tags.php */
-	do_action( 'edit_link_category_form', $tag );
+	do_action_deprecated( 'edit_link_category_form', array( $tag ), '3.0.0', '{$taxonomy}_add_form' );
 } else {
 	/**
 	 * Fires at the end of the Edit Term form.
 	 *
 	 * @since 2.5.0
-	 * @deprecated 3.0.0 Use {$taxonomy}_edit_form instead.
+	 * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form'} instead.
 	 *
 	 * @param WP_Term $tag Current taxonomy term object.
 	 */
-	do_action( 'edit_tag_form', $tag );
+	do_action_deprecated( 'edit_tag_form', array( $tag ), '3.0.0', '{$taxonomy}_edit_form' );
 }
 /**
  * Fires at the end of the Edit Term form for all taxonomies.