get_theme_data [ WordPress Function ]
get_theme_data ( $theme_file )
| Parameters: |
|
| See: | |
| Returns: |
|
| Defined at: |
|
Retrieve theme data from parsed theme file.
Source
<?php
function get_theme_data( $theme_file ) {
_deprecated_function( __FUNCTION__, 3.4, 'wp_get_theme()' );
$theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) );
$theme_data = array(
'Name' => $theme->get('Name'),
'URI' => $theme->display('ThemeURI', true, false),
'Description' => $theme->display('Description', true, false),
'Author' => $theme->display('Author', true, false),
'AuthorURI' => $theme->display('AuthorURI', true, false),
'Version' => $theme->get('Version'),
'Template' => $theme->get('Template'),
'Status' => $theme->get('Status'),
'Tags' => $theme->get('Tags'),
'Title' => $theme->get('Name'),
'AuthorName' => $theme->display('Author', false, false),
);
return $theme_data;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get theme data « WordPress Codex
Description. Returns an array of information about a theme file. Usage. <?php get_theme_data( $theme_filename ); ?> Parameters. $theme_filename: (string) ...
codex.wordpress.org - WordPress › Support » if file_exists / get_theme_data
I tried simply calling the get_theme_data function but quickly discovered that if the file doesn't exist (e.g. if the remote site is down) it returns every page in the ...
wordpress.org - Using get_theme_data() when Developing a Custom Theme for ...
Jun 22, 2010 ... If you are building a custom theme that you would like to add to the WordPress directory or start to sell online somewhere, a great function that ...
bavotasan.com - Wordpress Display theme information with get_theme_data
Jun 25, 2011 ... wordpress Display theme information with get_theme_data, admin, theme.
wpsnipp.com