On display, replace an empty Theme Name with the theme's directory. see #20103.

git-svn-id: https://develop.svn.wordpress.org/trunk@20146 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-03-07 23:56:35 +00:00
parent f7bd4afbeb
commit 22eed35901
1 changed files with 5 additions and 3 deletions

View File

@ -510,10 +510,8 @@ final class WP_Theme implements ArrayAccess {
*/
public function display( $header, $markup = true, $translate = true ) {
$value = $this->get( $header );
if ( false === $value || '' === $value )
return $value;
if ( ! $this->load_textdomain() )
if ( empty( $value ) || ! $this->load_textdomain() )
$translate = false;
if ( $translate )
@ -586,6 +584,10 @@ final class WP_Theme implements ArrayAccess {
*/
private function markup_header( $header, $value, $translate ) {
switch ( $header ) {
case 'Name' :
if ( empty( $value ) )
$value = $this->get_stylesheet();
break;
case 'Description' :
$value = wptexturize( $value );
break;