Switch language

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




register_theme_directory [ WordPress Function ]

register_theme_directory ( $directory )
Parameters:
  • (string) $directory Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR
Returns:
  • (bool)
Defined at:



Register a directory that contains themes.

Source


<?php
function register_theme_directory$directory ) {
    global 
$wp_theme_directories;

    if ( ! 
file_exists$directory ) ) {
        
// Try prepending as the theme directory could be relative to the content directory
        
$directory WP_CONTENT_DIR '/' $directory;
        
// If this directory does not exist, return and do not register
        
if ( ! file_exists$directory ) )
            return 
false;
    }

    
$wp_theme_directories[] = $directory;

    return 
true;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



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