tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // Enable featured images add_theme_support( 'post-thumbnails' ); add_image_size( 'blog_posts', 550, 380, false ); add_image_size( 'full_page', 1000, 550, false ); // Register our navigation areas register_nav_menus( array( 'header_top' => __( 'Header Top', 'advocator-lite' ), 'header_bottom' => __( 'Header Bottom', 'advocator-lite' ), 'footer' => __( 'Footer', 'advocator-lite' ), ) ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'aside', 'chat', 'quote', 'link', 'status' ) ); // Setup the WordPress core custom background feature. add_theme_support( 'custom-background', apply_filters( 'rescue_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => '', ) ) ); // Enable support for HTML5 markup. add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) ); } endif; // rescue_setup add_action( 'after_setup_theme', 'rescue_setup' ); /*----------------------------------------------------*/ /* WooCommerce /*----------------------------------------------------*/ function advocator_lite_woocommerce_support() { add_theme_support( 'woocommerce' ); } add_action( 'after_setup_theme', 'advocator_lite_woocommerce_support' ); /*----------------------------------------------------*/ /* Enable Shortcodes in Text Widgets /*----------------------------------------------------*/ add_filter('widget_text', 'do_shortcode'); /*----------------------------------------------------*/ /* Register widgetized areas /*----------------------------------------------------*/ function rescue_widgets_init() { register_sidebar( array( 'name' => __( 'Inner Pages', 'advocator-lite' ), 'id' => 'inner_sidebar', 'description' => __( 'Inner Pages Sidebar', 'advocator-lite' ), 'before_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Hero Area', 'advocator-lite' ), 'id' => 'home_slider', 'description' => __( 'Home Hero Area Sidebar', 'advocator-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Top Area', 'advocator-lite' ), 'id' => 'home_widgets_top', 'description' => __( 'Home Top Area Sidebar', 'advocator-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Left Area', 'advocator-lite' ), 'id' => 'home_left', 'description' => __( 'Home Left Area Sidebar', 'advocator-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Home Right Area', 'advocator-lite' ), 'id' => 'home_right', 'description' => __( 'Home Right Sidebar', 'advocator-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Left', 'advocator-lite' ), 'id' => 'footer_sidebar-1', 'description' => __( 'Footer Left Sidebar', 'advocator-lite' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Footer Middle', 'advocator-lite' ), 'id' => 'footer_sidebar-2', 'description' => __( 'Footer Middle Sidebar', 'advocator-lite' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); register_sidebar( array( 'name' => __( 'Footer Right', 'advocator-lite' ), 'id' => 'footer_sidebar-3', 'description' => __( 'Footer Right Sidebar', 'advocator-lite' ), 'before_widget' => '', 'before_title' => '
', 'after_title' => '
', ) ); } add_action( 'widgets_init', 'rescue_widgets_init' ); /*----------------------------------------------------*/ /* Foundation Setup /*----------------------------------------------------*/ if ( ! function_exists( 'advocator_lite_enqueue_foundation' ) ) : function advocator_lite_enqueue_foundation() { wp_enqueue_style( 'advocator-lite-foundation-style', get_template_directory_uri() . '/app.css' ); wp_enqueue_script( 'advocator-lite-foundation-js', get_template_directory_uri() . '/js/foundation.js', array( 'jquery' ), '5.4.7', true ); wp_enqueue_script( 'advocator-lite-modernizr', get_template_directory_uri() . '/js/vendor/modernizr.js', array(), '2.8.3', true ); } endif; // advocator_lite_enqueue_foundation add_action( 'wp_enqueue_scripts', 'advocator_lite_enqueue_foundation', 10 ); if ( ! function_exists( 'advocator_lite_admin_bar_nav' ) ) : // Fixes admin bar overlap function advocator_lite_admin_bar_nav() { if ( is_admin_bar_showing() ) { ?> has_children = !empty($children_elements[$element->ID]); $element->classes[] = ($element->current || $element->current_item_ancestor) ? 'active' : ''; $element->classes[] = ($element->has_children) ? 'has-dropdown' : ''; parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output); } function start_lvl(&$output, $depth = 0, $args = array()) { $output .= "\n