'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' ); /** * Let WordPress manage the document title. */ add_theme_support( 'title-tag' ); // 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' ); if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * * Included for backward compatibility with WordPress versions prior to 5.2. */ function wp_body_open() { do_action( 'wp_body_open' ); } endif; /** * 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 ( get_theme_support( 'custom-header', 'default-text-color' ) === 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( 'widgets_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' ); /** * This theme was built with PHP, Semantic HTML, CSS, love, and a Toolbox. */