[wp-trac] [WordPress Trac] #54833: Twenty Eleven: screen_icon() and get_current_theme() are deprecated
WordPress Trac
noreply at wordpress.org
Thu Apr 28 19:23:27 UTC 2022
#54833: Twenty Eleven: screen_icon() and get_current_theme() are deprecated
--------------------------------------+------------------------------
Reporter: Presskopp | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+------------------------------
Comment (by tomjdv):
@viralsampat I think {{{get_current_theme()}}} is necessary when using
child themes, where the name is not the same as the parent theme's name. I
think it might be better to use the following snippet:
{{{#!php
<?php
if ( $theme = get_option( 'current_theme' ) )
return $theme;
return wp_get_theme()->get('Name');
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54833#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list