mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Also return raw author name and URI from get_theme_data and get_themes. props blepoxp, fixes #12275.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
81d5ac363d
commit
a2a0b6041b
@ -233,12 +233,13 @@ function get_theme_data( $theme_file ) {
|
||||
$theme_data['Tags'] = array_map( 'trim', explode( ',', wp_kses( $theme_data['Tags'], array() ) ) );
|
||||
|
||||
if ( $theme_data['Author'] == '' ) {
|
||||
$theme_data['Author'] = __('Anonymous');
|
||||
$theme_data['Author'] = $theme_data['AuthorName'] = __('Anonymous');
|
||||
} else {
|
||||
$theme_data['AuthorName'] = wp_kses( $theme_data['Author'], $themes_allowed_tags );
|
||||
if ( empty( $theme_data['AuthorURI'] ) ) {
|
||||
$theme_data['Author'] = wp_kses( $theme_data['Author'], $themes_allowed_tags );
|
||||
$theme_data['Author'] = $theme_data['AuthorName'];
|
||||
} else {
|
||||
$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 ) );
|
||||
$theme_data['Author'] = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $theme_data['AuthorURI'], __( 'Visit author homepage' ), $theme_data['AuthorName'] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -414,7 +415,26 @@ function get_themes() {
|
||||
}
|
||||
|
||||
$theme_roots[$stylesheet] = str_replace( WP_CONTENT_DIR, '', $theme_root );
|
||||
$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 ) );
|
||||
$wp_themes[$name] = array(
|
||||
'Name' => $name,
|
||||
'Title' => $title,
|
||||
'Description' => $description,
|
||||
'Author' => $author,
|
||||
'Author Name' => $theme_data['AuthorName'],
|
||||
'Author URI' => $theme_data['AuthorURI'],
|
||||
'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 ),
|
||||
);
|
||||
}
|
||||
|
||||
unset($theme_files);
|
||||
|
Loading…
Reference in New Issue
Block a user