function jumbotron_content()
 {
     global $ss_settings, $ss_framework;
     $hero = false;
     $site_style = $ss_settings['site_style'];
     $visibility = $ss_settings['jumbotron_visibility'];
     $nocontainer = $ss_settings['jumbotron_nocontainer'];
     if (($visibility == 1 && is_front_page() || $visibility != 1) && is_active_sidebar('jumbotron')) {
         $hero = true;
     }
     if ($hero) {
         echo $ss_framework->clearfix();
         echo '<div class="before-main-wrapper">';
         if ($site_style == 'boxed' && $nocontainer != 1) {
             echo '<div class="' . StacheStack_Layout::container_class() . '">';
         }
         echo '<div class="jumbotron">';
         if ($nocontainer != 1 && $site_style == 'wide' || $site_style == 'boxed') {
             echo '<div class="' . StacheStack_Layout::container_class() . '">';
         }
         dynamic_sidebar('Jumbotron');
         if ($nocontainer != 1 && $site_style == 'wide' || $site_style == 'boxed') {
             echo '</div>';
         }
         echo '</div>';
         if ($site_style == 'boxed' && $nocontainer != 1) {
             echo '</div>';
         }
         echo '</div>';
     }
 }
Пример #2
0
/**
 * Layout functions
 */
function stachestack_content_width_px($echo = false)
{
    _stachestack_deprecated_function(__FUNCTION__, '3.2', 'StacheStack_Layout::content_width_px()');
    return StacheStack_Layout::content_width_px($echo);
}
 function featured_image()
 {
     global $ss_framework, $ss_settings;
     $data = array();
     if (!has_post_thumbnail() || '' == get_the_post_thumbnail()) {
         return;
     }
     $data['width'] = StacheStack_Layout::content_width_px();
     if (is_singular()) {
         // Do not process if we don't want images on single posts
         if ($ss_settings['feat_img_post'] != 1) {
             return;
         }
         $data['url'] = wp_get_attachment_url(get_post_thumbnail_id());
         if ($ss_settings['feat_img_post_custom_toggle'] == 1) {
             $data['width'] = $ss_settings['feat_img_post_width'];
         }
         $data['height'] = $ss_settings['feat_img_post_height'];
     } else {
         // Do not process if we don't want images on post archives
         if ($ss_settings['feat_img_archive'] != 1) {
             return;
         }
         $data['url'] = wp_get_attachment_url(get_post_thumbnail_id());
         if ($ss_settings['feat_img_archive_custom_toggle'] == 1) {
             $data['width'] = $ss_settings['feat_img_archive_width'];
         }
         $data['height'] = $ss_settings['feat_img_archive_height'];
     }
     $image = StacheStack_Image::image_resize($data);
     echo $ss_framework->clearfix() . '<a href="' . get_permalink() . '"><img class="featured-image ' . $ss_framework->float_class('left') . '" src="' . $image['url'] . '" /></a>';
 }