CoreFiles by mySites.guru
theme.php52 lines, 1,453 bytes, from wordpress-2.3.2-beta.zip
Raw History Compare with 2.3.1-beta1
md5
da44fd3619013b27dba0c68fab5d1549
sha1
4b06c0b081fa4f948a14a8081a5cdcc03eb512da
sha256
91c5f8e56494ea57769f5f94b22168aff6db1414ddbc980566cd7018c1196926
<?php

function current_theme_info() {
	$themes = get_themes();
	$current_theme = get_current_theme();
	$ct->name = $current_theme;
	$ct->title = $themes[$current_theme]['Title'];
	$ct->version = $themes[$current_theme]['Version'];
	$ct->parent_theme = $themes[$current_theme]['Parent Theme'];
	$ct->template_dir = $themes[$current_theme]['Template Dir'];
	$ct->stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
	$ct->template = $themes[$current_theme]['Template'];
	$ct->stylesheet = $themes[$current_theme]['Stylesheet'];
	$ct->screenshot = $themes[$current_theme]['Screenshot'];
	$ct->description = $themes[$current_theme]['Description'];
	$ct->author = $themes[$current_theme]['Author'];
	return $ct;
}

function get_broken_themes() {
	global $wp_broken_themes;

	get_themes();
	return $wp_broken_themes;
}

function get_page_templates() {
	$themes = get_themes();
	$theme = get_current_theme();
	$templates = $themes[$theme]['Template Files'];
	$page_templates = array ();

	if ( is_array( $templates ) ) {
		foreach ( $templates as $template ) {
			$template_data = implode( '', file( ABSPATH.$template ));

			preg_match( '|Template Name:(.*)$|mi', $template_data, $name );
			preg_match( '|Description:(.*)$|mi', $template_data, $description );

			$name = $name[1];
			$description = $description[1];

			if ( !empty( $name ) ) {
				$page_templates[trim( $name )] = basename( $template );
			}
		}
	}

	return $page_templates;
}

?>

The same content is in 14 releases, WordPress 2.3-beta1 to 2.3.3. See them all, or every version of this file.