protected static function _modify(Wpjb_Model_Job $job) { $arr = $job->allToArray(); foreach (Wpjb_Utility_Registry::getCategories() as $category) { if ($category->id == $job->job_category) { break; } } foreach (Wpjb_Utility_Registry::getJobTypes() as $type) { if ($type->id == $job->job_type) { break; } } $public = array("id", "company_name", "company_website", "job_type", "job_category", "job_country", "job_state", "job_zip_code", "job_location", "job_limit_to_country", "job_title", "job_slug", "job_created_at", "job_expires_at", "job_description", "is_active", "is_filled", "is_featured", "stat_view", "stat_unique", "stat_apply"); $publish = new stdClass(); foreach ($public as $k) { $publish->{$k} = $job->{$k}; } $arr = $job->allToArray(); foreach ($arr as $k => $a) { if (substr($k, 0, 6) == "field_") { $publish->{$k} = $a; } } $publish->url = wpjb_link_to("job", $job); $publish->image = $job->getImageUrl(); $publish->formatted_created_at = wpjb_date("M, d", $job->job_created_at); $publish->location = $job->locationToString(); $publish->category = $category->toArray(); $publish->type = $type->toArray(); $publish->is_new = $job->isNew(); $publish->is_free = $job->isFree(); return $publish; }
<td><?php _e("Applicant E-mail", WPJB_DOMAIN); ?> </td> <td><?php echo $application->email; ?> </td> </tr> <tr> <td><?php _e("Date Sent", WPJB_DOMAIN); ?> </td> <td><?php echo wpjb_date("d M, Y", $application->applied_at); ?> </td> </tr> <?php foreach ($application->getNonEmptyFields() as $field) { ?> <tr> <td><?php echo esc_html($field->getField()->label); ?> </td> <td><?php echo esc_html($field->value); ?> </td>