[wp-trac] [WordPress Trac] #39583: Add a new function for images: "get_image_size()"
WordPress Trac
noreply at wordpress.org
Sat Jan 14 05:35:38 UTC 2017
#39583: Add a new function for images: "get_image_size()"
-----------------------------+------------------------
Reporter: alexvorn2 | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Media | Version: trunk
Severity: normal | Resolution: duplicate
Keywords: | Focuses: template
-----------------------------+------------------------
Comment (by alexvorn2):
Like this:
{{{#!php
<?php
function get_image_size( $name = '' ) {
global $_wp_additional_image_sizes;
if ( isset( $_wp_additional_image_sizes[$name] ) ) {
return $_wp_additional_image_sizes[$name];
} else {
return false;
}
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39583#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list