'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' ) { ?> <li><a name="comment-<?php comment_ID(); ?>" href="<?php echo esc_url( $comment->comment_author_url ); ?>"> <?php if ( function_exists( 'comment_favicon' ) ) { comment_favicon( $before='<img src="', $after='" alt="" class="trackback-avatar" />'); } ?> <strong><u><?php echo $comment->comment_author; ?></u></strong> <small> <?php comment_type(__('commented'), __('trackbacked'), __('pingbacked')); ?> <?php _e('on') ?> <?php if (function_exists('time_since')) { echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " ago"; } else { ?> <?php comment_date(); ?>, <?php comment_time(); } ?> </small> </a> </li> <?php edit_comment_link( __( '<li>Edit This</li>' ) ); } } 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; } ?> <li id="comment-<?php comment_ID() ?>" <?php if ($is_author == true) { $class .= ' '.$author; } else { $class .= ' '.$bgcolor; }?> <?php comment_class( $class ); ?>> <div class="comment-body"> <div class="comment-header"> <?php if (function_exists('comment_favicon')) { ?><a href="<?php echo( esc_url( $comment->comment_author_url ) ); ?>" title="Visit <?php echo( esc_attr( $comment->comment_author ) ); ?>"><?php comment_favicon($before='<img src="', $after='" alt="" class="comment-avatar" />'); ?></a><?php } ?> <?php echo get_avatar( $comment, 48 ); ?> <em><a href="#comment-<?php echo( esc_attr( $comment->comment_ID ) ) ?>" title="<?php esc_attr_e( 'Permanent link to this comment', 'fauna' ); ?>"><?php esc_attr_e( '*', 'fauna' ); ?></a></em> <strong><?php comment_author_link(); ?></strong> <?php if ( function_exists( 'comment_subscription_status' ) ) { if (comment_subscription_status()) { ?><?php _e('(subscribed to comments)', 'fauna' ) ?><?php }} ?> <?php _e( 'says:', 'fauna' ) ?> <?php if ($comment->comment_approved == '0') : ?> <small><?php _e('Your comment is awaiting moderation. This is just a spam counter-measure, and will only happen the first time you post here. Your comment will be approved as soon as possible.', 'fauna' ) ?></small> <?php endif; ?> </div> <?php comment_text() ?> <?php echo comment_reply_link(array('depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => ' | ')) ?> <small> <?php _e( 'Posted', 'fauna' ) ?> <?php if (function_exists('time_since')) { echo time_since(abs(strtotime($comment->comment_date_gmt . " GMT")), time()) . " ago"; } else { ?> <?php comment_date(); ?>, <?php comment_time(); } ?> <?php } ?> <?php edit_comment_link( __( "Edit This", 'fauna' ), ' | ' ); ?> </small> </div> </li> <?php }