[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
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: | 985 lines (31 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
twentyeleven_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 twentyeleven_setup() in a child theme, add your own twentyeleven_setup to your child theme's functions.php file. |
twentyeleven_scripts_styles() X-Ref |
Enqueue scripts and styles for front end. |
twentyeleven_block_editor_styles() X-Ref |
Enqueue styles for the block-based editor. |
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_theme_support('custom-header') in twentyeleven_setup(). |
twentyeleven_admin_header_image() X-Ref |
Custom header image markup displayed on the Appearance > Header admin panel. Referenced via add_theme_support('custom-header') in twentyeleven_setup(). |
twentyeleven_header_image() X-Ref |
Custom header image markup displayed. |
twentyeleven_excerpt_length( $length ) X-Ref |
Set 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. param: int $length The number of excerpt characters. return: int The filtered number of characters. |
twentyeleven_continue_reading_link() X-Ref |
Return a "Continue Reading" link for excerpts return: string The "Continue Reading" HTML link. |
twentyeleven_auto_excerpt_more( $more ) X-Ref |
Replace "[...]" in the Read More link with an ellipsis. The "[...]" 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. param: string $more The Read More text. return: string The filtered Read More text. |
twentyeleven_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. param: string $output The "Continue Reading" link. return: string The filtered "Continue Reading" link. |
twentyeleven_page_menu_args( $args ) X-Ref |
Show a home link for the wp_nav_menu() fallback, wp_page_menu(). param: array $args The page menu arguments. @see wp_page_menu() return: array The filtered page menu arguments. |
twentyeleven_widgets_init() X-Ref |
Register sidebars and widgetized areas. Also register the default Ephemera widget. |
twentyeleven_content_nav( $html_id ) X-Ref |
Display navigation to next/previous pages when applicable. param: string $html_id The HTML id attribute. |
twentyeleven_get_first_url() X-Ref |
Return the first link from the post content. If none found, the post permalink is used as a fallback. return: string The first link. |
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. param: WP_Comment $comment The comment object. param: array $args An array of comment arguments. @see get_comment_reply_link() param: int $depth The depth of the comment. |
twentyeleven_posted_on() X-Ref |
Print HTML with meta information for the current post-date/time and author. Create your own twentyeleven_posted_on to override in a child theme |
twentyeleven_body_classes( $classes ) X-Ref |
Add 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 param: array $classes Existing body classes. return: array The filtered array of body classes. |
twentyeleven_get_gallery_images() X-Ref |
Retrieve the IDs for images in a gallery. return: array List of image IDs from the post gallery. |
twentyeleven_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. param: array $args Arguments for tag cloud widget. return: array The filtered arguments for tag cloud widget. |
wp_body_open() X-Ref |
Fire the wp_body_open action. Added for backward compatibility to support pre-5.2.0 WordPress versions. |
twentyeleven_skip_link() X-Ref |
Include a skip to content link at the top of the page so that users can bypass the menu. |
wp_get_list_item_separator() X-Ref |
Retrieves the list item separator based on the locale. Added for backward compatibility to support pre-6.0.0 WordPress versions. |
Generated : Thu Nov 21 08:20:01 2024 | Cross-referenced by PHPXref |