8889841cPKh[s*(FFfunctions-candidate-display.phpnu[ ID, 'candidate_category' ); if ( $categories ) { ?>
name); ?>
ID, 'candidate_location' ); ob_start(); if ( $locations ) { $terms = array(); superio_locations_walk($locations, 0, $terms); if ( empty($terms) ) { $terms = $locations; } else { $terms = array_reverse($terms, true); } if ( $display_type == 'icon' ) { ?>
ID); $location = $obj_candidate_meta->get_post_meta( 'address' ); if ( empty($location) ) { $location = $obj_candidate_meta->get_post_meta( 'map_location_address' ); } ob_start(); if ( $location ) { if ( $display_type == 'icon' ) { ?>
ID); $job_title = $obj_candidate_meta->get_post_meta( 'job_title' ); if ( $job_title ) { ?>
ID); $featured = $obj_candidate_meta->get_post_meta( 'featured' ); if ( $featured ) { ?> ID); $urgent = $obj_candidate_meta->get_post_meta( 'urgent' ); if ( $urgent ) { ?> ID ); ob_start(); if ( $phone ) { ?>
ID ); ob_start(); if ( $email ) { ?>
ID); ob_start(); if ( $salary ) { if ( $display_type == 'icon' ) { ?>
ID); $birthday = $obj_candidate_meta->get_post_meta( 'founded_date' ); ob_start(); if ( $birthday ) { $birthday = strtotime($birthday); $birthday = date_i18n(get_option('date_format'), $birthday); if ( $display_type == 'icon' ) { ?>
ID, 'candidate_tag' ); ob_start(); if ( $tags ) { ?>
ID, 'candidate_tag' ); ob_start(); $i = 1; if ( $tags ) { ?>
0 && $i > $limit ) { break; } ?> name); ?> 0 && count($tags) > $limit ) { ?>
ID); $latitude = $obj_candidate_meta->get_post_meta( 'map_location_latitude' ); $longitude = $obj_candidate_meta->get_post_meta( 'map_location_longitude' ); $url = ''; if ( has_post_thumbnail($post->ID) ) { $url = get_the_post_thumbnail_url($post->ID, 'thumbnail'); } echo 'data-latitude="'.esc_attr($latitude).'" data-longitude="'.esc_attr($longitude).'" data-img="'.esc_url($url).'"'; } function superio_candidate_display_meta($post, $meta_key, $icon = '', $show_title = false, $suffix = '', $echo = false) { $obj_job_meta = WP_Job_Board_Pro_Candidate_Meta::get_instance($post->ID); $value = $obj_job_meta->get_post_meta( $meta_key ); ob_start(); if ( $obj_job_meta->check_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_post_meta( $meta_key )) ) { ?>
get_post_meta_title($meta_key); ?>
ID); ob_start(); if ( $obj_job_meta->check_custom_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_custom_post_meta( $meta_key )) ) { ?>
get_custom_post_meta_title($meta_key); ?>
found_posts; $per_page = $wp_query->get( 'posts_per_page' ); $_per_page = wp_job_board_pro_get_option('number_candidates_per_page', 12); // Generate per page options $products_per_page_options = array(); while ( $_per_page < $total ) { $products_per_page_options[] = $_per_page; $_per_page = $_per_page * 2; } if ( empty( $products_per_page_options ) ) { return; } $products_per_page_options[] = -1; ?>
=') ) { $show = superio_get_config('show_candidate_invite_apply_job', 'always'); if ( $show == 'always' || ($show == 'show_loggedin' && is_user_logged_in() && WP_Job_Board_Pro_User::is_employer(get_current_user_id()) ) || ($show == 'none-register-employer' && (!is_user_logged_in() || WP_Job_Board_Pro_User::is_employer(get_current_user_id())) ) ) { WP_Job_Board_Pro_Candidate::display_invite_btn($post_id); } } }PKh[(D))functions-redux-configs.phpnu[ 'el el-pencil', 'title' => esc_html__('Jobs Settings', 'superio'), 'fields' => array( array( 'id' => 'show_job_breadcrumbs', 'type' => 'switch', 'title' => esc_html__('Breadcrumbs', 'superio'), 'default' => 1 ), array( 'title' => esc_html__('Breadcrumbs Background Color', 'superio'), 'subtitle' => ''.esc_html__('The breadcrumbs background color of the site.', 'superio').'', 'id' => 'job_breadcrumb_color', 'type' => 'color', 'transparent' => false, ), array( 'id' => 'job_breadcrumb_image', 'type' => 'media', 'title' => esc_html__('Breadcrumbs Background', 'superio'), 'subtitle' => esc_html__('Upload a .jpg or .png image that will be your breadcrumbs.', 'superio'), ), array( 'id' => 'jobs_general_settings', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('Other Settings', 'superio').'

', ), array( 'id' => 'job_show_full_phone', 'type' => 'switch', 'title' => esc_html__('Show Full Phone Number', 'superio'), 'default' => 0, ), ) ); // Archive settings $sections[] = array( 'title' => esc_html__('Job Archives', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'jobs_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'jobs_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'jobs_layout_type', 'type' => 'select', 'title' => esc_html__('Jobs Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout archive job.', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'fullwidth' => esc_html__('Full Width', 'superio'), 'half-map' => esc_html__('Half Map', 'superio'), 'top-map' => esc_html__('Top Map', 'superio'), 'half-job-details' => esc_html__('Half Job Details', 'superio'), ), 'default' => 'default', ), array( 'id' => 'jobs_layout_sidebar', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Sidebar Layout', 'superio'), 'subtitle' => esc_html__('Select a sidebar layout', 'superio'), 'options' => array( 'main' => array( 'title' => esc_html__('Main Content', 'superio'), 'alt' => esc_html__('Main Content', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen1.png' ), 'left-main' => array( 'title' => esc_html__('Left - Main Sidebar', 'superio'), 'alt' => esc_html__('Left - Main Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen2.png' ), 'main-right' => array( 'title' => esc_html__('Main - Right Sidebar', 'superio'), 'alt' => esc_html__('Main - Right Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen3.png' ), ), 'default' => 'main-right', 'required' => array('jobs_layout_type', '=', array('default', 'top-map')), ), array( 'id' => 'jobs_show_filter_top', 'type' => 'switch', 'title' => esc_html__('Show Filter Top', 'superio'), 'default' => false, 'required' => array('jobs_layout_type', '=', array('default', 'top-map')), ), array( 'id' => 'jobs_filter_top_sidebar', 'type' => 'select', 'title' => esc_html__('Jobs Filter Top Sidebar', 'superio'), 'subtitle' => esc_html__('Choose a sidebar for job filter sidebar.', 'superio'), 'options' => array( 'jobs-filter-top-sidebar' => esc_html__('Jobs Filter Top Sidebar', 'superio'), 'jobs-filter-top2-sidebar' => esc_html__('Jobs Filter Top 2 Sidebar', 'superio'), 'jobs-filter-top3-sidebar' => esc_html__('Jobs Filter Top 3 Sidebar', 'superio'), 'jobs-filter-top4-sidebar' => esc_html__('Jobs Filter Top 4 Sidebar', 'superio'), ), 'default' => 'jobs-filter-top-sidebar', 'required' => array('jobs_show_filter_top', '=', true), ), array( 'id' => 'jobs_show_offcanvas_filter', 'type' => 'switch', 'title' => esc_html__('Show Offcanvas Filter', 'superio'), 'default' => false, 'required' => array('jobs_layout_sidebar', '=', array('main')), ), array( 'id' => 'jobs_filter_sidebar', 'type' => 'select', 'title' => esc_html__('Jobs Filter Sidebar', 'superio'), 'subtitle' => esc_html__('Choose a sidebar for job filter sidebar.', 'superio'), 'options' => array( 'jobs-filter-sidebar' => esc_html__('Jobs Filter Sidebar', 'superio'), 'jobs-filter2-sidebar' => esc_html__('Jobs Filter 2 Sidebar', 'superio'), 'jobs-filter3-sidebar' => esc_html__('Jobs Filter 3 Sidebar', 'superio'), ), 'default' => 'jobs-filter-sidebar' ), array( 'id' => 'jobs_display_mode', 'type' => 'select', 'title' => esc_html__('Jobs display mode', 'superio'), 'subtitle' => esc_html__('Choose a default display mode for archive job.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid', 'superio'), 'list' => esc_html__('List', 'superio'), ), 'default' => 'list' ), array( 'id' => 'jobs_inner_list_style', 'type' => 'select', 'title' => esc_html__('Jobs list item style', 'superio'), 'subtitle' => esc_html__('Choose a job list style.', 'superio'), 'options' => array( 'list' => esc_html__('List Default', 'superio'), 'list-v1' => esc_html__('List V1', 'superio'), 'list-v2' => esc_html__('List V2', 'superio'), 'list-v3' => esc_html__('List V3', 'superio'), 'list-v4' => esc_html__('List V4', 'superio'), 'list-v5' => esc_html__('List V5', 'superio'), 'list-v6' => esc_html__('List V6', 'superio'), 'list-v7' => esc_html__('List V7', 'superio'), 'list-v8' => esc_html__('List V8', 'superio'), ), 'default' => 'list', 'required' => array('jobs_display_mode', '=', array('list')) ), array( 'id' => 'jobs_inner_grid_style', 'type' => 'select', 'title' => esc_html__('Jobs grid item style', 'superio'), 'subtitle' => esc_html__('Choose a job grid style.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid Default', 'superio'), 'grid-v1' => esc_html__('Grid V1', 'superio'), 'grid-v2' => esc_html__('Grid V2', 'superio'), 'grid-v3' => esc_html__('Grid V3', 'superio'), 'grid-v4' => esc_html__('Grid V4', 'superio'), ), 'default' => 'grid', 'required' => array('jobs_display_mode', '=', array('grid')) ), array( 'id' => 'jobs_columns', 'type' => 'select', 'title' => esc_html__('Job Columns', 'superio'), 'options' => $columns, 'default' => 3 ), array( 'id' => 'jobs_pagination', 'type' => 'select', 'title' => esc_html__('Pagination Type', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'loadmore' => esc_html__('Load More Button', 'superio'), 'infinite' => esc_html__('Infinite Scrolling', 'superio'), ), 'default' => 'default' ), array( 'id' => 'job_placeholder_image', 'type' => 'media', 'title' => esc_html__('Placeholder Image', 'superio'), 'subtitle' => esc_html__('Upload a .jpg or .png image that will be your placeholder.', 'superio'), ), array( 'title' => esc_html__('Job Urgent Background Color', 'superio'), 'subtitle' => ''.esc_html__('The job urgent background color of the site.', 'superio').'', 'id' => 'job_urgent_background_color', 'type' => 'color', 'transparent' => false, ), array( 'title' => esc_html__('Job Featured Background Color', 'superio'), 'subtitle' => ''.esc_html__('The job featured background color of the site.', 'superio').'', 'id' => 'job_featured_background_color', 'type' => 'color', 'transparent' => false, ), ) ); // Job Page $sections[] = array( 'title' => esc_html__('Single Job', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'job_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'job_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'job_layout_type', 'type' => 'select', 'title' => esc_html__('Job Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout single job.', 'superio'), 'options' => array( 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), 'v4' => esc_html__('Version 4', 'superio'), 'v5' => esc_html__('Version 5', 'superio'), 'v6' => esc_html__('Version 6', 'superio'), 'v7' => esc_html__('Version 7', 'superio'), ), 'default' => 'v1', ), array( 'id' => 'show_job_social_share', 'type' => 'switch', 'title' => esc_html__('Show Social Share', 'superio'), 'default' => 1 ), array( 'id' => 'job_block_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('Job Block Setting', 'superio').'

', ), array( 'id' => 'job_releated_show', 'type' => 'switch', 'title' => esc_html__('Show Jobs Related', 'superio'), 'default' => 1 ), array( 'id' => 'job_releated_number', 'title' => esc_html__('Number of related jobs to show', 'superio'), 'default' => 4, 'min' => '1', 'step' => '1', 'max' => '50', 'type' => 'slider', 'required' => array('job_releated_show', '=', true) ), ) ); // Job Expired Page $sections[] = array( 'title' => esc_html__('Single Job Expired', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'job_general_expired_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'title' => esc_html__('Image Icon', 'superio'), 'subtitle' => ''.esc_html__('Icon for expired error.', 'superio').'', 'id' => 'job_expired_icon_img', 'type' => 'media', ), array( 'id' => 'job_expired_title', 'type' => 'text', 'title' => esc_html__('Title', 'superio'), 'default' => 'We\'re Sorry Opps! Job Expired' ), array( 'id' => 'job_expired_description', 'type' => 'editor', 'title' => esc_html__('Description', 'superio'), 'default' => 'Unable to access the link. Job has been expired. Please contact the admin or who shared the link with you.' ) ) ); return $sections; } add_filter( 'superio_redux_framwork_configs', 'superio_wp_job_board_pro_redux_config', 10, 3 ); // employers function superio_wp_job_board_pro_employer_redux_config($sections, $sidebars, $columns) { $sections[] = array( 'icon' => 'el el-pencil', 'title' => esc_html__('Employer Settings', 'superio'), 'fields' => array( array( 'id' => 'show_employer_breadcrumbs', 'type' => 'switch', 'title' => esc_html__('Breadcrumbs', 'superio'), 'default' => 1 ), array( 'title' => esc_html__('Breadcrumbs Background Color', 'superio'), 'subtitle' => ''.esc_html__('The breadcrumbs background color of the site.', 'superio').'', 'id' => 'employer_breadcrumb_color', 'type' => 'color', 'transparent' => false, ), array( 'id' => 'employer_breadcrumb_image', 'type' => 'media', 'title' => esc_html__('Breadcrumbs Background', 'superio'), 'subtitle' => esc_html__('Upload a .jpg or .png image that will be your breadcrumbs.', 'superio'), ), ) ); // Archive settings $sections[] = array( 'title' => esc_html__('Employer Archives', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'employers_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'employers_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'employers_layout_type', 'type' => 'select', 'title' => esc_html__('Employers Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout archive job.', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'half-map' => esc_html__('Half Map', 'superio'), 'top-map' => esc_html__('Top Map', 'superio'), ), 'default' => 'default', ), array( 'id' => 'employers_layout_sidebar', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Sidebar Layout', 'superio'), 'subtitle' => esc_html__('Select a sidebar layout', 'superio'), 'options' => array( 'main' => array( 'title' => esc_html__('Main Content', 'superio'), 'alt' => esc_html__('Main Content', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen1.png' ), 'left-main' => array( 'title' => esc_html__('Left - Main Sidebar', 'superio'), 'alt' => esc_html__('Left - Main Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen2.png' ), 'main-right' => array( 'title' => esc_html__('Main - Right Sidebar', 'superio'), 'alt' => esc_html__('Main - Right Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen3.png' ), ), 'default' => 'main-right', 'required' => array('employers_layout_type', '=', array('default', 'top-map')), ), array( 'id' => 'employers_display_mode', 'type' => 'select', 'title' => esc_html__('Employers display mode', 'superio'), 'subtitle' => esc_html__('Choose a default display mode for archive employer.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid', 'superio'), 'list' => esc_html__('List', 'superio'), ), 'default' => 'list' ), array( 'id' => 'employers_inner_list_style', 'type' => 'select', 'title' => esc_html__('Employers list item style', 'superio'), 'subtitle' => esc_html__('Choose a employer list style.', 'superio'), 'options' => array( 'list' => esc_html__('List Default', 'superio'), 'list-v1' => esc_html__('List V1', 'superio'), 'list-v2' => esc_html__('List V2', 'superio'), ), 'default' => 'list', 'required' => array('employers_display_mode', '=', array('list')) ), array( 'id' => 'employers_inner_grid_style', 'type' => 'select', 'title' => esc_html__('Employers grid item style', 'superio'), 'subtitle' => esc_html__('Choose a employer grid style.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid Default', 'superio'), 'grid-v1' => esc_html__('Grid V1', 'superio'), 'grid-v2' => esc_html__('Grid V2', 'superio'), 'grid-v3' => esc_html__('Grid V3', 'superio'), ), 'default' => 'grid', 'required' => array('employers_display_mode', '=', array('grid')) ), array( 'id' => 'employers_columns', 'type' => 'select', 'title' => esc_html__('Employer Columns', 'superio'), 'options' => $columns, 'default' => 4, ), array( 'id' => 'employers_pagination', 'type' => 'select', 'title' => esc_html__('Pagination Type', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'loadmore' => esc_html__('Load More Button', 'superio'), 'infinite' => esc_html__('Infinite Scrolling', 'superio'), ), 'default' => 'default' ), array( 'title' => esc_html__('Employer Featured Background Color', 'superio'), 'subtitle' => ''.esc_html__('The employer featured background color of the site.', 'superio').'', 'id' => 'employer_featured_background_color', 'type' => 'color', 'transparent' => false, ), ) ); // Employer Page $sections[] = array( 'title' => esc_html__('Single Employer', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'employer_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'employer_layout_type', 'type' => 'select', 'title' => esc_html__('Employer Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout single employer.', 'superio'), 'options' => array( 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), ), 'default' => 'v1', ), array( 'id' => 'employer_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'show_employer_description', 'type' => 'switch', 'title' => esc_html__('Show Description', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_socials', 'type' => 'switch', 'title' => esc_html__('Show Socials', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_video', 'type' => 'switch', 'title' => esc_html__('Show Video', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_photos', 'type' => 'switch', 'title' => esc_html__('Show Photos', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_members', 'type' => 'switch', 'title' => esc_html__('Show Members', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_open_jobs', 'type' => 'switch', 'title' => esc_html__('Show Open Jobs', 'superio'), 'default' => 1 ), array( 'id' => 'show_employer_social_share', 'type' => 'switch', 'title' => esc_html__('Show Social Share', 'superio'), 'default' => 1 ), ) ); return $sections; } add_filter( 'superio_redux_framwork_configs', 'superio_wp_job_board_pro_employer_redux_config', 10, 3 ); // candidates function superio_wp_job_board_pro_candidate_redux_config($sections, $sidebars, $columns) { $sections[] = array( 'icon' => 'el el-pencil', 'title' => esc_html__('Candidate Settings', 'superio'), 'fields' => array( array( 'id' => 'show_candidate_breadcrumbs', 'type' => 'switch', 'title' => esc_html__('Breadcrumbs', 'superio'), 'default' => 1 ), array( 'title' => esc_html__('Breadcrumbs Background Color', 'superio'), 'subtitle' => ''.esc_html__('The breadcrumbs background color of the site.', 'superio').'', 'id' => 'candidate_breadcrumb_color', 'type' => 'color', 'transparent' => false, ), array( 'id' => 'candidate_breadcrumb_image', 'type' => 'media', 'title' => esc_html__('Breadcrumbs Background', 'superio'), 'subtitle' => esc_html__('Upload a .jpg or .png image that will be your breadcrumbs.', 'superio'), ), ) ); // Archive settings $sections[] = array( 'title' => esc_html__('Candidate Archives', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'candidates_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'candidates_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'candidates_layout_type', 'type' => 'select', 'title' => esc_html__('Candidates Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout archive job.', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'half-map' => esc_html__('Half Map', 'superio'), 'top-map' => esc_html__('Top Map', 'superio'), ), 'default' => 'default', ), array( 'id' => 'candidates_layout_sidebar', 'type' => 'image_select', 'compiler' => true, 'title' => esc_html__('Sidebar Layout', 'superio'), 'subtitle' => esc_html__('Select a sidebar layout', 'superio'), 'options' => array( 'main' => array( 'title' => esc_html__('Main Content', 'superio'), 'alt' => esc_html__('Main Content', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen1.png' ), 'left-main' => array( 'title' => esc_html__('Left - Main Sidebar', 'superio'), 'alt' => esc_html__('Left - Main Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen2.png' ), 'main-right' => array( 'title' => esc_html__('Main - Right Sidebar', 'superio'), 'alt' => esc_html__('Main - Right Sidebar', 'superio'), 'img' => get_template_directory_uri() . '/inc/assets/images/screen3.png' ), ), 'default' => 'main-right', 'required' => array('candidates_layout_type', '=', array('default', 'top-map')), ), array( 'id' => 'candidates_display_mode', 'type' => 'select', 'title' => esc_html__('Candidates display mode', 'superio'), 'subtitle' => esc_html__('Choose a default display mode for archive candidate.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid', 'superio'), 'list' => esc_html__('List', 'superio'), ), 'default' => 'list' ), array( 'id' => 'candidates_inner_list_style', 'type' => 'select', 'title' => esc_html__('Candidates list item style', 'superio'), 'subtitle' => esc_html__('Choose a candidate list style.', 'superio'), 'options' => array( 'list' => esc_html__('List Default', 'superio'), 'list-v1' => esc_html__('List V1', 'superio'), 'list-v2' => esc_html__('List V2', 'superio'), 'list-v3' => esc_html__('List V3', 'superio'), ), 'default' => 'list', 'required' => array('candidates_display_mode', '=', array('list')) ), array( 'id' => 'candidates_inner_grid_style', 'type' => 'select', 'title' => esc_html__('Candidates grid item style', 'superio'), 'subtitle' => esc_html__('Choose a candidate grid style.', 'superio'), 'options' => array( 'grid' => esc_html__('Grid Default', 'superio'), 'grid-v1' => esc_html__('Grid V1', 'superio'), 'grid-v2' => esc_html__('Grid V2', 'superio'), ), 'default' => 'grid', 'required' => array('candidates_display_mode', '=', array('grid')) ), array( 'id' => 'candidates_columns', 'type' => 'select', 'title' => esc_html__('Candidate Columns', 'superio'), 'options' => $columns, 'default' => 4, 'required' => array('candidates_display_mode', '=', array('grid')) ), array( 'id' => 'candidates_pagination', 'type' => 'select', 'title' => esc_html__('Pagination Type', 'superio'), 'options' => array( 'default' => esc_html__('Default', 'superio'), 'loadmore' => esc_html__('Load More Button', 'superio'), 'infinite' => esc_html__('Infinite Scrolling', 'superio'), ), 'default' => 'default' ), array( 'id' => 'candidates_show_filter_top', 'type' => 'select', 'title' => esc_html__('Show Filter Top', 'superio'), 'options' => array( 'no' => esc_html__('No', 'superio'), 'yes' => esc_html__('Yes', 'superio') ), ), array( 'id' => 'candidates_filter_top_sidebar', 'type' => 'select', 'title' => esc_html__('Candidates Filter Top Sidebar', 'superio'), 'subtitle' => esc_html__('Choose a filter top sidebar for your website.', 'superio'), 'options' => array( 'candidates-filter-top-sidebar' => esc_html__('Candidates Filter Top Sidebar', 'superio'), 'candidates-filter-top2-sidebar' => esc_html__('Candidates Filter Top 2 Sidebar', 'superio'), 'candidates-filter-top3-sidebar' => esc_html__('Candidates Filter Top 3 Sidebar', 'superio'), ), 'default' => 'candidates-filter-top-sidebar' ), array( 'id' => 'candidates_filter_sidebar', 'type' => 'select', 'title' => esc_html__('Candidates Filter Sidebar', 'superio'), 'subtitle' => esc_html__('Choose a filter sidebar for your website.', 'superio'), 'options' => array( 'candidates-filter-sidebar' => esc_html__('Candidates Filter Sidebar', 'superio'), 'candidates-filter2-sidebar' => esc_html__('Candidates Filter 2 Sidebar', 'superio'), ), 'default' => 'candidates-filter-sidebar' ), array( 'id' => 'candidate_placeholder_image', 'type' => 'media', 'title' => esc_html__('Placeholder Image', 'superio'), 'subtitle' => esc_html__('Upload a .jpg or .png image that will be your placeholder.', 'superio'), ), array( 'title' => esc_html__('Candidate Urgent Background Color', 'superio'), 'subtitle' => ''.esc_html__('The candidate urgent background color of the site.', 'superio').'', 'id' => 'candidate_urgent_background_color', 'type' => 'color', 'transparent' => false, ), array( 'title' => esc_html__('Candidate Featured Background Color', 'superio'), 'subtitle' => ''.esc_html__('The candidate featured background color of the site.', 'superio').'', 'id' => 'candidate_featured_background_color', 'type' => 'color', 'transparent' => false, ), ) ); // Candidate Page $sections[] = array( 'title' => esc_html__('Single Candidate', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'candidate_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'candidate_layout_type', 'type' => 'select', 'title' => esc_html__('Candidate Layout', 'superio'), 'subtitle' => esc_html__('Choose a default layout archive candidate.', 'superio'), 'options' => array( 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), 'v4' => esc_html__('Version 4', 'superio'), 'v5' => esc_html__('Version 5', 'superio'), ), 'default' => 'v1', ), array( 'id' => 'candidate_fullwidth', 'type' => 'switch', 'title' => esc_html__('Is Full Width?', 'superio'), 'default' => false ), array( 'id' => 'show_candidate_description', 'type' => 'switch', 'title' => esc_html__('Show Description', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_video', 'type' => 'switch', 'title' => esc_html__('Show Video', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_map_location', 'type' => 'switch', 'title' => esc_html__('Show Map Location', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_education', 'type' => 'switch', 'title' => esc_html__('Show Education', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_experience', 'type' => 'switch', 'title' => esc_html__('Show Experience', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_portfolios', 'type' => 'switch', 'title' => esc_html__('Show Portfolios', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_skill', 'type' => 'switch', 'title' => esc_html__('Show Skill', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_award', 'type' => 'switch', 'title' => esc_html__('Show Award', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_social_share', 'type' => 'switch', 'title' => esc_html__('Show Social Share', 'superio'), 'default' => 1 ), array( 'id' => 'show_candidate_invite_apply_job', 'type' => 'select', 'title' => esc_html__('Show Invite Candidate Apply Job', 'superio'), 'options' => array( 'always' => esc_html__('Always Show', 'superio'), 'show_loggedin' => esc_html__('Show when Employer Logged in', 'superio'), 'none-register-employer' => esc_html__('None Register and Employer', 'superio'), 'hide' => esc_html__('Hide', 'superio'), ), 'default' => 'always', ), array( 'id' => 'candidate_block_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('Candidate Block Setting', 'superio').'

', ), array( 'id' => 'candidate_releated_show', 'type' => 'switch', 'title' => esc_html__('Show Candidates Related', 'superio'), 'default' => 1 ), array( 'id' => 'candidate_releated_number', 'title' => esc_html__('Number of related candidates to show', 'superio'), 'default' => 4, 'min' => '1', 'step' => '1', 'max' => '50', 'type' => 'slider', 'required' => array('candidate_releated_show', '=', true) ), array( 'id' => 'candidate_releated_columns', 'type' => 'select', 'title' => esc_html__('Related Candidates Columns', 'superio'), 'options' => $columns, 'default' => 3, 'required' => array('candidate_releated_show', '=', true) ), ) ); // Candidate Expired Page $sections[] = array( 'title' => esc_html__('Single Candidate Expired', 'superio'), 'subsection' => true, 'fields' => array( array( 'id' => 'candidate_general_expired_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'title' => esc_html__('Image Icon', 'superio'), 'subtitle' => ''.esc_html__('Icon for expired error.', 'superio').'', 'id' => 'candidate_expired_icon_img', 'type' => 'media', ), array( 'id' => 'candidate_expired_title', 'type' => 'text', 'title' => esc_html__('Title', 'superio'), 'default' => 'We\'re Sorry Opps! Candidate Expired' ), array( 'id' => 'candidate_expired_description', 'type' => 'editor', 'title' => esc_html__('Description', 'superio'), 'default' => 'Unable to access the link. Candidate has been expired. Please contact the admin or who shared the link with you.' ) ) ); return $sections; } add_filter( 'superio_redux_framwork_configs', 'superio_wp_job_board_pro_candidate_redux_config', 10, 3 ); function superio_wp_job_board_pro_register_form_redux_config($sections, $sidebars, $columns) { // Register Form $sections[] = array( 'title' => esc_html__('Register Form', 'superio'), 'fields' => array( array( 'id' => 'register_general_setting', 'icon' => true, 'type' => 'info', 'raw' => '

'.esc_html__('General Setting', 'superio').'

', ), array( 'id' => 'register_form_enable_candidate', 'type' => 'switch', 'title' => esc_html__('Enable Register Candidate', 'superio'), 'default' => true, ), array( 'id' => 'register_form_enable_employer', 'type' => 'switch', 'title' => esc_html__('Enable Register Employer', 'superio'), 'default' => true, ), ) ); return $sections; } add_filter( 'superio_redux_framwork_configs', 'superio_wp_job_board_pro_register_form_redux_config', 11, 3 ); PKh[T!((functions-employer.phpnu[ -1, 'post_status' => 'publish', 'get_employers_by' => 'recent', 'orderby' => '', 'order' => '', 'post__in' => array(), 'fields' => null, // ids 'author' => null, 'categories' => array(), 'locations' => array(), )); extract($params); $query_args = array( 'post_type' => 'employer', 'posts_per_page' => $limit, 'post_status' => $post_status, 'orderby' => $orderby, 'order' => $order, ); $meta_query = array(); switch ($get_employers_by) { case 'recent': $query_args['orderby'] = 'date'; $query_args['order'] = 'DESC'; break; case 'featured': $meta_query[] = array( 'key' => WP_JOB_BOARD_PRO_EMPLOYER_PREFIX.'featured', 'value' => 'on', 'compare' => '=', ); break; } if ( !empty($post__in) ) { $query_args['post__in'] = $post__in; } if ( !empty($fields) ) { $query_args['fields'] = $fields; } if ( !empty($author) ) { $query_args['author'] = $author; } $tax_query = array(); if ( !empty($categories) ) { $tax_query[] = array( 'taxonomy' => 'employer_category', 'field' => 'slug', 'terms' => $categories, 'operator' => 'IN' ); } if ( !empty($locations) ) { $tax_query[] = array( 'taxonomy' => 'employer_location', 'field' => 'slug', 'terms' => $locations, 'operator' => 'IN' ); } if ( !empty($tax_query) ) { $query_args['tax_query'] = $tax_query; } $meta_query[] = array( 'relation' => 'OR', array( 'key' => WP_JOB_BOARD_PRO_EMPLOYER_PREFIX.'show_profile', 'value' => 'show', 'compare' => '==', ), array( 'key' => WP_JOB_BOARD_PRO_EMPLOYER_PREFIX.'show_profile', 'compare' => 'NOT EXISTS', ), ); if ( !empty($meta_query) ) { $query_args['meta_query'] = $meta_query; } if ( method_exists('WP_Job_Board_Pro_Employer', 'employer_restrict_listing_query_args') ) { $query_args = WP_Job_Board_Pro_Employer::employer_restrict_listing_query_args($query_args, null); } return new WP_Query( $query_args ); } if ( !function_exists('superio_employer_content_class') ) { function superio_employer_content_class( $class ) { $prefix = 'employers'; if ( is_singular( 'employer' ) ) { $prefix = 'employer'; } if ( superio_get_config($prefix.'_fullwidth') ) { return 'container-fluid'; } return $class; } } add_filter( 'superio_employer_content_class', 'superio_employer_content_class', 1, 1 ); if ( !function_exists('superio_get_employers_layout_configs') ) { function superio_get_employers_layout_configs() { $layout_type = superio_get_employers_layout_sidebar(); switch ( $layout_type ) { case 'left-main': $configs['left'] = array( 'sidebar' => 'employers-filter-sidebar', 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main-right': default: $configs['right'] = array( 'sidebar' => 'employers-filter-sidebar', 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main': $configs['main'] = array( 'class' => 'col-md-12 col-sm-12 col-xs-12' ); break; } return $configs; } } function superio_get_employers_layout_sidebar() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_layout', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('employers_layout_sidebar', 'main-right'); } return apply_filters( 'superio_get_employers_layout_sidebar', $layout_type ); } function superio_get_employers_layout_type() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_employers_layout_type', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('employers_layout_type', 'main-right'); } return apply_filters( 'superio_get_employers_layout_type', $layout_type ); } function superio_get_employers_display_mode() { global $post; if ( is_page() && is_object($post) ) { $columns = get_post_meta( $post->ID, 'apus_page_employers_display_mode', true ); } if ( empty($columns) ) { $columns = superio_get_config('employers_display_mode', 3); } return apply_filters( 'superio_get_employers_columns', $columns ); } function superio_get_employers_inner_style() { global $post; $display_mode = superio_get_employers_display_mode(); if ( $display_mode == 'list' ) { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_employers_inner_list_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('employers_inner_list_style', 'list'); } } else { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_employers_inner_grid_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('employers_inner_grid_style', 'grid'); } } return apply_filters( 'superio_get_employers_inner_style', $inner_style ); } function superio_get_employers_columns() { global $post; if ( is_page() && is_object($post) ) { $columns = get_post_meta( $post->ID, 'apus_page_employers_columns', true ); } if ( empty($columns) ) { $columns = superio_get_config('employers_columns', 3); } return apply_filters( 'superio_get_employers_columns', $columns ); } function superio_get_employer_layout_type() { global $post; $layout_type = get_post_meta($post->ID, WP_JOB_BOARD_PRO_EMPLOYER_PREFIX.'layout_type', true); if ( empty($layout_type) ) { $layout_type = superio_get_config('employer_layout_type', 'v1'); } return apply_filters( 'superio_get_employer_layout_type', $layout_type ); } function superio_get_employers_pagination() { global $post; if ( is_page() && is_object($post) ) { $pagination = get_post_meta( $post->ID, 'apus_page_employers_pagination', true ); } if ( empty($pagination) ) { $pagination = superio_get_config('employers_pagination', 'default'); } return apply_filters( 'superio_get_employers_pagination', $pagination ); } // post per page add_filter('wp-job-board-pro-employer-filter-query', 'superio_employer_filter_query', 10, 2); function superio_employer_filter_query( $query, $params) { $query_vars = &$query->query_vars; $query_vars['posts_per_page'] = superio_employer_get_limit_number(); $query->query_vars = $query_vars; return $query; } add_filter( 'wp-job-board-pro-employer-query-args', 'superio_employer_filter_query_args', 10, 2 ); function superio_employer_filter_query_args($query_args, $params) { $query_args['posts_per_page'] = superio_employer_get_limit_number(); return $query_args; } function superio_employer_get_limit_number() { if ( isset( $_REQUEST['employers_ppp'] ) ) { $number = intval( $_REQUEST['employers_ppp'] ); } elseif ( !empty($_COOKIE['employers_per_page']) ) { $number = intval( $_COOKIE['employers_per_page'] ); } else { $value = wp_job_board_pro_get_option('number_employers_per_page', 10); $number = intval( $value ); } return $number; } add_action('init', 'superio_employer_save_ppp'); function superio_employer_save_ppp() { if ( !empty( $_REQUEST['employers_ppp'] ) ) { $number = intval( $_REQUEST['employers_ppp'] ); setcookie('employers_per_page', $number, time() + 864000); $_COOKIE['employers_per_page'] = $number; } } function superio_get_employers_show_filter_top() { $layout_type = superio_get_employers_layout_type(); $layout_sidebar = superio_get_employers_layout_sidebar(); $show_filter_top = false; if ( $layout_type !== 'top-map' && $layout_sidebar == 'main' && is_active_sidebar( 'employers-filter-top-sidebar' ) ) { $show_filter_top = true; } return apply_filters( 'superio_get_employers_show_filter_top', $show_filter_top ); } add_filter('wp-job-board-pro-employer-admin-custom-fields', 'superio_employer_metaboxes_fields', 10); function superio_employer_metaboxes_fields($fields) { $prefix = WP_JOB_BOARD_PRO_EMPLOYER_PREFIX; $layout_key = 'tab-heading-employer-layout'.rand(100,1000); $fields[$layout_key] = array( 'id' => $layout_key, 'icon' => 'dashicons-admin-appearance', 'title' => esc_html__( 'Layout Type', 'superio' ), 'fields' => array( array( 'name' => esc_html__( 'Layout Type', 'superio' ), 'id' => $prefix . 'layout_type', 'type' => 'select', 'options' => array( '' => esc_html__('Global Settings', 'superio'), 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), ), ) ), ); return $fields; } function superio_is_employers_page() { if ( is_page() ) { $page_name = basename(get_page_template()); if ( $page_name == 'page-employers.php' ) { return true; } } elseif( is_post_type_archive('employer') || is_tax('employer_category') || is_tax('employer_location') ) { return true; } return false; } function superio_employer_placeholder_img_src( $size = 'thumbnail' ) { $src = get_template_directory_uri() . '/images/placeholder.png'; $placeholder_image = superio_get_config('employer_placeholder_image'); if ( !empty($placeholder_image['id']) ) { if ( is_numeric( $placeholder_image['id'] ) ) { $image = wp_get_attachment_image_src( $placeholder_image['id'], $size ); if ( ! empty( $image[0] ) ) { $src = $image[0]; } } else { $src = $placeholder_image; } } return apply_filters( 'superio_employer_placeholder_img_src', $src ); }PKh[w;w;functions-employer-display.phpnu[ ID, 'employer_location' ); ob_start(); if ( $locations ) { $terms = array(); superio_locations_walk($locations, 0, $terms); if ( empty($terms) ) { $terms = $locations; } else { $terms = array_reverse($terms, true); } ?> ID); $title = $meta_obj->get_post_meta_title('location'); ?>

:

ID); $location = $meta_obj->get_post_meta( 'address' ); if ( empty($location) ) { $location = $meta_obj->get_post_meta( 'map_location_address' ); } ob_start(); if ( $location ) { if ( $display_type == 'icon' ) { ?>
ID); $title = $meta_obj->get_post_meta_title('location'); ?>
ID); $args = array( 'post_type' => 'job_listing', 'post_per_page' => 1, 'post_status' => 'publish', 'fields' => 'ids', 'author' => $user_id ); $jobs = WP_Job_Board_Pro_Query::get_posts($args); $count_jobs = $jobs->found_posts; ?> %s', 'Open Jobs - %s', intval($count_jobs), 'superio'), intval($count_jobs)); ?> ID); $args = array( 'post_type' => 'job_listing', 'post_per_page' => 1, 'post_status' => 'publish', 'fields' => 'ids', 'author' => $user_id ); $jobs = WP_Job_Board_Pro_Query::get_posts($args); $count_jobs = $jobs->found_posts; ?> ID; $total_reviews = WP_Job_Board_Pro_Review::get_total_reviews($employer_id); $total_reviews_display = $total_reviews ? WP_Job_Board_Pro_Mixes::format_number($total_reviews) : 0; ?>
%d Review', '%d Reviews', intval($total_reviews), 'superio'), $total_reviews_display); ?>
ID); $views = $meta_obj->get_post_meta( 'views_count' ); $views_display = $views ? WP_Job_Board_Pro_Mixes::format_number($views) : 0; ?>
%d View', '%d Views', intval($views), 'superio'), $views_display); ?>
ID); $featured = $meta_obj->get_post_meta( 'featured' ); if ( $featured ) { if ( $display_type == 'icon' ) { ?>
ID); $title = $meta_obj->get_post_meta_title('phone'); ?>

:

ID); $title = $meta_obj->get_post_meta_title('email'); ?>

:

get_post_meta_title('category'); ?>

:

ID); $latitude = $meta_obj->get_post_meta( 'map_location_latitude' ); $longitude = $meta_obj->get_post_meta( 'map_location_longitude' ); $url = ''; if ( has_post_thumbnail($post->ID) ) { $url = get_the_post_thumbnail_url($post->ID, 'thumbnail'); } echo 'data-latitude="'.esc_attr($latitude).'" data-longitude="'.esc_attr($longitude).'" data-img="'.esc_url($url).'"'; } function superio_employer_display_meta($post, $meta_key, $icon = '', $show_title = false, $suffix = '', $echo = false) { $obj_job_meta = WP_Job_Board_Pro_Employer_Meta::get_instance($post->ID); ob_start(); if ( $obj_job_meta->check_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_post_meta( $meta_key )) ) { ?>
get_post_meta_title($meta_key); ?>

:

ID); ob_start(); if ( $obj_job_meta->check_custom_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_custom_post_meta( $meta_key )) ) { ?>
get_custom_post_meta_title($meta_key); ?>

:

found_posts; $per_page = $wp_query->get( 'posts_per_page' ); $_per_page = wp_job_board_pro_get_option('number_employers_per_page', 12); // Generate per page options $products_per_page_options = array(); while ( $_per_page < $total ) { $products_per_page_options[] = $_per_page; $_per_page = $_per_page * 2; } if ( empty( $products_per_page_options ) ) { return; } $products_per_page_options[] = -1; ?>
ID); $employer_id = WP_Job_Board_Pro_User::get_employer_by_user_id($author_id); if ( $link ) { if ( $link_employer ) { $url = get_permalink($employer_id); } else { $url = get_permalink($post); } } $obj_job_meta = WP_Job_Board_Pro_Job_Listing_Meta::get_instance($post->ID); ob_start(); ?> ID); $employer_id = WP_Job_Board_Pro_User::get_employer_by_user_id($author_id); ob_start(); if ( $employer_id ) { $employer_obj = get_post($employer_id); ?>

ID, 'job_listing_category' ); if ( $categories ) { $i = 1; ?>
term_id, '_color', true ); $style = ''; if ( $color ) { $style = 'color: '.$color; } ?> name); ?>, name); ?>
ID, 'job_listing_category' ); if ( $categories ) { $i = 1; ?>
term_id, '_color', true ); $style = ''; if ( $color ) { $style = 'color: '.$color; } ?> name); ?>
ID, 'job_listing_type' ); ob_start(); if ( $types ) { ?>
term_id, 'bg_color', true ); $text_color = get_term_meta( $term->term_id, 'text_color', true ); if ( !empty($bg_color) ) { $style .= 'background-color: '.$bg_color.';'; } if ( !empty($text_color) ) { $style .= 'color: '.$text_color.';'; } } ?> name); ?>
ID, 'job_listing_tag' ); ob_start(); if ( $tags ) { ?>
ID, 'job_listing_tag' ); ob_start(); $i = 1; if ( $tags ) { ?>
0 && $i > $limit ) { break; } ?> name); ?> 0 && count($tags) > $limit ) { ?>
ID, 'job_listing_location' ); ob_start(); if ( $locations ) { $terms = array(); superio_locations_walk($locations, 0, $terms); if ( empty($terms) ) { $terms = $locations; } else { $terms = array_reverse($terms, true); } ?> ID); $location = $obj_job_meta->get_post_meta( 'address' ); if ( empty($location) ) { $location = $obj_job_meta->get_post_meta( 'map_location_address' ); } if ( $location ) { if ( $display_type == 'icon' ) { ?>
ID); ob_start(); if ( $salary ) { if ( $display_type == 'icon' ) { ?>
ID); $application_deadline_date = $obj_job_meta->get_post_meta( 'application_deadline_date' ); ob_start(); if ( empty($application_deadline_date) || date('Y-m-d', strtotime($application_deadline_date)) >= date('Y-m-d', strtotime('now')) ) { if ( $application_deadline_date ) { $deadline_date = strtotime($application_deadline_date); ?>
ID); $featured = $obj_job_meta->get_post_meta( 'featured' ); if ( $featured ) { ?> ID); $urgent = $obj_job_meta->get_post_meta( 'urgent' ); if ( $urgent ) { ?> ID) ) { ?> ID); $latitude = $obj_job_meta->get_post_meta( 'map_location_latitude' ); $longitude = $obj_job_meta->get_post_meta( 'map_location_longitude' ); $author_id = superio_get_post_author($post->ID); $employer_id = WP_Job_Board_Pro_User::get_employer_by_user_id($author_id); $url = ''; if ( $obj_job_meta->check_post_meta_exist('logo') && ($logo_url = $obj_job_meta->get_post_meta( 'logo' )) ) { $logo_id = WP_Job_Board_Pro_Job_Listing::get_post_meta($post->ID, 'logo_id', true); if ( $logo_id ) { $url = wp_get_attachment_image_url($logo_id, 'thumbnail'); } else { $url = $logo_url; } } elseif ( has_post_thumbnail($employer_id) ) { $url = get_the_post_thumbnail_url($employer_id, 'thumbnail'); } echo 'data-latitude="'.esc_attr($latitude).'" data-longitude="'.esc_attr($longitude).'" data-img="'.esc_url($url).'"'; } function superio_job_display_meta($post, $meta_key, $icon = '', $show_title = false, $suffix = '', $echo = false) { $obj_job_meta = WP_Job_Board_Pro_Job_Listing_Meta::get_instance($post->ID); ob_start(); if ( $obj_job_meta->check_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_post_meta( $meta_key )) ) { ?>
get_post_meta_title($meta_key); ?>
ID); ob_start(); if ( $obj_job_meta->check_custom_post_meta_exist($meta_key) && ($value = $obj_job_meta->get_custom_post_meta( $meta_key )) ) { ?>
get_custom_post_meta_title($meta_key); ?>
found_posts; $per_page = $wp_query->get( 'posts_per_page' ); $_per_page = wp_job_board_pro_get_option('number_jobs_per_page', 12); // Generate per page options $products_per_page_options = array(); while ( $_per_page < $total ) { $products_per_page_options[] = $_per_page; $_per_page = $_per_page * 2; } if ( empty( $products_per_page_options ) ) { return; } $products_per_page_options[] = -1; ?>
-1, 'post_status' => 'publish', 'get_candidates_by' => 'recent', 'orderby' => '', 'order' => '', 'post__in' => array(), 'fields' => null, // ids 'author' => null, 'categories' => array(), 'locations' => array(), )); extract($params); $query_args = array( 'post_type' => 'candidate', 'posts_per_page' => $limit, 'post_status' => $post_status, 'orderby' => $orderby, 'order' => $order, ); $meta_query = array(); switch ($get_candidates_by) { case 'recent': $query_args['orderby'] = 'date'; $query_args['order'] = 'DESC'; break; case 'featured': $meta_query[] = array( 'key' => WP_JOB_BOARD_PRO_CANDIDATE_PREFIX.'featured', 'value' => 'on', 'compare' => '=', ); break; case 'urgent': $meta_query[] = array( 'key' => WP_JOB_BOARD_PRO_CANDIDATE_PREFIX.'urgent', 'value' => 'on', 'compare' => '=', ); break; } if ( !empty($post__in) ) { $query_args['post__in'] = $post__in; } if ( !empty($fields) ) { $query_args['fields'] = $fields; } if ( !empty($author) ) { $query_args['author'] = $author; } $tax_query = array(); if ( !empty($categories) ) { $tax_query[] = array( 'taxonomy' => 'candidate_category', 'field' => 'slug', 'terms' => $categories, 'operator' => 'IN' ); } if ( !empty($locations) ) { $tax_query[] = array( 'taxonomy' => 'candidate_location', 'field' => 'slug', 'terms' => $locations, 'operator' => 'IN' ); } if ( !empty($tax_query) ) { $query_args['tax_query'] = $tax_query; } $meta_query[] = array( 'relation' => 'OR', array( 'key' => WP_JOB_BOARD_PRO_CANDIDATE_PREFIX.'show_profile', 'value' => 'show', 'compare' => '==', ), array( 'key' => WP_JOB_BOARD_PRO_CANDIDATE_PREFIX.'show_profile', 'compare' => 'NOT EXISTS', ), ); if ( !empty($meta_query) ) { $query_args['meta_query'] = $meta_query; } if ( method_exists('WP_Job_Board_Pro_Candidate', 'candidate_restrict_listing_query_args') ) { $query_args = WP_Job_Board_Pro_Candidate::candidate_restrict_listing_query_args($query_args, null); } return new WP_Query( $query_args ); } if ( !function_exists('superio_candidate_content_class') ) { function superio_candidate_content_class( $class ) { $prefix = 'candidates'; if ( is_singular( 'candidate' ) ) { $prefix = 'candidate'; } if ( superio_get_config($prefix.'_fullwidth') ) { return 'container-fluid'; } return $class; } } add_filter( 'superio_candidate_content_class', 'superio_candidate_content_class', 1 , 1 ); if ( !function_exists('superio_get_candidates_layout_configs') ) { function superio_get_candidates_layout_configs() { $layout_type = superio_get_candidates_layout_sidebar(); $sidebar = superio_get_candidates_filter_sidebar(); switch ( $layout_type ) { case 'left-main': $configs['left'] = array( 'sidebar' => $sidebar, 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main-right': default: $configs['right'] = array( 'sidebar' => $sidebar, 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main': $configs['main'] = array( 'class' => 'col-md-12 col-sm-12 col-xs-12' ); break; } return $configs; } } function superio_get_candidates_layout_sidebar() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_layout', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('candidates_layout_sidebar', 'main-right'); } return apply_filters( 'superio_get_candidates_layout_sidebar', $layout_type ); } function superio_get_candidates_layout_type() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_candidates_layout_type', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('candidates_layout_type', 'main-right'); } return apply_filters( 'superio_get_candidates_layout_type', $layout_type ); } function superio_get_candidates_display_mode() { global $post; if ( is_page() && is_object($post) ) { $display_mode = get_post_meta( $post->ID, 'apus_page_candidates_display_mode', true ); } if ( empty($display_mode) ) { $display_mode = superio_get_config('candidates_display_mode', 3); } return apply_filters( 'superio_get_candidates_display_mode', $display_mode ); } function superio_get_candidates_inner_style() { global $post; $display_mode = superio_get_candidates_display_mode(); if ( $display_mode == 'list' ) { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_candidates_inner_list_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('candidates_inner_list_style', 'list'); } } else { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_candidates_inner_grid_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('candidates_inner_grid_style', 'grid'); } } return apply_filters( 'superio_get_candidates_inner_style', $inner_style ); } function superio_get_candidates_columns() { global $post; if ( is_page() && is_object($post) ) { $columns = get_post_meta( $post->ID, 'apus_page_candidates_columns', true ); } if ( empty($columns) ) { $columns = superio_get_config('candidates_columns', 3); } return apply_filters( 'superio_get_candidates_columns', $columns ); } function superio_get_candidate_layout_type() { global $post; $layout_type = get_post_meta($post->ID, WP_JOB_BOARD_PRO_CANDIDATE_PREFIX.'layout_type', true); if ( empty($layout_type) ) { $layout_type = superio_get_config('candidate_layout_type', 'v1'); } return apply_filters( 'superio_get_candidate_layout_type', $layout_type ); } function superio_get_candidates_pagination() { global $post; if ( is_page() && is_object($post) ) { $pagination = get_post_meta( $post->ID, 'apus_page_candidates_pagination', true ); } if ( empty($pagination) ) { $pagination = superio_get_config('candidates_pagination', 'default'); } return apply_filters( 'superio_get_candidates_pagination', $pagination ); } // post per page add_filter('wp-job-board-pro-candidate-filter-query', 'superio_candidate_filter_query', 10, 2); function superio_candidate_filter_query( $query, $params) { $query_vars = &$query->query_vars; $query_vars['posts_per_page'] = superio_candidate_get_limit_number(); $query->query_vars = $query_vars; return $query; } add_filter( 'wp-job-board-pro-candidate-query-args', 'superio_candidate_filter_query_args', 10, 2 ); function superio_candidate_filter_query_args($query_args, $params) { $query_args['posts_per_page'] = superio_candidate_get_limit_number(); return $query_args; } function superio_candidate_get_limit_number() { if ( isset( $_REQUEST['candidates_ppp'] ) ) { $number = intval( $_REQUEST['candidates_ppp'] ); } elseif ( !empty($_COOKIE['candidates_per_page']) ) { $number = intval( $_COOKIE['candidates_per_page'] ); } else { $value = wp_job_board_pro_get_option('number_candidates_per_page', 10); $number = intval( $value ); } return $number; } add_action('init', 'superio_candidate_save_ppp'); function superio_candidate_save_ppp() { if ( !empty( $_REQUEST['candidates_ppp'] ) ) { $number = intval( $_REQUEST['candidates_ppp'] ); setcookie('candidates_per_page', $number, time() + 864000); $_COOKIE['candidates_per_page'] = $number; } } function superio_candidate_check_hidden_review() { $view = wp_job_board_pro_get_option('candidates_restrict_review', 'all'); if ( $view == 'always_hidden' ) { return false; } return true; } //----- function superio_get_candidates_show_filter_top() { global $post; if ( is_page() && is_object($post) ) { $show_filter_top = get_post_meta( $post->ID, 'apus_page_candidates_show_filter_top', true ); } if ( empty($show_filter_top) ) { $show_filter_top = superio_get_config('candidates_show_filter_top', 'no'); } if ( $show_filter_top == 'yes' ) { $show_filter_top = true; } else { $show_filter_top = false; } return apply_filters( 'superio_get_candidates_show_filter_top', $show_filter_top ); } function superio_get_candidates_filter_sidebar() { global $post; if ( is_page() && is_object($post) ) { $candidates_filter_sidebar = get_post_meta( $post->ID, 'apus_page_candidates_filter_sidebar', true ); } if ( empty($candidates_filter_sidebar) ) { $candidates_filter_sidebar = superio_get_config('candidates_filter_sidebar', 'candidates-filter-sidebar'); } return apply_filters( 'superio_get_candidates_filter_sidebar', $candidates_filter_sidebar ); } function superio_get_candidates_filter_top_sidebar() { global $post; if ( is_page() && is_object($post) ) { $candidates_filter_top_sidebar = get_post_meta( $post->ID, 'apus_page_candidates_filter_top_sidebar', true ); } if ( empty($candidates_filter_top_sidebar) ) { $candidates_filter_top_sidebar = superio_get_config('candidates_filter_top_sidebar', 'candidates-filter-top-sidebar'); } return apply_filters( 'superio_get_candidates_filter_top_sidebar', $candidates_filter_top_sidebar ); } add_filter('wp-job-board-pro-candidate-admin-custom-fields', 'superio_candidate_metaboxes_fields', 10); function superio_candidate_metaboxes_fields($fields) { $prefix = WP_JOB_BOARD_PRO_CANDIDATE_PREFIX; $layout_key = 'tab-heading-candidate-layout'.rand(100,1000); $fields[$layout_key] = array( 'id' => $layout_key, 'icon' => 'dashicons-admin-appearance', 'title' => esc_html__( 'Layout Type', 'superio' ), 'fields' => array( array( 'name' => esc_html__( 'Layout Type', 'superio' ), 'id' => $prefix . 'layout_type', 'type' => 'select', 'options' => array( '' => esc_html__('Global Settings', 'superio'), 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), 'v4' => esc_html__('Version 4', 'superio'), 'v5' => esc_html__('Version 5', 'superio'), ), ) ), ); return $fields; } function superio_is_candidates_page() { if ( is_page() ) { $page_name = basename(get_page_template()); if ( $page_name == 'page-candidates.php' ) { return true; } } elseif( is_post_type_archive('candidate') || is_tax('candidate_category') || is_tax('candidate_location') ) { return true; } return false; } function superio_candidate_placeholder_img_src( $size = 'thumbnail' ) { $src = get_template_directory_uri() . '/images/placeholder.png'; $placeholder_image = superio_get_config('candidate_placeholder_image'); if ( !empty($placeholder_image['id']) ) { if ( is_numeric( $placeholder_image['id'] ) ) { $image = wp_get_attachment_image_src( $placeholder_image['id'], $size ); if ( ! empty( $image[0] ) ) { $src = $image[0]; } } else { $src = $placeholder_image; } } return apply_filters( 'superio_candidate_placeholder_img_src', $src ); }PKh[ functions.phpnu[ -1, 'post_status' => 'publish', 'get_jobs_by' => 'recent', 'orderby' => '', 'order' => '', 'post__in' => array(), 'fields' => null, // ids 'author' => null, 'categories' => array(), 'types' => array(), 'locations' => array(), )); extract($params); $query_args = array( 'post_type' => 'job_listing', 'posts_per_page' => $limit, 'post_status' => $post_status, 'orderby' => $orderby, 'order' => $order, ); $meta_query = array(); switch ($get_jobs_by) { case 'recent': $query_args['orderby'] = 'date'; $query_args['order'] = 'DESC'; break; case 'featured': $meta_query[] = array( 'key' => WP_JOB_BOARD_PRO_JOB_LISTING_PREFIX.'featured', 'value' => 'on', 'compare' => '=', ); break; case 'urgent': $meta_query[] = array( 'key' => WP_JOB_BOARD_PRO_JOB_LISTING_PREFIX.'urgent', 'value' => 'on', 'compare' => '=', ); break; } if ( !empty($post__in) ) { $query_args['post__in'] = $post__in; } if ( !empty($fields) ) { $query_args['fields'] = $fields; } if ( !empty($author) ) { $query_args['author'] = $author; } $tax_query = array(); if ( !empty($categories) ) { $tax_query[] = array( 'taxonomy' => 'job_listing_category', 'field' => 'slug', 'terms' => $categories, 'operator' => 'IN' ); } if ( !empty($types) ) { $tax_query[] = array( 'taxonomy' => 'job_listing_type', 'field' => 'slug', 'terms' => $types, 'operator' => 'IN' ); } if ( !empty($locations) ) { $tax_query[] = array( 'taxonomy' => 'job_listing_location', 'field' => 'slug', 'terms' => $locations, 'operator' => 'IN' ); } if ( !empty($tax_query) ) { $query_args['tax_query'] = $tax_query; } if ( !empty($meta_query) ) { $query_args['meta_query'] = $meta_query; } if ( method_exists('WP_Job_Board_Pro_Job_Listing', 'job_restrict_listing_query_args') ) { $query_args = WP_Job_Board_Pro_Job_Listing::job_restrict_listing_query_args($query_args, null); } return new WP_Query( $query_args ); } if ( !function_exists('superio_job_content_class') ) { function superio_job_content_class( $class ) { $prefix = 'jobs'; if ( is_singular( 'job_listing' ) ) { $prefix = 'job'; } if ( superio_get_config($prefix.'_fullwidth') ) { return 'container-fluid'; } return $class; } } add_filter( 'superio_job_content_class', 'superio_job_content_class', 1 , 1 ); if ( !function_exists('superio_get_jobs_layout_configs') ) { function superio_get_jobs_layout_configs() { $layout_sidebar = superio_get_jobs_layout_sidebar(); $sidebar = superio_get_jobs_filter_sidebar(); switch ( $layout_sidebar ) { case 'left-main': $configs['left'] = array( 'sidebar' => $sidebar, 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main-right': default: $configs['right'] = array( 'sidebar' => $sidebar, 'class' => 'col-md-4 col-sm-12 col-xs-12' ); $configs['main'] = array( 'class' => 'col-md-8 col-sm-12 col-xs-12' ); break; case 'main': $configs['main'] = array( 'class' => 'col-md-12 col-sm-12 col-xs-12' ); break; } return $configs; } } function superio_get_jobs_layout_sidebar() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_layout', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('jobs_layout_sidebar', 'main-right'); } return apply_filters( 'superio_get_jobs_layout_sidebar', $layout_type ); } function superio_get_jobs_layout_type() { global $post; if ( is_page() && is_object($post) ) { $layout_type = get_post_meta( $post->ID, 'apus_page_layout_type', true ); } if ( empty($layout_type) ) { $layout_type = superio_get_config('jobs_layout_type', 'main-right'); } return apply_filters( 'superio_get_jobs_layout_type', $layout_type ); } function superio_get_jobs_display_mode() { global $post; if ( is_page() && is_object($post) ) { $display_mode = get_post_meta( $post->ID, 'apus_page_display_mode', true ); } if ( empty($display_mode) ) { $display_mode = superio_get_config('jobs_display_mode', 'list'); } return apply_filters( 'superio_get_jobs_display_mode', $display_mode ); } function superio_get_jobs_inner_style() { global $post; $display_mode = superio_get_jobs_display_mode(); if ( $display_mode == 'list' ) { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_inner_list_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('jobs_inner_list_style', 'list'); } } else { if ( is_page() && is_object($post) ) { $inner_style = get_post_meta( $post->ID, 'apus_page_inner_grid_style', true ); } if ( empty($inner_style) ) { $inner_style = superio_get_config('jobs_inner_grid_style', 'grid'); } } return apply_filters( 'superio_get_jobs_inner_style', $inner_style ); } function superio_get_jobs_columns() { global $post; if ( is_page() && is_object($post) ) { $columns = get_post_meta( $post->ID, 'apus_page_jobs_columns', true ); } if ( empty($columns) ) { $columns = superio_get_config('jobs_columns', 3); } return apply_filters( 'superio_get_jobs_columns', $columns ); } function superio_get_job_layout_type() { global $post; $layout_type = get_post_meta($post->ID, WP_JOB_BOARD_PRO_JOB_LISTING_PREFIX.'layout_type', true); if ( empty($layout_type) ) { $layout_type = superio_get_config('job_layout_type', 'v1'); } return apply_filters( 'superio_get_job_layout_type', $layout_type ); } function superio_get_jobs_pagination() { global $post; if ( is_page() && is_object($post) ) { $pagination = get_post_meta( $post->ID, 'apus_page_jobs_pagination', true ); } if ( empty($pagination) ) { $pagination = superio_get_config('jobs_pagination', 'default'); } return apply_filters( 'superio_get_jobs_pagination', $pagination ); } function superio_get_jobs_show_filter_top() { global $post; if ( is_page() && is_object($post) ) { $show_filter_top = get_post_meta( $post->ID, 'apus_page_jobs_show_filter_top', true ); } if ( empty($show_filter_top) ) { $show_filter_top = superio_get_config('jobs_show_filter_top'); } if ( $show_filter_top == 'yes' ) { $show_filter_top = true; } else { $show_filter_top = false; } return apply_filters( 'superio_get_jobs_show_filter_top', $show_filter_top ); } function superio_get_jobs_show_offcanvas_filter() { global $post; if ( is_page() && is_object($post) ) { $show_offcanvas_filter = get_post_meta( $post->ID, 'apus_page_jobs_show_offcanvas_filter', true ); } if ( empty($show_offcanvas_filter) ) { $show_offcanvas_filter = superio_get_config('jobs_show_offcanvas_filter'); } if ( $show_offcanvas_filter == 'yes' ) { $show_offcanvas_filter = true; } else { $show_offcanvas_filter = false; } return apply_filters( 'superio_get_jobs_show_offcanvas_filter', $show_offcanvas_filter ); } function superio_get_jobs_filter_sidebar() { global $post; if ( is_page() && is_object($post) ) { $jobs_filter_sidebar = get_post_meta( $post->ID, 'apus_page_jobs_filter_sidebar', true ); } if ( empty($jobs_filter_sidebar) ) { $jobs_filter_sidebar = superio_get_config('jobs_filter_sidebar', 'jobs-filter-sidebar'); } return apply_filters( 'superio_get_jobs_filter_sidebar', $jobs_filter_sidebar ); } function superio_get_jobs_filter_top_sidebar() { global $post; if ( is_page() && is_object($post) ) { $jobs_filter_top_sidebar = get_post_meta( $post->ID, 'apus_page_jobs_filter_top_sidebar', true ); } if ( empty($jobs_filter_top_sidebar) ) { $jobs_filter_top_sidebar = superio_get_config('jobs_filter_top_sidebar', 'jobs-filter-top-sidebar'); } return apply_filters( 'superio_get_jobs_filter_top_sidebar', $jobs_filter_top_sidebar ); } function superio_job_scripts() { wp_enqueue_style( 'leaflet' ); wp_enqueue_script( 'jquery-highlight' ); wp_enqueue_script( 'leaflet' ); wp_enqueue_script( 'control-geocoder' ); wp_enqueue_script( 'leaflet-markercluster' ); wp_enqueue_script( 'leaflet-HtmlIcon' ); if ( wp_job_board_pro_get_option('map_service') == 'google-map' ) { wp_enqueue_script( 'leaflet-GoogleMutant' ); } $locale = get_locale(); $locale = explode('_', $locale); $locale_code = !empty($locale[0]) ? $locale[0] : ''; wp_register_script( 'superio-job', get_template_directory_uri() . '/js/job.js', array( 'jquery', 'wp-job-board-pro-main' ), '20150330', true ); wp_localize_script( 'superio-job', 'superio_job_opts', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'empty_msg' => apply_filters( 'superio_autocompleate_search_empty_msg', esc_html__( 'Unable to find any listing that match the currenty query', 'superio' ) ), 'show' => __( 'Show', 'superio' ), 'hide' => __( 'Hide', 'superio' ), 'lang_code' => $locale_code, )); wp_enqueue_script( 'superio-job' ); $here_map_api_key = ''; $here_style = ''; $mapbox_token = ''; $mapbox_style = ''; $custom_style = ''; $map_service = wp_job_board_pro_get_option('map_service', ''); if ( $map_service == 'mapbox' ) { $mapbox_token = wp_job_board_pro_get_option('mapbox_token', ''); $mapbox_style = wp_job_board_pro_get_option('mapbox_style', 'streets-v11'); } elseif ( $map_service == 'here' ) { $here_map_api_key = wp_job_board_pro_get_option('here_map_api_key', ''); $here_style = wp_job_board_pro_get_option('here_map_style', 'normal.day'); } else { $custom_style = wp_job_board_pro_get_option('google_map_style', ''); } wp_register_script( 'superio-job-map', get_template_directory_uri() . '/js/job-map.js', array( 'jquery' ), '20150330', true ); wp_localize_script( 'superio-job-map', 'superio_job_map_opts', array( 'map_service' => $map_service, 'mapbox_token' => $mapbox_token, 'mapbox_style' => $mapbox_style, 'here_map_api_key' => $here_map_api_key, 'here_style' => $here_style, 'custom_style' => $custom_style, 'default_latitude' => wp_job_board_pro_get_option('default_maps_location_latitude', '43.6568'), 'default_longitude' => wp_job_board_pro_get_option('default_maps_location_longitude', '-79.4512'), 'default_pin' => wp_job_board_pro_get_option('default_maps_pin', ''), )); wp_enqueue_script( 'superio-job-map' ); } add_action( 'wp_enqueue_scripts', 'superio_job_scripts', 10 ); function superio_job_create_resume_pdf_styles() { return array( get_template_directory() . '/css/all-awesome.css', get_template_directory() . '/css/flaticon.css', get_template_directory() . '/css/themify-icons.css', get_template_directory() . '/css/resume-pdf.css' ); } add_filter( 'wp-job-board-pro-style-pdf', 'superio_job_create_resume_pdf_styles', 10 ); add_filter('wp-job-board-pro-job_listing-admin-custom-fields', 'superio_job_metaboxes_fields', 10); function superio_job_metaboxes_fields($fields) { $prefix = WP_JOB_BOARD_PRO_JOB_LISTING_PREFIX; $layout_key = 'tab-heading-job_layout'.rand(100,1000); $fields[$layout_key] = array( 'id' => $layout_key, 'icon' => 'dashicons-admin-appearance', 'title' => esc_html__( 'Layout Type', 'superio' ), 'fields' => array( array( 'name' => esc_html__( 'Layout Type', 'superio' ), 'id' => $prefix . 'layout_type', 'type' => 'select', 'options' => array( '' => esc_html__('Global Settings', 'superio'), 'v1' => esc_html__('Version 1', 'superio'), 'v2' => esc_html__('Version 2', 'superio'), 'v3' => esc_html__('Version 3', 'superio'), 'v4' => esc_html__('Version 4', 'superio'), 'v5' => esc_html__('Version 5', 'superio'), 'v6' => esc_html__('Version 6', 'superio'), 'v7' => esc_html__('Version 7', 'superio'), ), ) ), ); return $fields; } function superio_job_template_folder_name($folder) { $folder = 'template-jobs'; return $folder; } add_filter( 'wp-job-board-pro-theme-folder-name', 'superio_job_template_folder_name', 10 ); // post per page add_filter('wp-job-board-pro-job_listing-filter-query', 'superio_job_filter_query', 10, 2); function superio_job_filter_query( $query, $params) { $query_vars = &$query->query_vars; $query_vars['posts_per_page'] = superio_job_get_limit_number(); $query->query_vars = $query_vars; return $query; } add_filter( 'wp-job-board-pro-job_listing-query-args', 'superio_job_filter_query_args', 10, 2 ); function superio_job_filter_query_args($query_args, $params) { $query_args['posts_per_page'] = superio_job_get_limit_number(); return $query_args; } function superio_job_get_limit_number() { if ( isset( $_REQUEST['jobs_ppp'] ) ) { $number = intval( $_REQUEST['jobs_ppp'] ); } elseif ( !empty($_COOKIE['jobs_per_page']) ) { $number = intval( $_COOKIE['jobs_per_page'] ); } else { $value = wp_job_board_pro_get_option('number_jobs_per_page', 10); $number = intval( $value ); } return $number; } add_action('init', 'superio_job_save_ppp'); function superio_job_save_ppp() { if ( !empty( $_REQUEST['jobs_ppp'] ) ) { $number = intval( $_REQUEST['jobs_ppp'] ); setcookie('jobs_per_page', $number, time() + 864000); $_COOKIE['jobs_per_page'] = $number; } } function superio_check_employer_candidate_review($post) { if ( (comments_open($post) || get_comments_number($post)) ) { if ( $post->post_type == 'employer' ) { if ( method_exists('WP_Job_Board_Pro_Employer', 'check_restrict_review') ) { if ( WP_Job_Board_Pro_Employer::check_restrict_review($post) ) { return true; } else { return false; } } } elseif ( $post->post_type == 'candidate' ) { if ( method_exists('WP_Job_Board_Pro_Candidate', 'check_restrict_review') ) { if ( WP_Job_Board_Pro_Candidate::check_restrict_review($post) ) { return true; } else { return false; } } } return true; } return false; } function superio_placeholder_img_src( $size = 'thumbnail' ) { $src = get_template_directory_uri() . '/images/placeholder.png'; $placeholder_image = superio_get_config('job_placeholder_image'); if ( !empty($placeholder_image['id']) ) { if ( is_numeric( $placeholder_image['id'] ) ) { $image = wp_get_attachment_image_src( $placeholder_image['id'], $size ); if ( ! empty( $image[0] ) ) { $src = $image[0]; } } else { $src = $placeholder_image; } } return apply_filters( 'superio_job_placeholder_img_src', $src ); } function superio_locations_walk( $terms, $id_parent, &$dropdown ) { foreach ( $terms as $key => $term ) { if ( $term->parent == $id_parent ) { $dropdown = array_merge( $dropdown, array( $term ) ); unset($terms[$key]); superio_locations_walk( $terms, $term->term_id, $dropdown ); } } } function superio_display_phone( $phone, $icon = '', $force_show_phone = false ) { if ( empty($phone) ) { return; } $show_full = superio_get_config('job_show_full_phone', false); $hide_phone = !$show_full ? true : false; if ( $force_show_phone ) { $hide_phone = false; } $hide_phone = apply_filters('superio_phone_hide_number', $hide_phone); $add_class = ''; if ( $hide_phone ) { $add_class = 'phone-hide'; } ?>
  • :

  • =') ) { wp_enqueue_script('wpjbp-select2'); wp_enqueue_style('wpjbp-select2'); } else { wp_enqueue_script('select2'); wp_enqueue_style('select2'); } } add_action( 'wjbp_ajax_superio_get_job_chart', 'superio_job_get_chart_data' ); add_action( 'wp_ajax_superio_get_job_chart', 'superio_job_get_chart_data' ); add_action( 'wp_ajax_nopriv_superio_get_job_chart', 'superio_job_get_chart_data' ); function superio_job_get_chart_data() { $return = array(); if ( !isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'superio-job-chart-nonce' ) ) { $return = array( 'status' => false, 'msg' => esc_html__('Your nonce did not verify.', 'superio') ); echo wp_json_encode($return); exit; } if ( empty($_REQUEST['job_id']) ) { $return = array( 'status' => 'error', 'html' => esc_html__('Job not found', 'superio') ); echo wp_json_encode($return); exit; } if ( superio_get_config('main_color') != "" ) { $main_color = superio_get_config('main_color'); } else { $main_color = '#1967D2'; } $job_id = $_REQUEST['job_id']; // datas $nb_days = !empty($_REQUEST['nb_days']) ? $_REQUEST['nb_days'] : 15; $number_days = apply_filters('superio-get-traffic-data-nb-days', $nb_days); if( empty($number_days) ) { $number_days = 15; } $number_days--; // labels $array_labels = array(); for ($i=$number_days; $i >= 0; $i--) { $date = strtotime(date("Y-m-d", strtotime("-".$i." day"))); $array_labels[] = date_i18n(get_option('date_format'), $date); } // values $views_by_date = get_post_meta( $job_id, '_views_by_date', true ); if ( !is_array( $views_by_date ) ) { $views_by_date = array(); } $array_values = array(); for ($i=$number_days; $i >= 0; $i--) { $date = date("Y-m-d", strtotime("-".$i." day")); if ( isset($views_by_date[$date]) ) { $array_values[] = $views_by_date[$date]; } else { $array_values[] = 0; } } $return = array( 'stats_labels' => $array_labels, 'stats_values' => $array_values, 'stats_view' => esc_html__('Views', 'superio'), 'chart_type' => apply_filters('superio-job-stats-type', 'line'), 'bg_color' => apply_filters('superio-job-stats-bg-color', $main_color), 'border_color' => apply_filters('superio-job-stats-border-color', $main_color), ); echo json_encode($return); die(); } add_filter('post_class', 'superio_set_post_class', 10, 3); function superio_set_post_class($classes, $class, $post_id){ if ( is_admin() ) { return $classes; } $post_type = get_post_type($post_id); switch ($post_type) { case 'job_listing': $obj_meta = WP_Job_Board_Pro_Job_Listing_Meta::get_instance($post_id); $featured = $obj_meta->get_post_meta( 'featured' ); $urgent = $obj_meta->get_post_meta( 'urgent' ); if ( $featured ) { $classes[] = 'is-featured'; } if ( $urgent ) { $classes[] = 'is-urgent'; } break; case 'candidate': $obj_meta = WP_Job_Board_Pro_Candidate_Meta::get_instance($post_id); $featured = $obj_meta->get_post_meta( 'featured' ); $urgent = $obj_meta->get_post_meta( 'urgent' ); if ( $featured ) { $classes[] = 'is-featured'; } if ( $urgent ) { $classes[] = 'is-urgent'; } break; case 'employer': $obj_meta = WP_Job_Board_Pro_Employer_Meta::get_instance($post_id); $featured = $obj_meta->get_post_meta( 'featured' ); if ( $featured ) { $classes[] = 'is-featured'; } break; } return $classes; } // show job details add_action( 'wjbp_ajax_superio_show_job_details', 'superio_show_job_details' ); function superio_show_job_details() { $job_id = isset($_REQUEST['job_id']) ? $_REQUEST['job_id'] : null; if ( empty($job_id) ) { $return = array( 'status' => false, 'html' => esc_html__('The job is not exists.', 'superio') ); echo wp_json_encode($return); exit; } $job = get_post($job_id); if ( empty($job) ) { $return = array( 'status' => false, 'html' => esc_html__('The job is not exists.', 'superio') ); echo wp_json_encode($return); exit; } ob_start(); setup_postdata( $GLOBALS['post'] =& $job ); echo WP_Job_Board_Pro_Template_Loader::get_template_part( 'content-single-archive-job_listing' ); wp_reset_postdata(); $html = ob_get_clean(); $return = array( 'status' => true, 'html' => $html ); echo wp_json_encode($return); exit; } // autocomplete search jobs add_action( 'wjbp_ajax_superio_autocomplete_search_jobs', 'superio_autocomplete_search_jobs' ); function superio_autocomplete_search_jobs() { // Query for suggestions $suggestions = array(); $args = array( 'post_type' => 'job_listing', 'post_per_page' => 10, 'fields' => 'ids' ); $filter_params = isset($_REQUEST['data']) ? $_REQUEST['data'] : null; $jobs = WP_Job_Board_Pro_Query::get_posts( $args, $filter_params ); if ( !empty($jobs->posts) ) { foreach ($jobs->posts as $post_id) { $post = get_post($post_id); $suggestion['title'] = get_the_title($post_id); $suggestion['url'] = get_permalink($post_id); $obj_job_meta = WP_Job_Board_Pro_Job_Listing_Meta::get_instance($post_id); $image = ''; if ( $obj_job_meta->check_post_meta_exist('logo') && ($logo_url = $obj_job_meta->get_post_meta( 'logo' )) ) { $logo_id = WP_Job_Board_Pro_Job_Listing::get_post_meta($post_id, 'logo_id', true); if ( $logo_id ) { $image = wp_get_attachment_image_url( $logo_id, 'thumbnail' ); } else { $image = $logo_url; } } else { $author_id = superio_get_post_author($post_id); $employer_id = WP_Job_Board_Pro_User::get_employer_by_user_id($author_id); if ( has_post_thumbnail($employer_id) ) { $image = wp_get_attachment_image_url( get_post_thumbnail_id($employer_id), 'thumbnail' ); } else { $image = superio_placeholder_img_src(); } } $suggestion['image'] = $image; $suggestion['salary'] = superio_job_display_salary($post, 'icon', false); $suggestions[] = $suggestion; } } echo json_encode( $suggestions ); exit; } function superio_hide_string($str = "") { $str = mb_convert_encoding($str, "UTF-8"); $replaced = ""; for($i = 0; $i < strlen($str) -1; $i++) $replaced .= "*"; return substr($str, 0, 1)."".$replaced."".substr($str, -1, 1); } // demo function function superio_check_demo_account() { if ( defined('SUPERIO_DEMO_MODE') && SUPERIO_DEMO_MODE ) { $user_id = get_current_user_id(); $user_obj = get_user_by('ID', $user_id); if ( strtolower($user_obj->data->user_login) == 'candidate' || strtolower($user_obj->data->user_login) == 'employer' ) { $return = array( 'status' => false, 'msg' => esc_html__('Demo users are not allowed to modify information.', 'superio') ); echo wp_json_encode($return); exit; } } } add_action('wp-job-board-pro-process-apply-email', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-apply-internal', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-remove-applied', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-add-job-shortlist', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-remove-job-shortlist', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-follow-employer', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-unfollow-employer', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-add-candidate-shortlist', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-remove-candidate-shortlist', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-forgot-password', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-process-change-password', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-before-delete-profile', 'superio_check_demo_account', 10); add_action('wp-job-board-pro-before-remove-job-alert', 'superio_check_demo_account', 10 ); add_action('wp-job-board-pro-before-process-remove-job', 'superio_check_demo_account', 10 ); function superio_check_demo_account2($error) { if ( defined('SUPERIO_DEMO_MODE') && SUPERIO_DEMO_MODE ) { $user_id = get_current_user_id(); $user_obj = get_user_by('ID', $user_id); if ( strtolower($user_obj->data->user_login) == 'candidate' || strtolower($user_obj->data->user_login) == 'employer' ) { $error[] = esc_html__('Demo users are not allowed to modify information.', 'superio'); } } return $error; } add_filter('wp-job-board-pro-submission-validate', 'superio_check_demo_account2', 10, 2); add_filter('wp-job-board-pro-edit-validate', 'superio_check_demo_account2', 10, 2); function superio_check_demo_account3($post_id, $prefix) { if ( defined('SUPERIO_DEMO_MODE') && SUPERIO_DEMO_MODE ) { $user_id = get_current_user_id(); $user_obj = get_user_by('ID', $user_id); if ( strtolower($user_obj->data->user_login) == 'candidate' || strtolower($user_obj->data->user_login) == 'employer' ) { $_SESSION['messages'][] = array( 'danger', esc_html__('Demo users are not allowed to modify information.', 'superio') ); $redirect_url = get_permalink( wp_job_board_pro_get_option('edit_profile_page_id') ); WP_Job_Board_Pro_Mixes::redirect( $redirect_url ); exit(); } } } add_action('wp-job-board-pro-process-profile-before-change', 'superio_check_demo_account3', 10, 2); function superio_check_demo_account5($post_id, $prefix) { if ( defined('SUPERIO_DEMO_MODE') && SUPERIO_DEMO_MODE ) { $user_id = get_current_user_id(); $user_obj = get_user_by('ID', $user_id); if ( strtolower($user_obj->data->user_login) == 'candidate' || strtolower($user_obj->data->user_login) == 'employer' ) { $_SESSION['messages'][] = array( 'danger', esc_html__('Demo users are not allowed to modify information.', 'superio') ); $redirect_url = get_permalink( wp_job_board_pro_get_option('my_resume_page_id') ); WP_Job_Board_Pro_Mixes::redirect( $redirect_url ); exit(); } } } add_action('wp-job-board-pro-process-resume-before-change', 'superio_check_demo_account5', 10, 2); function superio_check_demo_account4() { if ( defined('SUPERIO_DEMO_MODE') && SUPERIO_DEMO_MODE ) { $user_id = get_current_user_id(); $user_obj = get_user_by('ID', $user_id); if ( strtolower($user_obj->data->user_login) == 'candidate' || strtolower($user_obj->data->user_login) == 'employer' ) { $return['msg'] = esc_html__('Demo users are not allowed to modify information.', 'superio'); $return['status'] = false; echo json_encode($return); exit; } } } add_action('wp-private-message-before-reply-message', 'superio_check_demo_account4'); add_action('wp-private-message-before-add-message', 'superio_check_demo_account4'); add_action('wp-private-message-before-delete-message', 'superio_check_demo_account4');PKh[s*(FFfunctions-candidate-display.phpnu[PKh[(D))Ffunctions-redux-configs.phpnu[PKh[T!((bfunctions-employer.phpnu[PKh[w;w;7functions-employer-display.phpnu[PKh[6XXNfunctions-job-display.phpnu[PKh[I 6U/U/ functions-candidate.phpnu[PKh[ functions.phpnu[PKkW