Changeset 49181 for trunk/src/wp-admin/includes/media.php
- Timestamp:
- 10/17/2020 02:52:04 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/media.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/media.php
r49120 r49181 961 961 962 962 /** 963 * Downloads an image from the specified URL andattaches it to a post.963 * Downloads an image from the specified URL, saves it as an attachment, and optionally attaches it to a post. 964 964 * 965 965 * @since 2.6.0 966 966 * @since 4.2.0 Introduced the `$return` parameter. 967 * @since 4.8.0 Introduced the 'id' option withinthe `$return` parameter.967 * @since 4.8.0 Introduced the 'id' option for the `$return` parameter. 968 968 * @since 5.3.0 The `$post_id` parameter was made optional. 969 969 * @since 5.4.0 The original URL of the attachment is stored in the `_source_url` … … 975 975 * @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL), 976 976 * 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. 978 979 */ 979 980 function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'html' ) { … … 2274 2275 * @since 2.5.0 2275 2276 * 2276 * @param string $type2277 * @param object $errors2278 * @param int $id2277 * @param string $type 2278 * @param object $errors 2279 * @param int|WP_Error $id 2279 2280 */ 2280 2281 function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
Note: See TracChangeset
for help on using the changeset viewer.