__( 'Primary Menu', 'albinomouse' ), ) ); // Add support for the Aside Post Formats add_theme_support( 'post-formats', array( 'aside', 'gallery', 'image', 'link', 'quote', 'video' ) ); } endif; // albinomouse_setup add_action( 'after_setup_theme', 'albinomouse_setup' ); /** * Register widgetized area and update sidebar with default widgets * @since AlbinoMouse 1.0 */ function albinomouse_widgets_init() { $options = get_option( 'albinomouse' ); register_sidebar( array( 'name' => __( 'Header', 'albinomouse' ), 'id' => 'header-widgets', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); if ($options['sidebar-layout'] != '1col') { register_sidebar( array( 'name' => __( 'Sidebar', 'albinomouse' ), 'id' => 'sidebar-widgets', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ($options['footer-layout']) { register_sidebar( array( 'name' => __( 'Footer 1', 'albinomouse' ), 'id' => 'footer-1-widget', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ($options['footer-layout'] == '2col' || $options['footer-layout'] == '3col' || $options['footer-layout'] == '4col') { register_sidebar( array( 'name' => __( 'Footer 2', 'albinomouse' ), 'id' => 'footer-2-widget', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ($options['footer-layout'] == '3col' || $options['footer-layout'] == '4col') { register_sidebar( array( 'name' => __( 'Footer 3', 'albinomouse' ), 'id' => 'footer-3-widget', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ($options['footer-layout'] == '4col') { register_sidebar( array( 'name' => __( 'Footer 4', 'albinomouse' ), 'id' => 'footer-4-widget', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } } add_action( 'widgets_init', 'albinomouse_widgets_init' ); /** * Enqueue scripts and styles * @since AlbinoMouse 1.0 */ function albinomouse_s() { wp_enqueue_style( 'style', get_stylesheet_uri() ); wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'albinomouse_s' ); /** * Enqueue stylesheet for Google web fonts * This function is attached to the wp_head action hook. * @since AlbinoMouse 1.0 */ function albinomouse_google_web_fonts() { $options = get_option( 'albinomouse' ); if ($options['title_font'] == 'Anton') { wp_enqueue_style( 'Anton', 'http://fonts.googleapis.com/css?family=Anton' ); } if ($options['title_font'] == 'Bitter') { wp_enqueue_style( 'Bitter', 'http://fonts.googleapis.com/css?family=Bitter' ); } if ($options['title_font'] == 'Droid Sans' || $options['general_font'] == 'Droid Sans') { wp_enqueue_style( 'DroidSans', 'http://fonts.googleapis.com/css?family=Droid+Sans:400,700' ); } if ($options['title_font'] == 'Droid Serif' || $options['general_font'] == 'Droid Serif') { wp_enqueue_style( 'DroidSerif', 'http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' ); } if ($options['title_font'] == 'Open Sans' || $options['general_font'] == 'Open Sans') { wp_enqueue_style( 'OpenSans', 'http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' ); } if ($options['title_font'] == 'Source Sans Pro' || $options['general_font'] == 'Source Sans Pro') { wp_enqueue_style( 'SourceSansPro', 'http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic' ); } if ($options['title_font'] == 'Ubuntu' || $options['general_font'] == 'Ubuntu') { wp_enqueue_style( 'Ubuntu', 'http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic' ); } if ($options['title_font'] == 'Yanone Kaffeesatz') { wp_enqueue_style( 'YanoneKaffeesatz', 'http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' ); } } add_action( 'wp_enqueue_scripts', 'albinomouse_google_web_fonts' ); /** * Add a style block with some configurations of the theme options. * This function is attached to the wp_head action hook. * @since AlbinoMouse 1.0 */ function albinomouse_add_custom_styles() { $options = get_option( 'albinomouse' ); $link_color = $options['link_footer_color']; $header_bg = $options['header-background']; $footer_cols = $options['footer-layout']; ?>