Advertisement
cipher87

Loop Course

Jan 18th, 2023
970
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 19.26 KB | Source Code | 0 0
  1. <?php
  2. if( ! defined( 'ABSPATH' ) ) {  exit;  }    // Exit if accessed directly
  3.  
  4. global $avia_config, $post_loop_count;
  5.  
  6.  
  7. if( 'disable_blog' == avia_get_option( 'disable_blog' ) )
  8. {
  9.     if( current_user_can( 'edit_posts' ) )
  10.     {
  11.         $msg  = '<strong>' . __( 'Admin notice for:', 'avia_framework' ) . '</strong><br>';
  12.         $msg .= __( 'Blog Posts', 'avia_framework' ) . '<br><br>';
  13.         $msg .= __( 'This element was disabled in your theme settings. You can activate it here:', 'avia_framework' ) . '<br>';
  14.         $msg .= '<a target="_blank" href="' . admin_url( 'admin.php?page=avia#goto_performance') . '">' . __( 'Performance Settings', 'avia_framework' ) . '</a>';
  15.  
  16.         $content = "<span class='av-shortcode-disabled-notice'>{$msg}</span>";
  17.  
  18.         echo $content;
  19.     }
  20.  
  21.      return;
  22. }
  23.  
  24.  
  25. if( empty( $post_loop_count ) )
  26. {
  27.     $post_loop_count = 1;
  28. }
  29.  
  30. $blog_style = ! empty( $avia_config['blog_style'] ) ? $avia_config['blog_style'] : avia_get_option( 'blog_style', 'multi-big' );
  31.  
  32. if( is_single() )
  33. {
  34.     $blog_style = avia_get_option( 'single_post_style', 'single-big' );
  35. }
  36.  
  37. $blog_global_style = avia_get_option( 'blog_global_style', '' ); //alt: elegant-blog
  38.  
  39. $initial_id = avia_get_the_ID();
  40.  
  41. // check if we got posts to display:
  42. if( have_posts() )
  43. {
  44.     while( have_posts() )
  45.     {
  46.         the_post();
  47.  
  48.         /**
  49.          * get the current post id, the current post class and current post format
  50.          */
  51.         $url = '';
  52.         $current_post = array();
  53.         $current_post['post_loop_count'] = $post_loop_count;
  54.         $current_post['the_id'] = get_the_ID();
  55.         $current_post['parity'] = $post_loop_count % 2 ? 'odd' : 'even';
  56.         $current_post['last'] = count( $wp_query->posts ) == $post_loop_count ? ' post-entry-last ' : '';
  57.         $current_post['post_type'] = get_post_type( $current_post['the_id'] );
  58.         $current_post['post_class'] = "post-entry-{$current_post['the_id']} post-loop-{$post_loop_count} post-parity-{$current_post['parity']} {$current_post['last']} {$blog_style}";
  59.         $current_post['post_class'] .= ( $current_post['post_type'] == 'post' ) ? '' : ' post';
  60.         $current_post['post_format'] = get_post_format() ? get_post_format() : 'standard';
  61.         $current_post['post_layout'] = avia_layout_class( 'main', false );
  62.         $blog_content = ! empty( $avia_config['blog_content'] ) ? $avia_config['blog_content'] : 'content';
  63.  
  64.         /*If post uses builder change content to exerpt on overview pages*/
  65.         if( Avia_Builder()->get_alb_builder_status( $current_post['the_id'] ) && ! is_singular( $current_post['the_id'] ) && $current_post['post_type'] == 'post' )
  66.         {
  67.            $current_post['post_format'] = 'standard';
  68.            $blog_content = 'excerpt_read_more';
  69.         }
  70.  
  71.         /**
  72.          * Allows especially for ALB posts to change output to 'content'
  73.          * Supported since 4.5.5
  74.          *
  75.          * @since 4.5.5
  76.          * @param string $blog_content
  77.          * @param array $current_post
  78.          * @param string $blog_style
  79.          * @param string $blog_global_style
  80.          * @return string
  81.          */
  82.         $blog_content = apply_filters( 'avf_blog_content_in_loop', $blog_content, $current_post, $blog_style, $blog_global_style );
  83.  
  84.  
  85.         /*
  86.          * retrieve slider, title and content for this post,...
  87.          */
  88.         $size = 'course';
  89.  
  90.         /**
  91.          * Change default theme image
  92.          *
  93.          * @since 4.5.4
  94.          * @param string $image_link
  95.          * @param array $current_post
  96.          * @param string $size
  97.          * @return string
  98.          */
  99.         $current_post['slider'] = apply_filters( 'avf_post_featured_image_link', get_the_post_thumbnail( $current_post['the_id'], $size ), $current_post, $size );
  100.  
  101.         /**
  102.          * Backwards comp. to checkbox prior v4.5.3 (now selectbox with '' or '1')
  103.          */
  104.         $hide_featured_image = empty( get_post_meta( $current_post['the_id'], '_avia_hide_featured_image', true ) ) ? false : true;
  105.         if( is_single( $initial_id ) && $hide_featured_image )
  106.         {
  107.             $current_post['slider'] = '';
  108.         }
  109.  
  110.         $current_post['title'] = get_the_title();
  111.  
  112.         /**
  113.          * Allow 3rd party to hook and return a plugin specific content.
  114.          * This returned content replaces Enfold's standard content building procedure.
  115.          *
  116.          * @since 4.5.7.2
  117.          * @param string
  118.          * @param string $context
  119.          * @return string
  120.          */
  121.         $current_post['content'] = apply_filters( 'avf_the_content', '', 'loop_index' );
  122.         if( '' == $current_post['content'] )
  123.         {
  124.             $current_post['content'] = $blog_content == 'content' ? get_the_content( __( 'Read more', 'avia_framework' ) . '<span class="more-link-arrow"></span>' ) : get_the_excerpt();
  125.             $current_post['content'] = $blog_content == 'excerpt_read_more' ? $current_post['content'] . '<div class="read-more-link"><a href="' . get_permalink() . '" class="more-link">' . __( 'Read more', 'avia_framework' ) . '<span class="more-link-arrow"></span></a></div>' : $current_post['content'];
  126.             $current_post['before_content'] = '';
  127.  
  128.             /*
  129.              * ...now apply a filter, based on the post type... (filter function is located in includes/helper-post-format.php)
  130.              */
  131.             $current_post = apply_filters( 'post-format-' . $current_post['post_format'], $current_post );
  132.             $with_slider = empty( $current_post['slider'] ) ? '' : 'with-slider';
  133.  
  134.             /*
  135.              * ... last apply the default wordpress filters to the content
  136.              */
  137.             $current_post['content'] = str_replace( ']]>', ']]&gt;', apply_filters( 'the_content', $current_post['content'] ) );
  138.         }
  139.  
  140.         /*
  141.          * Now extract the variables so that $current_post['slider'] becomes $slider, $current_post['title'] becomes $title, etc
  142.          */
  143.         extract( $current_post );
  144.  
  145.  
  146.         /**
  147.          * render the html:
  148.          */
  149.         echo '<article class="' . implode( ' ', get_post_class( "post-entry post-entry-type-{$post_format} {$post_class} {$with_slider}" ) ) . '" ' . avia_markup_helper( array( 'context' => 'entry', 'echo' => false ) ) . '>';
  150.  
  151.         //  default link for preview images
  152.         $link = ! empty( $url ) ? $url : get_permalink();
  153.  
  154.         //  prepare responsive lightbox images
  155.         $link_lightbox = false;
  156.         $lightbox_attr = '';
  157.  
  158.         //preview image description
  159.         $desc = '';
  160.         $thumb_post = get_post( get_post_thumbnail_id() );
  161.         if( $thumb_post instanceof WP_Post )
  162.         {
  163.             if( '' != trim( $thumb_post->post_excerpt ) )
  164.             {
  165.                 //  return 'Caption' from media gallery
  166.                 $desc = $thumb_post->post_excerpt;
  167.             }
  168.             else if( '' != trim( $thumb_post->post_title ) )
  169.             {
  170.                 //  return 'Title' from media gallery
  171.                 $desc = $thumb_post->post_title;
  172.             }
  173.             else if( '' != trim( $thumb_post->post_content ) )
  174.             {
  175.                 //  return 'Description' from media gallery
  176.                 $desc = $thumb_post->post_content;
  177.             }
  178.         }
  179.  
  180.         $desc = trim( $desc );
  181.         if( '' == $desc )
  182.         {
  183.             $desc = trim( the_title_attribute( 'echo=0' ) );
  184.         }
  185.  
  186.         /**
  187.          * Allows to change the title attribute text for the featured image.
  188.          * If '' is returned, then no title attribute is added.
  189.          *
  190.          * @since 4.6.4
  191.          * @param string $desc
  192.          * @param string $context               'loop_index'
  193.          * @param WP_Post $thumb_post
  194.          */
  195.         $featured_img_title = apply_filters( 'avf_featured_image_title_attr', $desc, 'loop_index', $thumb_post );
  196.  
  197.         $featured_img_title = '' != trim( $featured_img_title ) ? ' title="' . esc_attr( $featured_img_title ) . '" ' : '';
  198.  
  199.         //on single page replace the link with a fullscreen image
  200.         if( is_singular() )
  201.         {
  202.             if( ! $thumb_post instanceof WP_Post )
  203.             {
  204.                 $link = '';
  205.             }
  206.             else
  207.             {
  208.                 $link = avia_image_by_id( $thumb_post->ID, 'large', 'url' );
  209.  
  210.                 $lightbox_img = AviaHelper::get_url( 'lightbox', $thumb_post->ID, true );
  211.                 $lightbox_attr = Av_Responsive_Images()->html_attr_image_src( $lightbox_img, false );
  212.                 $link_lightbox = true;
  213.             }
  214.         }
  215.  
  216.         if( ! in_array( $blog_style, array( 'bloglist-simple', 'bloglist-compact', 'bloglist-excerpt' ) ) )
  217.         {
  218.             //echo preview image
  219.             if( strpos( $blog_global_style, 'elegant-blog' ) === false )
  220.             {
  221.                 if( strpos( $blog_style, 'big' ) !== false )
  222.                 {
  223.                     if( $slider )
  224.                     {
  225.                         if( $link_lightbox )
  226.                         {
  227.                             $slider = '<a ' . $lightbox_attr . ' ' . $featured_img_title . '>' . $slider . '</a>';
  228.                         }
  229.                         else
  230.                         {
  231.                             $slider = '<a href="' . $link . '" ' . $featured_img_title . '>' . $slider . '</a>';
  232.                         }
  233.                     }
  234.  
  235.                     if( $slider )
  236.                     {
  237.                         echo '<div class="big-preview ' . $blog_style . '" ' . avia_markup_helper( array( 'context' => 'image', 'echo' => false ) ) . '>' . $slider . '</div>';
  238.                     }
  239.                 }
  240.  
  241.                 if( ! empty( $before_content ) )
  242.                 {
  243.                     echo '<div class="big-preview ' . $blog_style . '">' . $before_content . '</div>';
  244.                 }
  245.             }
  246.         }
  247.  
  248.         echo '<div class="blog-meta">';
  249.  
  250.             $blog_meta_output = '';
  251.             $icon = '<span class="iconfont" ' . av_icon_string( $post_format ) . '></span>';
  252.  
  253.             if( strpos( $blog_style, 'multi' ) !== false )
  254.             {
  255.                 $gravatar = '';
  256.                 $pf_link = get_post_format_link( $post_format );
  257.  
  258.                 if( $post_format == 'standard' )
  259.                 {
  260.                     $author_name = apply_filters( 'avf_author_name', get_the_author_meta( 'display_name', $post->post_author ), $post->post_author );
  261.                     $author_email = apply_filters( 'avf_author_email', get_the_author_meta('email', $post->post_author), $post->post_author );
  262.  
  263.                     $gravatar_alt = esc_html( $author_name );
  264.                     $gravatar = get_avatar( $author_email, '81', 'blank', $gravatar_alt );
  265.                     $pf_link = get_author_posts_url( $post->post_author );
  266.                 }
  267.  
  268.                 $blog_meta_output = "<a href='{$pf_link}' class='post-author-format-type'><span class='rounded-container'>" . $gravatar . $icon . '</span></a>';
  269.             }
  270.             else if( strpos( $blog_style, 'small' ) !== false )
  271.             {
  272.                 if( $link_lightbox )
  273.                 {
  274.                     $attr = $lightbox_attr;
  275.                 }
  276.                 else
  277.                 {
  278.                     $attr = "href='{$link}'";
  279.                 }
  280.  
  281.                 $blog_meta_output = "<a {$attr} class='small-preview' {$featured_img_title} " . avia_markup_helper( array( 'context' => 'image', 'echo' => false ) ). ">{$slider}{$icon}</a>";
  282.             }
  283.  
  284.             echo apply_filters( 'avf_loop_index_blog_meta', $blog_meta_output );
  285.  
  286.         echo '</div>';
  287.  
  288.         echo "<div class='entry-content-wrapper clearfix {$post_format}-content'>";
  289.             echo '<header class="entry-content-header">';
  290.  
  291.                 if( $blog_style == 'bloglist-compact' )
  292.                 {
  293.                     $format = get_post_format();
  294.                     echo '<span class="fallback-post-type-icon" ' . av_icon_string( $format ) . '></span>';
  295.                 }
  296.  
  297.                 $close_header = '</header>';
  298.  
  299.                 $content_output  = '<div class="entry-content" ' . avia_markup_helper( array( 'context' => 'entry_content', 'echo' => false ) ) . '>';
  300.                 $content_output .=      $content;
  301.                 $content_output .= '</div>';
  302.  
  303.  
  304.                 $taxonomies = get_object_taxonomies( get_post_type( $the_id ) );
  305.                 $cats = '';
  306.  
  307.                 $excluded_taxonomies = array_merge( get_taxonomies( array( 'public' => false ) ), array( 'post_tag', 'post_format' ) );
  308.  
  309.                 /**
  310.                  *
  311.                  * @since ????
  312.                  * @since 4.8.8                     added $context
  313.                  * @param array $excluded_taxonomies
  314.                  * @param string $post_type
  315.                  * @param int $the_id
  316.                  * @param string $context
  317.                  * @return array
  318.                  */
  319.                 $excluded_taxonomies = apply_filters( 'avf_exclude_taxonomies', $excluded_taxonomies, get_post_type( $the_id ), $the_id, 'loop-index' );
  320.  
  321.                 if( ! empty( $taxonomies ) )
  322.                 {
  323.                     foreach( $taxonomies as $taxonomy )
  324.                     {
  325.                         if( ! in_array( $taxonomy, $excluded_taxonomies ) )
  326.                         {
  327.                             $cats .= get_the_term_list( $the_id, $taxonomy, '', ', ', '' ) . ' ';
  328.                         }
  329.                     }
  330.                 }
  331.  
  332.                 //elegant blog
  333.                 //prev: if( $blog_global_style == 'elegant-blog' )
  334.                 if( strpos( $blog_global_style, 'elegant-blog' ) !== false )
  335.                 {
  336.                     $cat_output = '';
  337.  
  338.                     if( ! empty( $cats ) )
  339.                     {
  340.                         $cat_output .= '<span class="blog-categories minor-meta">';
  341.                         $cat_output .=      trim( $cats );
  342.                         $cat_output .= '</span>';
  343.                         $cats = '';
  344.                     }
  345.  
  346.                     if ( in_array( $blog_style, array( 'bloglist-compact', 'bloglist-excerpt' ) ) )
  347.                     {
  348.                         echo $title;
  349.                     }
  350.                     else
  351.                     {
  352.                         // The wrapper div prevents the Safari reader from displaying the content twice  Â¯\_(ツ)_/¯
  353.                         echo '<div class="av-heading-wrapper">';
  354.  
  355.                         if( strpos( $blog_global_style, 'modern-blog' ) === false )
  356.                         {
  357.                             echo $cat_output . $title;
  358.                         }
  359.                         else
  360.                         {
  361.                             echo $title . $cat_output;
  362.                         }
  363.  
  364.                         echo '</div>';
  365.                     }
  366.  
  367.                     echo $close_header;
  368.                     $close_header = '';
  369.  
  370.                     if( ! in_array( $blog_style, array( 'bloglist-simple', 'bloglist-compact', 'bloglist-excerpt' ) ) )
  371.                     {
  372.                         echo '<span class="av-vertical-delimiter"></span>';
  373.  
  374.                         //echo preview image
  375.                         if( strpos( $blog_style, 'big' ) !== false )
  376.                         {
  377.                             if( $slider )
  378.                             {
  379.                                 if( $link_lightbox )
  380.                                 {
  381.                                     $slider = '<a ' . $lightbox_attr . ' ' . $featured_img_title . '>' . $slider . '</a>';
  382.                                 }
  383.                                 else
  384.                                 {
  385.                                     $slider = '<a href="' . $link . '" ' . $featured_img_title . '>' . $slider . '</a>';
  386.                                 }
  387.                             }
  388.  
  389.                             if( $slider )
  390.                             {
  391.                                 echo '<div class="big-preview ' . $blog_style . '" ' . avia_markup_helper( array( 'context' => 'image', 'echo' => false ) ) . '>' . $slider . '</div>';
  392.                             }
  393.                         }
  394.  
  395.                         if( ! empty( $before_content ) )
  396.                         {
  397.                             echo '<div class="big-preview ' . $blog_style . '">' . $before_content . '</div>';
  398.                         }
  399.  
  400.                         echo $content_output;
  401.                     }
  402.  
  403.                     $cats = '';
  404.                     $title = '';
  405.                     $content_output = '';
  406.                 }
  407.  
  408.                 echo $title;
  409.  
  410.                 if( $blog_style !== 'bloglist-compact' )
  411.                 {
  412.                     echo '<span class="post-meta-infos">';
  413.  
  414.                         $meta_info = array();
  415.  
  416.                         /**
  417.                          * @since 4.8.8
  418.                          * @param string $hide_meta_only
  419.                          * @param string $context
  420.                          * @return string
  421.                          */
  422.                         $meta_seperator = apply_filters( 'avf_post_metadata_seperator', '<span class="text-sep">/</span>', 'loop-author' );
  423.  
  424.                         if( 'blog-meta-date' == avia_get_option( 'blog-meta-date' ) )
  425.                         {
  426.                             $meta_time  = '<time class="date-container minor-meta updated" ' . avia_markup_helper( array( 'context' => 'entry_time', 'echo' => false ) ) . '>';
  427.                             $meta_time .=       get_the_time( get_option( 'date_format' ) );
  428.                             $meta_time .= '</time>';
  429.  
  430.                             $meta_info['date'] = $meta_time;
  431.                         }
  432.  
  433.                         if( 'blog-meta-comments' == avia_get_option( 'blog-meta-comments' ) )
  434.                         {
  435.                             if( get_comments_number() != '0' || comments_open() )
  436.                             {
  437.                                 $meta_comment = '<span class="comment-container minor-meta">';
  438.  
  439.                                 ob_start();
  440.                                 comments_popup_link(
  441.                                                 "0 " . __( 'Comments', 'avia_framework' ),
  442.                                                 "1 " . __( 'Comment' , 'avia_framework' ),
  443.                                                 "% " . __( 'Comments', 'avia_framework' ),
  444.                                                 'comments-link',
  445.                                                 __( 'Comments Disabled', 'avia_framework' )
  446.                                             );
  447.  
  448.                                 $meta_comment .= ob_get_clean();
  449.                                 $meta_comment .= '</span>';
  450.  
  451.                                 $meta_info['comment'] = $meta_comment;
  452.                             }
  453.                         }
  454.  
  455.                         if( 'blog-meta-category' == avia_get_option( 'blog-meta-category' ) )
  456.                         {
  457.                             if( ! empty( $cats ) )
  458.                             {
  459.                                 $meta_cats  = '<span class="blog-categories minor-meta">' . __( 'in', 'avia_framework') . ' ';
  460.                                 $meta_cats .=   trim( $cats );
  461.                                 $meta_cats .= '</span>';
  462.  
  463.                                 $meta_info['categories'] = $meta_cats;
  464.                             }
  465.                         }
  466.  
  467.                         /**
  468.                          * Allow to change theme options setting for certain posts
  469.                          *
  470.                          * @since 4.8.8
  471.                          * @param boolean $show_author_meta
  472.                          * @param string $context
  473.                          * @return boolean
  474.                          */
  475.                         if( true === apply_filters( 'avf_show_author_meta', 'blog-meta-author' == avia_get_option( 'blog-meta-author' ), 'loop-index' ) )
  476.                         {
  477.                             $meta_author  = '<span class="blog-author minor-meta">' . __( 'by', 'avia_framework' ) . ' ';
  478.                             $meta_author .=     '<span class="entry-author-link" ' . avia_markup_helper( array( 'context' => 'author_name', 'echo' => false ) ) . '>';
  479.                             $meta_author .=         '<span class="author">';
  480.                             $meta_author .=             '<span class="fn">';
  481.                             $meta_author .=                 get_the_author_posts_link();
  482.                             $meta_author .=             '</span>';
  483.                             $meta_author .=         '</span>';
  484.                             $meta_author .=     '</span>';
  485.                             $meta_author .= '</span>';
  486.  
  487.                             $meta_info['author'] = $meta_author;
  488.                         }
  489.  
  490.                         /**
  491.                          * Modify the post metadata array
  492.                          *
  493.                          * @since 4.8.8
  494.                          * @param array $meta_info
  495.                          * @param string $context
  496.                          * @return array
  497.                          */
  498.                         $meta_info = apply_filters( 'avf_post_metadata_array', $meta_info, 'loop-index' );
  499.  
  500.                         echo implode( $meta_seperator, $meta_info );
  501.  
  502.                         if( $blog_style == 'bloglist-simple' )
  503.                         {
  504.                             echo '<div class="read-more-link"><a href="' . get_permalink() . '" class="more-link">' . __( 'Read more', 'avia_framework' ) . '<span class="more-link-arrow"></span></a></div>';
  505.                         }
  506.  
  507.                     echo '</span>';
  508.  
  509.                 } // display meta-infos on all layouts except bloglist-compact
  510.  
  511.                 echo $close_header;
  512.  
  513.  
  514.                 // echo the post content
  515.                 if ( $blog_style == 'bloglist-excerpt' )
  516.                 {
  517.                     the_excerpt();
  518.  
  519.                     echo '<div class="read-more-link">';
  520.                     echo    '<a href="' . get_permalink() . '" class="more-link">' . __( 'Read more', 'avia_framework' );
  521.                     echo        '<span class="more-link-arrow"></span>';
  522.                     echo    '</a>';
  523.                     echo '</div>';
  524.                 }
  525.  
  526.                 if ( ! in_array( $blog_style, array( 'bloglist-simple', 'bloglist-compact', 'bloglist-excerpt' ) ) )
  527.                 {
  528.                     echo $content_output;
  529.                 }
  530.  
  531.                 echo '<footer class="entry-footer">';
  532.  
  533.                     $avia_wp_link_pages_args = apply_filters( 'avf_wp_link_pages_args', array(
  534.                                                                         'before'    => '<nav class="pagination_split_post">' . __( 'Pages:', 'avia_framework' ),
  535.                                                                         'after'     => '</nav>',
  536.                                                                         'pagelink'  => '<span>%</span>',
  537.                                                                         'separator' => ' ',
  538.                                                                     ) );
  539.  
  540.                     wp_link_pages( $avia_wp_link_pages_args );
  541.  
  542.                     if( is_single() && ! post_password_required() )
  543.                     {
  544.                         //tags on single post
  545.                         if( 'blog-meta-tag' == avia_get_option( 'blog-meta-tag' ) && has_tag() )
  546.                         {
  547.                             echo '<span class="blog-tags minor-meta">';
  548.                                     the_tags( '<strong>' . __( 'Tags:', 'avia_framework' ) . '</strong><span> ' );
  549.                             echo '</span></span>';
  550.                         }
  551.  
  552.                         //share links on single post
  553.                         avia_social_share_links_single_post();
  554.                     }
  555.  
  556.                     do_action( 'ava_after_content', $the_id, 'post' );
  557.  
  558.             echo '</footer>';
  559.  
  560.             echo "<div class='post_delimiter'></div>";
  561.  
  562.         echo '</div>';
  563.  
  564.         echo '<div class="post_author_timeline"></div>';
  565.         echo av_blog_entry_markup_helper( $current_post['the_id'] );
  566.  
  567.         echo '</article>';
  568.  
  569.         $post_loop_count++;
  570.     }
  571. }
  572. else
  573. {
  574.     $default_heading = 'h1';
  575.     $args = array(
  576.                 'heading'       => $default_heading,
  577.                 'extra_class'   => ''
  578.             );
  579.  
  580.     /**
  581.      * @since 4.5.5
  582.      * @return array
  583.      */
  584.     $args = apply_filters( 'avf_customize_heading_settings', $args, 'loop_index::nothing_found', array() );
  585.  
  586.     $heading = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading;
  587.     $css = ! empty( $args['extra_class'] ) ? $args['extra_class'] : '';
  588. ?>
  589.     <article class="entry">
  590.         <header class="entry-content-header">
  591. <?php
  592.             echo "<{$heading} class='post-title entry-title {$css}'>" . __( 'Nothing Found', 'avia_framework' ) . "</{$heading}>";
  593. ?>
  594.         </header>
  595.  
  596.         <p class="entry-content" <?php avia_markup_helper( array( 'context' => 'entry_content' ) ); ?>><?php _e( 'Sorry, no posts matched your criteria', 'avia_framework' ); ?></p>
  597.  
  598.         <footer class="entry-footer"></footer>
  599.     </article>
  600.  
  601. <?php
  602. }
  603.  
  604. if( empty( $avia_config['remove_pagination'] ) )
  605. {
  606.     echo "<div class='{$blog_style}'>" . avia_pagination( '', 'nav' ) . '</div>';
  607. }
  608.  
  609.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement