Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #54833, comment 6


Ignore:
Timestamp:
06/30/2022 11:05:27 PM (2 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #54833, comment 6

    v1 v2  
    55* `screen_icon()` is removed, as it was soft-deprecated in [26537] / #26119 and formally deprecated in [41274] / #41153.
    66* The `current_theme` option was introduced for WordPress 2.5 in [6334] / #5346. Since Twenty Eleven requires WordPress 3.2 or later, I think we can rely on the option being available.
    7 * `wp_get_theme()` is replaced with `wp_get_theme()->get( 'Name' )`. I thought `wp_get_theme()` returns an object and not the theme name, so I was confused for a bit here. However, looking at [20039] / #20138, the `WP_Theme` class has a `__toString()` method, so this should work as expected. Still, using `::get( 'Name' )` explicitly would avoid the confusion, and that's what we use in other instances, e.g. in `get_theme_mods()`, `remove_theme_mods()`, or the deprecated `get_current_theme()` function.
     7* `wp_get_theme()` is replaced with `wp_get_theme()->get( 'Name' )`. I thought `wp_get_theme()` returns the theme object and not the theme name, so I was confused for a bit here. However, looking at [20039] / #20138, the `WP_Theme` class has a `__toString()` method, so this should work as expected. Still, using `wp_get_theme()->get( 'Name' )` explicitly would avoid the confusion, and that's what we use in other instances, e.g. in `get_theme_mods()`, `remove_theme_mods()`, or the deprecated `get_current_theme()` function.