Definition:
function register_theme_directory( $directory) {}
Register a directory that contains themes.
Parameters
- string $directory: Either the full filesystem path to a theme folder or a folder within WP_CONTENT_DIR
Source code
function register_theme_directory( $directory) { global $wp_theme_directories; /* If this folder does not exist, return and do not register */ if ( !file_exists( $directory ) ) /* Try prepending as the theme directory could be relative to the content directory */ $registered_directory = WP_CONTENT_DIR . '/' . $directory; else $registered_directory = $directory; /* If this folder does not exist, return and do not register */ if ( !file_exists( $registered_directory ) ) return false; $wp_theme_directories[] = $registered_directory; return true; }
2689
No comments yet... Be the first to leave a reply!