wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_wp_get_image_size_from_meta is private and should not be used in themes or plugins directly.
_wp_get_image_size_from_meta › WordPress Function
Seit4.4.0
Veraltetn/v
› _wp_get_image_size_from_meta ( $size_name, $image_meta )
Zugriff: |
|
Parameter: (2) |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Gets the image size as array from its meta data.
Used for responsive images.Ähnliche Funktionen: wp_get_image_mime, wp_getimagesize, wp_get_image_editor, wp_create_image_subsizes, get_date_from_gmt
Quellcode
function _wp_get_image_size_from_meta( $size_name, $image_meta ) { if ( 'full' === $size_name ) { return array( absint( $image_meta['width'] ), absint( $image_meta['height'] ), ); } elseif ( ! empty( $image_meta['sizes'][ $size_name ] ) ) { return array( absint( $image_meta['sizes'][ $size_name ]['width'] ), absint( $image_meta['sizes'][ $size_name ]['height'] ), ); } return false; }