Make WordPress Core

Changeset 31529


Ignore:
Timestamp:
02/24/2015 06:06:59 AM (10 years ago)
Author:
DrewAPicture
Message:

Add missing function and parameter descriptions to a variety of functions in wp-admin/includes/image-edit.php.

Props NikV for the initial patch.
Fixes #31353.

File:
1 edited

Legend:

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

    r31070 r31529  
    88
    99/**
    10  * @param int $post_id
    11  * @param bool|object $msg
     10 * Loads the WP image-editing interface.
     11 *
     12 * @param int         $post_id Post ID.
     13 * @param bool|object $msg     Optional. Message to display for image editor updates or errors.
     14 *                             Default false.
    1215 */
    1316function wp_image_editor($post_id, $msg = false) {
     
    331334}
    332335
     336/**
     337 * Image preview ratio. Internal use only.
     338 *
     339 * @since 2.9.0
     340 *
     341 * @ignore
     342 * @param int $w Image width in pixels.
     343 * @param int $h Image height in pixels.
     344 * @return float|int Image preview ratio.
     345 */
    333346function _image_get_preview_ratio($w, $h) {
    334347    $max = max($w, $h);
     
    336349}
    337350
    338 // @TODO: Returns GD resource, but is NOT public
     351/**
     352 * Returns an image resource. Internal use only.
     353 *
     354 * @since 2.9.0
     355 *
     356 * @ignore
     357 * @param resource  $img   Image resource.
     358 * @param float|int $angle Image rotation angle, in degrees.
     359 * @return resource|false GD image resource, false otherwise.
     360 */
    339361function _rotate_image_resource($img, $angle) {
    340362    _deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::rotate' ) );
     
    350372
    351373/**
    352  * @TODO: Only used within image_edit_apply_changes
    353  *        and receives/returns GD Resource.
    354  *        Consider removal.
    355  *
    356  * @param GD_Resource $img
    357  * @param boolean $horz
    358  * @param boolean $vert
    359  * @return GD_Resource
     374 * Flips an image resource. Internal use only.
     375 *
     376 * @since 2.9.0
     377 *
     378 * @ignore
     379 * @param resource $img  Image resource.
     380 * @param bool     $horz Whether to flip horizontally.
     381 * @param bool     $vert Whether to flip vertically.
     382 * @return resource (maybe) flipped image resource.
    360383 */
    361384function _flip_image_resource($img, $horz, $vert) {
     
    379402
    380403/**
    381  * @TODO: Only used within image_edit_apply_changes
    382  *        and receives/returns GD Resource.
    383  *        Consider removal.
    384  *
    385  * @param GD_Resource $img
    386  * @param float $x
    387  * @param float $y
    388  * @param float $w
    389  * @param float $h
    390  * @return GD_Resource
     404 * Crops an image resource. Internal use only.
     405 *
     406 * @since 2.9.0
     407 *
     408 * @ignore
     409 * @param resource $img Image resource.
     410 * @param float    $x   Source point x-coordinate.
     411 * @param float    $y   Source point y-cooredinate.
     412 * @param float    $w   Source width.
     413 * @param float    $h   Source height.
     414 * @return resource (maybe) cropped image resource.
    391415 */
    392416function _crop_image_resource($img, $x, $y, $w, $h) {
     
    562586
    563587/**
    564  * @param int $post_id
    565  * @return stdClass
     588 * Restores the metadata for a given attachment.
     589 *
     590 * @since 2.9.0
     591 *
     592 * @param int $post_id Attachment post ID.
     593 * @return stdClass Image restoration message object.
    566594 */
    567595function wp_restore_image($post_id) {
Note: See TracChangeset for help on using the changeset viewer.