Note theme support for custom background, header, and menus. see #11817

git-svn-id: https://develop.svn.wordpress.org/trunk@13417 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-02-25 22:04:59 +00:00
parent 9ad6dd41c7
commit 61ffa682c1
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,9 @@ function twentyten_init() {
// This theme needs post thumbnails
add_theme_support( 'post-thumbnails' );
// This theme uses wp_nav_menu()
add_theme_support( 'nav-menus' );
// We'll be using them for custom header images on posts and pages
// so we want them to be 940 pixels wide by 198 pixels tall (larger images will be auto-cropped to fit)
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );

View File

@ -1327,6 +1327,8 @@ function add_custom_image_header($header_callback, $admin_header_callback, $admi
if ( ! empty($header_callback) )
add_action('wp_head', $header_callback);
add_theme_support( 'custom-header' );
if ( ! is_admin() )
return;
require_once(ABSPATH . 'wp-admin/custom-header.php');
@ -1393,6 +1395,8 @@ function add_custom_background($header_callback = '', $admin_header_callback = '
add_action('wp_head', $header_callback);
add_theme_support( 'custom-background' );
if ( ! is_admin() )
return;
require_once(ABSPATH . 'wp-admin/custom-background.php');