'', 'class' =>'', 'background_color' =>'', 'background_image' =>'', 'background_repeat' =>'', 'background_position' =>'', 'background_parallax' =>'', 'border_size' =>'', 'border_color' =>'', 'border_style' =>'', 'padding_top' =>'', 'padding_bottom' =>'', 'padding_left' =>'', 'padding_right' =>'', 'contents_in_container' =>'yes', 'top_separator' => '', 'bottom_separator' => '', 'full_height' => '' ), $args ); extract( $defaults ); self::$args = $defaults; $add_class = uniqid('section-'); $class .= ' '.$add_class; $css_style = ''; $container = ''; if( $contents_in_container == 'yes' ) $container = 'container'; else $container = 'container-fullwidth'; if( is_numeric($border_size) ) $border_size = $border_size.'px'; if( is_numeric($padding_top) ) $padding_top = $padding_top.'px'; if( is_numeric($padding_bottom) ) $padding_bottom = $padding_bottom.'px'; if( is_numeric($padding_left) ) $padding_left = $padding_left.'px'; if( is_numeric($padding_right) ) $padding_right = $padding_right.'px'; $top_separator_html = ''; $bottom_separator_html = ''; switch( $top_separator ){ case "triangle": $top_separator_html = '
'; break; case "doublediagonal": $top_separator_html = '
'; break; case "halfcircle": $top_separator_html = '
'; break; case "bigtriangle": if( $background_color ): $top_separator_html .= ' '; endif; $top_separator_html .= '
'; break; case "bighalfcircle": if( $background_color ): $top_separator_html .= ' '; endif; $top_separator_html .= '
'; break; case "curl": if( $background_color ): $top_separator_html .= ''; endif; $top_separator_html .= '
'; break; case "multitriangles": if( $background_color ): $top_separator_html .= ''; endif; $top_separator_html .= '
'; break; case "roundedsplit": $top_separator_html = '
'; break; case "boxes": if( $background_color ): $top_separator_html .= ''; endif; $top_separator_html .= '
'; break; case "zigzag": if( $background_color ): $top_separator_html .= ''; endif; $top_separator_html .= '
'; break; case "clouds": if( $background_color ): $top_separator_html .= ''; endif; $top_separator_html .= '
'; break; } switch( $bottom_separator ){ case "triangle": $bottom_separator_html = '
'; break; case "halfcircle": $bottom_separator_html = '
'; break; case "bigtriangle": if( $background_color ): $bottom_separator_html = ''; endif; $bottom_separator_html .= '
'; break; case "bighalfcircle": if( $background_color ): $bottom_separator_html = ' '; endif; $bottom_separator_html .= '
'; break; case "curl": if( $background_color ): $bottom_separator_html .= ''; endif; $bottom_separator_html .= '
'; break; case "multitriangles": if( $background_color ): $bottom_separator_html .= ''; endif; $bottom_separator_html .= '
'; break; case "roundedcorners": $bottom_separator_html = '
'; break; case "foldedcorner": $bottom_separator_html = '
'; break; case "boxes": if( $background_color ): $bottom_separator_html .= ''; endif; $bottom_separator_html .= '
'; break; case "zigzag": if( $background_color ): $bottom_separator_html .= ''; endif; $bottom_separator_html .= '
'; break; case "stamp": if( $background_color ): $bottom_separator_html .= ''; endif; $bottom_separator_html .= '
'; break; } if( $background_color ) $css_style .= '.'.$add_class.'{ background-color:'.esc_attr($background_color).';}'; if( $background_image ) $css_style .= '.'.$add_class.'{ background-image: url('.esc_url($background_image).');}'; if( $background_repeat ) $css_style .= '.'.$add_class.'{ background-repeat:'.esc_attr($background_repeat).'; }'; if( $background_position ) $css_style .= '.'.$add_class.'{ background-position :'.esc_attr($background_position).';}'; if( $border_size ) $css_style .= '.'.$add_class.'{ border-size :'.esc_attr($border_size).';}'; if( $border_color ) $css_style .= '.'.$add_class.'{ border-color :'.esc_attr($border_color).';}'; if( $border_style ) $css_style .= '.'.$add_class.'{ border-style :'.esc_attr($border_style).';}'; if( $padding_top ) $css_style .= '.'.$add_class.'{ padding-top :'.esc_attr($padding_top).';}'; if( $padding_bottom ) $css_style .= '.'.$add_class.'{ padding-bottom :'.esc_attr($padding_bottom).';}'; if( $padding_left ) $css_style .= '.'.$add_class.'{ padding-left :'.esc_attr($padding_left).';}'; if( $padding_right ) $css_style .= '.'.$add_class.'{ padding-right :'.esc_attr($padding_right).';}'; if( $background_parallax == 'yes' ) $class .= ' parallax-scrolling'; $styles = sprintf( '',$css_style); $content = do_shortcode( Magee_Core::fix_shortcodes($content)); $html = ''; if( $top_separator == 'triangle' ){ if ( $full_height == 'yes'): $html .= sprintf('%s
%s
%s
%s
',$styles,esc_attr($class),esc_attr($id),$top_separator_html,$container,$content,$bottom_separator_html); else: $html .= sprintf('%s
%s
%s
%s
',$styles,esc_attr($class),esc_attr($id),$top_separator_html,$container,$content,$bottom_separator_html); endif; }else{ if ( $full_height == 'yes'): $html .= sprintf('%s
%s
%s %s
',$styles,esc_attr($class),esc_attr($id),$container,$content,$top_separator_html,$bottom_separator_html); else: $html .= sprintf('%s
%s
%s %s
',$styles,esc_attr($class),esc_attr($id),$container,$content,$top_separator_html,$bottom_separator_html); endif; } return $html; } } new Magee_Section(); endif;