示例#1
0
 function zupp_post_class($classes)
 {
     $masonry = 'post-container masonry-element col-md-4';
     $standard = 'post-container col-md-12';
     if (!zupp_is_single() && is_home()) {
         if (!zupp_setting('zupp_home') || zupp_setting('zupp_home') == "masonry") {
             $classes[] = $masonry;
         } else {
             $classes[] = $standard;
         }
     } else {
         if (!zupp_is_single() && zupp_get_archive_title()) {
             if (!zupp_setting('zupp_category_layout') || zupp_setting('zupp_category_layout') == "masonry") {
                 $classes[] = $masonry;
             } else {
                 $classes[] = $standard;
             }
         } else {
             if (!zupp_is_single() && is_search()) {
                 if (!zupp_setting('zupp_search_layout') || zupp_setting('zupp_search_layout') == "masonry") {
                     $classes[] = $masonry;
                 } else {
                     $classes[] = $standard;
                 }
             } else {
                 if (zupp_is_single()) {
                     $classes[] = 'post-container col-md-12';
                 }
             }
         }
     }
     return $classes;
 }
示例#2
0
 function zupp_slogan_function($title = "enabled", $style = "")
 {
     global $s;
     $html = '';
     if (zupp_is_single()) {
         if (zupp_postmeta('zupp_slogan')) {
             $html = zupp_postmeta('zupp_slogan');
         }
         if (zupp_postmeta('zupp_subslogan')) {
             $html .= '<span>' . zupp_postmeta('zupp_subslogan') . '</span>';
         }
     } elseif (is_search()) {
         $html = "<h1 class='title'>" . __('Search results for : ', "zupp") . $s . "</h1>";
     } elseif (is_404()) {
         $html = "<h1 class='title'>" . __('Content not found', "zupp") . "</h1>";
     } elseif (is_home()) {
         $html = "<h1 class='title'>" . get_bloginfo('name') . '<span>' . get_bloginfo('description') . '</span></h1>';
     } elseif (zupp_get_archive_title()) {
         if (strstr(zupp_get_archive_title(), ':')) {
             $archive_title = explode(":", zupp_get_archive_title());
             $html = "<h1 class='title'>" . $archive_title[1] . "</h1>";
         } else {
             $html = "<h1 class='title'>" . zupp_get_archive_title() . "</h1>";
         }
     }
     if (!empty($html)) {
         echo '<div id="slogan" ' . $style . '>' . $html . '</div>';
     }
 }