Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




get_theme_data [ WordPress Function ]

get_theme_data ( $theme_file )
Parameters:
  • (string) $theme_file Theme file path.
See:
Returns:
  • (array) Theme data.
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_Themebasenamedirname$theme_file ) ), dirnamedirname$theme_file ) ) );

    
$theme_data = array(
        
'Name' => $theme->get('Name'),
        
'URI' => $theme->display('ThemeURI'truefalse),
        
'Description' => $theme->display('Description'truefalse),
        
'Author' => $theme->display('Author'truefalse),
        
'AuthorURI' => $theme->display('AuthorURI'truefalse),
        
'Version' => $theme->get('Version'),
        
'Template' => $theme->get('Template'),
        
'Status' => $theme->get('Status'),
        
'Tags' => $theme->get('Tags'),
        
'Title' => $theme->get('Name'),
        
'AuthorName' => $theme->display('Author'falsefalse),
    );

    return 
$theme_data;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics