twentythirteen_custom_header_setup

Set up the WordPress core custom header arguments and settings.

Description

twentythirteen_custom_header_setup(); 

Usage

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

Defined (1)

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

/inc/custom-header.php  
  1. function twentythirteen_custom_header_setup() { 
  2. $args = array( 
  3. // Text color and image (empty to use none). 
  4. 'default-text-color' => '220e10',  
  5. 'default-image' => '%s/images/headers/circle.png',  
  6.  
  7. // Set height and width, with a maximum value for the width. 
  8. 'height' => 230,  
  9. 'width' => 1600,  
  10.  
  11. // Callbacks for styling the header and the admin preview. 
  12. 'wp-head-callback' => 'twentythirteen_header_style',  
  13. 'admin-head-callback' => 'twentythirteen_admin_header_style',  
  14. 'admin-preview-callback' => 'twentythirteen_admin_header_image',  
  15. ); 
  16.  
  17. add_theme_support( 'custom-header', $args ); 
  18.  
  19. /** 
  20. * Default custom headers packaged with the theme. 
  21. * %s is a placeholder for the theme template directory URI. 
  22. */ 
  23. register_default_headers( array( 
  24. 'circle' => array( 
  25. 'url' => '%s/images/headers/circle.png',  
  26. 'thumbnail_url' => '%s/images/headers/circle-thumbnail.png',  
  27. 'description' => _x( 'Circle', 'header image description', 'twentythirteen' ) 
  28. ),  
  29. 'diamond' => array( 
  30. 'url' => '%s/images/headers/diamond.png',  
  31. 'thumbnail_url' => '%s/images/headers/diamond-thumbnail.png',  
  32. 'description' => _x( 'Diamond', 'header image description', 'twentythirteen' ) 
  33. ),  
  34. 'star' => array( 
  35. 'url' => '%s/images/headers/star.png',  
  36. 'thumbnail_url' => '%s/images/headers/star-thumbnail.png',  
  37. 'description' => _x( 'Star', 'header image description', 'twentythirteen' ) 
  38. ),  
  39. ) );