twentyfourteen_custom_header_setup

Set up the WordPress core custom header settings.

Description

twentyfourteen_custom_header_setup(); 

Usage

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

Defined (1)

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

/inc/custom-header.php  
  1. function twentyfourteen_custom_header_setup() { 
  2. /** 
  3. * Filter Twenty Fourteen custom-header support arguments. 
  4. * @since Twenty Fourteen 1.0 
  5. * @param array $args { 
  6. * An array of custom-header support arguments. 
  7. * @type bool $header_text Whether to display custom header text. Default false. 
  8. * @type int $width Width in pixels of the custom header image. Default 1260. 
  9. * @type int $height Height in pixels of the custom header image. Default 240. 
  10. * @type bool $flex_height Whether to allow flexible-height header images. Default true. 
  11. * @type string $admin_head_callback Callback function used to style the image displayed in 
  12. * the Appearance > Header screen. 
  13. * @type string $admin_preview_callback Callback function used to create the custom header markup in 
  14. * the Appearance > Header screen. 
  15. * } 
  16. */ 
  17. add_theme_support( 'custom-header', apply_filters( 'twentyfourteen_custom_header_args', array( 
  18. 'default-text-color' => 'fff',  
  19. 'width' => 1260,  
  20. 'height' => 240,  
  21. 'flex-height' => true,  
  22. 'wp-head-callback' => 'twentyfourteen_header_style',  
  23. 'admin-head-callback' => 'twentyfourteen_admin_header_style',  
  24. 'admin-preview-callback' => 'twentyfourteen_admin_header_image',  
  25. ) ) );