Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/Scaffold_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function taxonomy( $args, $assoc_args ) {
$this->scaffold( $args[0], $assoc_args, $defaults, '/taxonomies/', $templates );
}

private function scaffold( $slug, $assoc_args, $defaults, $subdir, $templates ) {
protected function scaffold( $slug, $assoc_args, $defaults, $subdir, $templates ) {
$wp_filesystem = $this->init_wp_filesystem();

$control_defaults = [
Expand Down Expand Up @@ -527,7 +527,7 @@ public function child_theme( $args, $assoc_args ) {
}
}

private function get_output_path( $assoc_args, $subdir ) {
protected function get_output_path( $assoc_args, $subdir ) {
if ( $assoc_args['theme'] ) {
$theme = $assoc_args['theme'];
if ( is_string( $theme ) ) {
Expand Down Expand Up @@ -802,7 +802,7 @@ public function theme_tests( $args, $assoc_args ) {
$this->scaffold_plugin_theme_tests( $args, $assoc_args, 'theme' );
}

private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
protected function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
$wp_filesystem = $this->init_wp_filesystem();

if ( ! empty( $args[0] ) ) {
Expand Down Expand Up @@ -922,7 +922,7 @@ private function scaffold_plugin_theme_tests( $args, $assoc_args, $type ) {
*
* @return null|string Returns null on success, error message on error.
*/
private function check_target_directory( $type, $target_dir ) {
protected function check_target_directory( $type, $target_dir ) {
$parent_dir = dirname( self::canonicalize_path( str_replace( '\\', '/', $target_dir ) ) );

if ( 'theme' === $type && str_replace( '\\', '/', WP_CONTENT_DIR . '/themes' ) !== $parent_dir ) {
Expand Down Expand Up @@ -997,7 +997,7 @@ protected function log_whether_files_written( $files_written, $skip_message, $su
* @param array $assoc_args
* @return string|null
*/
private function extract_dashicon( $assoc_args ) {
protected function extract_dashicon( $assoc_args ) {
$dashicon = Utils\get_flag_value( $assoc_args, 'dashicon' );
if ( ! $dashicon ) {
return null;
Expand All @@ -1009,7 +1009,7 @@ private function extract_dashicon( $assoc_args ) {
* If you're writing your files to your theme directory your textdomain also needs to be the same as your theme.
* Same goes for when plugin is being used.
*/
private function get_textdomain( $textdomain, $args ) {
protected function get_textdomain( $textdomain, $args ) {
if ( strlen( $textdomain ) ) {
return $textdomain;
}
Expand Down Expand Up @@ -1042,7 +1042,7 @@ private function generate_machine_name( $slug ) {
* @param string $word Word to be pluralized.
* @return string
*/
private function pluralize( $word ) {
protected function pluralize( $word ) {
return Inflector::pluralize( $word );
}

Expand Down Expand Up @@ -1094,14 +1094,14 @@ protected function init_wp_filesystem() {
/**
* Localizes the template path.
*/
private static function mustache_render( $template, $data = [] ) {
protected static function mustache_render( $template, $data = [] ) {
return Utils\mustache_render( dirname( __DIR__ ) . "/templates/{$template}", $data );
}

/**
* Gets the template path based on installation type.
*/
private static function get_template_path( $template ) {
protected static function get_template_path( $template ) {
$command_root = Utils\phar_safe_path( dirname( __DIR__ ) );
$template_path = "{$command_root}/templates/{$template}";

Expand All @@ -1122,7 +1122,7 @@ private static function get_template_path( $template ) {
*
* @return string The canonicalized path.
*/
private static function canonicalize_path( $path ) {
protected static function canonicalize_path( $path ) {
if ( '' === $path || '/' === $path ) {
return $path;
}
Expand Down Expand Up @@ -1150,7 +1150,7 @@ private static function canonicalize_path( $path ) {
* @param string|bool $theme Theme name or true.
* @return string
*/
private function get_theme_name( $theme ) {
protected function get_theme_name( $theme ) {
if ( true === $theme ) {
$theme = wp_get_theme()->template;
}
Expand Down