WordPress.org

Make WordPress Core

Changeset 35056


Ignore:
Timestamp:
10/12/2015 04:10:44 PM (4 years ago)
Author:
DrewAPicture
Message:

Docs: Fix syntax and properly mark optional parameters as such in the DocBlock for get_image_send_to_editor().

Also fixes the return description, and adds the $size default value, missed in [35055].

See #34257. See #32246.

File:
1 edited

Legend:

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

    r35055 r35056  
    107107 * @since 2.5.0
    108108 *
    109  * @param int     $id      image attachment id
    110  * @param string  $caption image caption
    111  * @param string  $title   image title attribute
    112  * @param string  $align   image css alignment property
    113  * @param string  $url     image src url
    114  * @param string  $rel     image rel attribute
     109 * @param int     $id        Image attachment id.
     110 * @param string  $caption   Image caption.
     111 * @param string  $title     Image title attribute.
     112 * @param string  $align     Image CSS alignment property.
     113 * @param string  $url       Optional. Image src URL. Default empty.
     114 * @param string  $rel       Optional. Image rel attribute. Default empty.
    115115 * @param string|array $size Optional. Image size. Accepts any valid image size, or an array of width
    116  *                           and height values in pixels (in that order).
    117  * @return string the html to insert into editor
    118  */
    119 function get_image_send_to_editor( $id, $caption, $title, $align, $url='', $rel = '', $size='medium', $alt = '' ) {
     116 *                           and height values in pixels (in that order). Default 'medium'.
     117 * @param string  $alt       Optional. Image alt attribute. Default empty.
     118 * @return string The HTML output to insert into the editor.
     119 */
     120function get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $rel = '', $size = 'medium', $alt = '' ) {
    120121
    121122    $html = get_image_tag($id, $alt, '', $align, $size);
Note: See TracChangeset for help on using the changeset viewer.