'ffffff', 'text' => '000000', 'link' => '4f998d', 'border' => '322f28', 'url' => 'ae1f10', ); add_theme_support( 'print-style' ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'rusty-grunge' ), ) ); function toolbox_css_body_class( $classes ) { global $post; if ( is_page() || is_single() ) $classes[] = sanitize_title_with_dashes ( get_the_title( $post->ID ) ); return $classes; } add_filter( 'body_class', 'toolbox_css_body_class' ); /** * Custom Header Image. */ add_theme_support( 'custom-header', apply_filters( 'rustygrunge_custom_header_args', array( 'default-image' => '', 'default-text-color' => '', 'width' => 658, 'height' => 240, 'header-text' => false, 'wp-head-callback' => '', 'admin-head-callback' => 'rustygrunge_admin_header_style', ) ) ); function rustygrunge_admin_header_style() { ?> '322F28', 'default-image' => get_template_directory_uri() . '/images/bg-body.jpg' ) ) ); /** * Add default posts and comments RSS feed links to head */ add_theme_support( 'automatic-feed-links' ); /** * Add support for the Aside and Gallery Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'gallery', 'quote', 'status' ) ); /** * Enqueue scripts and styles */ function rustygrunge_scripts() { wp_enqueue_style( 'rustygrunge', get_stylesheet_uri() ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action( 'wp_enqueue_scripts', 'rustygrunge_scripts' ); /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ function toolbox_page_menu_args($args) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'toolbox_page_menu_args' ); /** * Register widgetized area and update sidebar with default widgets */ function toolbox_widgets_init() { register_sidebar( array ( 'name' => __( 'Sidebar 1', 'rusty-grunge' ), 'id' => 'sidebar-1', 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array ( 'name' => __( 'Sidebar 2', 'rusty-grunge' ), 'id' => 'sidebar-2', 'description' => __( 'An optional second sidebar area', 'rusty-grunge' ), 'before_widget' => '", 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'init', 'toolbox_widgets_init' ); if ( ! function_exists( 'toolbox_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own toolbox_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Toolbox 0.4 */ function toolbox_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : ?>
  • id="li-comment-">
    says:', 'rusty-grunge' ), sprintf( '%s', get_comment_author_link() ) ); ?>
    comment_approved == '0' ) : ?>
    $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    tag based on what is being viewed. * * @since Rusty Grunge 1.2 */ function rustygrunge_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', 'rusty-grunge' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'rustygrunge_wp_title', 10, 2 ); /** * This theme was built with PHP, Semantic HTML, CSS, love, and a Toolbox. */