/** * 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); $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; } ?> <div class="job-type <?php echo get_the_job_type()->slug; ?> term-<?php echo get_the_job_type() ? sanitize_title(get_the_job_type()->term_id) : ''; ?> "><?php the_job_type(); ?> </div> <?php echo $after_widget; $content = apply_filters('jobify_widget_job_type', ob_get_clean(), $instance, $args); echo $content; $this->cache_widget($args, $content); }
> <<?php echo $header_tag; ?> class="entry-title"><?php the_title(sprintf('<a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a>'); ?> </<?php echo $header_tag; ?> > <ul class="list-inline"> <?php do_action('job_listing_meta_start'); ?> <li class="job"><span class="label job-type <?php echo get_the_job_type() ? sanitize_title(get_the_job_type()->slug) : ''; ?> "><?php the_job_type(); ?> </span></li> <li class="date-posted" itemprop="datePosted"><i class="fa fa-calendar"></i> <date><?php printf(__('%s ago', 'wp-job-manager'), human_time_diff(get_post_time('U'), current_time('timestamp'))); ?> </date></li> <?php do_action('job_listing_meta_end'); ?> </ul> </li>