[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-content/themes/twentynineteen/inc/ -> template-functions.php (summary)

Functions which enhance the theme by hooking into WordPress.

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

Defines 10 functions

  twentynineteen_body_classes()
  twentynineteen_post_classes()
  twentynineteen_pingback_header()
  twentynineteen_comment_form_defaults()
  twentynineteen_get_the_archive_title()
  twentynineteen_post_thumbnail_sizes_attr()
  twentynineteen_add_ellipses_to_nav()
  twentynineteen_nav_menu_link_attributes()
  twentynineteen_add_mobile_parent_nav_menu_items()
  twentynineteen_link_pages_link()

Functions
Functions that are not part of a class:

twentynineteen_body_classes( $classes )   X-Ref
Adds custom classes to the array of body classes.

param: array $classes Classes for the body element.
return: array

twentynineteen_post_classes( $classes )   X-Ref
Adds custom class to the array of posts classes.

param: array $classes A list of existing post class values.
return: array The filtered post class list.

twentynineteen_pingback_header()   X-Ref
Adds a pingback url auto-discovery header for single posts, pages, or attachments.


twentynineteen_comment_form_defaults( $defaults )   X-Ref
Changes comment form default fields.


twentynineteen_get_the_archive_title()   X-Ref
Filters the default archive titles.


twentynineteen_post_thumbnail_sizes_attr( $attr )   X-Ref
Adds custom 'sizes' attribute to responsive image functionality for post thumbnails.

param: string[] $attr Array of attribute values for the image markup, keyed by attribute name.
return: string[] The filtered attributes for the image markup.

twentynineteen_add_ellipses_to_nav( $nav_menu, $args )   X-Ref
Adds an extra menu to our nav for our priority+ navigation to use.

param: string $nav_menu Nav menu.
param: object $args     Nav menu args.
return: string More link for hidden menu items.

twentynineteen_nav_menu_link_attributes( $atts, $item )   X-Ref
Handles WCAG 2.0 attributes for dropdown menus.

Adjustments to menu attributes to support WCAG 2.0 recommendations
for flyout and dropdown menus.

param: array   $atts {
param: WP_Post $item The current menu item object.
return: string[] Modified attributes.

twentynineteen_add_mobile_parent_nav_menu_items( $sorted_menu_items, $args )   X-Ref
Creates a nav menu item to be displayed on mobile to navigate from submenu back to the parent.

This duplicates each parent nav menu item and makes it the first child of itself.

param: array  $sorted_menu_items Sorted nav menu items.
param: object $args              Nav menu args.
return: array Amended nav menu items.

twentynineteen_link_pages_link( $link, $i )   X-Ref
Adds a fragment identifier (to the content) to paginated links.

param: string $link The page number HTML output.
param: int    $i    Page number for paginated posts' page links.
return: string Formatted output in HTML.



Generated : Fri May 10 08:20:01 2024 Cross-referenced by PHPXref