Make WordPress Core

Changeset 14658


Ignore:
Timestamp:
05/15/2010 06:28:35 AM (15 years ago)
Author:
nacin
Message:

Also return raw author name and URI from get_theme_data and get_themes. props blepoxp, fixes #12275.

File:
1 edited

Legend:

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

    r14641 r14658  
    234234
    235235    if ( $theme_data['Author'] == '' ) {
    236         $theme_data['Author'] = __('Anonymous');
     236        $theme_data['Author'] = $theme_data['AuthorName'] = __('Anonymous');
    237237    } else {
     238        $theme_data['AuthorName'] = wp_kses( $theme_data['Author'], $themes_allowed_tags );
    238239        if ( empty( $theme_data['AuthorURI'] ) ) {
    239             $theme_data['Author'] = wp_kses( $theme_data['Author'], $themes_allowed_tags );
     240            $theme_data['Author'] = $theme_data['AuthorName'];
    240241        } else {
    241             $theme_data['Author'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $theme_data['AuthorURI'], __( 'Visit author homepage' ), wp_kses( $theme_data['Author'], $themes_allowed_tags ) );
     242            $theme_data['Author'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $theme_data['AuthorURI'], __( 'Visit author homepage' ), $theme_data['AuthorName'] );
    242243        }
    243244    }
     
    415416
    416417        $theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root );
    417         $wp_themes[$name] = array( 'Name' => $name, 'Title' => $title, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Stylesheet' => $stylesheet, 'Template Files' => $template_files, 'Stylesheet Files' => $stylesheet_files, 'Template Dir' => $template_dir, 'Stylesheet Dir' => $stylesheet_dir, 'Status' => $theme_data['Status'], 'Screenshot' => $screenshot, 'Tags' => $theme_data['Tags'], 'Theme Root' => $theme_root, 'Theme Root URI' => str_replace( WP_CONTENT_DIR, content_url(), $theme_root ) );
     418        $wp_themes[$name] = array(
     419            'Name' => $name,
     420            'Title' => $title,
     421            'Description' => $description,
     422            'Author' => $author,
     423            'Author Name' => $theme_data['AuthorName'],
     424            'Author URI' => $theme_data['AuthorURI'],
     425            'Version' => $version,
     426            'Template' => $template,
     427            'Stylesheet' => $stylesheet,
     428            'Template Files' => $template_files,
     429            'Stylesheet Files' => $stylesheet_files,
     430            'Template Dir' => $template_dir,
     431            'Stylesheet Dir' => $stylesheet_dir,
     432            'Status' => $theme_data['Status'],
     433            'Screenshot' => $screenshot,
     434            'Tags' => $theme_data['Tags'],
     435            'Theme Root' => $theme_root,
     436            'Theme Root URI' => str_replace( WP_CONTENT_DIR, content_url(), $theme_root ),
     437        );
    418438    }
    419439
Note: See TracChangeset for help on using the changeset viewer.