Docs: Improve documentation for wp_save_image_file() and related functions.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47065


git-svn-id: http://core.svn.wordpress.org/trunk@46865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-01-12 16:56:05 +00:00
parent 810a243f2d
commit fa2f6e0644
2 changed files with 20 additions and 20 deletions

View File

@ -11,7 +11,7 @@
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param int $post_id Post ID. * @param int $post_id Attachment post ID.
* @param bool|object $msg Optional. Message to display for image editor updates or errors. * @param bool|object $msg Optional. Message to display for image editor updates or errors.
* Default false. * Default false.
*/ */
@ -315,11 +315,11 @@ function wp_stream_image( $image, $mime_type, $attachment_id ) {
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param string $filename * @param string $filename Name of the file to be saved.
* @param WP_Image_Editor $image * @param WP_Image_Editor $image The image editor instance.
* @param string $mime_type * @param string $mime_type The mime type of the image.
* @param int $post_id * @param int $post_id Attachment post ID.
* @return bool * @return bool True on success, false on failure.
*/ */
function wp_save_image_file( $filename, $image, $mime_type, $post_id ) { function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
if ( $image instanceof WP_Image_Editor ) { if ( $image instanceof WP_Image_Editor ) {
@ -337,9 +337,9 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
* *
* @param mixed $override Value to return instead of saving. Default null. * @param mixed $override Value to return instead of saving. Default null.
* @param string $filename Name of the file to be saved. * @param string $filename Name of the file to be saved.
* @param WP_Image_Editor $image WP_Image_Editor instance. * @param WP_Image_Editor $image The image editor instance.
* @param string $mime_type Image mime type. * @param string $mime_type The mime type of the image.
* @param int $post_id Post ID. * @param int $post_id Attachment post ID.
*/ */
$saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id ); $saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id );
@ -366,9 +366,9 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
* *
* @param mixed $override Value to return instead of saving. Default null. * @param mixed $override Value to return instead of saving. Default null.
* @param string $filename Name of the file to be saved. * @param string $filename Name of the file to be saved.
* @param WP_Image_Editor $image WP_Image_Editor instance. * @param WP_Image_Editor $image The image editor instance.
* @param string $mime_type Image mime type. * @param string $mime_type The mime type of the image.
* @param int $post_id Post ID. * @param int $post_id Attachment post ID.
*/ */
$saved = apply_filters_deprecated( 'wp_save_image_file', array( null, $filename, $image, $mime_type, $post_id ), '3.5.0', 'wp_save_image_editor_file' ); $saved = apply_filters_deprecated( 'wp_save_image_file', array( null, $filename, $image, $mime_type, $post_id ), '3.5.0', 'wp_save_image_editor_file' );
@ -617,12 +617,12 @@ function image_edit_apply_changes( $image, $changes ) {
/** /**
* Streams image in post to browser, along with enqueued changes * Streams image in post to browser, along with enqueued changes
* in $_REQUEST['history'] * in `$_REQUEST['history']`.
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param int $post_id * @param int $post_id Attachment post ID.
* @return bool * @return bool True on success, false on failure.
*/ */
function stream_preview_image( $post_id ) { function stream_preview_image( $post_id ) {
$post = get_post( $post_id ); $post = get_post( $post_id );
@ -747,13 +747,13 @@ function wp_restore_image( $post_id ) {
} }
/** /**
* Saves image to post along with enqueued changes * Saves image to post, along with enqueued changes
* in $_REQUEST['history'] * in `$_REQUEST['history']`.
* *
* @since 2.9.0 * @since 2.9.0
* *
* @param int $post_id * @param int $post_id Attachment post ID.
* @return \stdClass * @return stdClass
*/ */
function wp_save_image( $post_id ) { function wp_save_image( $post_id ) {
$_wp_additional_image_sizes = wp_get_additional_image_sizes(); $_wp_additional_image_sizes = wp_get_additional_image_sizes();

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.4-alpha-47064'; $wp_version = '5.4-alpha-47065';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.