Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a widget which can be updated every time with few values and admin update it on daily basis now how to get its last update time.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

When you save the widget, you can save a field (which won't be setable in the admin interface) which stores the current time and then use that when you go to do the widget output.

share|improve this answer
    
Thanks @m0r7if3r –  Huzoor Bux Mar 9 '12 at 7:56
    
I have added manual query on last updated time of table and fix this issue ... $recentposts = $wpdb->get_results("SELECT DATE_FORMAT(CONVERT_TZ(UPDATE_TIME,'-06:00','+5:00'),'%b %d, %Y %l:%i %p') as UPDATETIMEWidget FROM information_schema.tables WHERE TABLE_NAME = 'wp_options'"); echo $recentposts[0]->UPDATETIMEWidget; –  Huzoor Bux Mar 9 '12 at 9:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.