コード例 #1
0
 public static function untrashed_post($post_id)
 {
     if (get_post_type($post_id) == EM_POST_TYPE_EVENT) {
         global $EM_Notices, $EM_Event;
         $EM_Event = new EM_Event($post_id, 'post_id');
         //get a refreshed $EM_Event because otherwise statuses don't get updated by WP
         $EM_Event->set_status($EM_Event->get_status());
         $EM_Notices->remove_all();
         //no validation/notices needed
     }
 }