[ Index ]

PHP Cross Reference of WordPress




/wp-content/themes/twentyseventeen/ -> functions.php (summary)

Twenty Seventeen functions and definitions

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

Defines 18 functions


Functions that are not part of a class:

twentyseventeen_setup()   X-Ref
Sets 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 for post thumbnails.

twentyseventeen_content_width()   X-Ref
Set the content width in pixels, based on the theme's design and stylesheet.

Priority 0 to make it available to lower priority callbacks.

twentyseventeen_fonts_url()   X-Ref
Register custom fonts.

twentyseventeen_resource_hints( $urls, $relation_type )   X-Ref
Add preconnect for Google Fonts.

since: Twenty Seventeen 1.0
return: array URLs to print for resource hints.
param: array  $urls          URLs to print for resource hints.
param: string $relation_type The relation type the URLs are printed.

twentyseventeen_widgets_init()   X-Ref
Register widget area.

twentyseventeen_excerpt_more( $link )   X-Ref
Replaces "[...]" (appended to automatically generated excerpts) with ... and
a 'Continue reading' link.

since: Twenty Seventeen 1.0
return: string 'Continue reading' link prepended with an ellipsis.
param: string $link Link to single post/page.

twentyseventeen_javascript_detection()   X-Ref
Handles JavaScript detection.

Adds a `js` class to the root `<html>` element when JavaScript is detected.

since: Twenty Seventeen 1.0

twentyseventeen_pingback_header()   X-Ref
Add a pingback url auto-discovery header for singularly identifiable articles.

twentyseventeen_colors_css_wrap()   X-Ref
Display custom color CSS.

twentyseventeen_scripts()   X-Ref
Enqueues scripts and styles.

twentyseventeen_block_editor_styles()   X-Ref
Enqueues styles for the block-based editor.

since: Twenty Seventeen 1.8

twentyseventeen_content_image_sizes_attr( $sizes, $size )   X-Ref
Add custom image sizes attribute to enhance responsive image functionality
for content images.

since: Twenty Seventeen 1.0
return: string A source size value for use in a content image 'sizes' attribute.
param: string $sizes A source size value for use in a 'sizes' attribute.
param: array  $size  Image size. Accepts an array of width and height

twentyseventeen_header_image_tag( $html, $header, $attr )   X-Ref
Filters the `sizes` value in the header image markup.

since: Twenty Seventeen 1.0
return: string The filtered header image HTML.
param: string $html   The HTML image tag markup being filtered.
param: object $header The custom header object returned by 'get_custom_header()'.
param: array  $attr   Array of the attributes for the image tag.

twentyseventeen_post_thumbnail_sizes_attr( $attr, $attachment, $size )   X-Ref
Add custom image sizes attribute to enhance responsive image functionality
for post thumbnails.

since: Twenty Seventeen 1.0
return: string[] The filtered attributes for the image markup.
param: string[]     $attr       Array of attribute values for the image markup, keyed by attribute name.
param: WP_Post      $attachment Image attachment post.
param: string|int[] $size       Requested image size. Can be any registered image size name, or

twentyseventeen_front_page_template( $template )   X-Ref
Use front-page.php when Front page displays is set to a static page.

since: Twenty Seventeen 1.0
return: string The template to be used: blank if is_home() is true (defaults to index.php),
param: string $template front-page.php.

twentyseventeen_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.

since: Twenty Seventeen 1.4
return: array The filtered arguments for tag cloud widget.
param: array $args Arguments for tag cloud widget.

twentyseventeen_unique_id( $prefix = '' )   X-Ref
Gets unique ID.

This is a PHP implementation of Underscore's uniqueId method. A static variable
contains an integer that is incremented with each call. This number is returned
with the optional prefix. As such the returned value is not universally unique,
but it is unique across the life of the PHP process.

since: Twenty Seventeen 2.0
return: string Unique ID.
param: string $prefix Prefix for the returned ID.

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: Thu Jun 20 01:00:02 2024 Cross-referenced by PHPXref 0.7.1