Scaffold::get_template_path( $template )

Gets the template path based on installation type.


Return Return

(string) Template path.


Source Source

File: cli/src/scaffold.php

	public static function get_template_path( $template ) {
		$command_root  = WP_CLI\Utils\phar_safe_path( dirname( __DIR__ ) );
		$template_path = "{$command_root}/src/templates/{$template}";

		if ( ! file_exists( $template_path ) ) {
			WP_CLI::error( "Couldn't find {$template}" );
		}

		return $template_path;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.