]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyeleven/functions.php
Wordpress 3.5
[autoinstalls/wordpress.git] / wp-content / themes / twentyeleven / functions.php
index e9d97ed2765a63742a951bc8dba0eccddf888467..1fc8e659e7840dc4a8a1769558a2dff7bbf33d15 100644 (file)
@@ -101,7 +101,7 @@ function twentyeleven_setup() {
        if ( 'dark' == $theme_options['color_scheme'] )
                $default_background_color = '1d1d1d';
        else
-               $default_background_color = 'f1f1f1';
+               $default_background_color = 'e2e2e2';
 
        // Add support for custom backgrounds.
        add_theme_support( 'custom-background', array(
@@ -131,7 +131,7 @@ function twentyeleven_setup() {
                // Callback used to display the header preview in the admin.
                'admin-preview-callback' => 'twentyeleven_admin_header_image',
        );
-       
+
        add_theme_support( 'custom-header', $custom_header_support );
 
        if ( ! function_exists( 'get_custom_header' ) ) {
@@ -221,7 +221,7 @@ function twentyeleven_header_style() {
        // If no custom options for text are set, let's bail.
        if ( $text_color == HEADER_TEXTCOLOR )
                return;
-               
+
        // If we get this far, we have custom styles. Let's do this.
        ?>
        <style type="text/css">
@@ -337,12 +337,14 @@ function twentyeleven_excerpt_length( $length ) {
 }
 add_filter( 'excerpt_length', 'twentyeleven_excerpt_length' );
 
+if ( ! function_exists( 'twentyeleven_continue_reading_link' ) ) :
 /**
  * Returns a "Continue Reading" link for excerpts
  */
 function twentyeleven_continue_reading_link() {
        return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';
 }
+endif; // twentyeleven_continue_reading_link
 
 /**
  * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().
@@ -373,7 +375,8 @@ add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
  * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
  */
 function twentyeleven_page_menu_args( $args ) {
-       $args['show_home'] = true;
+       if ( ! isset( $args['show_home'] ) )
+               $args['show_home'] = true;
        return $args;
 }
 add_filter( 'wp_page_menu_args', 'twentyeleven_page_menu_args' );
@@ -442,11 +445,11 @@ if ( ! function_exists( 'twentyeleven_content_nav' ) ) :
 /**
  * Display navigation to next/previous pages when applicable
  */
-function twentyeleven_content_nav( $nav_id ) {
+function twentyeleven_content_nav( $html_id ) {
        global $wp_query;
 
        if ( $wp_query->max_num_pages > 1 ) : ?>
-               <nav id="<?php echo $nav_id; ?>">
+               <nav id="<?php echo esc_attr( $html_id ); ?>">
                        <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
                        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>
                        <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?></div>
@@ -538,7 +541,7 @@ function twentyeleven_comment( $comment, $args, $depth ) {
                                                /* translators: 1: comment author, 2: date and time */
                                                printf( __( '%1$s on %2$s <span class="says">said:</span>', 'twentyeleven' ),
                                                        sprintf( '<span class="fn">%s</span>', get_comment_author_link() ),
-                                                       sprintf( '<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>',
+                                                       sprintf( '<a href="%1$s"><time datetime="%2$s">%3$s</time></a>',
                                                                esc_url( get_comment_link( $comment->comment_ID ) ),
                                                                get_comment_time( 'c' ),
                                                                /* translators: 1: date, 2: time */
@@ -578,7 +581,7 @@ if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
  * @since Twenty Eleven 1.0
  */
 function twentyeleven_posted_on() {
-       printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
+       printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>', 'twentyeleven' ),
                esc_url( get_permalink() ),
                esc_attr( get_the_time() ),
                esc_attr( get_the_date( 'c' ) ),