Make WordPress Core


Ignore:
Timestamp:
10/26/2019 08:42:00 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Miscellaneous docblock fixes and improvements.

See #48303

File:
1 edited

Legend:

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

    r46418 r46594  
    3939 *
    4040 * Finally, there is a filter named {@see 'editor_max_image_size'}, that will be
    41  * called on the calculated array for width and height, respectively. The second
    42  * parameter will be the value that was in the $size parameter. The returned
    43  * type for the hook is an array with the width as the first element and the
    44  * height as the second element.
     41 * called on the calculated array for width and height, respectively.
    4542 *
    4643 * @since 2.5.0
     
    5552 * @param string       $context Optional. Could be 'display' (like in a theme) or 'edit'
    5653 *                              (like inserting into an editor). Default null.
    57  * @return array Width and height of what the result image should resize to.
     54 * @return int[] {
     55 *     An array of width and height values.
     56 *
     57 *     @type int $0 The maximum width in pixels.
     58 *     @type int $1 The maximum height in pixels.
     59 * }
    5860 */
    5961function image_constrain_size_for_editor( $width, $height, $size = 'medium', $context = null ) {
     
    118120     * @since 2.5.0
    119121     *
    120      * @param array        $max_image_size An array with the width as the first element,
    121      *                                     and the height as the second element.
     122     * @param int[]        $max_image_size {
     123     *     An array of width and height values.
     124     *
     125     *     @type int $0 The maximum width in pixels.
     126     *     @type int $1 The maximum height in pixels.
     127     * }
    122128     * @param string|array $size           Size of what the result image should be.
    123129     * @param string       $context        The context the image is being resized for.
     
    418424 * @param int $max_width      Optional. Max width in pixels to constrain to. Default 0.
    419425 * @param int $max_height     Optional. Max height in pixels to constrain to. Default 0.
    420  * @return array First item is the width, the second item is the height.
     426 * @return int[] {
     427 *     An array of width and height values.
     428 *
     429 *     @type int $0 The width in pixels.
     430 *     @type int $1 The height in pixels.
     431 * }
    421432 */
    422433function wp_constrain_dimensions( $current_width, $current_height, $max_width = 0, $max_height = 0 ) {
     
    475486     * @since 4.1.0
    476487     *
    477      * @param array $dimensions     The image width and height.
     488     * @param int[] $dimensions     {
     489     *     An array of width and height values.
     490     *
     491     *     @type int $0 The width in pixels.
     492     *     @type int $1 The height in pixels.
     493     * }
    478494     * @param int   $current_width  The current width of the image.
    479495     * @param int   $current_height The current height of the image.
     
    11501166 * @since 4.4.0
    11511167 *
    1152  * @param array  $size_array    Array of width and height values in pixels (in that order).
     1168 * @param int[]  $size_array    {
     1169 *     An array of width and height values.
     1170 *
     1171 *     @type int $0 The width in pixels.
     1172 *     @type int $1 The height in pixels.
     1173 * }
    11531174 * @param string $image_src     The 'src' of the image.
    11541175 * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
    1155  * @param int    $attachment_id Optional. The image attachment ID to pass to the filter. Default 0.
     1176 * @param int    $attachment_id Optional. The image attachment ID. Default 0.
    11561177 * @return string|bool          The 'srcset' attribute value. False on error or when only one source exists.
    11571178 */
     
    11631184     *
    11641185     * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
    1165      * @param array  $size_array    Array of width and height values in pixels (in that order).
     1186     * @param int[]  $size_array    {
     1187     *     An array of requested width and height values.
     1188     *
     1189     *     @type int $0 The width in pixels.
     1190     *     @type int $1 The height in pixels.
     1191     * }
    11661192     * @param string $image_src     The 'src' of the image.
    11671193     * @param int    $attachment_id The image attachment ID or 0 if not supplied.
     
    12321258     *
    12331259     * @param int   $max_width  The maximum image width to be included in the 'srcset'. Default '2048'.
    1234      * @param array $size_array Array of width and height values in pixels (in that order).
     1260     * @param int[] $size_array {
     1261     *     An array of requested width and height values.
     1262     *
     1263     *     @type int $0 The width in pixels.
     1264     *     @type int $1 The height in pixels.
     1265     * }
    12351266     */
    12361267    $max_srcset_image_width = apply_filters( 'max_srcset_image_width', 2048, $size_array );
     
    13111342     *     }
    13121343     * }
    1313      * @param array  $size_array    Array of width and height values in pixels (in that order).
     1344     * @param array $size_array     {
     1345     *     An array of requested width and height values.
     1346     *
     1347     *     @type int $0 The width in pixels.
     1348     *     @type int $1 The height in pixels.
     1349     * }
    13141350     * @param string $image_src     The 'src' of the image.
    13151351     * @param array  $image_meta    The image meta data as returned by 'wp_get_attachment_metadata()'.
     
    23772413
    23782414/**
    2379  * Returns a filtered list of WP-supported audio formats.
     2415 * Returns a filtered list of supported audio formats.
    23802416 *
    23812417 * @since 3.6.0
     
    26252661
    26262662/**
    2627  * Returns a filtered list of WP-supported video formats.
     2663 * Returns a filtered list of supported video formats.
    26282664 *
    26292665 * @since 3.6.0
     
    40124048     * @since 3.6.0
    40134049     *
    4014      * @param array  $args Post query arguments.
    4015      * @param string $type Mime type of the desired media.
    4016      * @param mixed  $post Post ID or object.
     4050     * @param array   $args Post query arguments.
     4051     * @param string  $type Mime type of the desired media.
     4052     * @param WP_Post $post Post object.
    40174053     */
    40184054    $args = apply_filters( 'get_attached_media_args', $args, $type, $post );
     
    40254061     * @since 3.6.0
    40264062     *
    4027      * @param array  $children Associative array of media attached to the given post.
    4028      * @param string $type     Mime type of the media desired.
    4029      * @param mixed  $post     Post ID or object.
     4063     * @param array   $children Associative array of media attached to the given post.
     4064     * @param string  $type     Mime type of the media desired.
     4065     * @param WP_Post $post     Post object.
    40304066     */
    40314067    return (array) apply_filters( 'get_attached_media', $children, $type, $post );
     
    40334069
    40344070/**
    4035  * Check the content blob for an audio, video, object, embed, or iframe tags.
     4071 * Check the content HTML for a audio, video, object, embed, or iframe tags.
    40364072 *
    40374073 * @since 3.6.0
     
    42894325
    42904326/**
    4291  * Registers the personal data exporter for media
     4327 * Registers the personal data exporter for media.
    42924328 *
    42934329 * @param array   $exporters   An array of personal data exporters.
Note: See TracChangeset for help on using the changeset viewer.