diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-06-21 16:41:02 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-06-21 16:41:02 +0000 |
commit | a5fe68e002632c190ffbd85167671ed4d4961135 (patch) | |
tree | ae57f94603111507c50cb3c212a03bedf8f7dc5a /wp-includes/theme.php | |
parent | 4e38776b5b68c61a4593a84340f4654200f7568e (diff) | |
download | wordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.tar.gz wordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.tar.xz wordpress-mu-a5fe68e002632c190ffbd85167671ed4d4961135.zip |
WP Merge to WP 2.2.1
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1005 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/theme.php')
-rw-r--r-- | wp-includes/theme.php | 45 |
1 files changed, 14 insertions, 31 deletions
diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 51513bc..e561e23 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -56,21 +56,6 @@ function get_template_directory_uri() { } function get_theme_data( $theme_file ) { - $themes_allowed_tags = array( - 'a' => array( - 'href' => array(),'title' => array() - ), - 'abbr' => array( - 'title' => array() - ), - 'acronym' => array( - 'title' => array() - ), - 'code' => array(), - 'em' => array(), - 'strong' => array() - ); - $theme_data = implode( '', file( $theme_file ) ); $theme_data = str_replace ( '\r', '\n', $theme_data ); preg_match( '|Theme Name:(.*)|i', $theme_data, $theme_name ); @@ -79,28 +64,26 @@ function get_theme_data( $theme_file ) { preg_match( '|Author:(.*)|i', $theme_data, $author_name ); preg_match( '|Author URI:(.*)|i', $theme_data, $author_uri ); preg_match( '|Template:(.*)|i', $theme_data, $template ); - if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) ) - $version = wp_kses( trim( $version[1] ), $themes_allowed_tags ); + $version = trim( $version[1] ); else - $version = ''; - + $version =''; if ( preg_match('|Status:(.*)|i', $theme_data, $status) ) - $status = wp_kses( trim( $status[1] ), $themes_allowed_tags ); + $status = trim($status[1]); else $status = 'publish'; - - $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 ) ); - $template = wp_kses( trim( $template[1] ), $themes_allowed_tags ); - - $author_uri = clean_url( trim( $author_uri[1] ) ); - - if ( empty( $author_uri[1] ) ) { - $author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags ); + + $description = wptexturize( trim( $description[1] ) ); + + $name = $theme_name[1]; + $name = trim( $name ); + $theme = $name; + $theme_uri = trim( $theme_uri[1] ); + + if ( '' == $author_uri[1] ) { + $author = trim( $author_name[1] ); } else { - $author = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>', $author_uri, __( 'Visit author homepage' ), wp_kses( trim( $author_name[1] ), $themes_allowed_tags ) ); + $author = '<a href="' . trim( $author_uri[1] ) . '" title="' . __('Visit author homepage') . '">' . trim( $author_name[1] ) . '</a>'; } return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Status' => $status ); |