/**
  * Make sure only one instance is only running.
  */
 public static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
    /**
     * 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);
        if (!class_exists('Astoundify_Job_Manager_Companies')) {
            return;
        }
        $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '', $instance, $this->id_base);
        $companies = Astoundify_Job_Manager_Companies::instance();
        $company_url = esc_url($companies->company_url(get_the_company_name()));
        echo $before_widget;
        ?>

		<?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

		<a href="<?php 
        echo $company_url;
        ?>
" title="<?php 
        printf(__('More jobs by %s', 'jobify'), get_the_company_name());
        ?>
"><i class="icon-newspaper"></i> <?php 
        _e('More Jobs', 'jobify');
        ?>
</a>

		<?php 
        echo $after_widget;
        $content = apply_filters('jobify_widget_job_more_jobs', ob_get_clean(), $instance, $args);
        echo $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;
        }
        global $wp_embed;
        ob_start();
        extract($args);
        global $post;
        $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 (class_exists('Astoundify_Job_Manager_Companies') && '' != get_the_company_name()) {
                $companies = Astoundify_Job_Manager_Companies::instance();
                $company_url = esc_url($companies->company_url(get_the_company_name()));
                ?>
			<a href="<?php 
                echo $company_url;
                ?>
" target="_blank"><?php 
                the_company_logo();
                ?>
</a>
			<?php 
            } else {
                ?>
				<?php 
                the_company_logo();
                ?>
			<?php 
            }
            ?>

		<?php 
        } else {
            ?>

			<?php 
            the_candidate_photo('large');
            ?>

		<?php 
        }
        ?>

		<?php 
        echo $after_widget;
        $content = apply_filters('jobify_widget_job_company_logo', ob_get_clean(), $instance, $args);
        echo $content;
        $this->cache_widget($args, $content);
    }
		<ul>
			<?php 
do_action('single_job_listing_meta_start');
?>

			<li class="job-type <?php 
echo get_the_job_type() ? sanitize_title(get_the_job_type()->slug) : '';
?>
"><?php 
the_job_type();
?>
</li>
			<li class="job-company">
				<?php 
if (class_exists('Astoundify_Job_Manager_Companies') && '' != get_the_company_name()) {
    $companies = Astoundify_Job_Manager_Companies::instance();
    $company_url = esc_url($companies->company_url(get_the_company_name()));
    ?>
				<a href="<?php 
    echo $company_url;
    ?>
" target="_blank"><?php 
    the_company_name();
    ?>
</a>
				<?php 
} else {
    ?>
					<?php 
    the_company_name();
    ?>