wp/wp-includes/category-template.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-includes/category-template.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/category-template.php	Tue Sep 27 16:37:53 2022 +0200
@@ -103,12 +103,12 @@
  *
  * @since 0.71
  *
- * @param int $cat_ID Category ID.
+ * @param int $cat_id Category ID.
  * @return string|WP_Error Category name on success, WP_Error on failure.
  */
-function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
-	$cat_ID   = (int) $cat_ID;
-	$category = get_term( $cat_ID );
+function get_the_category_by_ID( $cat_id ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
+	$cat_id   = (int) $cat_id;
+	$category = get_term( $cat_id );
 
 	if ( is_wp_error( $category ) ) {
 		return $category;
@@ -331,6 +331,8 @@
  *                                           Default false (create select element even if no categories are found).
  *     @type bool         $required          Whether the `<select>` element should have the HTML5 'required' attribute.
  *                                           Default false.
+ *     @type Walker       $walker            Walker object to use to build the output. Default empty which results in a
+ *                                           Walker_CategoryDropdown instance being used.
  * }
  * @return string HTML dropdown list of categories.
  */
@@ -518,6 +520,8 @@
  *                                               to disable. Default 'Categories'.
  *     @type bool|int     $use_desc_for_title    Whether to use the category description as the title attribute.
  *                                               Accepts 0, 1, or their bool equivalents. Default 1.
+ *     @type Walker       $walker                Walker object to use to build the output. Default empty which results
+ *                                               in a Walker_Category instance being used.
  * }
  * @return void|string|false Void if 'echo' argument is true, HTML list of categories if 'echo' is false.
  *                           False if the taxonomy does not exist.
@@ -661,9 +665,9 @@
 	 *
 	 * @since 2.1.0
 	 *
-	 * @param string $output HTML output.
-	 * @param array  $args   An array of taxonomy-listing arguments. See wp_list_categories()
-	 *                       for information on accepted arguments.
+	 * @param string       $output HTML output.
+	 * @param array|string $args   An array or query string of taxonomy-listing arguments. See
+	 *                             wp_list_categories() for information on accepted arguments.
 	 */
 	$html = apply_filters( 'wp_list_categories', $output, $args );
 
@@ -737,9 +741,9 @@
 
 	foreach ( $tags as $key => $tag ) {
 		if ( 'edit' === $args['link'] ) {
-			$link = get_edit_term_link( $tag->term_id, $tag->taxonomy, $args['post_type'] );
+			$link = get_edit_term_link( $tag, $tag->taxonomy, $args['post_type'] );
 		} else {
-			$link = get_term_link( (int) $tag->term_id, $tag->taxonomy );
+			$link = get_term_link( $tag, $tag->taxonomy );
 		}
 
 		if ( is_wp_error( $link ) ) {
@@ -1343,9 +1347,15 @@
 	/**
 	 * Filters the term links for a given taxonomy.
 	 *
-	 * The dynamic portion of the filter name, `$taxonomy`, refers
+	 * The dynamic portion of the hook name, `$taxonomy`, refers
 	 * to the taxonomy slug.
 	 *
+	 * Possible hook names include:
+	 *
+	 *  - `term_links-category`
+	 *  - `term_links-post_tag`
+	 *  - `term_links-post_format`
+	 *
 	 * @since 2.5.0
 	 *
 	 * @param string[] $links An array of term links.