• 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 / twentysixteen_custom_header_and_background() – Sets up the WordPress core custom header and custom background features.

You appear to be a bot. Output may be restricted

Description

Sets up the WordPress core custom header and custom background features.

Usage

twentysixteen_custom_header_and_background();

Parameters

Returns

void

Source

File name: twentysixteen/inc/customizer.php


Lines:

1 to 59 of 59
function twentysixteen_custom_header_and_background() {
  $color_scheme             = twentysixteen_get_color_scheme();
  $default_background_color = trim( $color_scheme[0], '#' );
  $default_text_color       = trim( $color_scheme[3], '#' );

  add_theme_support(
    'custom-background',
    
/**
 * Filters the arguments used when adding 'custom-background' support in Twenty Sixteen.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $args {
 *     An array of custom-background support arguments.
 *
 *     @type string $default-color Default color of the background.
 * }
 */
    apply_filters(
      'twentysixteen_custom_background_args',
      array(
        'default-color' => $default_background_color,
      )
    )
  );

  add_theme_support(
    'custom-header',
    
/**
 * Filters the arguments used when adding 'custom-header' support in Twenty Sixteen.
 *
 * @since Twenty Sixteen 1.0
 *
 * @param array $args {
 *     An array of custom-header support arguments.
 *
 *     @type string   $default-text-color Default color of the header text.
 *     @type int      $width              Width in pixels of the custom header image. Default 1200.
 *     @type int      $height             Height in pixels of the custom header image. Default 280.
 *     @type bool     $flex-height        Whether to allow flexible-height header images. Default true.
 *     @type callable $wp-head-callback   Callback function used to style the header image and text
 *                                        displayed on the blog.
 * }
 */
    apply_filters(
      'twentysixteen_custom_header_args',
      array(
        'default-text-color' => $default_text_color,
        'width'              => 1200,
        'height'             => 280,
        'flex-height'        => true,
        'wp-head-callback'   => 'twentysixteen_header_style',
      )
    )
  );
}
 

 View on Trac

Published: 25th November 2019 | Last updated: 21st August 2020

Primary Sidebar

Information

Function name: twentysixteen_custom_header_and_background
Plugin ref: Twenty Sixteen
Version: 2.8
Sourcefile: inc/customizer.php
File ref: inc/customizer.php
Deprecated?: No
API Letters: A,B,C,H,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