[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

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

TwentyTen 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: 508 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 13 functions

  twentyten_setup()
  twentyten_admin_header_style()
  twentyten_page_menu_args()
  twentyten_excerpt_length()
  twentyten_continue_reading_link()
  twentyten_auto_excerpt_more()
  twentyten_custom_excerpt_more()
  twentyten_remove_gallery_css()
  twentyten_comment()
  twentyten_widgets_init()
  twentyten_remove_recent_comments_style()
  twentyten_posted_on()
  twentyten_posted_in()

Functions
Functions that are not part of a class:

twentyten_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 twentyten_setup() in a child theme, add your own twentyten_setup to your child theme's
functions.php file.


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

Referenced via add_custom_image_header() in twentyten_setup().


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

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


twentyten_excerpt_length( $length )   X-Ref
Sets the post excerpt length to 40 characters.

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

return: int

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

return: string "Continue Reading" link

twentyten_auto_excerpt_more( $more )   X-Ref
Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_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.

return: string An ellipsis

twentyten_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.

return: string Excerpt with a pretty "Continue Reading" link

twentyten_remove_gallery_css( $css )   X-Ref
Deprecated way to remove inline styles printed when the gallery shortcode is used.

This function is no longer needed or used. Use the use_default_gallery_style
filter instead, as seen above.

return: string The gallery style filter, with the styles themselves removed.

twentyten_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 twentyten_comment(), and that function will be used instead.

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


twentyten_widgets_init()   X-Ref
Register widgetized areas, including two sidebars and four widget-ready columns in the footer.

To override twentyten_widgets_init() in a child theme, remove the action hook and add your own
function tied to the init hook.


twentyten_remove_recent_comments_style()   X-Ref
Removes the default styles that are packaged with the Recent Comments widget.

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

This function uses a filter (show_recent_comments_widget_style) new in WordPress 3.1
to remove the default style. Using Twenty Ten 1.2 in WordPress 3.0 will show the styles,
but they won't have any effect on the widget in default Twenty Ten styling.


twentyten_posted_on()   X-Ref
Prints HTML with meta information for the current post-date/time and author.


twentyten_posted_in()   X-Ref
Prints HTML with meta information for the current post (category, tags and permalink).




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