[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





/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: 758 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 18 functions


Functions that are not part of a class:

twentyten_setup()   X-Ref
Set 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
Style 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
Show a home link for our wp_nav_menu() fallback, wp_page_menu().

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.

param: array $args An optional array of arguments. @see wp_page_menu()

twentyten_excerpt_length( $length )   X-Ref
Set 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 The filtered number of excerpt characters.
param: int $length The number of excerpt characters.

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

return: string "Continue Reading" link.

twentyten_auto_excerpt_more( $more )   X-Ref
Replace "[...]" with an ellipsis and twentyten_continue_reading_link().

"[...]" is appended to automatically generated excerpts.

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

return: string The filtered Read More text.
param: string $more The Read More text.

twentyten_custom_excerpt_more( $output )   X-Ref
Add 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.
param: string $output The "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.

param: WP_Comment $comment The comment object.
param: array      $args    An array of arguments. @see get_comment_reply_link()
param: int        $depth   The depth of the comment.

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
Remove 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
Print HTML with meta information for the current post-date/time and author.

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

twentyten_get_gallery_images()   X-Ref
Retrieve the IDs for images in a gallery.

return: array List of image IDs from the post gallery.

twentyten_widget_tag_cloud_args( $args )   X-Ref
Modifies tag cloud widget arguments to display all tags in the same font size
and use list format for better accessibility.

return: array The filtered arguments for tag cloud widget.
param: array $args Arguments for tag cloud widget.

twentyten_scripts_styles()   X-Ref
Enqueue scripts and styles for front end.

twentyten_block_editor_styles()   X-Ref
Enqueue styles for the block-based editor.

wp_body_open()   X-Ref
Fire the wp_body_open action.

Added for backward compatibility to support pre-5.2.0 WordPress versions.

Generated : Tue Jan 26 08:20:01 2021 Cross-referenced by PHPXref