__( 'Primary Navigation', 'woothemes' ), ) ); // Thumbnails add_theme_support( 'post-thumbnails', array( 'post' ) ); set_post_thumbnail_size( 490, 200, true ); // Add support for the aside post format add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); $options = get_option('bueno_theme_options'); if ( ! isset( $options['colorscheme'] ) ) { $colorscheme = 'default'; } else { $colorscheme = esc_attr( strtolower( $options['colorscheme'] ) ); } // This theme allows users to set a custom background add_theme_support( 'custom-background', apply_filters( 'bueno_custom_background_args', array( 'default-color' => 'ffffff', 'default-image' => get_template_directory_uri() . '/styles/' . $colorscheme . '/bodytile.jpg', ) ) ); add_theme_support( 'print-style' ); /** * Enqueue scripts and styles */ function bueno_scripts() { wp_enqueue_style( 'bueno', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'bueno_scripts' ); // Allow custom colors to clear the background image function bueno_custom_background_color() { if ( get_background_image() == '' && get_background_color() != '' ) { ?> '', 'default-text-color' => '000', 'width' => 930, 'height' => 198, 'flex-height' => true, 'wp-head-callback' => 'bueno_header_style', 'admin-head-callback' => 'bueno_admin_header_style', ) ) ); /** * Styles the header image and text displayed on the blog * */ function bueno_header_style() { // If no custom options for text are set, let's bail if ( HEADER_TEXTCOLOR == get_header_textcolor() ) return; // If we get this far, we have custom styles. Let's do this. ?> post_parent ) { $attachments = array_values(get_children( array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID') )); foreach ( $attachments as $k => $attachment ) if ( $attachment->ID == $post->ID ) break; $k = $k + 1; if ( isset($attachments[$k]) ) { return get_attachment_link($attachments[$k]->ID); } else { return get_permalink($post->post_parent); } } } endif; // Load the theme options page require_once ( get_template_directory() . '/includes/options-page.php' ); function theme_alt_styles() { $options = get_option('bueno_theme_options'); if ( ! isset( $options['colorscheme'] ) ) { echo ''."\n"; } else { echo ''."\n"; } } add_action('wp_head', 'theme_alt_styles', 9); // Filter wp_nav_menu() to add homelink and rsslink function bueno_nav_menu_items($items) { $options = get_option('bueno_theme_options'); if ( ! is_front_page()) { $highlight = "page_item"; } else {$highlight = "page_item current_page_item"; } $homelink = '