| 58 | | function get_theme_data($theme_file) { |
|---|
| 59 | | $theme_data = implode('', file($theme_file)); |
|---|
| 60 | | preg_match("|Theme Name:(.*)|i", $theme_data, $theme_name); |
|---|
| 61 | | preg_match("|Theme URI:(.*)|i", $theme_data, $theme_uri); |
|---|
| 62 | | preg_match("|Description:(.*)|i", $theme_data, $description); |
|---|
| 63 | | preg_match("|Author:(.*)|i", $theme_data, $author_name); |
|---|
| 64 | | preg_match("|Author URI:(.*)|i", $theme_data, $author_uri); |
|---|
| 65 | | preg_match("|Template:(.*)|i", $theme_data, $template); |
|---|
| 66 | | if ( preg_match("|Version:(.*)|i", $theme_data, $version) ) |
|---|
| 67 | | $version = trim($version[1]); |
|---|
| | 58 | function get_theme_data( $theme_file ) { |
|---|
| | 59 | $theme_data = implode( '', file( $theme_file ) ); |
|---|
| | 60 | $theme_data = str_replace ( '\r', '\n', $theme_data ); |
|---|
| | 61 | preg_match( '|Theme Name:(.*)|i', $theme_data, $theme_name ); |
|---|
| | 62 | preg_match( '|Theme URI:(.*)|i', $theme_data, $theme_uri ); |
|---|
| | 63 | preg_match( '|Description:(.*)|i', $theme_data, $description ); |
|---|
| | 64 | preg_match( '|Author:(.*)|i', $theme_data, $author_name ); |
|---|
| | 65 | preg_match( '|Author URI:(.*)|i', $theme_data, $author_uri ); |
|---|
| | 66 | preg_match( '|Template:(.*)|i', $theme_data, $template ); |
|---|
| | 67 | if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) ) |
|---|
| | 68 | $version = trim( $version[1] ); |
|---|
| 84 | | $author = '<a href="' . trim($author_uri[1]) . '" title="' . __('Visit author homepage') . '">' . trim($author_name[1]) . '</a>'; |
|---|
| 85 | | } |
|---|
| 86 | | |
|---|
| 87 | | return array('Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status); |
|---|
| | 85 | $author = '<a href="' . trim( $author_uri[1] ) . '" title="' . __('Visit author homepage') . '">' . trim( $author_name[1] ) . '</a>'; |
|---|
| | 86 | } |
|---|
| | 87 | |
|---|
| | 88 | return array( 'Name' => $name, 'Title' => $theme, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1], 'Status' => $status ); |
|---|