twentyeleven_get_default_link_color

Definition:
function twentyeleven_get_default_link_color( $color_scheme = null ) {}

Returns the default link color for Twenty Eleven, based on color scheme.

Parameters

  • $string $color_scheme: Color scheme. Defaults to the active color scheme.

Return values

returns:Color.

Source code

function twentyeleven_get_default_link_color( $color_scheme = null ) {

	if ( null === $color_scheme ) {

		$options = twentyeleven_get_theme_options();

		$color_scheme = $options['color_scheme'];

	}



	$color_schemes = twentyeleven_color_schemes();

	if ( ! isset( $color_schemes[ $color_scheme ] ) )

		return false;



	return $color_schemes[ $color_scheme ]['default_link_color'];

}

14733

twentyeleven_footer_sidebar_class

Definition:
function twentyeleven_footer_sidebar_class() {}

Count the number of footer sidebars to enable dynamic classes for the footer

Source code

function twentyeleven_footer_sidebar_class() {

	$count = 0;



	if ( is_active_sidebar( 'sidebar-3' ) )

		$count++;



	if ( is_active_sidebar( 'sidebar-4' ) )

		$count++;



	if ( is_active_sidebar( 'sidebar-5' ) )

		$count++;



	$class = '';



	switch ( $count ) {

		case '1':

			$class = 'one';

			break;

		case '2':

			$class = 'two';

			break;

		case '3':

			$class = 'three';

			break;

	}



	if ( $class )

		echo 'class="' . $class . '"';

}

14731

twentyeleven_excerpt_length

Definition:
function twentyeleven_excerpt_length( $length ) {}

Sets the post excerpt length to 40 words.
To override this length in a child theme, remove the filter and add your own function tied to the excerpt_length filter hook.

Parameters

  • $length

Source code

function twentyeleven_excerpt_length( $length ) {

	return 40;

}

14729

twentyeleven_enqueue_color_scheme

Definition:
function twentyeleven_enqueue_color_scheme() {}

Enqueue the styles for the current color scheme.

Defined actions

  • twentyeleven_enqueue_color_scheme
    do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );

Source code

function twentyeleven_enqueue_color_scheme() {

	$options = twentyeleven_get_theme_options();

	$color_scheme = $options['color_scheme'];



	if ( 'dark' == $color_scheme )

		wp_enqueue_style( 'dark', get_template_directory_uri() . '/colors/dark.css', array(), null );



	do_action( 'twentyeleven_enqueue_color_scheme', $color_scheme );

}

14727

twentyeleven_custom_excerpt_more

Definition:
function twentyeleven_custom_excerpt_more( $output ) {}

Adds a pretty "Continue Reading" link to custom post excerpts.
To override this link in a child theme, remove the filter and add your own function tied to the get_the_excerpt filter hook.

Parameters

  • $output

Source code

function twentyeleven_custom_excerpt_more( $output ) {

	if ( has_excerpt() && ! is_attachment() ) {

		$output .= twentyeleven_continue_reading_link();

	}

	return $output;

}

14725