Skip to content

Instantly share code, notes, and snippets.

@yousufansa
Last active January 14, 2019 16:07
Show Gist options
  • Save yousufansa/5ac06d291cd5ba10cdf24bdcfda6b8e0 to your computer and use it in GitHub Desktop.
Save yousufansa/5ac06d291cd5ba10cdf24bdcfda6b8e0 to your computer and use it in GitHub Desktop.
Job Overview Custom Field Display
if( ! function_exists( 'jh_child_single_job_overview_details' ) ) {
function jh_child_single_job_overview_details( $args ) {
$args['job_title'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Title', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_title',
);
$args['job_contact'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Contact', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_contact',
);
$args['job_category'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Category', 'jobhunt' ),
'taxonomy' => 'job_listing_category',
);
$args['job_region'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Region', 'jobhunt' ),
'taxonomy' => 'job_listing_region',
);
$args['job_founded'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Founded', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_founded',
);
$args['job_contact_details'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Contact Details', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_contact_details',
);
$args['job_email_general'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Email General', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_email_general',
);
$args['job_email_demo'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Email Demo', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_email_demo',
);
$args['job_demo_url'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Demo Url', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_demo_url',
);
$args['job_website'] = array(
'icon' => 'la la-graduation-cap',
'label' => esc_html__( 'Job Email Demo', 'jobhunt' ),
'callback' => 'jh_child_single_job_overview_job_website',
);
return $args;
}
}
add_filter( 'jobhunt_single_job_overview_details', 'jh_child_single_job_overview_details' );
if( ! function_exists( 'jh_child_single_job_overview_job_title' ) ) {
function jh_child_single_job_overview_job_title() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_title ) ? $post->_job_title : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_contact' ) ) {
function jh_child_single_job_overview_job_contact() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_contact ) ? $post->_job_contact : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_founded' ) ) {
function jh_child_single_job_overview_job_founded() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_founded ) ? $post->_job_founded : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_contact_details' ) ) {
function jh_child_single_job_overview_job_contact_details() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_contact_details ) ? $post->_job_contact_details : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_email_general' ) ) {
function jh_child_single_job_overview_job_email_general() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_email_general ) ? $post->_job_email_general : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_email_demo' ) ) {
function jh_child_single_job_overview_job_email_demo() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_email_demo ) ? $post->_job_email_demo : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_demo_url' ) ) {
function jh_child_single_job_overview_job_demo_url() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_demo_url ) ? $post->_job_demo_url : '';
}
}
if( ! function_exists( 'jh_child_single_job_overview_job_website' ) ) {
function jh_child_single_job_overview_job_website() {
$post = get_post();
if ( ! $post || 'job_listing' !== $post->post_type ) {
return;
}
echo isset( $post->_job_website ) ? $post->_job_website : '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment