register_default_headers

Register a selection of default headers to be displayed by the custom header admin UI.

Description

register_default_headers( (array) $headers ); 

Parameters (1)

0. $headers (array)
Array of headers keyed by a string id. The ids point to arrays containing url,, thumbnail_url , and description keys.

Usage

  1. if ( !function_exists( 'register_default_headers' ) ) { 
  2. require_once ABSPATH . WPINC . '/theme.php'; 
  3.  
  4. // Array of headers keyed by a string id. The ids point to arrays containing 'url', 'thumbnail_url', and 'description' keys. 
  5. $headers = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = register_default_headers($headers); 
  9.  

Defined (1)

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

/wp-includes/theme.php  
  1. function register_default_headers( $headers ) { 
  2. global $_wp_default_headers; 
  3.  
  4. $_wp_default_headers = array_merge( (array) $_wp_default_headers, (array) $headers );