/**
  * Outputs the content for the current Recent Comments widget instance.
  *
  * @param array $args     Display arguments including 'before_title', 'after_title',
  *                        'before_widget', and 'after_widget'.
  * @param array $instance Settings for the current Recent Comments widget instance.
  */
 public function widget($args, $instance)
 {
     if (!isset($args['widget_id'])) {
         $args['widget_id'] = $this->id;
     }
     $title = !empty($instance['title']) ? $instance['title'] : __('Recent Comments');
     /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     $number = !empty($instance['number']) ? absint($instance['number']) : 5;
     if (!$number) {
         $number = 5;
     }
     $show_date = isset($instance['show_date']) ? $instance['show_date'] : false;
     /**
      * Filter the arguments for the Recent Comments widget.
      *
      * @since 3.4.0
      *
      * @see WP_Comment_Query::query() for information on accepted arguments.
      *
      * @param array $comment_args An array of arguments used to retrieve the recent comments.
      */
     $comments = get_comments(apply_filters('widget_comments_args', array('number' => $number, 'status' => 'approve', 'post_status' => 'publish')));
     if (is_array($comments) && $comments) {
         // Prime cache for associated posts. (Prime post term cache if we need it for permalinks.)
         $post_ids = array_unique(wp_list_pluck($comments, 'comment_post_ID'));
         _prime_post_caches($post_ids, strpos(get_option('permalink_structure'), '%category%'), false);
         $args['title'] = $title;
         $args['comments'] = $comments;
         $args['show_date'] = $show_date;
         get_template_part_hierarchical_fetch('partials/widgets/recent-comments', '', $args);
         wp_reset_postdata();
     }
 }
 /**
  * Outputs the content for the current Recent Posts widget instance.
  *
  * @param array $args     Display arguments including 'before_title', 'after_title',
  *                        'before_widget', and 'after_widget'.
  * @param array $instance Settings for the current Recent Posts widget instance.
  */
 public function widget($args, $instance)
 {
     if (!isset($args['widget_id'])) {
         $args['widget_id'] = $this->id;
     }
     $title = !empty($instance['title']) ? $instance['title'] : __('Recent Posts');
     /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     $number = !empty($instance['number']) ? absint($instance['number']) : 5;
     if (!$number) {
         $number = 5;
     }
     $show_date = isset($instance['show_date']) ? $instance['show_date'] : false;
     $show_thumb = isset($instance['show_thumb']) ? $instance['show_thumb'] : true;
     /**
      * Filter the arguments for the Recent Posts widget.
      *
      * @since 3.4.0
      *
      * @see WP_Query::get_posts()
      *
      * @param array $args An array of arguments used to retrieve the recent posts.
      */
     $r = new WP_Query(apply_filters('widget_posts_args', array('posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true)));
     if ($r->have_posts()) {
         $args['title'] = $title;
         $args['loop'] = $r;
         $args['show_date'] = $show_date;
         $args['show_thumb'] = $show_thumb;
         get_template_part_hierarchical_fetch('partials/widgets/recent-posts', '', $args);
         wp_reset_postdata();
     }
 }
 /**
  * Outputs the content for the current Recent Comments widget instance.
  *
  * @param array $args     Display arguments including 'before_title', 'after_title',
  *                        'before_widget', and 'after_widget'.
  * @param array $instance Settings for the current Recent Comments widget instance.
  */
 public function widget($args, $instance)
 {
     if (!isset($args['widget_id'])) {
         $args['widget_id'] = $this->id;
     }
     $show_count = !empty($instance['count']) ? '1' : '0';
     $is_dropdown = !empty($instance['dropdown']) ? '1' : '0';
     /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Archives') : $instance['title'], $instance, $this->id_base);
     $args['title'] = $title;
     $args['show_count'] = $show_count;
     $args['is_dropdown'] = $is_dropdown;
     if ($is_dropdown) {
         /**
          * Filter the arguments for the Archives widget drop-down.
          *
          * @since 2.8.0
          *
          * @see wp_get_archives()
          *
          * @param array $args An array of Archives widget drop-down arguments.
          */
         $dropdown_args = apply_filters('widget_archives_dropdown_args', array('type' => 'monthly', 'format' => 'option', 'show_post_count' => $show_count));
         switch ($dropdown_args['type']) {
             case 'yearly':
                 $label = __('Select Year');
                 break;
             case 'monthly':
                 $label = __('Select Month');
                 break;
             case 'daily':
                 $label = __('Select Day');
                 break;
             case 'weekly':
                 $label = __('Select Week');
                 break;
             default:
                 $label = __('Select Post');
                 break;
         }
         $args['dropdown_id'] = "{$this->id_base}-dropdown-{$this->number}";
         $args['dropdown_args'] = $dropdown_args;
         $args['label'] = $label;
     } else {
         /**
          * Filter the arguments for the Archives widget.
          *
          * @since WP 2.8.0
          * @see wp_get_archives()
          * @param array $args An array of Archives option arguments.
          */
         $archives_args = apply_filters('widget_archives_args', array('type' => 'monthly', 'show_post_count' => $show_count));
         $args['archives_args'] = $archives_args;
     }
     get_template_part_hierarchical_fetch('partials/widgets/archives', '', $args);
 }
 /**
  * Front-end display of widget.
  *
  * @see WP_Widget::widget()
  *
  * @param array $args     Widget arguments.
  * @param array $instance Saved values from database.
  */
 public function widget($args, $instance)
 {
     if (empty($instance['author_id'])) {
         echo '';
         return;
     }
     if ($instance['author_id'] == 'current') {
         $args['is_current'] = true;
         if (is_singular()) {
             $id = get_the_author_meta('ID');
             if (!empty($id) && is_int($id)) {
                 $instance['author_id'] = $id;
             }
         } else {
             unset($instance['author_id']);
         }
     }
     if (isset($instance['author_id'])) {
         $author = get_userdata($instance['author_id']);
         if (!empty($author)) {
             $html_filtered = has_filter('widget_title', 'esc_html');
             if ($html_filtered) {
                 remove_filter('widget_title', 'esc_html');
             }
             if (!empty($instance['title'])) {
                 $title = apply_filters('widget_title', sprintf(__('<a href="%1$s">%2$s</a>', 'basicbootstrap'), get_author_posts_url($instance['author_id']), $instance['title']), $instance, $this->id_base);
             } else {
                 $title = apply_filters('widget_title', sprintf(__('About <a href="%1$s">%2$s</a>', 'basicbootstrap'), get_author_posts_url($instance['author_id']), !empty($instance['title']) ? $instance['title'] : $author->display_name), $instance, $this->id_base);
             }
             if ($html_filtered) {
                 add_filter('widget_title', 'esc_html');
             }
             $args['title'] = $title;
             $args['author'] = $author;
             get_template_part_hierarchical_fetch('partials/widgets/author-block', '', $args);
         }
     }
 }
" <?php 
post_class('blog-post');
?>
 itemscope itemtype="http://schema.org/VideoObject">

    <?php 
if ($video_host_type == 'embeded') {
    ?>
        <div class="featured-media" itemprop="contentUrl">
            <?php 
    echo $video_embed;
    ?>
        </div>
    <?php 
} elseif (!empty($video_self_hosted)) {
    get_template_part_hierarchical_fetch('partials/formats/video', '', array('post' => get_post(), 'video_self_hosted' => $video_self_hosted));
}
?>

    <header>
        <h1 class="blog-post-title" itemprop="name">
            <?php 
if (!is_single() && !is_page()) {
    ?>
            <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>
" rel="bookmark">
if (has_post_thumbnail()) {
    ?>
            <div class="center-block">
                <?php 
    the_post_thumbnail('post-thumbnail', array('class' => 'img-responsive size-post-thumbnail'));
    ?>
            </div>
        <?php 
}
?>

        <?php 
$quote_content = get_post_meta(get_the_ID(), 'post-format-quote-content', true);
$quote_source_name = get_post_meta(get_the_ID(), 'post-format-quote-source-name', true);
$quote_source_link = get_post_meta(get_the_ID(), 'post-format-quote-source-link', true);
get_template_part_hierarchical_fetch('partials/formats/quote', '', array('post' => get_post(), 'quote_content' => $quote_content, 'quote_source_name' => $quote_source_name, 'quote_source_link' => $quote_source_link));
?>
        <?php 
the_content();
?>
        <div class="blog-post-links"><?php 
get_the_link_pages();
?>
</div>
    </div>

    <div class="hidden-print">
        <?php 
if (is_page() && get_basicbootstrap_mod('show_sharing_links_page') || !is_page() && get_basicbootstrap_mod('show_sharing_links_post')) {
    ?>
            <?php 
/**
 * Retrieve protected post password form content.
 *
 * To use this method, write:
 *
 *      add_filter('the_password_form', 'basicbootstrap_get_the_password_form');
 *
 * The `the_password_form` filter is documented in `wp-includes/post-template.php`.
 *
 * @return string HTML content for password form for password protected post.
 */
function basicbootstrap_get_the_password_form()
{
    $post = get_post();
    $label = 'pwbox-' . (empty($post->ID) ? rand() : $post->ID);
    ob_start();
    get_template_part_hierarchical_fetch('partials/password-form', '', array('post' => $post, 'label' => $label));
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
 */
/* @var $post \WP_Post */
global $post;
$gallery_type = get_post_meta(get_the_ID(), 'post-format-gallery-type', true);
$gallery_images = rwmb_meta('post-format-gallery-images', $args = array('type' => 'file_advanced'), get_the_ID());
?>
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('blog-post');
?>
 itemscope itemtype="http://schema.org/Article">
    <?php 
if (!empty($gallery_images)) {
    get_template_part_hierarchical_fetch('partials/formats/gallery', $gallery_type, array('post' => get_post(), 'gallery_images' => $gallery_images));
}
?>
    <header>
        <h1 class="blog-post-title" itemprop="name">
            <?php 
if (!is_single() && !is_page()) {
    ?>
            <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    the_title_attribute();
    ?>
" rel="bookmark">
            <?php 
    <div class="blog-post-content" itemprop="articleBody">

        <?php 
if (has_post_thumbnail()) {
    ?>
            <div class="center-block">
                <?php 
    the_post_thumbnail('post-thumbnail', array('class' => 'img-responsive size-post-thumbnail'));
    ?>
            </div>
        <?php 
}
?>

        <?php 
get_template_part_hierarchical_fetch('partials/formats/link', '', array('post' => get_post(), 'link' => get_post_meta(get_the_ID(), 'post-format-link-url', true), 'title' => get_post_meta(get_the_ID(), 'post-format-link-title', true)));
?>

        <?php 
the_content();
?>
        <div class="blog-post-links"><?php 
get_the_link_pages();
?>
</div>
    </div>

    <div class="hidden-print">
        <?php 
if (is_page() && get_basicbootstrap_mod('show_sharing_links_page') || !is_page() && get_basicbootstrap_mod('show_sharing_links_post')) {
    ?>