• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / Files / functions.php


Lines:

1 to 100 of 113
<?php

/**
 * Twenty Seventeen functions and definitions
 *
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since Twenty Seventeen 1.0
 */


/**
 * Twenty Seventeen only works in WordPress 4.7 or later.
 */
if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '<' ) ) {
  require get_template_directory() . '/inc/back-compat.php';
  return;
}

/* function twentyseventeen_setup() – Sets up theme defaults and registers support for various WordPress features. */
add_action( 'after_setup_theme', 'twentyseventeen_setup' );

/* function twentyseventeen_content_width() – Set the content width in pixels, based on the theme’s design and stylesheet. */
add_action( 'template_redirect', 'twentyseventeen_content_width', 0 );

/* function twentyseventeen_fonts_url() – Register custom fonts. */

/* function twentyseventeen_resource_hints() – Add preconnect for Google Fonts. */
add_filter( 'wp_resource_hints', 'twentyseventeen_resource_hints', 10, 2 );

/* function twentyseventeen_widgets_init() – Register widget area. */
add_action( 'widgets_init', 'twentyseventeen_widgets_init' );

/* function twentyseventeen_excerpt_more() – Replaces "[. */
add_filter( 'excerpt_more', 'twentyseventeen_excerpt_more' );

/* function twentyseventeen_javascript_detection() – Handles JavaScript detection. */
add_action( 'wp_head', 'twentyseventeen_javascript_detection', 0 );

/* function twentyseventeen_pingback_header() – Add a pingback url auto-discovery header for singularly identifiable articles. */
add_action( 'wp_head', 'twentyseventeen_pingback_header' );

/* function twentyseventeen_colors_css_wrap() – Display custom color CSS. */
add_action( 'wp_head', 'twentyseventeen_colors_css_wrap' );

/* function twentyseventeen_scripts() – Enqueues scripts and styles. */
add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' );

/* function twentyseventeen_block_editor_styles() – Enqueues styles for the block-based editor. */
add_action( 'enqueue_block_editor_assets', 'twentyseventeen_block_editor_styles' );

/* function twentyseventeen_content_image_sizes_attr() – Add custom image sizes attribute to enhance responsive image functionality
for content images. */
add_filter( 'wp_calculate_image_sizes', 'twentyseventeen_content_image_sizes_attr', 10, 2 );

/* function twentyseventeen_header_image_tag() – Filters the `sizes` value in the header image markup. */
add_filter( 'get_header_image_tag', 'twentyseventeen_header_image_tag', 10, 3 );

/* function twentyseventeen_post_thumbnail_sizes_attr() – Add custom image sizes attribute to enhance responsive image functionality
for post thumbnails. */
add_filter( 'wp_get_attachment_image_attributes', 'twentyseventeen_post_thumbnail_sizes_attr', 10, 3 );

/* function twentyseventeen_front_page_template() – Use front-page.php when Front page displays is set to a static page. */
add_filter( 'frontpage_template', 'twentyseventeen_front_page_template' );

/* function twentyseventeen_widget_tag_cloud_args() – Modifies tag cloud widget arguments to display all tags in the same font size
and use list format for better accessibility. */
add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' );

/* function twentyseventeen_unique_id() – Gets unique ID. */

if ( ! function_exists( 'wp_get_list_item_separator' ) ) :
/* function wp_get_list_item_separator() – Retrieves the list item separator based on the locale. */
endif;


/**
 * Implement the Custom Header feature.
 */
require get_parent_theme_file_path( '/inc/custom-header.php' );


/**
 * Custom template tags for this theme.
 */
require get_parent_theme_file_path( '/inc/template-tags.php' );


/**
 * Additional features to allow styling of the templates.
 */
require get_parent_theme_file_path( '/inc/template-functions.php' );


/**
 * Customizer additions.
 */
require get_parent_theme_file_path( '/inc/customizer.php' );
[1] [2] Next »

 View on GitHub View on Trac

Called by

    Invoked by

      Calls

      Call hooks

      File name: functions.php
      Plugin ref: Twenty Seventeen
      Version: 3.1
      Deprecated?: No
      API Letters: F,P

      Published: 8th April 2020 | Last updated: 2nd November 2022

      Primary Sidebar

      Information

      File name: functions.php
      Plugin ref: Twenty Seventeen
      Version: 3.1
      Deprecated?: No
      API Letters: F,P

      Footer

      WordPress a2z
      WordPress a2z
      WordPress Dynamic API Reference
      WordPress 6.1.1. PHP: 8.0.27
      WordPress a2z
      WordPress core a2z
      Genesis Theme Framework a2z
      Jetpack a2z
      WordPress develop tests
      Easy Digital Downloads a2z
      WooCommerce a2z
      Yoast SEO a2z
      WordPress Blocks

      Site:  wp-a2z.org
      © Copyright WordPress a2z 2014-2023. All rights reserved.


      Website designed and developed by Herb Miller
      Proudly powered by WordPress and oik plugins

      • Home
      • Blog
      • Sitemap
      • Sites