__( 'Main Menu', 'albar' ), 'header-bar-menu' => __( 'Header Bar Menu (Header Layout Two)', 'albar' ) ) ); add_theme_support('post-thumbnails'); if ( function_exists( 'add_image_size' ) ) { add_image_size('blog_standard_img', 580, 380, true ); } // The custom header is used for the logo add_theme_support('custom-header', array( 'default-image' => get_template_directory_uri() . '/images/albar_logo.png', 'width' => 300, 'height' => 110, 'flex-width' => true, 'flex-height' => true, 'header-text' => false, )); add_editor_style(); /** * Enable support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); add_theme_support( 'custom-background', array( 'default-color' => '#ffffff', ) ); add_theme_support( 'woocommerce' ); } endif; // kaira_setup add_action( 'after_setup_theme', 'alba_setup_theme' ); /** * Register widgetized area and update sidebar with default widgets */ function alba_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'albar' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name' => __('Alba Footer', 'albar'), 'id' => 'site-footer', )); register_widget( 'alba_banner' ); register_widget( 'alba_carousel' ); register_widget( 'alba_heading' ); register_widget( 'alba_icon' ); } add_action( 'widgets_init', 'alba_widgets_init' ); if(!function_exists('alba_footer_widget_params')): /** * Set the widths of the footer widgets * * @param $params * @return mixed * * @filter dynamic_sidebar_params */ function alba_footer_widget_params($params){ // Check that this is the footer if($params[0]['id'] != 'site-footer') return $params; $sidebars_widgets = wp_get_sidebars_widgets(); $count = count($sidebars_widgets[$params[0]['id']]); $params[0]['before_widget'] = preg_replace('/\>$/', ' style="width:'.round(100/$count,4).'%" >', $params[0]['before_widget']); return $params; } endif; add_filter('dynamic_sidebar_params', 'alba_footer_widget_params'); function alba_print_styles(){ global $cx_framework_options; $custom_css = $cx_framework_options['cx-options-custom-css']; $primary_color = $cx_framework_options['cx-options-primary-color']; $primary_color_hover = $cx_framework_options['cx-options-primary-hover-color']; ?> '; } function alba_wrap_woocommerce_end() { echo ''; } /** * Add Alba WP Updates code. */ require get_template_directory() . '/wp-updates-theme.php'; new WPUpdatesThemeUpdater_960( 'http://wp-updates.com/api/2/theme', basename( get_template_directory() ) );