/** * generate mail message to send * return string */ function get_alert_message($cats, $number_job) { $option = new ET_GeneralOptions(); // $site_logo = $option->get_website_logo (); $customize = $option->get_customization(); $job_content = ''; $cats = explode(',', $cats); $jobs = new WP_Query(array('post_type' => 'job', 'post_status' => 'publish', 'posts_per_page' => $number_job, 'tax_query' => array(array('taxonomy' => 'job_category', 'field' => 'slug', 'terms' => $cats)))); $found_post = $jobs->found_posts; $i = 0; while ($jobs->have_posts()) { $jobs->the_post(); global $post; $company = et_create_companies_response($post->post_author); $company_logo = $company['user_logo']; if ($i != 0) { $job_content .= '<tr><td style="padding: 8px 10px 8px 0;">'; } $job_content .= ' <a style="display: block; padding: 5px; height: 70px; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -moz-box-shadow: 0 3px 3px #E9E9E9; -webkit-box-shadow: 0 3px 3px #E9E9E9; box-shadow: 0 3px 3px #E9E9E9; border-bottom:2px solid #E9E9E9;"> <img width="70" height="70" title="" alt="" src="' . $company_logo['company-logo'][0] . '" /></a> </td> <td valign="top" style="padding: 10px 0;"> <a href="' . get_permalink() . '" style="font-size :15px; ;font-family :' . $customize['font-heading'] . ';text-decoration: none; display: block; color: #5c5c5c; font-weight: 300; margin-bottom: 10px; text-transform: uppercase;">' . get_the_title() . '</a> <div style="color: #909090;font-family :' . $customize['font-text'] . '; font-size :12px;"> ' . get_the_excerpt() . ' </div>'; $i++; if ($i < $found_post) { $job_content .= '</td></tr>'; } } wp_reset_query(); $alert_message = get_option('et_mail_alert_message', $this->get_alert_message_template()); $list_jobs = str_ireplace('[list_jobs]', $job_content, $alert_message); $list_jobs = str_ireplace('[blogname]', get_bloginfo('name'), $list_jobs); $list_jobs = str_ireplace('[admin_email]', get_option('admin_email'), $list_jobs); $list_jobs = str_ireplace('[site_url]', get_bloginfo('url'), $list_jobs); $list_jobs = str_ireplace('[blogdescription]', get_option('blogdescription'), $list_jobs); $option = new ET_GeneralOptions(); $site_logo = $option->get_website_logo(); $list_jobs = str_ireplace('[site_logo]', $site_logo[0], $list_jobs); $list_jobs = str_ireplace('[copyright]', $option->get_copyright(), $list_jobs); $header = '<html class="no-js" lang="en"> <body style="margin: 0px; font-family:arial,sans-serif; font-size: 13px; line-height: 1.3;">'; $footer = '</body> </html>'; if ($job_content != '') { return $header . $list_jobs . $footer; } else { return ''; } }
<?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
/** * */ 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; }
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; }
<?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">