[ Index ]

PHP Cross Reference of WordPress




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

Functions which enhance the theme by hooking into WordPress

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

Defines 17 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.

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

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

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

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

since: Twenty Twenty-One 1.0
return: void

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

since: Twenty Twenty-One 1.0
return: void

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

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

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

since: Twenty Twenty-One 1.0
return: bool

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

since: Twenty Twenty-One 1.0
return: int

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.

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

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

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
return: string

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

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

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

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

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.

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
return: bool Returns true if a block was located & printed, otherwise false.

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

param: string      $output The password form HTML output.
param: int|WP_Post $post   Optional. Post ID or WP_Post object. Default is global $post.
since: Twenty Twenty-One 1.0
since: Twenty Twenty-One 1.4 Corrected parameter name for `$output`,
return: string HTML content for password form for password protected post.

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

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
return: array

Generated: Sat May 15 01:00:05 2021 Cross-referenced by PHPXref 0.7.1