Beispiel #1
0
 function row_header($styles, $options, $remove_gutter, $is_fluid)
 {
     // output
     $e = '';
     // inner background
     $inner_background = '';
     // get css output
     $e = '<div class="mc-content-container" style="' . container_styles($styles) . '" data-content-id="' . $this->id . '" data-content-type="' . $this->content_type . '">';
     // has inner background?
     if ($options['row-inner-background']) {
         $inner_background = 'style="background-color: ' . $options['row-inner-background'] . ';"';
     }
     // check if layout is fluid or non-fluid
     if ($is_fluid) {
         $container_class = '';
         // if gutter, center masonry
         if (!$remove_gutter) {
             $fit_width = 'isFitWidth: true';
             $masonry = '.masonry-full-inner';
             $container_class = 'class="masonry-full"';
         }
     } else {
         $container_class = 'class="container"';
     }
     $e .= '<div id="masonry-' . $this->id . '" ' . $container_class . ' ' . $inner_background . '>';
     // open masonry inner
     if ($is_fluid && !$remove_gutter) {
         // masonry inner
         $e .= '<div class="masonry-full-inner">';
     }
     if ($remove_gutter) {
         $e .= '<div class="no-gutter-grid-sizer"></div>';
         $e .= '<div class="no-gutter-gutter-sizer"></div>';
     } else {
         $e .= '<div class="row"><div class="grid-sizer"></div>';
         $e .= '<div class="gutter-sizer"></div>';
     }
     // output
     echo $e;
 }
Beispiel #2
0
 while ($query->have_posts()) {
     $query->the_post();
     // is fwt?
     if ($is_fwt) {
         // get fwt styles
         if ($is_fwt) {
             $styles = array();
             $styles['background-color'] = get_field('background_color');
             $styles['background-image'] = get_field('background_image');
             $styles['background-size'] = get_field('background_scale');
             $styles['background-repeat'] = get_field('background_repeat');
             $styles['border-bottom'] = get_field('border_bottom');
         }
         //fwt header
         $e .= '<a href="' . get_permalink() . '" class="fwt-link" title="' . get_the_title() . '">';
         $e .= '<div class="fwt" style="' . container_styles($styles) . ' padding: 0px !important;">';
         $e .= '<div class="container">';
         $e .= '<div class="row">';
         // title format
         if (get_field('fwt_title_format') === 'image') {
             if (get_field('fwt_image')) {
                 // get fwt thumbnail
                 $image = wp_get_attachment_image_src(get_field('fwt_image'), 'full');
                 $e .= '<div class="span12 fwt-solo-img"><img class="middle" src="' . $image[0] . '" /></div>';
             }
         } else {
             if (filter_var(get_field('fwt_hide_title'), FILTER_VALIDATE_BOOLEAN) === FALSE) {
                 $e .= '<div class="fwt-inner span12 ' . get_field('fwt_title_hor') . ' ' . get_field('fwt_title_ver') . '">';
                 $e .= '<h2 class="' . get_field('fwt_title_weight') . ' ' . get_field('fwt_title_font_size') . '" style="color: ' . get_field('fwt_title_color') . ' !important;">' . get_the_title() . '</h2>';
                 $e .= '<p class="fwt-category ' . get_field('fwt_category_font_weight') . ' ' . get_field('fwt_category_font_size') . '" style="display: block; color: ' . get_field('fwt_category_color') . ' !important;">' . get_field('category') . '</p>';
                 $e .= '</div>';