-
+ 415793A6250EE4041D8AC4D9FB234F7C5093C9FFCA6B574E3329C9C5DF4FD108DB92565644FBA46304408890664F8185DCC8696905767A0CBBC6A03CC72F8903
mp-wp/wp-admin/includes/theme.php
(0 . 0)(1 . 82)
44393 <?php
44394 /**
44395 * WordPress Theme Administration API
44396 *
44397 * @package WordPress
44398 * @subpackage Administration
44399 */
44400
44401 /**
44402 * {@internal Missing Short Description}}
44403 *
44404 * @since unknown
44405 *
44406 * @return unknown
44407 */
44408 function current_theme_info() {
44409 $themes = get_themes();
44410 $current_theme = get_current_theme();
44411 $ct->name = $current_theme;
44412 $ct->title = $themes[$current_theme]['Title'];
44413 $ct->version = $themes[$current_theme]['Version'];
44414 $ct->parent_theme = $themes[$current_theme]['Parent Theme'];
44415 $ct->template_dir = $themes[$current_theme]['Template Dir'];
44416 $ct->stylesheet_dir = $themes[$current_theme]['Stylesheet Dir'];
44417 $ct->template = $themes[$current_theme]['Template'];
44418 $ct->stylesheet = $themes[$current_theme]['Stylesheet'];
44419 $ct->screenshot = $themes[$current_theme]['Screenshot'];
44420 $ct->description = $themes[$current_theme]['Description'];
44421 $ct->author = $themes[$current_theme]['Author'];
44422 $ct->tags = $themes[$current_theme]['Tags'];
44423 return $ct;
44424 }
44425
44426 /**
44427 * {@internal Missing Short Description}}
44428 *
44429 * @since unknown
44430 *
44431 * @return unknown
44432 */
44433 function get_broken_themes() {
44434 global $wp_broken_themes;
44435
44436 get_themes();
44437 return $wp_broken_themes;
44438 }
44439
44440 /**
44441 * {@internal Missing Short Description}}
44442 *
44443 * @since unknown
44444 *
44445 * @return unknown
44446 */
44447 function get_page_templates() {
44448 $themes = get_themes();
44449 $theme = get_current_theme();
44450 $templates = $themes[$theme]['Template Files'];
44451 $page_templates = array ();
44452
44453 if ( is_array( $templates ) ) {
44454 foreach ( $templates as $template ) {
44455 $template_data = implode( '', file( WP_CONTENT_DIR.$template ));
44456
44457 $name = '';
44458 if ( preg_match( '|Template Name:(.*)$|mi', $template_data, $name ) )
44459 $name = $name[1];
44460
44461 $description = '';
44462 if( preg_match( '|Description:(.*)$|mi', $template_data, $description ) )
44463 $description = $description[1];
44464
44465 if ( !empty( $name ) ) {
44466 $page_templates[trim( $name )] = basename( $template );
44467 }
44468 }
44469 }
44470
44471 return $page_templates;
44472 }
44473
44474 ?>