'00355F',
'border' => '246192',
'text' => 'D4E7F7',
'link' => '87B2D8',
'url' => '4E8ABE'
);
// Widgets
register_sidebar( array(
'name' => __( 'Sidebar', 'andrea' ),
'id' => 'sidebar-1',
'description' => __( 'The sidebar widget area', 'andrea' ),
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
) );
// Feeds
add_theme_support( 'automatic-feed-links' );
// Custom navigation menu
register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'andrea' ),
) );
// Custom background
add_theme_support( 'custom-background' );
add_theme_support( 'print-style' );
}
add_action( 'after_setup_theme', 'andrea_setup' );
/**
* Enqueue scripts and styles
*/
function andrea_scripts() {
wp_enqueue_style( 'andrea', get_stylesheet_uri() );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'andrea_scripts' );
/**
* Implement the Custom Header feature
*/
require( get_template_directory() . '/inc/custom-header.php' );
/**
* Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
*/
function andrea_page_menu_args( $args ) {
$args['show_home'] = true;
return $args;
}
add_filter( 'wp_page_menu_args', 'andrea_page_menu_args' );
/**
*Changed wp_page_menu structure to get rid of the wrapped div and add menu_class arguments to
*/
function andrea_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('/^
/i', '', $new_markup);
return $new_markup;
}
add_filter('wp_page_menu', 'andrea_add_menu_class');
// Load theme options
require_once( get_template_directory() . '/inc/theme-options.php' );
function andrea_comment( $comment, $args, $depth ) {
// Based on Twenty Ten comments
$GLOBALS['comment'] = $comment; ?>
comment_type, array( '', 'comment' ), true ) ) : ?>
- id="comment-">
comment_approved == '0' ) : ?>
$depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
-
'flexible-width',
);
$options = get_option( 'andrea_theme_options', $defaults );
return $options;
}
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @since Andrea 0.4
*/
function andrea_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', 'andrea' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'andrea_wp_title', 10, 2 );
/*
* Load Jetpack compatibility file.
*/
require( get_template_directory() . '/inc/jetpack.php' );