'000000', 'border' => '333333', 'text' => 'b8babb', 'link' => '7f8e91', 'url' => '7f8e91' ); function piano_black_setup() { // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); // Enable the primary navigation menu register_nav_menus( array( 'primary' => __( 'Primary Navigation', 'piano-black' ), ) ); // Enable custom header image add_theme_support( 'custom-header', apply_filters( 'piano_black_custom_header_args', array( 'default-image' => '', 'default-text-color' => 'fff', 'width' => 951, 'height' => 160, 'wp-head-callback' => 'piano_black_header_style', 'admin-head-callback' => 'piano_black_admin_header_style', ) ) ); // Enable use of featured images as header images set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // Load theme options require_once( dirname( __FILE__ ) . '/inc/theme-options.php' ); add_theme_support( 'print-style' ); // Add support for custom backgrounds. add_theme_support( 'custom-background', apply_filters( 'piano_black_custom_background_args', array( 'default-color' => '393939', 'default-image' => get_template_directory_uri() . '/img/body-bg.gif', ) ) ); load_theme_textdomain( 'piano-black', get_template_directory() . '/languages' ); } add_action( 'after_setup_theme', 'piano_black_setup' ); /** * Enqueue scripts and styles */ function piano_black_scripts() { wp_enqueue_style( 'piano-black', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'piano_black_scripts' ); // Header style for front-end function piano_black_header_style() { if ( HEADER_TEXTCOLOR == get_header_textcolor() && '' == get_header_image() ) return; ?> Header function piano_black_admin_header_style() { $background_color = get_background_color(); if ( empty( $background_color ) ) $background_color = '000'; ?> comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">
    says:', 'piano-black' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    __( 'Sidebar 1', 'piano-black' ), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '

    ', 'after_title' => '

    ', ) ); } add_action( 'init', 'piano_black_widgets_init' ); // Get theme options with defaults as fallback function piano_black_get_theme_options() { $defaults = array( 'theme_rss' => 'yes', 'theme_search' => 'yes', ); $options = get_option( 'piano_black_theme_options', $defaults ); return $options; } /** * Adds theme-specific classes to the array of body classes. * For use with CSS layout. */ function piano_black_body_classes( $classes ) { if ( ! is_multi_author() ) { $classes[] = 'single-author'; } if ( is_page_template( 'full-width-page.php' ) || is_attachment() ) $classes[] = 'full-width-layout'; return $classes; } add_filter( 'body_class', 'piano_black_body_classes' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Piano Black 2.3.1 */ function piano_black_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'piano-black' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'piano_black_wp_title', 10, 2 ); /** * This theme was built with PHP, Semantic HTML, CSS, love, and a Toolbox. */