what php function would we use to call the available php themes to a page? I want to show my users what templates are installed, and it would be much easier for alot of people if it would auto update directly with some php function.
I have looked at themes.php in the wpmu admin folder, but my php knowledge is very little.
It looks like its somewhere here :
<?php
$themes = get_themes();
$ct = current_theme_info();
$allowed_themes = get_site_option( "allowed_themes" );
if( $allowed_themes == false ) {
$allowed_themes = $themes;
}
$blog_allowed_themes = get_option( "allowed_themes" );
if( is_array( $blog_allowed_themes ) )
$allowed_themes = array_merge( $allowed_themes, $blog_allowed_themes );
if( isset( $allowed_themes[ $ct->title ] ) == false ) {
$allowed_themes[ $ct->title ] = true;
}
reset( $themes );
while( list( $key, $val ) = each( $themes ) ) {
if( isset( $allowed_themes[ $key ] ) == false ) {
unset( $themes[ $key ] );
}
}
reset( $themes );
?>
or here:
<?php
$style = '';
$theme_names = array_keys($themes);
natcasesort($theme_names);
foreach ($theme_names as $theme_name) {
if ( $theme_name == $current_theme )
continue;
$template = $themes[$theme_name]['Template'];
$stylesheet = $themes[$theme_name]['Stylesheet'];
$title = $themes[$theme_name]['Title'];
$version = $themes[$theme_name]['Version'];
$description = $themes[$theme_name]['Description'];
$author = $themes[$theme_name]['Author'];
$screenshot = $themes[$theme_name]['Screenshot'];
$stylesheet_dir = $themes[$theme_name]['Stylesheet Dir'];
$activate_link = "themes.php?action=activate&template=$template&stylesheet=$stylesheet";
?>