Skip to content

Commit ff18031

Browse files
committed
Docs: Miscellaneous docblock fixes.
See #50768 git-svn-id: https://develop.svn.wordpress.org/trunk@49181 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b183312 commit ff18031

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/wp-admin/includes/media.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -960,11 +960,11 @@ function wp_media_upload_handler() {
960960
}
961961

962962
/**
963-
* Downloads an image from the specified URL and attaches it to a post.
963+
* Downloads an image from the specified URL, saves it as an attachment, and optionally attaches it to a post.
964964
*
965965
* @since 2.6.0
966966
* @since 4.2.0 Introduced the `$return` parameter.
967-
* @since 4.8.0 Introduced the 'id' option within the `$return` parameter.
967+
* @since 4.8.0 Introduced the 'id' option for the `$return` parameter.
968968
* @since 5.3.0 The `$post_id` parameter was made optional.
969969
* @since 5.4.0 The original URL of the attachment is stored in the `_source_url`
970970
* post meta value.
@@ -974,7 +974,8 @@ function wp_media_upload_handler() {
974974
* @param string $desc Optional. Description of the image.
975975
* @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL),
976976
* or 'id' (attachment ID). Default 'html'.
977-
* @return string|WP_Error Populated HTML img tag on success, WP_Error object otherwise.
977+
* @return string|int|WP_Error Populated HTML img tag, attachment ID, or attachment source
978+
* on success, WP_Error object otherwise.
978979
*/
979980
function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'html' ) {
980981
if ( ! empty( $file ) ) {
@@ -2273,9 +2274,9 @@ function media_upload_form( $errors = null ) {
22732274
*
22742275
* @since 2.5.0
22752276
*
2276-
* @param string $type
2277-
* @param object $errors
2278-
* @param int $id
2277+
* @param string $type
2278+
* @param object $errors
2279+
* @param int|WP_Error $id
22792280
*/
22802281
function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
22812282

src/wp-admin/includes/plugin-install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function plugins_api( $action, $args = array() ) {
240240
* @since 2.7.0
241241
*
242242
* @param array $args
243-
* @return array
243+
* @return array|WP_Error
244244
*/
245245
function install_popular_tags( $args = array() ) {
246246
$key = md5( serialize( $args ) );

src/wp-includes/class-wp-customize-control.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class WP_Customize_Control {
6060
* The primary setting for the control (if there is one).
6161
*
6262
* @since 3.4.0
63-
* @var string
63+
* @var string|WP_Customize_Setting|null
6464
*/
6565
public $setting = 'default';
6666

0 commit comments

Comments
 (0)