From e2bf96e4afad5f50d4c2d650a32a0f6e102e1708 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 1 Jul 2022 14:25:00 +0000 Subject: [PATCH] Twenty Eleven: Replace deprecated function calls on theme options page. This includes: * Removing the deprecated `screen_icon()` function call. * Replacing the deprecated `get_current_theme()` function call with `get_option( 'current_theme' )`. * Using `wp_get_theme()->display( 'Name' )` explicitly instead of relying on `WP_Theme`'s `__toString()` method, for clarity. Follow-up to [6334], [20039], [20040], [20042], [20508], [26537], [41274]. Props Presskopp, cu121, viralsampat, costdev, tomjdv, sabernhardt, SergeyBiryukov. Fixes #54833. git-svn-id: https://develop.svn.wordpress.org/trunk@53626 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentyeleven/inc/theme-options.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentyeleven/inc/theme-options.php b/src/wp-content/themes/twentyeleven/inc/theme-options.php index 78be3b5aad..bb521d0011 100644 --- a/src/wp-content/themes/twentyeleven/inc/theme-options.php +++ b/src/wp-content/themes/twentyeleven/inc/theme-options.php @@ -339,10 +339,9 @@ function twentyeleven_settings_field_layout() { * @since Twenty Eleven 1.2 */ function twentyeleven_theme_options_render_page() { + $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme()->display( 'Name' ) : get_option( 'current_theme' ); ?>
- -