Make WordPress Core

Changeset 20146


Ignore:
Timestamp:
03/07/2012 11:56:35 PM (12 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-theme.php

    r20145 r20146  
    511511    public function display( $header, $markup = true, $translate = true ) {
    512512        $value = $this->get( $header );
    513         if ( false === $value || '' === $value )
    514             return $value;
    515 
    516         if ( ! $this->load_textdomain() )
     513
     514        if ( empty( $value ) || ! $this->load_textdomain() )
    517515            $translate = false;
    518516
     
    587585    private function markup_header( $header, $value, $translate ) {
    588586        switch ( $header ) {
     587            case 'Name' :
     588                if ( empty( $value ) )
     589                    $value = $this->get_stylesheet();
     590                break;
    589591            case 'Description' :
    590592                $value = wptexturize( $value );
Note: See TracChangeset for help on using the changeset viewer.