• 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 / APIs / twentyseventeen_custom_header_setup() – Set up the WordPress core custom header feature.

You appear to be a bot. Output may be restricted

Description

Set up the WordPress core custom header feature.

Usage

twentyseventeen_custom_header_setup();

Parameters

Returns

void

Source

File name: twentyseventeen/inc/custom-header.php


Lines:

1 to 46 of 46
function twentyseventeen_custom_header_setup() {

  add_theme_support(
    'custom-header',
    
/**
 * Filters Twenty Seventeen custom-header support arguments.
 *
 * @since Twenty Seventeen 1.0
 *
 * @param array $args {
 *     An array of custom-header support arguments.
 *
 *     @type string $default-image    Default image of the header.
 *     @type int    $width            Width in pixels of the custom header image. Default 954.
 *     @type int    $height           Height in pixels of the custom header image. Default 1300.
 *     @type string $flex-height      Flex support for height of header.
 *     @type string $video            Video support for header.
 *     @type string $wp-head-callback Callback function used to styles the header image and text
 *                                    displayed on the blog.
 * }
 */
    apply_filters(
      'twentyseventeen_custom_header_args',
      array(
        'default-image'    => get_parent_theme_file_uri( '/assets/images/header.jpg' ),
        'width'            => 2000,
        'height'           => 1200,
        'flex-height'      => true,
        'video'            => true,
        'wp-head-callback' => 'twentyseventeen_header_style',
      )
    )
  );

  register_default_headers(
    array(
      'default-image' => array(
        'url'           => '%s/assets/images/header.jpg',
        'thumbnail_url' => '%s/assets/images/header.jpg',
        'description'   => __( 'Default Header Image', 'twentyseventeen' ),
      ),
    )
  );
}
 

 View on GitHub View on Trac

Published: 8th April 2020 | Last updated: 21st August 2020

Primary Sidebar

Information

Function name: twentyseventeen_custom_header_setup
Plugin ref: Twenty Seventeen
Version: 3.1
Sourcefile: inc/custom-header.php
File ref: inc/custom-header.php
Deprecated?: No
API Letters: C,H,S,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
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