private static function get_prview_header_info($is_published, $published_at) { $header_info = array(); switch ($status = Site_Util::get_status($is_published, $published_at)) { case 'closed': $header_info = array('body' => sprintf('この%sはまだ%sされていません。', term('news.view'), term('form.publish')), 'type' => 'danger'); break; case 'reserved': $header_info = array('body' => sprintf('この%sは %s に%sされます。', term('news.view'), site_get_time($published_at, 'normal', 'Y/m/d H:i'), term('form.publish'))); break; } return $header_info; }