WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#20265 closed defect (bug) (fixed)

Update twentyten and twentyeleven to new-style header and background support

Reported by: sabreuse Owned by: nacin
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

#20249 deprecates add_custom_image_header() and add_custom_background() in favor of add_theme_support. This patch updates the bundled themes to the new style.

Attachments (2)

20265.diff (8.6 KB) - added by sabreuse 3 years ago.
20265.2.diff (8.6 KB) - added by sabreuse 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 @nacin3 years ago

  • Milestone changed from Awaiting Review to 3.4

@sabreuse3 years ago

comment:2 @toscho3 years ago

  • Cc info@… added
add_image_size( get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ), true );

Shouldn’t that be:

add_image_size( 
    'large-feature', 
    get_theme_support( 'custom-header', 'width' ), 
    get_theme_support( 'custom-header', 'height' ), 
    true 
);

The 'random-default' parameter values are wrong: It should be false in TwentyTen and true in TwentyEleven.

@sabreuse3 years ago

comment:3 @sabreuse3 years ago

toscho, thanks for catching those: errors corrected in 20265.2.diff

comment:5 @nacin3 years ago

In [20222]:

Update twentyeleven/functions.php to use the new add_theme_support() calls for backgrounds and headers. props sabreuse for initial patch. see #20265. see #20249.

comment:18 @nacin3 years ago

In [20223]:

Remove use of HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT from twentyeleven/header.php. see #20265.

comment:19 @nacin3 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [20225]:

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.

comment:19 @nacin3 years ago

In [20226]:

Remove unused variable. see #20265.

Note: See TracTickets for help on using tickets.