WP_Filesystem_Base::wp_themes_dir()publicWP 2.7.0

Returns the path on the remote filesystem of the Themes Directory.

Метод класса: WP_Filesystem_Base{}

Хуков нет.

Возвращает

Строку. The location of the remote path.

Использование

$WP_Filesystem_Base = new WP_Filesystem_Base();
$WP_Filesystem_Base->wp_themes_dir( $theme );
$theme(строка|false)
The theme stylesheet or template for the directory.
По умолчанию: false

Список изменений

С версии 2.7.0 Введена.

Код WP_Filesystem_Base::wp_themes_dir() WP 6.4.3

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 );
}