From 8512036e4e82c59eef2bc40d959fa6ebb9937d8b Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 27 Dec 2016 09:27:38 +0000 Subject: [PATCH] Docs: Misc corrections and additions to inline documentation. See #39130 Props keesiemeijer git-svn-id: https://develop.svn.wordpress.org/trunk@39639 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 2 +- src/wp-includes/functions.php | 2 +- src/wp-includes/general-template.php | 6 +++--- src/wp-includes/link-template.php | 6 +++--- src/wp-includes/media-template.php | 2 +- src/wp-includes/ms-functions.php | 2 +- src/wp-includes/pluggable.php | 6 ++++-- .../endpoints/class-wp-rest-comments-controller.php | 1 + .../rest-api/endpoints/class-wp-rest-posts-controller.php | 2 ++ .../endpoints/class-wp-rest-settings-controller.php | 1 + .../rest-api/endpoints/class-wp-rest-users-controller.php | 3 +++ src/wp-includes/taxonomy.php | 2 +- 12 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index e9b3428f38..bf4a0f4175 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -718,7 +718,7 @@ function wp_tag_cloud( $args = '' ) { } /** - * Default topic count scaling for tag links + * Default topic count scaling for tag links. * * @since 2.9.0 * diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 0eeb60ccec..914cbb9eae 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -5392,7 +5392,7 @@ function wp_delete_file( $file ) { * * @since 2.1.0 * - * @param string $medium Path to the file to delete. + * @param string $file Path to the file to delete. */ $delete = apply_filters( 'wp_delete_file', $file ); if ( ! empty( $delete ) ) { diff --git a/src/wp-includes/general-template.php b/src/wp-includes/general-template.php index 2c3f91cfdf..715dab7d15 100644 --- a/src/wp-includes/general-template.php +++ b/src/wp-includes/general-template.php @@ -3545,9 +3545,9 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) { * will be used instead. * * @since 2.3.0 - * - * @param string $file Style handle name or filename (without ".css" extension) - * relative to wp-admin/. Defaults to 'wp-admin'. + * @param string $stylesheet_link HTML link element for the stylesheet. + * @param string $file Style handle name or filename (without ".css" extension) + * relative to wp-admin/. Defaults to 'wp-admin'. */ echo apply_filters( 'wp_admin_css', "\n", $file ); diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php index 7b2d3a59fc..4adc6c95ac 100644 --- a/src/wp-includes/link-template.php +++ b/src/wp-includes/link-template.php @@ -846,7 +846,7 @@ function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { * * @param string $link The taxonomy feed link. * @param string $feed Feed type. - * @param string $feed The taxonomy name. + * @param string $taxonomy The taxonomy name. */ $link = apply_filters( 'taxonomy_feed_link', $link, $feed, $taxonomy ); } @@ -3583,8 +3583,8 @@ function wp_get_canonical_url( $post = null ) { * * @since 4.6.0 * - * @param string $string The post's canonical URL. - * @param WP_Post $post Post object. + * @param string $canonical_url The post's canonical URL. + * @param WP_Post $post Post object. */ return apply_filters( 'get_canonical_url', $canonical_url, $post ); } diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index f12b11cff3..5246350201 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -761,7 +761,7 @@ function wp_print_media_templates() { <# } #> > __( 'Thumbnail' ), 'medium' => __( 'Medium' ), diff --git a/src/wp-includes/ms-functions.php b/src/wp-includes/ms-functions.php index 2c356cae26..d0cada3847 100644 --- a/src/wp-includes/ms-functions.php +++ b/src/wp-includes/ms-functions.php @@ -2240,7 +2240,7 @@ function wp_schedule_update_network_counts() { } /** - * Update the network-wide counts for the current network. + * Update the network-wide counts for the current network. * * @since 3.1.0 */ diff --git a/src/wp-includes/pluggable.php b/src/wp-includes/pluggable.php index 0c5106221e..2d76e73e6c 100644 --- a/src/wp-includes/pluggable.php +++ b/src/wp-includes/pluggable.php @@ -2412,8 +2412,10 @@ function get_avatar( $id_or_email, $size = 96, $default = '', $alt = '', $args = * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, * user email, WP_User object, WP_Post object, or WP_Comment object. * @param int $size Square avatar width and height in pixels to retrieve. - * @param string $alt Alternative text to use in the avatar image tag. - * Default empty. + * @param string $default URL for the default image or a default type. Accepts '404', 'retro', 'monsterid', + * 'wavatar', 'indenticon','mystery' (or 'mm', or 'mysteryman'), 'blank', or 'gravatar_default'. + * Default is the value of the 'avatar_default' option, with a fallback of 'mystery'. + * @param string $alt Alternative text to use in the avatar image tag. Default empty. * @param array $args Arguments passed to get_avatar_data(), after processing. */ return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args ); diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index a3438c5f76..be09c18038 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -1593,6 +1593,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller { * string is allowed when a comment is being updated. * * @since 4.7.0 + * @access public * * @param string $value Author email value submitted. * @param WP_REST_Request $request Full details about the request. diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 2c5d9fc76a..e48767d633 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -1166,6 +1166,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * Checks whether current user can assign all terms sent with the current request. * * @since 4.7.0 + * @access protected * * @param WP_REST_Request $request The request object with post and terms data. * @return bool Whether the current user can assign the provided terms. @@ -1519,6 +1520,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * in a machine readable format, we remove the "Protected: " prefix. * * @since 4.7.0 + * @access public * * @return string Protected title format. */ diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php index 2b8e265c93..57954f1b52 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-settings-controller.php @@ -306,6 +306,7 @@ class WP_REST_Settings_Controller extends WP_REST_Controller { * provide a wrapper sanitizer to whitelist the use of `null`. * * @since 4.7.0 + * @access public * * @param mixed $value The value for the setting. * @param WP_REST_Request $request The request object. diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index 3179ef3419..0d733f2aef 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -142,6 +142,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { * The value can be an integer, 'false', false, or ''. * * @since 4.7.0 + * @access public * * @param int|bool $value The value passed to the reassign parameter. * @param WP_REST_Request $request Full details about the request. @@ -1054,6 +1055,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { * Performs a couple of checks like edit_user() in wp-admin/includes/user.php. * * @since 4.7.0 + * @access public * * @param mixed $value The username submitted in the request. * @param WP_REST_Request $request Full details about the request. @@ -1083,6 +1085,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { * Performs a couple of checks like edit_user() in wp-admin/includes/user.php. * * @since 4.7.0 + * @access public * * @param mixed $value The password submitted in the request. * @param WP_REST_Request $request Full details about the request. diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 7fa4076acf..2b2a9fb9c1 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/wp-includes/taxonomy.php @@ -2943,7 +2943,7 @@ function clean_object_term_cache($object_ids, $object_type) { * @since 2.5.0 * * @param array $object_ids An array of object IDs. - * @param string $objet_type Object type. + * @param string $object_type Object type. */ do_action( 'clean_object_term_cache', $object_ids, $object_type ); }