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.
Built from https://develop.svn.wordpress.org/trunk@53626


git-svn-id: http://core.svn.wordpress.org/trunk@53185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-07-01 14:26:15 +00:00
parent 580d991349
commit 3e622b1d75
2 changed files with 2 additions and 3 deletions

View File

@ -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' );
?>
<div class="wrap">
<?php screen_icon(); ?>
<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
<h2>
<?php
/* translators: %s: Theme name. */

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.1-alpha-53593';
$wp_version = '6.1-alpha-53626';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.