将exif日期格式转换为unix时间戳。
原型
wp_exif_date2ts( string $str )
参数
$str
(string)
(Required)
返回值
(int)
源文件
路径:wp-admin/includes/image.php
<?php
...
function wp_exif_date2ts($str) {
@list( $date, $time ) = explode( ' ', trim($str) );
@list( $y, $m, $d ) = explode( ':', $date );
return strtotime( "{$y}-{$m}-{$d} {$time}" );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/wp_exif_date2ts/