function gdlr_print_full_size_wrapper($content) { $item_id = empty($content['option']['page-item-id']) ? '' : ' id="' . $content['option']['page-item-id'] . '" '; global $gdlr_spaces; $padding = !empty($content['option']['padding-top']) && $gdlr_spaces['top-full-wrapper'] != $content['option']['padding-top'] ? 'padding-top: ' . $content['option']['padding-top'] . '; ' : ''; $padding .= !empty($content['option']['padding-bottom']) && $gdlr_spaces['bottom-wrapper'] != $content['option']['padding-bottom'] ? 'padding-bottom: ' . $content['option']['padding-bottom'] . '; ' : ''; $border = ''; if (!empty($content['option']['border']) && $content['option']['border'] != 'none') { if ($content['option']['border'] == 'top' || $content['option']['border'] == 'both') { $border .= ' border-top: 4px solid ' . $content['option']['border-top-color'] . '; '; } if ($content['option']['border'] == 'bottom' || $content['option']['border'] == 'both') { $border .= ' border-bottom: 4px solid ' . $content['option']['border-bottom-color'] . '; '; } } $background = !empty($content['option']['background']) ? ' background-color: ' . $content['option']['background'] . '; ' : ''; $content['option']['show-section'] = !empty($content['option']['show-section']) ? $content['option']['show-section'] : ''; $style = !empty($padding) || !empty($border) || !empty($background) ? ' style="' . $padding . $border . $background . '" ' : ''; echo '<div class="gdlr-full-size-wrapper ' . $content['option']['show-section'] . '" ' . $item_id . $style . ' >'; $size = 0; foreach ($content['items'] as $item) { if ($item['item-type'] == 'wrapper') { if ($size != 0 && abs($size - intval($size)) < 0.01) { echo '<div class="clear"></div>'; } gdlr_print_column_wrapper($item); $size += gdlr_item_size_to_num($item['size']); } else { $size = 0; gdlr_print_item($item); echo '<div class="clear"></div>'; } } echo '<div class="clear"></div>'; echo '</div>'; // close wrapper }
function gdlr_print_full_size_wrapper($content) { $item_id = empty($content['option']['page-item-id']) ? '' : ' id="' . $content['option']['page-item-id'] . '" '; global $gdlr_spaces; $padding = !empty($content['option']['padding-top']) && $gdlr_spaces['top-full-wrapper'] != $content['option']['padding-top'] ? 'padding-top: ' . $content['option']['padding-top'] . '; ' : ''; $padding .= !empty($content['option']['padding-bottom']) && $gdlr_spaces['bottom-wrapper'] != $content['option']['padding-bottom'] ? 'padding-bottom: ' . $content['option']['padding-bottom'] . '; ' : ''; $border = ''; if (!empty($content['option']['border']) && $content['option']['border'] != 'none') { if ($content['option']['border'] == 'top' || $content['option']['border'] == 'both') { $border .= ' border-top: 4px solid ' . $content['option']['border-top-color'] . '; '; } if ($content['option']['border'] == 'bottom' || $content['option']['border'] == 'both') { $border .= ' border-bottom: 4px solid ' . $content['option']['border-bottom-color'] . '; '; } } $style = !empty($padding) || !empty($border) ? ' style="' . $padding . $border . '" ' : ''; echo '<div class="gdlr-full-size-wrapper" ' . $item_id . $style . ' >'; foreach ($content['items'] as $item) { if ($item['item-type'] == 'wrapper') { gdlr_print_column_wrapper($item); } else { gdlr_print_item($item); } } echo '<div class="clear"></div>'; echo '</div>'; // close wrapper }