WordPress.org

Make WordPress Core

Ticket #26873: 26873.2.diff

File 26873.2.diff, 956 bytes (added by SergeyBiryukov, 8 years ago)
  • src/wp-includes/class-wp-theme.php

     
    571571         * @param string $header Theme header. Name, Description, Author, Version, ThemeURI, AuthorURI, Status, Tags.
    572572         * @param bool $markup Optional. Whether to mark up the header. Defaults to true.
    573573         * @param bool $translate Optional. Whether to translate the header. Defaults to true.
    574          * @return string Processed header, false on failure.
     574         * @return string Processed header.
    575575         */
    576576        public function display( $header, $markup = true, $translate = true ) {
    577577                $value = $this->get( $header );
     578                if ( ! $value ) {
     579                        return '';
     580                }
    578581
    579                 if ( $translate && ( empty( $value ) || ! $this->load_textdomain() ) )
     582                if ( $translate && ! $this->load_textdomain() )
    580583                        $translate = false;
    581584
    582585                if ( $translate )