Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
wb.cafbleau

Timestamp

Hello,
I want to see the EXIF DATA Timestamp field.
I can select it, but the current date and time is displayed instead!

thanks for help

Regards,

Emmanuel Liron

4 years ago
Stefan
Developer

Hi Emmanuel,

Thanks for your feedback. I think there are two things happening.

1) I think that the create_timestamp value is not stored for the images you display in the overview. I can’t find any photo myself where the created_timestamp is in fact stored for an image. The column you mentioned just displays the value that is stored in the Exif data for the image by WordPress. So there isn’t much that we can do to make the created timestamp available for your if it is not already stored by WordPress.

2) The fact that you see the current date is that our code should not run if there is no value at all. So instead of the current date it should show a dash, giving the user the information that there is no created timestamp set for the image. I already made a fix for this for the upcoming maintenance release.

4 years ago
wb.cafbleau

Hello Stefan,

No, the timestamp exists for images. I added the following code to functions.php:

add_filter('manage_media_columns', 'posts_columns_attachment_exif', 1);
add_action('manage_media_custom_column', 'posts_custom_columns_attachment_exif', 1, 2);
function posts_columns_attachment_exif($defaults){
$defaults['wps_post_attachments_exif'] = __('EXIF');
return $defaults;
}
function posts_custom_columns_attachment_exif($column_name, $id){
if($column_name === 'wps_post_attachments_exif'){
$meta = wp_get_attachment_metadata($id);
if($meta[image_meta][camera] != ''){
echo date('m/d/Y H:i:s',$meta[image_meta][created_timestamp])."<hr />";
}
}
}

I can have the field displayed in an EXIF ​​column, which works fine.

I made three columns: EXIF, credit and timestamp.(credit et timestamp with AdminColumns). The first and second work fine, but not the timestamp column!

But the EXIF ​​column is not sortable. I wanted to use AdminColumns to have a sortable column

Regards

Emmanuel

4 years ago
Stefan
Developer

I was able to put in some fake EXIF data to test this use case and reproduce the issue.
There is already a fix for the upcoming release. If you don’t want to wait for the upcoming release please send me an message on the live chat or at support@admincolumns.com and I’ll send you a beta.

4 years ago
wb.cafbleau

Hello Stefan,

Thank you for your answer.
I’m testing this new site. I would like to test to see if the problem is solved!

Regards

Emmanuel

4 years ago
wb.cafbleau

Hello Stefan,

Since the update, the display is correct, thank you.
However, sorting is alphabetic and not on the timestamp.
(In French), 4 Octobre 2017 comes before 5 Juillet 2017!

Emmanuel

3 years, 11 months ago

You must be logged in to reply to this topic.