WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/22/2016 04:36:42 AM (4 years ago)
Author:
wonderboymusic
Message:

Media: add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports.

See #37699.

File:
1 edited

Legend:

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

    r38272 r38303  
    13681368 * @since 2.9.0
    13691369 *
    1370  * @global array $_wp_additional_image_sizes
    1371  *
    13721370 * @param int $thumbnail_id ID of the attachment used for thumbnail
    13731371 * @param mixed $post The post ID or object associated with the thumbnail, defaults to global $post.
     
    13751373 */
    13761374function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
    1377     global $_wp_additional_image_sizes;
     1375    $_wp_additional_image_sizes = wp_get_additional_image_sizes();
    13781376
    13791377    $post               = get_post( $post );
Note: See TracChangeset for help on using the changeset viewer.