From 1a265e464c946264f7ba4adf758836bb0d04be89 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 20 Mar 2012 21:32:42 +0000 Subject: [PATCH] Move Twenty Ten and the rest of Twenty Eleven to add_theme_support() for headers and backgrounds. props sabreuse for initial patch. fixes #20265. see #20249. git-svn-id: http://svn.automattic.com/wordpress/trunk@20225 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyeleven/functions.php | 9 ++-- wp-content/themes/twentyeleven/showcase.php | 8 ++-- wp-content/themes/twentyten/functions.php | 46 ++++++++------------ wp-content/themes/twentyten/header.php | 4 +- 4 files changed, 30 insertions(+), 37 deletions(-) diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php index 1228bb4a7d..b93b0212f4 100644 --- a/wp-content/themes/twentyeleven/functions.php +++ b/wp-content/themes/twentyeleven/functions.php @@ -62,10 +62,9 @@ if ( ! function_exists( 'twentyeleven_setup' ) ): * * @uses load_theme_textdomain() For translation/localization support. * @uses add_editor_style() To style the visual editor. - * @uses add_theme_support() To add support for post thumbnails, automatic feed links, and Post Formats. + * @uses add_theme_support() To add support for post thumbnails, automatic feed links, custom headers + * and backgrounds, and post formats. * @uses register_nav_menus() To add support for navigation menus. - * @uses add_custom_background() To add support for a custom background. - * @uses add_custom_image_header() To add support for a custom header. * @uses register_default_headers() To register the default custom header images provided with the theme. * @uses set_post_thumbnail_size() To set a custom post thumbnail size. * @@ -234,7 +233,7 @@ if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) : /** * Styles the header image displayed on the Appearance > Header admin panel. * - * Referenced via add_custom_image_header() in twentyeleven_setup(). + * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). * * @since Twenty Eleven 1.0 */ @@ -284,7 +283,7 @@ if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) : /** * Custom header image markup displayed on the Appearance > Header admin panel. * - * Referenced via add_custom_image_header() in twentyeleven_setup(). + * Referenced via add_theme_support('custom-header') in twentyeleven_setup(). * * @since Twenty Eleven 1.0 */ diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index 4f69099240..027adc79b4 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -66,6 +66,8 @@ get_header(); ?> */ $counter_slider = 0; + $header_image_width = get_theme_support( 'custom-header', 'width' ); + $header_image_height = get_theme_support( 'custom-header', 'height' ); ?>