bre_custom_header_setup

Sets up the WordPress core custom header arguments and settings.

Description

bre_custom_header_setup(); 

Usage

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

Defined (1)

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

/inc/custom-header.php  
  1. function bre_custom_header_setup() { 
  2. $args = array( 
  3. // Text color and image (empty to use none). 
  4. 'default-text-color' => '444',  
  5. 'default-image' => '',  
  6.  
  7. // Set height and width, with a maximum value for the width. 
  8. 'height' => 120,  
  9. 'width' => 1170,  
  10. 'max-width' => 2000,  
  11.  
  12. // Support flexible height and width. 
  13. 'flex-height' => true,  
  14. 'flex-width' => true,  
  15.  
  16. // Random image rotation off by default. 
  17. 'random-default' => false,  
  18.  
  19. // Callbacks for styling the header and the admin preview. 
  20. 'wp-head-callback' => 'bre_header_style',  
  21. 'admin-head-callback' => 'bre_admin_header_style',  
  22. 'admin-preview-callback' => 'bre_admin_header_image',  
  23. ); 
  24.  
  25. add_theme_support( 'custom-header', $args );