[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/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

  twentyseventeen_setup()
  twentyseventeen_content_width()
  twentyseventeen_fonts_url()
  twentyseventeen_resource_hints()
  twentyseventeen_widgets_init()
  twentyseventeen_excerpt_more()
  twentyseventeen_javascript_detection()
  twentyseventeen_pingback_header()
  twentyseventeen_colors_css_wrap()
  twentyseventeen_scripts()
  twentyseventeen_block_editor_styles()
  twentyseventeen_content_image_sizes_attr()
  twentyseventeen_header_image_tag()
  twentyseventeen_post_thumbnail_sizes_attr()
  twentyseventeen_front_page_template()
  twentyseventeen_widget_tag_cloud_args()
  twentyseventeen_unique_id()
  wp_get_list_item_separator()

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.

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.
since: Twenty Seventeen 1.0

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.

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

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.

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
since: Twenty Seventeen 1.0

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

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.
since: Twenty Seventeen 1.0

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

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
since: Twenty Seventeen 1.0

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

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

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.

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

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.

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

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 Nov 21 01:00:03 2024 Cross-referenced by PHPXref 0.7.1