HTTP/2 301
server: nginx
date: Thu, 24 Jul 2025 16:30:27 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/classes/WP_Filesystem_Base/wp_themes_dir/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Thu, 24 Jul 2025 16:30:27 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
WP_Filesystem_Base::wp_themes_dir() – Method | Developer.WordPress.org
WordPress Developer Resources
WP_Filesystem_Base::wp_themes_dir()
WP_Filesystem_Base::wp_themes_dir( string|false $theme = false ): string
Returns the path on the remote filesystem of the Themes Directory.
$theme
string|falseoptionalThe theme stylesheet or template for the directory.
Default:false
string The location of the remote path.
public function wp_themes_dir( $theme = false ) {
$theme_root = get_theme_root( $theme );
// Account for relative theme roots.
if ( '/themes' === $theme_root || ! is_dir( $theme_root ) ) {
$theme_root = WP_CONTENT_DIR . $theme_root;
}
return $this->find_folder( $theme_root );
}
View all references View on Trac View on GitHub
Version | Description |
---|
2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.