/** * 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); }
/** * 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); }
/** * Output the company video */ function the_company_video($post = null) { $video = get_the_company_video($post); $filetype = wp_check_filetype($video); // FV Wordpress Flowplayer Support for advanced video formats if (shortcode_exists('flowplayer')) { $video_embed = '[flowplayer src="' . esc_attr($video) . '"]'; } elseif (!empty($filetype['ext'])) { $video_embed = wp_video_shortcode(array('src' => $video)); } else { $video_embed = wp_oembed_get($video); } $video_embed = apply_filters('the_company_video_embed', $video_embed, $post); if ($video_embed) { echo '<div class="company_video">' . $video_embed . '</div>'; } }
/** * Output the company video */ function the_company_video($post = null) { $video = get_the_company_video($post); $video_embed = wp_oembed_get($video); if ($video_embed) { echo '<div class="company_video">' . $video_embed . '</div>'; } }
/** * Output the company video */ function the_company_video($post = null) { $video = get_the_company_video($post); $filetype = wp_check_filetype($video); if (!empty($filetype['ext'])) { $video_embed = wp_video_shortcode(array('src' => $video)); } else { $video_embed = wp_oembed_get($video); } if ($video_embed) { echo '<div class="company_video">' . $video_embed . '</div>'; } }