[wp-trac] [WordPress Trac] #57020: Twenty Eleven: replace deprecated functions (was: Twenty Eleven Theme: The deprecated function has been used in the twenty-eleven theme.)

WordPress Trac noreply at wordpress.org
Mon Nov 7 23:09:33 UTC 2022


#57020: Twenty Eleven: replace deprecated functions
---------------------------+------------------------------
 Reporter:  krunal265      |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  2nd-opinion    |     Focuses:
---------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => 2nd-opinion
 * focuses:  performance, coding-standards =>
 * severity:  major => normal


Old description:

> The deprecated function has been used in the functions.php file of
> twentyeleven theme.
> 1) **add_custom_background()**
> 2) **add_custom_image_header()**
>
> We need to use the add_theme_support() function instead of that.

New description:

 Deprecated functions are used in the functions.php file of Twenty Eleven
 theme.
 1) `add_custom_background()`
 2) `add_custom_image_header()`

 We need to use the `add_theme_support()` function instead of that.

--

Comment:

 Hi and thanks for the report!

 This is not a bug because the theme uses `add_theme_support()` for both
 `custom-header` and `custom-background` in `twentyeleven_setup()`. The
 deprecated functions were added in changeset:20983 to support WordPress
 versions before 3.4. Anyone who might still have a very old, unsupported
 version of WordPress likely will not update the theme either, but I think
 this is fine to keep in functions.php.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57020#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list