WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/05/2019 09:21:46 PM (18 months ago)
Author:
johnbillion
Message:

Docs: Improve documentation of known return types, plus other docs fixes.

See #48303

File:
1 edited

Legend:

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

    r46644 r46660  
    846846
    847847/**
    848  * Gets the available intermediate image sizes.
     848 * Gets the available intermediate image size names.
    849849 *
    850850 * @since 3.0.0
    851851 *
    852  * @return array Returns a filtered array of image size strings.
     852 * @return string[] An array of image size names.
    853853 */
    854854function get_intermediate_image_sizes() {
     
    865865     * @since 2.5.0
    866866     *
    867      * @param array $default_sizes An array of intermediate image sizes. Defaults
    868      *                             are 'thumbnail', 'medium', 'medium_large', 'large'.
     867     * @param string[] $default_sizes An array of intermediate image size names. Defaults
     868     *                                are 'thumbnail', 'medium', 'medium_large', 'large'.
    869869     */
    870870    return apply_filters( 'intermediate_image_sizes', $default_sizes );
     
    24372437 * @param WP_Post $attachment The current attachment, provided for context.
    24382438 * @param string  $context    Optional. The context. Accepts 'edit', 'display'. Default 'display'.
    2439  * @return array Key/value pairs of field keys to labels.
     2439 * @return string[] Key/value pairs of field keys to labels.
    24402440 */
    24412441function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) {
     
    30473047 *                                     or 'objects' to return an array of taxonomy objects.
    30483048 *                                     Default is 'names'.
    3049  * @return array Empty array on failure. List of taxonomies on success.
     3049 * @return string[]|WP_Taxonomy[] List of taxonomies or taxonomy names. Empty array on failure.
    30503050 */
    30513051function get_attachment_taxonomies( $attachment, $output = 'names' ) {
     
    31603160 * @param int $max_width      The maximum allowed width.
    31613161 * @param int $max_height     The maximum allowed height.
    3162  * @return array The maximum possible width and height based on the example ratio.
     3162 * @return int[] {
     3163 *     An array of maximum width and height values.
     3164 *
     3165 *     @type int $0 The maximum width in pixels.
     3166 *     @type int $1 The maximum height in pixels.
     3167 * }
    31633168 */
    31643169function wp_expand_dimensions( $example_width, $example_height, $max_width, $max_height ) {
     
    42274232 *
    42284233 * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`.
    4229  * @return array A list of a gallery's image srcs in order.
     4234 * @return string[] A list of a gallery's image srcs in order.
    42304235 */
    42314236function get_post_gallery_images( $post = 0 ) {
     
    43134318 * @since 4.0.0
    43144319 *
    4315  * @return array The relevant CSS file URLs.
     4320 * @return string[] The relevant CSS file URLs.
    43164321 */
    43174322function wpview_media_sandbox_styles() {
Note: See TracChangeset for help on using the changeset viewer.