views:

68

answers:

2

With a Wordpress theme, it is necessary to add information to the top of the style.css file:

e.g; for the default theme there is this:

/*
Theme Name: WordPress Default
Theme URI: http://wordpress.org/
Description: The default WordPress theme based on the famous <a href="http://binarybonsai.com/kubrick/"&gt;Kubrick&lt;/a&gt;.
Version: 1.6
Author: Michael Heilemann
Author URI: http://binarybonsai.com/
Tags: blue, custom header, fixed width, two columns, widgets
*/

Are there any wordpress functions to get this information programatically?

+3  A: 

get_theme_data

Typeoneerror
Just what I needed. Thank you.
Abizern
+2  A: 

You could use get_theme_data() or this PHP script I put together quickly:

<?php
$file = file('your file location');
$contents = '';
foreach($file as $lines => $line){
$contents .= $line;
}
preg_match('!/\*[^*]*\*+([^/][^*]*\*+)*/!', $contents, $themeinfo);
echo nl2br($themeinfo[0]);
?>
BenTheDesigner