(string) WP_Theme is now the theme name, translated. Good replacement for get_current_theme(); better than wp_get_theme()->display('Name'). see #20103, see #20138.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
966a27513f
commit
bf97881f98
|
@ -314,7 +314,7 @@ function twentyeleven_theme_options_render_page() {
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), get_current_theme() ); ?></h2>
|
<h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), wp_get_theme() ); ?></h2>
|
||||||
<?php settings_errors(); ?>
|
<?php settings_errors(); ?>
|
||||||
|
|
||||||
<form method="post" action="options.php">
|
<form method="post" action="options.php">
|
||||||
|
|
|
@ -238,6 +238,15 @@ final class WP_Theme implements ArrayAccess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When converting the object to a string, the theme name is returned.
|
||||||
|
*
|
||||||
|
* @return string Theme name, ready for display (translated)
|
||||||
|
*/
|
||||||
|
function __toString() {
|
||||||
|
return (string) $this->display('Name');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __isset() magic method for properties formerly returned by current_theme_info()
|
* __isset() magic method for properties formerly returned by current_theme_info()
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue