mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 09:57:38 +01:00
Fix notice in wp-includes/theme.php, props filosofo, fixes #9336
git-svn-id: http://svn.automattic.com/wordpress/trunk@10825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c25364742c
commit
7510ca2238
@ -179,9 +179,20 @@ function get_theme_data( $theme_file ) {
|
||||
|
||||
$theme_data = implode( '', file( $theme_file ) );
|
||||
$theme_data = str_replace ( '\r', '\n', $theme_data );
|
||||
preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name );
|
||||
preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri );
|
||||
preg_match( '|Description:(.*)$|mi', $theme_data, $description );
|
||||
if ( preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ) )
|
||||
$name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags );
|
||||
else
|
||||
$name = $theme = '';
|
||||
|
||||
if ( preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ) )
|
||||
$theme_uri = clean_url( trim( $theme_uri[1] ) );
|
||||
else
|
||||
$theme_uri = '';
|
||||
|
||||
if ( preg_match( '|Description:(.*)$|mi', $theme_data, $description ) )
|
||||
$description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) );
|
||||
else
|
||||
$description = '';
|
||||
|
||||
if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) )
|
||||
$author_uri = clean_url( trim( $author_uri[1]) );
|
||||
@ -208,10 +219,6 @@ function get_theme_data( $theme_file ) {
|
||||
else
|
||||
$tags = array();
|
||||
|
||||
$name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags );
|
||||
$theme_uri = clean_url( trim( $theme_uri[1] ) );
|
||||
$description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) );
|
||||
|
||||
if ( preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ) ) {
|
||||
if ( empty( $author_uri ) ) {
|
||||
$author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags );
|
||||
|
Loading…
Reference in New Issue
Block a user