wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
_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
Da4.4.0
Deprecaton/a
› _wp_get_image_size_from_meta ( $size_name, $image_meta )
Accedi: |
|
Parametri: (2) |
|
Ritorna: |
|
Definito a: |
|
Codex: |
Gets the image size as array from its meta data.
Used for responsive images.Funzioni correlate: wp_get_image_mime, wp_getimagesize, wp_get_image_editor, wp_create_image_subsizes, get_date_from_gmt
Sorgenti
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; }