[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

/wp-content/themes/twentyeleven/ -> functions.php (summary)

Twenty Eleven functions and definitions Sets up the theme and provides some helper functions. Some helper functions are used in the theme as custom template tags. Others are attached to action and filter hooks in WordPress to change core functionality.

File Size: 561 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 15 functions

  twentyeleven_setup()
  twentyeleven_header_style()
  twentyeleven_admin_header_style()
  twentyeleven_admin_header_image()
  twentyeleven_excerpt_length()
  twentyeleven_continue_reading_link()
  twentyeleven_auto_excerpt_more()
  twentyeleven_custom_excerpt_more()
  twentyeleven_singular_class()
  twentyeleven_page_menu_args()
  twentyeleven_widgets_init()
  twentyeleven_content_nav()
  twentyeleven_url_grabber()
  twentyeleven_footer_sidebar_class()
  twentyeleven_comment()

Functions
Functions that are not part of a class:

twentyeleven_setup()   X-Ref
Sets up theme defaults and registers support for various WordPress features.

Note that this function is hooked into the after_setup_theme hook, which runs
before the init hook. The init hook is too late for some features, such as indicating
support post thumbnails.

To override twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's
functions.php file.


twentyeleven_header_style()   X-Ref
Styles the header image and text displayed on the blog


twentyeleven_admin_header_style()   X-Ref
Styles the header image displayed on the Appearance > Header admin panel.

Referenced via add_custom_image_header() in twentyeleven_setup().


twentyeleven_admin_header_image()   X-Ref
Custom header image markup displayed on the Appearance > Header admin panel.

Referenced via add_custom_image_header() in twentyeleven_setup().


twentyeleven_excerpt_length( $length )   X-Ref
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.

twentyeleven_continue_reading_link()   X-Ref
Returns a "Continue Reading" link for excerpts


twentyeleven_auto_excerpt_more( $more )   X-Ref
Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyeleven_continue_reading_link().

To override this in a child theme, remove the filter and add your own
function tied to the excerpt_more filter hook.

twentyeleven_custom_excerpt_more( $output )   X-Ref
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.

twentyeleven_singular_class( $classes )   X-Ref
Add custom body classes


twentyeleven_page_menu_args( $args )   X-Ref
Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.


twentyeleven_widgets_init()   X-Ref
Register our sidebars and widgetized areas. Also register the default Epherma widget.


twentyeleven_content_nav( $nav_id )   X-Ref
Display navigation to next/previous pages when applicable


twentyeleven_url_grabber()   X-Ref
Return the URL for the first link found in the post content.

return: string|bool URL or false when no link is present.

twentyeleven_footer_sidebar_class()   X-Ref
Count the number of footer sidebars to enable dynamic classes for the footer


twentyeleven_comment( $comment, $args, $depth )   X-Ref
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.

Used as a callback by wp_list_comments() for displaying the comments.




Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting