mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@38303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1367,14 +1367,12 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
*
|
||||
* @since 2.9.0
|
||||
*
|
||||
* @global array $_wp_additional_image_sizes
|
||||
*
|
||||
* @param int $thumbnail_id ID of the attachment used for thumbnail
|
||||
* @param mixed $post The post ID or object associated with the thumbnail, defaults to global $post.
|
||||
* @return string html
|
||||
*/
|
||||
function _wp_post_thumbnail_html( $thumbnail_id = null, $post = null ) {
|
||||
global $_wp_additional_image_sizes;
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
|
||||
$post = get_post( $post );
|
||||
$post_type_object = get_post_type_object( $post->post_type );
|
||||
|
||||
Reference in New Issue
Block a user