Switch language

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




get_theme_roots [ WordPress Function ]

get_theme_roots ( No parameters )
Returns:
  • (array|string) An array of theme roots keyed by template/stylesheet or a single theme root if all themes have the same root.
Defined at:



Retrieve theme roots.

Source


<?php
function get_theme_roots() {
    global 
$wp_theme_directories;

    if ( 
count($wp_theme_directories) <= )
        return 
'/themes';

    
$theme_roots get_site_transient'theme_roots' );
    if ( 
false === $theme_roots ) {
        
search_theme_directoriestrue ); // Regenerate the transient.
        
$theme_roots get_site_transient'theme_roots' );
    }
    return 
$theme_roots;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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