From cf400b9bc457e034045943496d36c738da7d1119 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 25 Mar 2018 19:34:31 +0000 Subject: [PATCH] Docs: Correct and improve various inline documentation. See #42505 git-svn-id: https://develop.svn.wordpress.org/trunk@42877 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/dashboard.php | 6 ++---- src/wp-admin/includes/taxonomy.php | 4 ++-- src/wp-admin/includes/theme.php | 2 +- src/wp-includes/category-template.php | 2 +- src/wp-includes/class-http.php | 2 +- src/wp-includes/class-walker-nav-menu.php | 2 +- src/wp-includes/class-wp-meta-query.php | 2 +- src/wp-includes/class-wp-metadata-lazyloader.php | 2 +- src/wp-includes/date.php | 6 +++--- 9 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php index fff6f1adc2..fc54e46619 100644 --- a/src/wp-admin/includes/dashboard.php +++ b/src/wp-admin/includes/dashboard.php @@ -439,10 +439,8 @@ function wp_network_dashboard_right_now() { * just before the user and site search form fields. * * @since MU (3.0.0) - * - * @param null $unused */ - do_action( 'wpmuadminresult', '' ); + do_action( 'wpmuadminresult' ); ?>
@@ -1529,7 +1527,7 @@ function wp_dashboard_browser_nag() { * @since 3.2.0 * * @param string $notice The notice content. - * @param array $response An array containing web browser information. + * @param array $response An array containing web browser information. See `wp_check_browser_version()`. */ echo apply_filters( 'browse-happy-notice', $notice, $response ); } diff --git a/src/wp-admin/includes/taxonomy.php b/src/wp-admin/includes/taxonomy.php index 5c729e3f6d..62988c3b99 100644 --- a/src/wp-admin/includes/taxonomy.php +++ b/src/wp-admin/includes/taxonomy.php @@ -282,8 +282,8 @@ function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) { * * @see get_terms_to_edit() * - * @param array $terms_to_edit An array of terms. - * @param string $taxonomy The taxonomy for which to retrieve terms. Default 'post_tag'. + * @param string $terms_to_edit A comma-separated list of term names. + * @param string $taxonomy The taxonomy name for which to retrieve terms. */ $terms_to_edit = apply_filters( 'terms_to_edit', $terms_to_edit, $taxonomy ); diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 425460e7dd..242ceecdb6 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -580,7 +580,7 @@ function wp_prepare_themes_for_js( $themes = null ) { /** * Filters theme data before it is prepared for JavaScript. * - * Passing a non-empty array will result in wp_prepare_themes_for_js() returning + * Passing a non-empty array will result in `wp_prepare_themes_for_js()` returning * early with that value instead. * * @since 4.2.0 diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 5548a51407..d1bcf7b31b 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -1387,7 +1387,7 @@ function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) { * * @since 2.9.0 * - * @param array $term_list List of terms to display. + * @param string $term_list List of terms to display. * @param string $taxonomy The taxonomy name. * @param string $before String to use before the terms. * @param string $sep String to use between the terms. diff --git a/src/wp-includes/class-http.php b/src/wp-includes/class-http.php index b8cc4ee4fa..edfcd11cbe 100644 --- a/src/wp-includes/class-http.php +++ b/src/wp-includes/class-http.php @@ -440,7 +440,7 @@ class WP_Http { * * @since 4.6.0 * - * @param array $cookies List of cookies to send with the request. + * @param array $cookies Array of cookies to send with the request. * @return Requests_Cookie_Jar Cookie holder object. */ public static function normalize_cookies( $cookies ) { diff --git a/src/wp-includes/class-walker-nav-menu.php b/src/wp-includes/class-walker-nav-menu.php index 7960d48057..f46f14c177 100644 --- a/src/wp-includes/class-walker-nav-menu.php +++ b/src/wp-includes/class-walker-nav-menu.php @@ -140,7 +140,7 @@ class Walker_Nav_Menu extends Walker { $args = apply_filters( 'nav_menu_item_args', $args, $item, $depth ); /** - * Filters the CSS class(es) applied to a menu item's list item element. + * Filters the CSS classes applied to a menu item's list item element. * * @since 3.0.0 * @since 4.1.0 The `$depth` parameter was added. diff --git a/src/wp-includes/class-wp-meta-query.php b/src/wp-includes/class-wp-meta-query.php index d9234c246f..fafcf9cbbb 100644 --- a/src/wp-includes/class-wp-meta-query.php +++ b/src/wp-includes/class-wp-meta-query.php @@ -339,7 +339,7 @@ class WP_Meta_Query { * * @since 3.1.0 * - * @param array $clauses Array containing the query's JOIN and WHERE clauses. + * @param array $sql Array containing the query's JOIN and WHERE clauses. * @param array $queries Array of meta queries. * @param string $type Type of meta. * @param string $primary_table Primary table. diff --git a/src/wp-includes/class-wp-metadata-lazyloader.php b/src/wp-includes/class-wp-metadata-lazyloader.php index 9b04983961..80b8bdd5bd 100644 --- a/src/wp-includes/class-wp-metadata-lazyloader.php +++ b/src/wp-includes/class-wp-metadata-lazyloader.php @@ -97,7 +97,7 @@ class WP_Metadata_Lazyloader { * * @since 4.5.0 * - * @param array $object_ids Object IDs. + * @param array $object_ids Array of object IDs. * @param string $object_type Type of object being queued. * @param WP_Metadata_Lazyloader $lazyloader The lazy-loader object. */ diff --git a/src/wp-includes/date.php b/src/wp-includes/date.php index e85fe3287d..8d82db784e 100644 --- a/src/wp-includes/date.php +++ b/src/wp-includes/date.php @@ -140,9 +140,9 @@ class WP_Date_Query { * } * } * } - * @param array $default_column Optional. Default column to query against. Default 'post_date'. - * Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', - * 'comment_date', 'comment_date_gmt'. + * @param string $default_column Optional. Default column to query against. Default 'post_date'. + * Accepts 'post_date', 'post_date_gmt', 'post_modified', 'post_modified_gmt', + * 'comment_date', 'comment_date_gmt'. */ public function __construct( $date_query, $default_column = 'post_date' ) { if ( isset( $date_query['relation'] ) && 'OR' === strtoupper( $date_query['relation'] ) ) {