Example #1
0
 function weaverii_do_excerpt()
 {
     // return true if this kind of post should be excerpted
     if (weaverii_sc_getopt('show') == 'excerpt') {
         return true;
     }
     if (weaverii_sc_getopt('show') == 'full') {
         // fixed 6/25/13
         return false;
     }
     if (weaverii_is_checked_post_opt('ttw-force-post-excerpt')) {
         return true;
     }
     if (weaverii_is_checked_post_opt('ttw-force-post-full')) {
         return false;
     }
     $n1 = weaverii_get_per_page_value('wvr_fullposts');
     if (!$n1) {
         $n1 = weaverii_getopt('wii_fullpost_first');
     }
     if ($n1) {
         global $page, $paged;
         if (!($paged >= 2 || $page >= 2) && weaverii_post_count() <= $n1) {
             return false;
         }
     }
     $pwp = weaverii_get_per_page_value('wvr_pwp_type');
     if ($pwp == 'full') {
         // need to check before archive/search
         return false;
     }
     // override global setting
     if ($pwp == 'excerpt') {
         return true;
     }
     // override global setting
     if (is_search()) {
         return !weaverii_getopt_checked('wii_fullpost_search');
     }
     if (is_archive()) {
         return !weaverii_getopt_checked('wii_fullpost_archive');
     }
     return weaverii_getopt_checked('wii_excerpt_blog') || weaverii_excerpt_mobile();
 }
Example #2
0
     $num_cols = 1;
 }
 $sticky_one = weaverii_getopt_checked('wii_blog_sticky_one') && $paged <= 1;
 $first_one = weaverii_getopt_checked('wii_blog_first_one') && $paged <= 1;
 $masonry_wrap = false;
 // need this for one-column posts
 $hide_n_posts = weaverii_get_per_page_value('wvr_hide_n_posts');
 if ($hide_n_posts == '' || $hide_n_posts < 1 || $hide_n_posts > 100) {
     $hide_n_posts = 0;
 }
 weaverii_post_count_clear();
 $col = 0;
 while (have_posts()) {
     the_post();
     weaverii_post_count_bump();
     if (weaverii_post_count() <= $hide_n_posts) {
         global $page, $paged;
         if (!($paged >= 2 || $page >= 2)) {
             continue;
             // skip posting
         }
     }
     $weaverii_sticky = false;
     if (is_array($sticky_posts) && !empty($sticky_posts) && in_array(get_the_ID(), $sticky_posts)) {
         $weaverii_sticky = true;
     }
     if ((is_sticky() || $weaverii_sticky) && $sticky_one) {
         get_template_part('content', get_post_format());
     } else {
         if ($first_one) {
             get_template_part('content', get_post_format());