[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Twenty Fifteen functions and definitions Set up the theme and provides some helper functions, which are used in the theme as custom template tags. Others are attached to action and filter hooks in WordPress to change core functionality.

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

Defines 12 functions

  twentyfifteen_setup()
  twentyfifteen_widgets_init()
  twentyfifteen_fonts_url()
  twentyfifteen_javascript_detection()
  twentyfifteen_scripts()
  twentyfifteen_block_editor_styles()
  twentyfifteen_resource_hints()
  twentyfifteen_post_nav_background()
  twentyfifteen_nav_description()
  twentyfifteen_search_form_modify()
  twentyfifteen_widget_tag_cloud_args()
  twentyfifteen_author_bio_template()

Functions
Functions that are not part of a class:

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


twentyfifteen_widgets_init()   X-Ref
Register widget area.


twentyfifteen_fonts_url()   X-Ref
Register fonts for Twenty Fifteen.

return: string Fonts URL for the theme.

twentyfifteen_javascript_detection()   X-Ref
JavaScript Detection.

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


twentyfifteen_scripts()   X-Ref
Enqueue scripts and styles.


twentyfifteen_block_editor_styles()   X-Ref
Enqueue styles for the block-based editor.


twentyfifteen_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 to print for resource hints.

twentyfifteen_post_nav_background()   X-Ref
Add featured image as background image to post navigation elements.


twentyfifteen_nav_description( $item_output, $item, $depth, $args )   X-Ref
Display descriptions in main navigation.

param: string   $item_output The menu item's starting HTML output.
param: WP_Post  $item        Menu item data object.
param: int      $depth       Depth of the menu. Used for padding.
param: stdClass $args        An object of wp_nav_menu() arguments.
return: string Menu item with possible description.

twentyfifteen_search_form_modify( $html )   X-Ref
Add a `screen-reader-text` class to the search form's submit button.

param: string $html Search form HTML.
return: string Modified search form HTML.

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

twentyfifteen_author_bio_template( $template )   X-Ref
Prevents `author-bio.php` partial template from interfering with rendering
an author archive of a user with the `bio` username.

param: string $template Template file.
return: string Replacement template file.



Generated : Fri Apr 19 08:20:01 2024 Cross-referenced by PHPXref