[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Functions which enhance the theme by hooking into WordPress

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

Defines 17 functions

  twenty_twenty_one_body_classes()
  twenty_twenty_one_post_classes()
  twenty_twenty_one_pingback_header()
  twenty_twenty_one_supports_js()
  twenty_twenty_one_comment_form_defaults()
  twenty_twenty_one_can_show_post_thumbnail()
  twenty_twenty_one_get_avatar_size()
  twenty_twenty_one_continue_reading_text()
  twenty_twenty_one_continue_reading_link_excerpt()
  twenty_twenty_one_continue_reading_link()
  twenty_twenty_one_post_title()
  twenty_twenty_one_get_icon_svg()
  twenty_twenty_one_change_calendar_nav_arrows()
  twenty_twenty_one_get_non_latin_css()
  twenty_twenty_one_print_first_instance_of_block()
  twenty_twenty_one_password_form()
  twenty_twenty_one_get_attachment_image_attributes()

Functions
Functions that are not part of a class:

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

return: array
param: array $classes Classes for the body element.
since: Twenty Twenty-One 1.0

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

return: array
param: array $classes An array of CSS classes.
since: Twenty Twenty-One 1.0

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

return: void
since: Twenty Twenty-One 1.0

twenty_twenty_one_supports_js()   X-Ref
Remove the `no-js` class from body if JS is supported.

return: void
since: Twenty Twenty-One 1.0

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

return: array
param: array $defaults The form defaults.
since: Twenty Twenty-One 1.0

twenty_twenty_one_can_show_post_thumbnail()   X-Ref
Determines if post thumbnail can be displayed.

return: bool
since: Twenty Twenty-One 1.0

twenty_twenty_one_get_avatar_size()   X-Ref
Returns the size for avatars used in the theme.

return: int
since: Twenty Twenty-One 1.0

twenty_twenty_one_continue_reading_text()   X-Ref
Creates continue reading text


twenty_twenty_one_continue_reading_link_excerpt()   X-Ref
Create the continue reading link for excerpt.


twenty_twenty_one_continue_reading_link()   X-Ref
Create the continue reading link.


twenty_twenty_one_post_title( $title )   X-Ref
Add a title to posts and pages that are missing titles.

return: string
param: string $title The title.
since: Twenty Twenty-One 1.0

twenty_twenty_one_get_icon_svg( $group, $icon, $size = 24 )   X-Ref
Gets the SVG code for a given icon.

return: string
param: string $group The icon group.
param: string $icon The icon.
param: int    $size The icon size in pixels.
since: Twenty Twenty-One 1.0

twenty_twenty_one_change_calendar_nav_arrows( $calendar_output )   X-Ref
Changes the default navigation arrows to svg icons

return: string
param: string $calendar_output The generated HTML of the calendar.

twenty_twenty_one_get_non_latin_css( $type = 'front-end' )   X-Ref
Get custom CSS.

Return CSS for non-latin language, if available, or null

return: string
param: string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".

twenty_twenty_one_print_first_instance_of_block( $block_name, $content = null, $instances = 1 )   X-Ref
Print the first instance of a block in the content, and then break away.

return: bool Returns true if a block was located & printed, otherwise false.
param: string      $block_name The full block type name, or a partial match.
param: string|null $content    The content to search in. Use null for get_the_content().
param: int         $instances  How many instances of the block will be printed (max). Defaults to 1.
since: Twenty Twenty-One 1.0

twenty_twenty_one_password_form( $post = 0 )   X-Ref
Retrieve protected post password form content.

return: string HTML content for password form for password protected post.
param: int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
since: Twenty Twenty-One 1.0

twenty_twenty_one_get_attachment_image_attributes( $attr, $attachment, $size )   X-Ref
Filters the list of attachment image attributes.

return: array
param: array        $attr       Array of attribute values for the image markup, keyed by attribute name.
param: WP_Post      $attachment Image attachment post.
param: string|array $size       Requested size. Image size or array of width and height values
since: Twenty Twenty-One 1.0



Generated: Fri Feb 26 01:00:04 2021 Cross-referenced by PHPXref 0.7.1