twentyeleven_continue_reading_link

Definition:
function twentyeleven_continue_reading_link() {}

Returns a "Continue Reading" link for excerpts

Source code

function twentyeleven_continue_reading_link() {

	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) . '</a>';

}

14723

twentyeleven_content_nav

Definition:
function twentyeleven_content_nav( $nav_id ) {}

Display navigation to next/previous pages when applicable

Parameters

  • $nav_id

Source code

function twentyeleven_content_nav( $nav_id ) {

	global $wp_query;



	if ( $wp_query->max_num_pages > 1 ) : ?>

		<nav id="<?php echo $nav_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>

		</nav><!-- #nav-above -->

	<?php endif;

}

14721

twentyeleven_comment

Definition:
function twentyeleven_comment( $comment, $args, $depth ) {}

Template for comments and pingbacks.
To override this walker in a child theme without modifying the comments template simply create your own twentyeleven_comment(), and that function will be used instead.

Parameters

  • $comment
  • $args
  • $depth

Source code

function twentyeleven_comment( $comment, $args, $depth ) {

	$GLOBALS['comment'] = $comment;

	switch ( $comment->comment_type ) :

		case 'pingback' :

		case 'trackback' :

	?>

	<li class="post pingback">

		<p><?php _e( 'Pingback:', 'twentyeleven' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?></p>

	<?php

			break;

		default :

	?>

	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">

		<article id="comment-<?php comment_ID(); ?>" class="comment">

			<footer class="comment-meta">

				<div class="comment-author vcard">

					<?php

						$avatar_size = 68;

						if ( '0' != $comment->comment_parent )

							$avatar_size = 39;



						echo get_avatar( $comment, $avatar_size );



						/* 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>',

								esc_url( get_comment_link( $comment->comment_ID ) ),

								get_comment_time( 'c' ),

								/* translators: 1: date, 2: time */

								sprintf( __( '%1$s at %2$s', 'twentyeleven' ), get_comment_date(), get_comment_time() )

							)

						);

					?>



					<?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>

				</div><!-- .comment-author .vcard -->



				<?php if ( $comment->comment_approved == '0' ) : ?>

					<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>

					<br />

				<?php endif; ?>



			</footer>



			<div class="comment-content"><?php comment_text(); ?></div>



			<div class="reply">

				<?php comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply <span>&darr;</span>', 'twentyeleven' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>

			</div><!-- .reply -->

		</article><!-- #comment-## -->



	<?php

			break;

	endswitch;

}

14719

twentyeleven_color_schemes

Definition:
function twentyeleven_color_schemes() {}

Returns an array of color schemes registered for Twenty Eleven.

Defined filters

  • twentyeleven_color_schemes
    apply_filters( 'twentyeleven_color_schemes', $color_scheme_options )

Source code

function twentyeleven_color_schemes() {

	$color_scheme_options = array(

		'light' => array(

			'value' => 'light',

			'label' => __( 'Light', 'twentyeleven' ),

			'thumbnail' => get_template_directory_uri() . '/inc/images/light.png',

			'default_link_color' => '#1b8be0',

		),

		'dark' => array(

			'value' => 'dark',

			'label' => __( 'Dark', 'twentyeleven' ),

			'thumbnail' => get_template_directory_uri() . '/inc/images/dark.png',

			'default_link_color' => '#e4741f',

		),

	);



	return apply_filters( 'twentyeleven_color_schemes', $color_scheme_options );

}

14717

twentyeleven_body_classes

Definition:
function twentyeleven_body_classes( $classes ) {}

Adds two classes to the array of body classes.
The first is if the site has only had one author with published posts. The second is if a singular post being displayed

Parameters

  • $classes

Source code

function twentyeleven_body_classes( $classes ) {



	if ( function_exists( 'is_multi_author' ) && ! is_multi_author() )

		$classes[] = 'single-author';



	if ( is_singular() && ! is_home() && ! is_page_template( 'showcase.php' ) && ! is_page_template( 'sidebar-page.php' ) )

		$classes[] = 'singular';



	return $classes;

}

14715