Used By
| Used By | Description |
|---|---|
| wp-admin/includes/image.php: wp_read_image_metadata() | Get extended image metadata, exif or iptc as available. |
Convert a fraction string to a decimal.
(string) (Required)
(int|float)
File: wp-admin/includes/image.php
function wp_exif_frac2dec( $str ) {
if ( false === strpos( $str, '/' ) ) {
return $str;
}
list( $numerator, $denominator ) = explode( '/', $str );
if ( ! empty( $denominator ) ) {
return $numerator / $denominator;
}
return $str;
} | Version | Description |
|---|---|
| 2.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_exif_frac2dec