'ffffff',
'text' => '565654',
'link' => '1177aa',
'border' => 'f5f5ef',
'url' => '66bbdd',
);
$content_width = 500;
function fauna_body_class( $classes, $class ) {
return $class;
}
add_filter( 'body_class', 'fauna_body_class', 1, 2 );
register_sidebar( array(
'name' => __('Sidebar'),
'id' => 'sidebar',
'before_widget' => '',
'after_widget' => '',
'before_title' => '
',
'after_title' => '
' )
);
add_theme_support( 'automatic-feed-links' );
// Custom background
add_custom_background();
add_theme_support( 'print-style' );
/**
* Enqueue scripts and styles
*/
function fauna_scripts() {
wp_enqueue_style( 'fauna', get_stylesheet_uri() );
wp_enqueue_style( 'fauna-default', get_template_directory_uri() . '/fauna-default.css', array( 'fauna' ) );
wp_enqueue_script( 'fauna', get_template_directory_uri() . '/meta/scripts.js', array(), false, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
wp_enqueue_script( 'comment-reply' );
}
add_action( 'wp_enqueue_scripts', 'fauna_scripts' );
function fauna_custom_background() {
if ( '' != get_background_color() && '' == get_background_image() ) { ?>
__( 'Primary Navigation', 'fauna' )
) );
// Fallback for primary navigation
function fauna_page_menu() { ?>
slug;
} else {
$name = $parent->name;
}
if ( 0 !== $id->parent ) {
$cat_parents = get_category_parents( $parent->parent, $link, $separator, $nicename );
}
if ( $parent->parent && ! is_wp_error( $cat_parents ) )
$chain .= $cat_parents;
if ($link) {
$chain .= 'name) . '">'."♥".'' . $separator;
} else {
$chain .= $name.$separator;
}
return $chain;
}
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @since Fauna 1.0
*/
function fauna_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', 'fauna' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'fauna_wp_title', 10, 2 );
function fauna_trackback( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
if ( $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) {
?>
');
} ?>
comment_author; ?>
comment_date_gmt . " GMT")), time()) . " ago";
} else { ?>
,
Edit This' ) );
}
}
function fauna_comment($comment, $args, $depth) {
$even = "comment-even";
$odd = "comment-odd";
$author = "comment-author";
$bgcolor = $even;
$class = '';
$GLOBALS['comment'] = $comment;
if ($comment->comment_type != "trackback" && $comment->comment_type != "pingback") {
if( $odd == $bgcolor) { $bgcolor = $even; } else { $bgcolor = $odd; }
/* Assign .comment-author CSS class to weblog administrator */
$is_author = false;
if($comment->comment_author_email == get_option('admin_email')) {
$is_author = true;
}
?>