[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

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

Twenty Fourteen 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: 766 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 18 functions

  twentyfourteen_setup()
  twentyfourteen_content_width()
  twentyfourteen_get_featured_posts()
  twentyfourteen_has_featured_posts()
  twentyfourteen_widgets_init()
  twentyfourteen_font_url()
  twentyfourteen_scripts()
  twentyfourteen_admin_fonts()
  twentyfourteen_resource_hints()
  twentyfourteen_block_editor_styles()
  twentyfourteen_the_attached_image()
  twentyfourteen_list_authors()
  twentyfourteen_body_classes()
  twentyfourteen_post_classes()
  twentyfourteen_wp_title()
  twentyfourteen_widget_tag_cloud_args()
  twentyfourteen_register_block_patterns()
  is_customize_preview()

Functions
Functions that are not part of a class:

twentyfourteen_setup()   X-Ref
Twenty Fourteen setup.

Set 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 post thumbnails.


twentyfourteen_content_width()   X-Ref
Adjust content_width value for image attachment template.


twentyfourteen_get_featured_posts()   X-Ref
Getter function for Featured Content Plugin.

return: array An array of WP_Post objects.

twentyfourteen_has_featured_posts()   X-Ref
A helper conditional function that returns a boolean value.

return: bool Whether there are featured posts.

twentyfourteen_widgets_init()   X-Ref
Register three Twenty Fourteen widget areas.


twentyfourteen_font_url()   X-Ref
Register Lato font for Twenty Fourteen.

return: string

twentyfourteen_scripts()   X-Ref
Enqueue scripts and styles for the front end.


twentyfourteen_admin_fonts()   X-Ref
Enqueue font stylesheet to admin screen for custom header display.


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

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


twentyfourteen_the_attached_image()   X-Ref
Print the attached image with a link to the next attached image.


twentyfourteen_list_authors()   X-Ref
Print a list of all site contributors who published at least one post.


twentyfourteen_body_classes( $classes )   X-Ref
Extend the default WordPress body classes.

Adds body classes to denote:
1. Single or multiple authors.
2. Presence of header image except in Multisite signup and activate pages.
3. Index views.
4. Full-width content layout.
5. Presence of footer widgets.
6. Single views.
7. Featured content layout.

return: array The filtered body class list.
param: array $classes A list of existing body class values.

twentyfourteen_post_classes( $classes )   X-Ref
Extend the default WordPress post classes.

Adds a post class to denote:
Non-password protected page with a post thumbnail.

return: array The filtered post class list.
param: array $classes A list of existing post class values.

twentyfourteen_wp_title( $title, $sep )   X-Ref
Create a nicely formatted and more specific title element text for output
in head of document, based on current view.

return: string The filtered title.
param: string $title Default title text for current view.
param: string $sep Optional separator.

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

twentyfourteen_register_block_patterns()   X-Ref
Register block patterns and pattern categories.


is_customize_preview()   X-Ref
Add an `is_customize_preview` function if it is missing.

Enables installing Twenty Fourteen in WordPress versions before 4.0.0 when the
`is_customize_preview` function was introduced.




Generated : Sat Nov 23 08:20:01 2024 Cross-referenced by PHPXref