当前位置: 首页>>代码示例>>PHP>>正文


PHP get_job_manager_template函数代码示例

本文整理汇总了PHP中get_job_manager_template函数的典型用法代码示例。如果您正苦于以下问题:PHP get_job_manager_template函数的具体用法?PHP get_job_manager_template怎么用?PHP get_job_manager_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_job_manager_template函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: submit

 /**
  * 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/');
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:32,代码来源:class-wp-resume-manager-form-edit-resume.php

示例2: submit

 /**
  * 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')));
 }
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:32,代码来源:class-wp-job-manager-form-edit-job.php

示例3: job_manager_input_business_hours

    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 
    }
开发者ID:GaryJones,项目名称:dockerfiles,代码行数:33,代码来源:class-wp-job-manager-business-hours.php

示例4: already_applied_message

 /**
  * 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/');
     }
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:10,代码来源:class-wp-job-manager-applications-post-types.php

示例5: apply_with_resume

 /**
  * 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/');
 }
开发者ID:sabdev1,项目名称:sabstaff,代码行数:13,代码来源:class-wp-resume-manager-apply.php

示例6: job_manager_input_business_hours

    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 
    }
开发者ID:durichitayat,项目名称:befolio-wp,代码行数:55,代码来源:class-wp-job-manager-business-hours.php

示例7: past_applications

 /**
  * 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/');
     }
 }
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:18,代码来源:class-wp-job-manager-applications-past.php

示例8: past_applications

 /**
  * 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();
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:21,代码来源:class-wp-job-manager-applications-past.php

示例9: submit

 /**
  * 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')));
 }
开发者ID:rossojames,项目名称:wp-production,代码行数:47,代码来源:class-wp-job-manager-form-edit-job.php

示例10: new_resume_submitted

 /**
  * 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'));
 }
开发者ID:CodeNoEvil,项目名称:mbp_web_infrastructure,代码行数:24,代码来源:class-wp-resume-manager-email-notification.php

示例11: done

 /**
  * 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)));
 }
开发者ID:azeemgolive,项目名称:thefunkidsgame,代码行数:8,代码来源:class-wp-job-manager-form-submit-job.php

示例12: job_application_footer

 /**
  * 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/');
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:8,代码来源:wp-job-manager-applications-template.php

示例13: application_details_url

 /**
  * 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));
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:7,代码来源:class-wp-job-manager-post-types.php

示例14: widget

    /**
     * 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);
    }
开发者ID:abdullahrahim,项目名称:shadighar,代码行数:84,代码来源:class-widget-job_listing-author.php

示例15: esc_attr_e

            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>
开发者ID:rossojames,项目名称:wp-production,代码行数:31,代码来源:job-submit.php


注:本文中的get_job_manager_template函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。