/** * filter payment setup response if free return direct link to process payment */ function ce_payment_setup($response, $paymentType, $order) { $order_pay = $order->generate_data_to_pay(); if ($order_pay['total'] <= 0) { //$session = et_read_session(); $ad_id = $order_pay['product_id']; $response = array('success' => true, 'data' => array('ACK' => true, 'url' => et_get_page_link('process-payment', array('paymentType' => 'coupon', 'ad_id' => $ad_id)))); update_post_meta($order_pay['ID'], 'et_order_gateway', 'cash'); et_update_post_field($ad_id, 'ad_paid', 1); $o = (array) et_get_post_field($ad_id, 'ad_order'); if (empty($o)) { $o = array(); } $o[] = $order_pay['ID']; et_update_post_field($ad_id, 'ad_order', $o); } if ((isset($response['success']) && $response['success'] || isset($response['ACK']) && $response['ACK'] == 'Success') && isset($_REQUEST['coupon_code'])) { // update coupon used. global $user_ID; $coupon_code = trim($_REQUEST['coupon_code']); $coupon_data = $this->generate_coupon_response($coupon_code); $pre = intval(get_user_meta($user_ID, 'ce_coupon_used_' . $coupon_code, true)); $pre++; update_user_meta($user_ID, 'ce_coupon_used_' . $coupon_code, $pre); $used_time = intval($coupon_data['have_been_used']); $used_time++; update_post_meta($coupon_data['ID'], 'ce_coupon_have_been_used', $used_time); } return $response; }
/** * filter payment setup response if free return direct link to process payment */ function je_payment_setup($response, $paymentType, $order) { $order_pay = $order->generate_data_to_pay(); if ($order_pay['total'] <= 0) { //$session = et_read_session(); $job_id = $order_pay['product_id']; $response = array('success' => true, 'data' => array('ACK' => true, 'url' => et_get_page_link('process-payment', array('paymentType' => 'coupon', 'job_id' => $job_id)))); update_post_meta($order_pay['ID'], 'et_order_gateway', 'cash'); et_update_post_field($job_id, 'job_paid', 1); $o = et_get_post_field($job_id, 'job_order'); if (empty($o)) { $o = array(); } $o[] = $order_pay['ID']; et_update_post_field($job_id, 'job_order', $o); } return $response; }
/** * update subscriber group when have a new job published */ function je_save_job($new_status, $old_status, $post) { // return if post type is not job $job = $post; $job_id = $post->ID; if ($job->post_type != 'job') { return; } //$job = get_post($job_id); if ($new_status == $old_status) { return; } if ($new_status != 'publish') { return; } $location = et_get_post_field($job_id, 'location'); $location_array = explode(',', $location); array_push($location_array, 'Anywhere'); $term = wp_get_post_terms($job_id, 'job_category'); if ($term) { $slug = $term[0]->slug; } else { $slug = ""; } foreach ($location_array as $key => $value) { $subcriber = new WP_Query(array('post_type' => 'subscriber', 's' => $value, 'posts_per_page' => -1, 'meta_query' => array(array('key' => 'job_category', 'value' => $slug, 'compare' => 'LIKE')))); while ($subcriber->have_posts()) { $subcriber->the_post(); update_post_meta(get_the_ID(), 'je_have_new_job', 1); } } wp_reset_query(); }
/** * */ public function jobs_ajax_response($response) { $opt = new ET_GeneralOptions(); $is_indeed_job = et_get_post_field($response['id'], 'indeed_url'); $indeed_logo = $opt->get_default_logo(); $url = et_get_post_field($response['id'], 'indeed_url'); $plus = array('is_indeed_job' => et_get_post_field($response['id'], 'indeed_url') != '' ? true : false, 'indeed_url' => et_get_post_field($response['id'], 'indeed_url'), 'indeed_logo' => is_array($indeed_logo) ? array_shift($indeed_logo) : '', 'indeed_company' => et_get_post_field($response['id'], 'indeed_company'), 'indeed_ref_url' => str_replace('viewjob', 'rc/clk', $url)); return $response + $plus; }
<div></div> </div> </div> <?php } ?> <div class="content-info content-text"> <?php the_content(); do_action('je_single_job_fields', $job); ?> </div> <div class="content-info content-info-last content-text"> <?php $apply_method = et_get_post_field($job->ID, 'apply_method'); if ($apply_method != 'ishowtoapply') { ?> <a target="_blank" rel="nofollow" href="<?php echo get_post_meta($job->ID, 'et_rss_url', true); ?> " class="ui-btn-s btn-blue btn-wide modal-open"> <?php _e('Apply For This Job Rss', ET_DOMAIN); ?> </a> <?php } else { ?> <a href="#modal_apply" class="ui-btn-s btn-blue btn-wide modal-open"><?php
<?php global $post, $job; $is_indeed_job = et_get_post_field($job['id'], 'indeed_url') != '' ? true : false; $job_cat = isset($job['categories'][0]) ? $job['categories'][0] : ''; $job_type = isset($job['job_types'][0]) ? $job['job_types'][0] : ''; $company = et_create_companies_response($job['author_id']); $company_logo = $company['user_logo']; // add this company data to the array to pass to js if (!isset($arrAuthors[$company['id']])) { $arrAuthors[$company['id']] = array('display_name' => $company['display_name'], 'user_url' => $company['user_url'], 'user_logo' => $company_logo); } ?> <li class="job-item"> <div class="thumb"> <a href="<?php echo $job['indeed_ref_url']; ?> "> <img src="<?php echo $job['indeed_logo']; ?> "> </a> </div> <div class="content"> <a class="title-link" target="_blank" href="<?php echo $job['indeed_ref_url']; ?> " title="<?php
function ajax_jobs_response($job) { $opt = new ET_GeneralOptions(); $company = et_create_companies_response($job['author_id']); $company_logo = $company['user_logo']; $logo = ''; $default = $opt->get_default_logo(); $default = $default[0]; if ($company_logo['thumbnail'][0] && $company_logo['thumbnail'][0] != '') { $logo = $company_logo['thumbnail'][0]; } $job += array('rss_url' => et_get_post_field($job['ID'], 'rss_url'), 'rss_logo' => $logo == '' ? $default : $logo); return $job; }
/** * */ public function jobs_ajax_response($response) { $opt = new ET_GeneralOptions(); $simplyhired_logo = $opt->get_default_logo(); $is_simplyhired_job = et_get_post_field($response['id'], 'simplyhired_url'); $company = et_create_companies_response($response['author_id']); $company_logo = $company['user_logo']; $logo = ''; if ($company_logo['thumbnail'][0] && $company_logo['thumbnail'][0] != '') { $logo = $company_logo['thumbnail'][0]; } $url = et_get_post_field($response['id'], 'simplyhired_url'); $plus = array('is_simplyhired_job' => et_get_post_field($response['id'], 'simplyhired_url') != '' ? true : false, 'simplyhired_url' => et_get_post_field($response['id'], 'simplyhired_url'), 'simplyhired_logo' => $logo == '' ? array_shift($simplyhired_logo) : $logo, 'simplyhired_company' => et_get_post_field($response['id'], 'simplyhired_creator')); return $response + $plus; }
<?php global $post, $job; $is_linkedin_job = et_get_post_field($job['id'], 'linkedin_url') != '' ? true : false; $job_cat = isset($job['categories'][0]) ? $job['categories'][0] : ''; $job_type = isset($job['job_types'][0]) ? $job['job_types'][0] : ''; $company = et_create_companies_response($job['author_id']); $company_logo = $company['user_logo']; // add this company data to the array to pass to js if (!isset($arrAuthors[$company['id']])) { $arrAuthors[$company['id']] = array('display_name' => $company['display_name'], 'user_url' => $company['user_url'], 'user_logo' => $company_logo); } ?> <li class="job-item"> <div class="thumb"> <a href="<?php echo $company['post_url']; ?> "> <img src="<?php echo $job['linkedin_logo']; ?> "> </a> </div> <div class="content"> <a class="title-link" href="<?php the_permalink(); ?> " title="<?php
function custom_hide_sidebar_infor() { global $job; if (is_single() && get_post_type() == 'job') { $template = et_get_post_field($job->ID, 'template_id'); if ($template == 'linkedin') { ?> <style type="text/css"> #sidebar-job-detail .company-profile{ display: none; } </style> <?php } } }
<?php global $et_global, $post, $user_ID; $imgUrl = $et_global['imgUrl']; $jsUrl = $et_global['jsUrl']; $job = $post; if (have_posts()) { the_post(); // get all job categories $job_cats = et_get_the_job_category($job->ID); // get all job types $job_types = et_get_the_job_type($job->ID); $company = et_create_companies_response($post->post_author); $company_logo = $company['user_logo']; $job_location = et_get_post_field($post->ID, 'location'); //echo get_post_meta( $job->ID, 'et_rss_job_category', true ); get_header(); ?> <style type="text/css"> /*** update single rss ***/ .btn-apply-rss { display: block; max-width: 250px; float: left; } </style> <div class="wrapper content-container"> <div class="heading"> <div class="main-center">