/** * Output get_job_application_avatar * @param object $application_id */ function get_job_application_avatar($application_id, $size = 42) { $email = get_job_application_email($application_id); $resume_id = get_job_application_resume_id($application_id); if ($resume_id && 'publish' === get_post_status($resume_id) && function_exists('get_the_candidate_photo')) { return '<img src="' . esc_attr(get_the_candidate_photo($resume_id)) . '" height="' . esc_attr($size) . '" />'; } return $email ? get_avatar($email, $size) : ''; }
/** * Output the photo for the resume/candidate * * @param string $size (default: 'full') * @param mixed $default (default: null) * @param WP_Post|int $post (default: null) */ function the_candidate_photo($size = 'thumbnail', $default = null, $post = null) { $logo = get_the_candidate_photo($post); if ($logo) { if ($size !== 'full') { $logo = job_manager_get_resized_image($logo, $size); } echo '<img class="candidate_photo" src="' . $logo . '" alt="Photo" />'; } elseif ($default) { echo '<img class="candidate_photo" src="' . $default . '" alt="Photo" />'; } else { echo '<img class="candidate_photo" src="' . apply_filters('resume_manager_default_candidate_photo', RESUME_MANAGER_PLUGIN_URL . '/assets/images/candidate.png') . '" alt="Logo" />'; } }