Make WordPress Core

Changeset 47065


Ignore:
Timestamp:
01/12/2020 04:54:56 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image-edit.php

    r47024 r47065  
    1212 * @since 2.9.0
    1313 *
    14  * @param int         $post_id Post ID.
     14 * @param int         $post_id Attachment post ID.
    1515 * @param bool|object $msg     Optional. Message to display for image editor updates or errors.
    1616 *                             Default false.
     
    316316 * @since 2.9.0
    317317 *
    318  * @param string $filename
    319  * @param WP_Image_Editor $image
    320  * @param string $mime_type
    321  * @param int $post_id
    322  * @return bool
     318 * @param string          $filename  Name of the file to be saved.
     319 * @param WP_Image_Editor $image     The image editor instance.
     320 * @param string          $mime_type The mime type of the image.
     321 * @param int             $post_id   Attachment post ID.
     322 * @return bool True on success, false on failure.
    323323 */
    324324function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
     
    338338         * @param mixed           $override  Value to return instead of saving. Default null.
    339339         * @param string          $filename  Name of the file to be saved.
    340          * @param WP_Image_Editor $image     WP_Image_Editor instance.
    341          * @param string          $mime_type Image mime type.
    342          * @param int             $post_id   Post ID.
     340         * @param WP_Image_Editor $image     The image editor instance.
     341         * @param string          $mime_type The mime type of the image.
     342         * @param int             $post_id   Attachment post ID.
    343343         */
    344344        $saved = apply_filters( 'wp_save_image_editor_file', null, $filename, $image, $mime_type, $post_id );
     
    367367         * @param mixed           $override  Value to return instead of saving. Default null.
    368368         * @param string          $filename  Name of the file to be saved.
    369          * @param WP_Image_Editor $image     WP_Image_Editor instance.
    370          * @param string          $mime_type Image mime type.
    371          * @param int             $post_id   Post ID.
     369         * @param WP_Image_Editor $image     The image editor instance.
     370         * @param string          $mime_type The mime type of the image.
     371         * @param int             $post_id   Attachment post ID.
    372372         */
    373373        $saved = apply_filters_deprecated( 'wp_save_image_file', array( null, $filename, $image, $mime_type, $post_id ), '3.5.0', 'wp_save_image_editor_file' );
     
    618618/**
    619619 * Streams image in post to browser, along with enqueued changes
    620  * in $_REQUEST['history']
    621  *
    622  * @since 2.9.0
    623  *
    624  * @param int $post_id
    625  * @return bool
     620 * in `$_REQUEST['history']`.
     621 *
     622 * @since 2.9.0
     623 *
     624 * @param int $post_id Attachment post ID.
     625 * @return bool True on success, false on failure.
    626626 */
    627627function stream_preview_image( $post_id ) {
     
    748748
    749749/**
    750  * Saves image to post along with enqueued changes
    751  * in $_REQUEST['history']
    752  *
    753  * @since 2.9.0
    754  *
    755  * @param int $post_id
    756  * @return \stdClass
     750 * Saves image to post, along with enqueued changes
     751 * in `$_REQUEST['history']`.
     752 *
     753 * @since 2.9.0
     754 *
     755 * @param int $post_id Attachment post ID.
     756 * @return stdClass
    757757 */
    758758function wp_save_image( $post_id ) {
Note: See TracChangeset for help on using the changeset viewer.