__( 'Primary Navigation', 'woothemes' ), ) ); // This theme allows users to set a custom background add_theme_support( 'custom-background' ); // Add a way for the custom header to be styled in the admin panel that controls // custom headers. See morningafter_admin_header_style(), below. add_theme_support( 'custom-header', apply_filters( 'morningafter_custom_header_args', array( 'default-image' => '%s/images/headers/book.png', 'header-text' => false, 'width' => apply_filters( 'morningafter_header_image_width', 960 ), 'height' => apply_filters( 'morningafter_header_image_height', 70 ), 'admin-head-callback' => 'morningafter_admin_header_style', ) ) ); // ... and thus ends the changeable header business. // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI. register_default_headers( array ( 'book' => array ( 'url' => '%s/images/headers/book.png', 'thumbnail_url' => '%s/images/headers/book_thumb.png', 'description' => __( 'Book', 'woothemes' ) ), 'sky' => array ( 'url' => '%s/images/headers/sky.png', 'thumbnail_url' => '%s/images/headers/sky_thumb.png', 'description' => __( 'Sky', 'woothemes' ) ), 'road' => array ( 'url' => '%s/images/headers/road.png', 'thumbnail_url' => '%s/images/headers/road_thumb.png', 'description' => __( 'Road', 'woothemes' ) ) ) ); // Set the thumbnail size used in Featured Posts in home page $morningafter_options = morningafter_get_theme_options(); $thumb_size = $morningafter_options['featured_thumb']; add_image_size( 'featured_thumbnail', $thumb_size, $thumb_size, true ); } endif; if ( ! function_exists( 'morningafter_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * * @since 3.0.0 */ function morningafter_admin_header_style() { ?> function morningafter_add_menu_class ( $page_markup ) { preg_match( '/^
/i', $page_markup, $matches ); $divclass = $matches[1]; $toreplace = array( '
', '
' ); $new_markup = str_replace( $toreplace, '', $page_markup ); $new_markup = preg_replace( '/^