[ Index ] |
PHP Cross Reference of WordPress |
[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: | 945 lines (30 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. since: Twenty Eleven 1.0 |
twentyeleven_scripts_styles() X-Ref |
Enqueue scripts and styles for front end. since: Twenty Eleven 2.9 |
twentyeleven_block_editor_styles() X-Ref |
Enqueue styles for the block-based editor. since: Twenty Eleven 2.9 |
twentyeleven_header_style() X-Ref |
Styles the header image and text displayed on the blog. since: Twenty Eleven 1.0 |
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(). since: Twenty Eleven 1.0 |
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(). since: Twenty Eleven 1.0 |
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. return: int The filtered number of characters. since: Twenty Eleven 1.0 param: int $length The number of excerpt characters. |
twentyeleven_continue_reading_link() X-Ref |
Return a "Continue Reading" link for excerpts return: string The "Continue Reading" HTML link. since: Twenty Eleven 1.0 |
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. return: string The filtered Read More text. since: Twenty Eleven 1.0 param: string $more The 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. return: string The filtered "Continue Reading" link. since: Twenty Eleven 1.0 param: string $output The "Continue Reading" link. |
twentyeleven_page_menu_args( $args ) X-Ref |
Show a home link for the wp_nav_menu() fallback, wp_page_menu(). return: array The filtered page menu arguments. since: Twenty Eleven 1.0 param: array $args The page menu arguments. @see wp_page_menu() |
twentyeleven_widgets_init() X-Ref |
Register sidebars and widgetized areas. Also register the default Epherma widget. since: Twenty Eleven 1.0 |
twentyeleven_content_nav( $html_id ) X-Ref |
Display navigation to next/previous pages when applicable. since: Twenty Eleven 1.0 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. since: Twenty Eleven 1.0 |
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. since: Twenty Eleven 1.0 |
twentyeleven_footer_sidebar_class() X-Ref |
Count the number of footer sidebars to enable dynamic classes for the footer. since: Twenty Eleven 1.0 |
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. since: Twenty Eleven 1.0 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 since: Twenty Eleven 1.0 |
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 return: array The filtered array of body classes. since: Twenty Eleven 1.0 param: array $classes Existing 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. since: Twenty Eleven 1.6 |
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. return: array The filtered arguments for tag cloud widget. since: Twenty Eleven 2.7 param: array $args 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. since: Twenty Eleven 3.3 |
twentyeleven_skip_link() X-Ref |
Include a skip to content link at the top of the page so that users can bypass the menu. since: Twenty Eleven 3.4 |
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. since: 6.0.0 |
Generated: Sat Dec 21 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |