/** * custom_columns function. * * @access public * @param mixed $column * @return void */ public function custom_columns($column) { global $post, $job_manager; switch ($column) { case "job_listing_type": $type = get_the_job_type($post); if ($type) { echo '<span class="job-type ' . $type->slug . '">' . $type->name . '</span>'; } break; case "job_position": echo '<div class="job_position">'; echo '<a href="' . admin_url('post.php?post=' . $post->ID . '&action=edit') . '" class="tips job_title" data-tip="' . sprintf(__('Job ID: %d', 'wp-job-manager'), $post->ID) . '">' . $post->post_title . '</a>'; echo '<div class="location">'; if (get_the_company_website()) { the_company_name('<span class="tips" data-tip="' . esc_attr(get_the_company_tagline()) . '"><a href="' . get_the_company_website() . '">', '</a></span> – '); } else { the_company_name('<span class="tips" data-tip="' . esc_attr(get_the_company_tagline()) . '">', '</span> – '); } the_job_location($post); echo '</div>'; the_company_logo(); echo '</div>'; break; case "job_listing_category": if (!($terms = get_the_term_list($post->ID, $column, '', ', ', ''))) { echo '<span class="na">–</span>'; } else { echo $terms; } break; case "filled": if (is_position_filled($post)) { echo '✔'; } else { echo '–'; } break; case "featured_job": if (is_position_featured($post)) { echo '✔'; } else { echo '–'; } break; case "job_posted": echo '<strong>' . date_i18n(__('M j, Y', 'wp-job-manager'), strtotime($post->post_date)) . '</strong><span>'; echo (empty($post->post_author) ? __('by a guest', 'wp-job-manager') : sprintf(__('by %s', 'wp-job-manager'), '<a href="' . get_edit_user_link($post->post_author) . '">' . get_the_author() . '</a>')) . '</span>'; break; case "job_expires": if ($post->_job_expires) { echo '<strong>' . date_i18n(__('M j, Y', 'wp-job-manager'), strtotime($post->_job_expires)) . '</strong>'; } else { echo '–'; } break; case "job_status": echo get_the_job_status($post); break; case "job_actions": echo '<div class="actions">'; $admin_actions = array(); if ($post->post_status == 'pending') { $admin_actions['approve'] = array('action' => 'approve', 'name' => __('Approve', 'wp-job-manager'), 'url' => wp_nonce_url(add_query_arg('approve_job', $post->ID), 'approve_job')); } if ($post->post_status !== 'trash') { $admin_actions['view'] = array('action' => 'view', 'name' => __('View', 'wp-job-manager'), 'url' => get_permalink($post->ID)); $admin_actions['edit'] = array('action' => 'edit', 'name' => __('Edit', 'wp-job-manager'), 'url' => get_edit_post_link($post->ID)); $admin_actions['delete'] = array('action' => 'delete', 'name' => __('Delete', 'wp-job-manager'), 'url' => get_delete_post_link($post->ID)); } $admin_actions = apply_filters('job_manager_admin_actions', $admin_actions, $post); foreach ($admin_actions as $action) { printf('<a class="button tips icon-%s" href="%s" data-tip="%s">%s</a>', sanitize_title($action['name']), esc_url($action['url']), esc_attr($action['name']), esc_attr($action['name'])); } echo '</div>'; break; } }
/** * Display or retrieve the current company tagline with optional content. * * @access public * @param mixed $id (default: null) * @return void */ function the_company_tagline($before = '', $after = '', $echo = true, $post = null) { $company_tagline = get_the_company_tagline($post); if (strlen($company_tagline) == 0) { return; } $company_tagline = esc_attr(strip_tags($company_tagline)); $company_tagline = $before . $company_tagline . $after; if ($echo) { echo $company_tagline; } else { return $company_tagline; } }
?> <?php the_post(); ?> <header class="page-header"> <h1 class="page-title"><?php printf(__('Jobs at %s', 'jobify'), esc_attr(urldecode(get_query_var(apply_filters('wp_job_manager_companies_company_slug', 'company'))))); ?> </h1> <h2 class="page-subtitle"><strong><?php printf(_n('%d Job Available', '%d Jobs Available', $wp_query->found_posts, 'jobify'), $wp_query->found_posts); ?> </strong> <?php if (get_the_company_tagline(get_the_ID())) { ?> • <?php the_company_tagline('', '', true, get_the_ID()); } ?> </h2> </header> <?php rewind_posts(); ?> <div id="primary" class="content-area"> <div id="content" class="container" role="main"> <div class="company-profile row">