__( 'Sidebar', 'blogauthor' ), 'id' => 'sidebar-1', 'description' => __( 'The sidebar will display any widgets that are added to this region.', 'blogauthor' ), ); $sidebar_args['offcanvas_sidebar'] = array( 'name' => __( 'Offcanvas Widget', 'blogauthor' ), 'id' => 'blogauthor-offcanvas-widget', 'description' => __( 'Any widgets that are placed in this area will be displayed on the offcanvas sidebar.', 'blogauthor' ), ); $enable_sticky_widget_area = blogauthor_get_option( 'enable_sticky_widget_area'); if ($enable_sticky_widget_area) { $sidebar_args['sticky_widget_area'] = array( 'name' => __( 'Navigation Sticky Widget', 'blogauthor' ), 'id' => 'blogauthor-navigation-widget', 'description' => __( 'Any widgets that are placed in this area will be displayed below navigation area', 'blogauthor' ), ); } /*Get homepage sidebar option from the customizer*/ $front_page_enable_sidebar = blogauthor_get_option('front_page_enable_sidebar'); if($front_page_enable_sidebar){ $sidebar_args['homepage_sidebar'] = array( 'name' => __( 'Homepage Sidebar', 'blogauthor' ), 'id' => 'home-page-sidebar', 'description' => __( 'The widgets added to this region will only be visible on the sidebar of the homepage.', 'blogauthor' ), ); } $sidebar_args['above_footer'] = array( 'name' => __( 'Footer Fullwidth', 'blogauthor' ), 'id' => 'fullwidth-footer-widgetarea', 'description' => __( 'Widgets added to this region will appear above the footer.', 'blogauthor' ), ); /*Get the footer column from the customizer*/ $footer_column_layout = blogauthor_get_option('footer_column_layout'); if($footer_column_layout){ switch ($footer_column_layout) { case "footer_layout_1": $footer_column = 4; break; case "footer_layout_2": case "footer_layout_5": $footer_column = 3; break; case "footer_layout_3": case "footer_layout_4": case "footer_layout_6": $footer_column = 2; break; default: $footer_column = 4; } }else{ $footer_column = 4; } $cols = intval( apply_filters( 'blogauthor_footer_widget_columns', $footer_column ) ); for ( $j = 1; $j <= $cols; $j++ ) { $footer = sprintf( 'footer_%d', $j ); $footer_region_name = sprintf( __( 'Footer Column %1$d', 'blogauthor' ), $j ); $footer_region_description = sprintf( __( 'Widgets added here will appear in column %1$d of the footer.', 'blogauthor' ), $j ); $sidebar_args[ $footer ] = array( 'name' => $footer_region_name, 'id' => sprintf( 'footer-%d', $j ), 'description' => $footer_region_description, ); } $sidebar_args = apply_filters( 'blogauthor_sidebar_args', $sidebar_args ); foreach ( $sidebar_args as $sidebar => $args ) { $widget_tags = array( 'before_widget' => '
', 'before_title' => '