twentyfifteen_custom_header_setup

Set up the WordPress core custom header feature.

Description

twentyfifteen_custom_header_setup(); 

Usage

  1. if ( !function_exists( 'twentyfifteen_custom_header_setup' ) ) { 
  2. require_once '/inc/custom-header.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfifteen_custom_header_setup(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/custom-header.php  
  1. function twentyfifteen_custom_header_setup() { 
  2. $color_scheme = twentyfifteen_get_color_scheme(); 
  3. $default_text_color = trim( $color_scheme[4], '#' ); 
  4.  
  5. /** 
  6. * Filter Twenty Fifteen custom-header support arguments. 
  7. * @since Twenty Fifteen 1.0 
  8. * @param array $args { 
  9. * An array of custom-header support arguments. 
  10. * @type string $default_text_color Default color of the header text. 
  11. * @type int $width Width in pixels of the custom header image. Default 954. 
  12. * @type int $height Height in pixels of the custom header image. Default 1300. 
  13. * @type string $wp-head-callback Callback function used to styles the header image and text 
  14. * displayed on the blog. 
  15. * } 
  16. */ 
  17. add_theme_support( 'custom-header', apply_filters( 'twentyfifteen_custom_header_args', array( 
  18. 'default-text-color' => $default_text_color,  
  19. 'width' => 954,  
  20. 'height' => 1300,  
  21. 'wp-head-callback' => 'twentyfifteen_header_style',  
  22. ) ) );