[ Index ]

WordPress 5.4.1

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    




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

Twenty Seventeen functions and definitions

File Size: 666 lines (21 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:

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.

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

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.

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

twentyseventeen_javascript_detection()   X-Ref
Handles JavaScript detection.

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

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.

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

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
return: string A source size value for use in a content image 'sizes' attribute.

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

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.
return: string The filtered header image HTML.

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

param: array $attr       Attributes for the image markup.
param: int   $attachment Image attachment ID.
param: array $size       Registered image size or flat array of height and width dimensions.
return: array The filtered attributes for the image markup.

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

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

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.

param: array $args Arguments for tag cloud widget.
return: array The filtered arguments for tag cloud widget.

twentyseventeen_unique_id( $prefix = '' )   X-Ref
Get 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.

param: string $prefix Prefix for the returned ID.
return: string Unique ID.

Generated: Tue May 19 15:51:04 2020 Cross-referenced by PHPXref 0.7.1