Advertisement
Guest User

Twenty Thirteen Function

a guest
Aug 22nd, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  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.     ) );
  40.  
  41.     add_action( 'admin_print_styles-appearance_page_custom-header', 'twentythirteen_fonts' );
  42. }
  43. add_action( 'after_setup_theme', 'twentythirteen_custom_header_setup' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement