Make WordPress Core

Changeset 53626


Ignore:
Timestamp:
07/01/2022 02:25:00 PM (22 months ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/inc/theme-options.php

    r49183 r53626  
    340340 */
    341341function twentyeleven_theme_options_render_page() {
     342    $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme()->display( 'Name' ) : get_option( 'current_theme' );
    342343    ?>
    343344    <div class="wrap">
    344         <?php screen_icon(); ?>
    345         <?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>
    346345        <h2>
    347346        <?php
Note: See TracChangeset for help on using the changeset viewer.