Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to WPCS v3 #324

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require-dev": {
"wp-cli/extension-command": "^1.2 || ^2",
"wp-cli/wp-cli-tests": "^3.1"
"wp-cli/wp-cli-tests": "^4"
},
"config": {
"process-timeout": 7200,
Expand Down
2 changes: 1 addition & 1 deletion scaffold-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return;
}

$wpcli_scaffold_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
$wpcli_scaffold_autoloader = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $wpcli_scaffold_autoloader ) ) {
require_once $wpcli_scaffold_autoloader;
}
Expand Down
4 changes: 1 addition & 3 deletions src/Scaffold_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@ protected function maybe_create_themes_dir() {
if ( ! is_dir( $themes_dir ) ) {
wp_mkdir_p( $themes_dir );
}

}

/**
Expand All @@ -1096,7 +1095,6 @@ protected function maybe_create_plugins_dir() {
if ( ! is_dir( WP_PLUGIN_DIR ) ) {
wp_mkdir_p( WP_PLUGIN_DIR );
}

}

/**
Expand All @@ -1113,7 +1111,7 @@ protected function init_wp_filesystem() {
* Localizes the template path.
*/
private static function mustache_render( $template, $data = [] ) {
return Utils\mustache_render( dirname( dirname( __FILE__ ) ) . "/templates/{$template}", $data );
return Utils\mustache_render( dirname( __DIR__ ) . "/templates/{$template}", $data );
}

/**
Expand Down