Permalink
Browse files

Switch to the new 'custom-header' theme feature.

  • Loading branch information...
1 parent be30b02 commit 189b7226d9e9602374f21c1d923f0ed72382c377 @justintadlock committed Aug 25, 2012
Showing with 12 additions and 9 deletions.
  1. +12 −9 functions.php
View
@@ -79,15 +79,18 @@ function my_life_theme_setup() {
)
);
- /**
- * Add support for WordPress custom header image. On that note, this is horrible and messy. Expect a
- * rewrite of this entire code into something more beautiful in future versions.
- */
- add_custom_image_header( '__return_false', '__return_false' );
- define( 'NO_HEADER_TEXT', true );
- define( 'HEADER_IMAGE', 'remove-header' ); // Setting the default to 'remove-header' instead of empty string.
- define( 'HEADER_IMAGE_WIDTH', 1000 );
- define( 'HEADER_IMAGE_HEIGHT', 200 );
+ /* Add support for a custom header image. */
+ add_theme_support(
+ 'custom-header',
+ array(
+ 'default-image' => 'remove-header',
+ 'width' => 1000,
+ 'height' => 200,
+ 'header-text' => false,
+ 'wp-head-callback' => '__return_false',
+ 'admin-head-callback' => '__return_false',
+ )
+ );
/* Embed width/height defaults. */
add_filter( 'embed_defaults', 'my_life_embed_defaults' );

0 comments on commit 189b722

Please sign in to comment.