'page-header-'.rand(), 'class' => '', 'visibility' => '', // Layout 'height' => '', 'height__sm' => '', 'height__md' => '', 'margin' => '', 'margin__sm' => '', 'margin__md' => '', 'style' => 'featured', // divided / simple / normal / featured. 'align' => 'left', 'v_align' => 'center', 'type' => 'breadcrumbs', // none / breadcrumbs / subnav / onpage 'depth' => '', 'parallax' => '', 'parallax_text' => '', 'sticky' => '', // WIP // Text 'text_color' => 'light', // Background 'bg' => '', 'bg_color' => '', 'bg_overlay' => '', 'bg_overlay__sm' => '', 'bg_overlay__md' => '', 'bg_pos' => '', 'bg_size' => '', // Titles 'show_title' => true, 'title' => '', 'title_size' => '', 'title_case' => '', 'sub_title' => '', // Element 'nav_size' => '', 'nav_style' => 'line', 'nav_case' => 'uppercase', // Show share 'share' => '', ), $atts); extract( $atts ); $classes = array(); $container_classes = array( "align-{$v_align}" ); $subtitle_classes = array(); $content_classes = array(); if( $class ) $classes[] = $class; if( $visibility ) $classes[] = $visibility; if ($text_color == 'light') $classes[] = 'dark'; if ($text_color == 'dark') $classes[] = 'light'; if ( $style ) { $classes[] = $style . '-title'; if ( $style == 'featured' ) { // $classes[] = 'dark nav-dark'; if ( ! $bg ) $bg = get_post_thumbnail_id(); } } // Title $title_classes = array(); if ( $title_case ) $title_classes[] = $title_case; if ( $title_size ) $title_classes[] = 'is-' . $title_size; if ( $parallax || $parallax_text ) $classes[] = 'has-parallax'; // Get default page title if ( ! $title ) $title = get_the_title(); // Depth if ( $depth ) $classes[] = 'box-shadow-'.$depth; // Nav style $nav_class = array('sm-touch-scroll'); if ( $nav_size ) $nav_class[] = 'nav-size-'.$nav_size; if ( $nav_style ) $nav_class[] = 'nav-'.$nav_style; if ( $nav_case ) $nav_class[] = 'nav-'.$nav_case; if ( $align ) $nav_class[] = 'text-'.$align.' nav-'.$align; $nav_class = implode(' ', $nav_class); // Parallax text if ( $parallax_text ) { $parallax_text = 'data-parallax-fade="true" data-parallax="-' . $parallax_text . '"'; } // Bg fix $atts['bg'] = $bg; // Add Content ob_start(); // Breadcrumbs if ( $type == 'breadcrumbs' ) { echo '
'; } else if ( $type == 'subnav' ) { get_flatsome_subnav( $nav_class ); } else if ( $type == 'onpage' ) { echo ' '; } else if ( $type == 'share' ) { echo '