/** * Submit Step */ public function submit() { global $post; $resume = get_post($this->resume_id); if (empty($this->resume_id) || $resume->post_status !== 'publish' && $resume->post_status !== 'hidden') { echo wpautop(__('Invalid resume', 'wp-job-manager-resumes')); return; } $this->init_fields(); foreach ($this->fields as $group_key => $group_fields) { foreach ($group_fields as $key => $field) { if (!isset($this->fields[$group_key][$key]['value'])) { if ('candidate_name' === $key) { $this->fields[$group_key][$key]['value'] = $resume->post_title; } elseif ('resume_content' === $key) { $this->fields[$group_key][$key]['value'] = $resume->post_content; } elseif (!empty($field['taxonomy'])) { $this->fields[$group_key][$key]['value'] = wp_get_object_terms($resume->ID, $field['taxonomy'], array('fields' => 'ids')); } elseif ('resume_skills' === $key) { $this->fields[$group_key][$key]['value'] = implode(', ', wp_get_object_terms($resume->ID, 'resume_skill', array('fields' => 'names'))); } else { $this->fields[$group_key][$key]['value'] = get_post_meta($resume->ID, '_' . $key, true); } } } } $this->fields = apply_filters('submit_resume_form_fields_get_resume_data', $this->fields, $resume); get_job_manager_template('resume-submit.php', array('class' => $this, 'form' => $this->form_name, 'job_id' => '', 'resume_id' => $this->get_resume_id(), 'action' => $this->get_action(), 'resume_fields' => $this->get_fields('resume_fields'), 'step' => $this->get_step(), 'submit_button_text' => __('Save changes', 'wp-job-manager-resumes')), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); }
/** * Submit Step */ public function submit() { $job = get_post($this->job_id); if (empty($this->job_id) || $job->post_status !== 'publish' && !job_manager_user_can_edit_pending_submissions()) { echo wpautop(__('Invalid listing', 'wp-job-manager')); return; } $this->init_fields(); foreach ($this->fields as $group_key => $group_fields) { foreach ($group_fields as $key => $field) { if (!isset($this->fields[$group_key][$key]['value'])) { if ('job_title' === $key) { $this->fields[$group_key][$key]['value'] = $job->post_title; } elseif ('job_description' === $key) { $this->fields[$group_key][$key]['value'] = $job->post_content; } elseif ('company_logo' === $key) { $this->fields[$group_key][$key]['value'] = has_post_thumbnail($job->ID) ? get_post_thumbnail_id($job->ID) : get_post_meta($job->ID, '_' . $key, true); } elseif (!empty($field['taxonomy'])) { $this->fields[$group_key][$key]['value'] = wp_get_object_terms($job->ID, $field['taxonomy'], array('fields' => 'ids')); } else { $this->fields[$group_key][$key]['value'] = get_post_meta($job->ID, '_' . $key, true); } } } } $this->fields = apply_filters('submit_job_form_fields_get_job_data', $this->fields, $job); wp_enqueue_script('wp-job-manager-job-submission'); get_job_manager_template('job-submit.php', array('form' => $this->form_name, 'job_id' => $this->get_job_id(), 'action' => $this->get_action(), 'job_fields' => $this->get_fields('job'), 'company_fields' => $this->get_fields('company'), 'step' => $this->get_step(), 'submit_button_text' => __('Save changes', 'wp-job-manager'))); }
public function job_manager_input_business_hours($key, $field) { global $wp_locale, $thepostid; ?> <div class="form-field" style="position: relative;"> <label for="<?php echo esc_attr($key); ?> "><?php echo esc_html($field['label']); ?> :</label> <?php global $field; if (empty($field['value'])) { $field['value'] = get_post_meta($thepostid, '_job_hours', true); } get_job_manager_template('form-fields/business-hours-field.php'); ?> <script> (function($) { $( '.timepicker' ).timepicker(); })(jQuery); </script> </div> <?php }
/** * Show message if already applied */ public function already_applied_message() { global $post; if (user_has_applied_for_job(get_current_user_id(), $post->ID)) { get_job_manager_template('applied-notice.php', array(), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } }
/** * Allow users to apply to a job with a resume */ public function apply_with_resume() { if (is_user_logged_in()) { $args = apply_filters('resume_manager_get_application_form_resumes_args', array('post_type' => 'resume', 'post_status' => array('publish', 'pending', 'hidden'), 'ignore_sticky_posts' => 1, 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'desc', 'author' => get_current_user_id())); $resumes = get_posts($args); } else { $resumes = array(); } get_job_manager_template('apply-with-resume.php', array('resumes' => $resumes), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); }
public function job_manager_input_business_hours($key, $field) { global $wp_locale, $post, $thepostid; $thepostid = $post->ID; ?> <div class="form-field" style="position: relative;"> <?php if (!is_admin()) { ?> <label for="<?php echo esc_attr($key); ?> "><?php echo esc_html($field['label']); ?> :</label> <?php } ?> <?php global $field; if (empty($field['value'])) { $field['value'] = get_post_meta($thepostid, '_job_hours', true); } get_job_manager_template('form-fields/business-hours-field.php'); ?> <script> (function($) { $( '.timepicker' ).timepicker({ timeFormat: '<?php echo str_replace('\\', '\\\\', get_option('time_format')); ?> ', noneOption: { label: '<?php _e('Closed', 'listify'); ?> ', value: '<?php _e('Closed', 'listify'); ?> ' } }); })(jQuery); </script> </div> <?php }
/** * Past Applications */ public function past_applications() { // If user is not logged in, abort if (!is_user_logged_in()) { do_action('job_manager_job_applications_past_logged_out'); return; } $args = apply_filters('job_manager_job_applications_past_args', array('post_type' => 'job_application', 'post_status' => array_keys(get_job_application_statuses()), 'posts_per_page' => -1, 'ignore_sticky_posts' => 1, 'meta_key' => '_candidate_user_id', 'meta_value' => get_current_user_id())); $applications = new WP_Query($args); if ($applications->have_posts()) { get_job_manager_template('past-applications.php', array('applications' => $applications->query($args)), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } else { get_job_manager_template('past-applications-none.php', array(), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } }
/** * Past Applications */ public function past_applications($atts) { // If user is not logged in, abort if (!is_user_logged_in()) { do_action('job_manager_job_applications_past_logged_out'); return; } extract(shortcode_atts(array('posts_per_page' => '25'), $atts)); $args = apply_filters('job_manager_job_applications_past_args', array('post_type' => 'job_application', 'post_status' => array_keys(get_job_application_statuses()), 'posts_per_page' => $posts_per_page, 'offset' => (max(1, get_query_var('paged')) - 1) * $posts_per_page, 'ignore_sticky_posts' => 1, 'meta_key' => '_candidate_user_id', 'meta_value' => get_current_user_id())); $applications = new WP_Query($args); ob_start(); if ($applications->have_posts()) { get_job_manager_template('past-applications.php', array('applications' => $applications->posts, 'max_num_pages' => $applications->max_num_pages), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } else { get_job_manager_template('past-applications-none.php', array(), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } return ob_get_clean(); }
/** * Submit Step */ public static function submit() { global $job_manager, $post; $job = get_post(self::$job_id); if (empty(self::$job_id) || $job->post_status !== 'publish') { echo wpautop(__('Invalid job', 'wp-job-manager')); return; } self::init_fields(); foreach (self::$fields as $group_key => $fields) { foreach ($fields as $key => $field) { switch ($key) { case 'job_title': if (!isset(self::$fields[$group_key][$key]['value'])) { self::$fields[$group_key][$key]['value'] = $job->post_title; } break; case 'job_description': if (!isset(self::$fields[$group_key][$key]['value'])) { self::$fields[$group_key][$key]['value'] = $job->post_content; } break; case 'job_type': if (!isset(self::$fields[$group_key][$key]['value'])) { self::$fields[$group_key][$key]['value'] = current(wp_get_object_terms($job->ID, 'job_listing_type', array('fields' => 'slugs'))); } break; case 'job_category': if (!isset(self::$fields[$group_key][$key]['value'])) { self::$fields[$group_key][$key]['value'] = current(wp_get_object_terms($job->ID, 'job_listing_category', array('fields' => 'slugs'))); } break; default: if (!isset(self::$fields[$group_key][$key]['value'])) { self::$fields[$group_key][$key]['value'] = get_post_meta($job->ID, '_' . $key, true); } break; } } } self::$fields = apply_filters('submit_job_form_fields_get_job_data', self::$fields, $job); wp_enqueue_script('wp-job-manager-job-submission'); get_job_manager_template('job-submit.php', array('form' => self::$form_name, 'job_id' => self::get_job_id(), 'action' => self::get_action(), 'job_fields' => self::get_fields('job'), 'company_fields' => self::get_fields('company'), 'submit_button_text' => __('Update job listing', 'wp-job-manager'))); }
/** * New resume notification */ public function new_resume_submitted($resume_id) { include_once 'admin/class-wp-resume-manager-writepanels.php'; $custom_fields = array_diff_key(WP_Resume_Manager_Writepanels::resume_fields(), array('_resume_file' => '', '_resume_expires' => '')); $resume = get_post($resume_id); $recipient = get_option('admin_email'); $subject = sprintf(__('New Resume Submission From %s', 'wp-job-manager-resumes'), $resume->post_title); $attachments = array(); $file_paths = get_resume_files($resume); foreach ($file_paths as $file_path) { $attachments[] = str_replace(array(site_url('/', 'http'), site_url('/', 'https')), ABSPATH, get_post_meta($resume_id, '_resume_file', true)); } ob_start(); get_job_manager_template('resume-submitted-notification.php', array('resume' => $resume, 'resume_id' => $resume_id, 'custom_fields' => $custom_fields), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); $message = ob_get_clean(); add_filter('wp_mail_from', array(__CLASS__, 'get_from_address')); add_filter('wp_mail_from_name', array(__CLASS__, 'get_from_name')); wp_mail(apply_filters('resume_manager_new_resume_notification_recipient', $recipient, $resume_id), apply_filters('resume_manager_new_resume_notification_subject', $subject, $resume_id), $message, apply_filters('resume_manager_new_resume_notification_headers', '', $resume_id), apply_filters('resume_manager_new_resume_notification_attachments', array_filter($attachments), $resume_id)); remove_filter('wp_mail_from', array(__CLASS__, 'get_from_address')); remove_filter('wp_mail_from_name', array(__CLASS__, 'get_from_name')); }
/** * Done Step */ public function done() { do_action('job_manager_job_submitted', $this->job_id); get_job_manager_template('job-submitted.php', array('job' => get_post($this->job_id))); }
/** * Output job_application_footer * @param object $application_id */ function job_application_footer($application) { get_job_manager_template('job-application-footer.php', array('application' => $application, 'job_id' => $application->post_parent), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); }
/** * The application content when the application method is a url */ public function application_details_url($apply) { get_job_manager_template('job-application-url.php', array('apply' => $apply)); }
/** * widget function. * * @see WP_Widget * @access public * @param array $args * @param array $instance * @return void */ function widget($args, $instance) { if ($this->get_cached_widget($args)) { return; } $descriptor = isset($instance['descriptor']) ? esc_attr($instance['descriptor']) : false; $biography = isset($instance['biography']) && 1 == $instance['biography'] ? true : false; global $post; extract($args); ob_start(); echo $before_widget; ?> <div class="job_listing-author"> <div class="job_listing-author-avatar"> <?php echo get_avatar(get_the_author_meta('ID'), 210); ?> </div> <div class="job_listing-author-info"> <?php the_author(); ?> <small class="job_listing-author-descriptor"><?php echo $descriptor; ?> </small> <?php if ('preview' != $post->post_status) { ?> <div class="job_listing-author-info-more"> <a href="#job_listing-author-apply" data-mfp-src=".job_application" class="popup-trigger"><span class="ion-email"></span></a> <?php if (!is_position_filled() && $post->post_status == 'publish') { get_job_manager_template('job-application.php'); } ?> <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?> "><span class="ion-information-circled"></span></a> </div> <?php } ?> </div> <?php if ($biography && ($bio = get_the_author_meta('description', get_the_author_meta('ID')))) { ?> <div class="job_listing-author-biography"> <?php echo $bio; ?> </div> <?php } ?> <?php do_action('listify_widget_job_listing_author_after'); ?> </div> <?php echo $after_widget; $content = ob_get_clean(); echo apply_filters($this->widget_id, $content); $this->cache_widget($args, $content); }
esc_attr_e($key); ?> "> <label for="<?php esc_attr_e($key); ?> "><?php echo $field['label'] . apply_filters('submit_job_form_required_label', $field['required'] ? '' : ' <small>' . __('(optional)', 'wp-job-manager') . '</small>', $field); ?> </label> <div class="field <?php echo $field['required'] ? 'required-field' : ''; ?> "> <?php get_job_manager_template('form-fields/' . $field['type'] . '-field.php', array('key' => $key, 'field' => $field)); ?> </div> </fieldset> <?php } ?> <?php do_action('submit_job_form_company_fields_end'); ?> <?php } ?> <p>
/** * Success message */ public function application_form_success() { get_job_manager_template('application-submitted.php', array(), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); }
<?php if (resume_has_links() || resume_has_file()) { ?> <ul class="resume-links"> <?php foreach (get_resume_links() as $link) { ?> <?php get_job_manager_template('content-resume-link.php', array('post' => $post, 'link' => $link), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); ?> <?php } ?> <?php if (resume_has_file()) { ?> <?php get_job_manager_template('content-resume-file.php', array('post' => $post), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); ?> <?php } ?> </ul> <?php }
/** * Done Step */ public function done() { get_job_manager_template('resume-submitted.php', array('resume' => get_post($this->resume_id), 'job_id' => $this->job_id), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); // Allow application if ($this->job_id) { echo '<h3 class="applying_for">' . sprintf(__('Submit your application to the job "%s".', 'wp-job-manager-resumes'), '<a href="' . get_permalink($this->job_id) . '">' . get_the_title($this->job_id) . '</a>') . '</h3>'; echo do_shortcode('[job_apply id="' . absint($this->job_id) . '"]'); } }
/** * widget function. * * @see WP_Widget * @access public * @param array $args * @param array $instance * @return void */ function widget($args, $instance) { if ($this->get_cached_widget($args)) { return; } ob_start(); extract($args); global $post; if ('preview' == $post->post_status) { return; } $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '', $instance, $this->id_base); echo $before_widget; ?> <?php if ($title) { echo $before_title . $title . $after_title; } ?> <?php if ('job_listing' == get_post_type()) { ?> <?php if (!is_position_filled()) { ?> <?php get_job_manager_template('job-application.php'); ?> <?php } ?> <?php if ('' != get_the_company_video()) { ?> <a href="#company-video" class="button view-video popup-trigger"><?php _e('Watch Video', 'jobify'); ?> </a> <div id="company-video" class="modal"> <?php the_company_video(); ?> </div> <?php } ?> <?php } else { ?> <?php get_job_manager_template('contact-details.php', array('post' => $post), 'resume_manager', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); ?> <?php if ('' != get_the_candidate_video()) { ?> <a href="#candidate-video" class="button view-video popup-trigger"><?php _e('Video Resume', 'jobify'); ?> </a> <div id="candidate-video" class="modal"> <?php the_candidate_video(); ?> </div> <?php } ?> <?php } ?> <?php do_action('jobify_widget_job_apply_after'); ?> <?php echo $after_widget; $content = ob_get_clean(); echo apply_filters('jobify_widget_job_apply', $content, $instance, $args); $this->cache_widget($args, $content); }
/** * Allow users to apply to a job with a resume */ public function application_form() { if (get_option('job_application_form_require_login', 0) && !is_user_logged_in()) { get_job_manager_template('application-form-login.php', array(), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } else { $this->init_fields(); wp_enqueue_script('wp-job-manager-applications'); // Application form get_job_manager_template('application-form.php', array('application_fields' => $this->fields), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); } }
/** * Format the email */ public function format_email($alert, $user, $jobs) { $template = get_option('job_manager_alerts_email_template'); if (!$template) { $template = $GLOBALS['job_manager_alerts']->get_default_email(); } if ($jobs && $jobs->have_posts()) { ob_start(); while ($jobs->have_posts()) { $jobs->the_post(); get_job_manager_template('content-email_job_listing.php', array(), 'wp-job-manager-alerts', JOB_MANAGER_ALERTS_PLUGIN_DIR . '/templates/'); } wp_reset_postdata(); $job_content = ob_get_clean(); } else { $job_content = __('No jobs were found matching your search. Login to your account to change your alert criteria', 'wp-job-manager-alerts'); } // Reschedule next alert switch ($alert->alert_frequency) { case 'daily': $next = strtotime('+1 day'); break; case 'fortnightly': $next = strtotime('+2 week'); break; default: $next = strtotime('+1 week'); break; } if (get_option('job_manager_alerts_auto_disable') > 0) { $alert_expirey = sprintf(__('This job alert will automatically stop sending after %s.', 'wp-job-manager-alerts'), date_i18n(get_option('date_format'), strtotime('+' . absint(get_option('job_manager_alerts_auto_disable')) . ' days', strtotime($alert->post_modified)))); } else { $alert_expirey = ''; } $replacements = array('{display_name}' => $user->display_name, '{alert_name}' => $alert->post_title, '{alert_expirey}' => $alert_expirey, '{alert_next_date}' => date_i18n(get_option('date_format'), $next), '{alert_page_url}' => get_permalink(get_option('job_manager_alerts_page_id')), '{jobs}' => $job_content); $template = str_replace(array_keys($replacements), array_values($replacements), $template); return apply_filters('job_manager_alerts_template', $template, $alert, $user, $jobs); }
/** * Show applications on the job dashboard */ public function show_applications($atts) { $job_id = absint($_REQUEST['job_id']); $job = get_post($job_id); extract(shortcode_atts(array('posts_per_page' => '20'), $atts)); remove_filter('the_title', array($this, 'add_breadcrumb_to_the_title')); // Permissions if (!job_manager_user_can_edit_job($job_id)) { _e('You do not have permission to view this job.', 'wp-job-manager-applications'); return; } wp_enqueue_script('wp-job-manager-applications-dashboard'); $args = apply_filters('job_manager_job_applications_args', array('post_type' => 'job_application', 'post_status' => array_diff(array_merge(array_keys(get_job_application_statuses()), array('publish')), array('archived')), 'ignore_sticky_posts' => 1, 'posts_per_page' => $posts_per_page, 'offset' => (max(1, get_query_var('paged')) - 1) * $posts_per_page, 'post_parent' => $job_id)); // Filters $application_status = !empty($_GET['application_status']) ? sanitize_text_field($_GET['application_status']) : ''; $application_orderby = !empty($_GET['application_orderby']) ? sanitize_text_field($_GET['application_orderby']) : ''; if ($application_status) { $args['post_status'] = $application_status; } switch ($application_orderby) { case 'name': $args['order'] = 'ASC'; $args['orderby'] = 'post_title'; break; case 'rating': $args['order'] = 'DESC'; $args['orderby'] = 'meta_value'; $args['meta_key'] = '_rating'; break; default: $args['order'] = 'DESC'; $args['orderby'] = 'date'; break; } $applications = new WP_Query(); $columns = apply_filters('job_manager_job_applications_columns', array('name' => __('Name', 'wp-job-manager-applications'), 'email' => __('Email', 'wp-job-manager-applications'), 'date' => __('Date Received', 'wp-job-manager-applications'))); get_job_manager_template('job-applications.php', array('applications' => $applications->query($args), 'job_id' => $job_id, 'max_num_pages' => $applications->max_num_pages, 'columns' => $columns, 'application_status' => $application_status, 'application_orderby' => $application_orderby), 'wp-job-manager-applications', JOB_MANAGER_APPLICATIONS_PLUGIN_DIR . '/templates/'); }
} ?> </tbody> <?php if ($submit_resume_form_page_id && (resume_manager_count_user_resumes() < $submission_limit || !$submission_limit)) { ?> <tfoot> <tr> <td colspan="<?php echo sizeof($candidate_dashboard_columns); ?> "> <a href="<?php echo esc_url(get_permalink($submit_resume_form_page_id)); ?> "><?php _e('Add Resume', 'wp-job-manager-resumes'); ?> </a> </td> </tr> </tfoot> <?php } ?> </table> <?php get_job_manager_template('pagination.php', array('max_num_pages' => $max_num_pages)); ?> </div>
/** * Displays job company data on the single job page */ function job_listing_company_display() { get_job_manager_template('content-single-job_listing-company.php', array()); }
</div> <?php } ?> <div class="job_description" itemprop="description"> <?php echo apply_filters('the_job_description', get_the_content()); ?> </div> <?php if (candidates_can_apply()) { ?> <?php get_job_manager_template('job-application.php'); ?> <?php } ?> <?php /** * single_job_listing_end hook */ do_action('single_job_listing_end'); ?> <?php } ?> </div>
?> <?php get_job_manager_template('account-signin.php', '', 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); ?> <?php } ?> <?php if (get_option('resume_manager_linkedin_import')) { ?> <?php get_job_manager_template('linkedin-import.php', '', 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); ?> <?php } ?> <?php if (resume_manager_user_can_post_resume()) { ?> <!-- Resume Fields --> <?php do_action('submit_resume_form_resume_fields_start'); ?>
/** * Register and enqueue scripts and css */ public function frontend_scripts() { $ajax_url = WP_Job_Manager_Ajax::get_endpoint(); $ajax_filter_deps = array('jquery', 'jquery-deserialize'); if (apply_filters('job_manager_chosen_enabled', true)) { wp_register_script('chosen', JOB_MANAGER_PLUGIN_URL . '/assets/js/jquery-chosen/chosen.jquery.min.js', array('jquery'), '1.1.0', true); wp_register_script('wp-job-manager-term-multiselect', JOB_MANAGER_PLUGIN_URL . '/assets/js/term-multiselect.min.js', array('jquery', 'chosen'), JOB_MANAGER_VERSION, true); wp_register_script('wp-job-manager-multiselect', JOB_MANAGER_PLUGIN_URL . '/assets/js/multiselect.min.js', array('jquery', 'chosen'), JOB_MANAGER_VERSION, true); wp_enqueue_style('chosen', JOB_MANAGER_PLUGIN_URL . '/assets/css/chosen.css'); $ajax_filter_deps[] = 'chosen'; } if (apply_filters('job_manager_ajax_file_upload_enabled', true)) { wp_register_script('jquery-iframe-transport', JOB_MANAGER_PLUGIN_URL . '/assets/js/jquery-fileupload/jquery.iframe-transport.js', array('jquery'), '1.8.3', true); wp_register_script('jquery-fileupload', JOB_MANAGER_PLUGIN_URL . '/assets/js/jquery-fileupload/jquery.fileupload.js', array('jquery', 'jquery-iframe-transport', 'jquery-ui-widget'), '5.42.3', true); wp_register_script('wp-job-manager-ajax-file-upload', JOB_MANAGER_PLUGIN_URL . '/assets/js/ajax-file-upload.min.js', array('jquery', 'jquery-fileupload'), JOB_MANAGER_VERSION, true); ob_start(); get_job_manager_template('form-fields/uploaded-file-html.php', array('name' => '', 'value' => '', 'extension' => 'jpg')); $js_field_html_img = ob_get_clean(); ob_start(); get_job_manager_template('form-fields/uploaded-file-html.php', array('name' => '', 'value' => '', 'extension' => 'zip')); $js_field_html = ob_get_clean(); wp_localize_script('wp-job-manager-ajax-file-upload', 'job_manager_ajax_file_upload', array('ajax_url' => $ajax_url, 'js_field_html_img' => esc_js(str_replace("\n", "", $js_field_html_img)), 'js_field_html' => esc_js(str_replace("\n", "", $js_field_html)), 'i18n_invalid_file_type' => __('Invalid file type. Accepted types:', 'wp-job-manager'))); } wp_register_script('jquery-deserialize', JOB_MANAGER_PLUGIN_URL . '/assets/js/jquery-deserialize/jquery.deserialize.js', array('jquery'), '1.2.1', true); wp_register_script('wp-job-manager-ajax-filters', JOB_MANAGER_PLUGIN_URL . '/assets/js/ajax-filters.min.js', $ajax_filter_deps, JOB_MANAGER_VERSION, true); wp_register_script('wp-job-manager-job-dashboard', JOB_MANAGER_PLUGIN_URL . '/assets/js/job-dashboard.min.js', array('jquery'), JOB_MANAGER_VERSION, true); wp_register_script('wp-job-manager-job-application', JOB_MANAGER_PLUGIN_URL . '/assets/js/job-application.min.js', array('jquery'), JOB_MANAGER_VERSION, true); wp_register_script('wp-job-manager-job-submission', JOB_MANAGER_PLUGIN_URL . '/assets/js/job-submission.min.js', array('jquery'), JOB_MANAGER_VERSION, true); wp_localize_script('wp-job-manager-ajax-filters', 'job_manager_ajax_filters', array('ajax_url' => $ajax_url, 'is_rtl' => is_rtl() ? 1 : 0, 'lang' => defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : '', 'i18n_load_prev_listings' => __('Load previous listings', 'wp-job-manager'))); wp_localize_script('wp-job-manager-job-dashboard', 'job_manager_job_dashboard', array('i18n_confirm_delete' => __('Are you sure you want to delete this listing?', 'wp-job-manager'))); wp_enqueue_style('wp-job-manager-frontend', JOB_MANAGER_PLUGIN_URL . '/assets/css/frontend.css'); }
if (is_array($field['value'])) { ?> <?php foreach ($field['value'] as $value) { ?> <?php get_job_manager_template('form-fields/uploaded-file-html.php', array('key' => $key, 'name' => 'current_' . $field_name, 'value' => $value, 'field' => $field)); ?> <?php } ?> <?php } elseif ($value = $field['value']) { ?> <?php get_job_manager_template('form-fields/uploaded-file-html.php', array('key' => $key, 'name' => 'current_' . $field_name, 'value' => $value, 'field' => $field)); ?> <?php } ?> <?php } ?> </div> <input type="file" class="<?php echo esc_attr(implode(' ', $classes)); ?> " data-file_types="<?php echo esc_attr(implode('|', $allowed_mime_types)); ?>
/** * Output the resume links * * @param WP_Post|int $post (default: null) */ function the_resume_links($post = null) { $post = get_post($post); get_job_manager_template('resume-links.php', array('post' => $post), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); }
/** * The application content when the application method is an email */ public function contact_details_email() { global $post; $email = get_post_meta($post->ID, '_candidate_email', true); $subject = sprintf(__('Contact via the resume for "%s" on %s', 'wp-job-manager-resumes'), single_post_title('', false), home_url()); get_job_manager_template('contact-details-email.php', array('email' => $email, 'subject' => $subject), 'wp-job-manager-resumes', RESUME_MANAGER_PLUGIN_DIR . '/templates/'); }