/** * 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; } global $job_manager, $post; extract($args); if ('' == get_the_company_video()) { return; } $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base); $icon = isset($instance['icon']) ? $instance['icon'] : null; if ($icon) { $before_title = sprintf($before_title, 'ion-' . $icon); } ob_start(); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } the_company_video(); echo $after_widget; $content = ob_get_clean(); echo apply_filters($this->widget_id, $content); $this->cache_widget($args, $content); }
the_company_logo(); ?> <p class="name"> <?php if ($website = get_the_company_website()) { ?> <a class="website" href="<?php echo esc_url($website); ?> " itemprop="url" target="_blank" rel="nofollow"><?php _e('Website', 'wp-job-manager'); ?> </a> <?php } ?> <?php the_company_twitter(); ?> <?php the_company_name('<strong itemprop="name">', '</strong>'); ?> </p> <?php the_company_tagline('<p class="tagline">', '</p>'); ?> <?php the_company_video(); ?> </div>
/** * 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); }