-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix/phpcs #223
Fix/phpcs #223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left two suggestions / questions. But this is great :)
/** | ||
* Plugin Name: 10up Plugin Scaffold | ||
* Description: A brief description of the plugin. | ||
* Version: 0.1.0 | ||
* Requires at least: 4.9 | ||
* Requires PHP: 7.2 | ||
* Author: 10up | ||
* Author URI: https://10up.com | ||
* License: GPL v2 or later | ||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html | ||
* Text Domain: tenup-plugin | ||
* Domain Path: /languages | ||
* Update URI: https://github.com/10up/wp-scaffold | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't all this metadata that never actually shows anywhere since mu-plugins are using the plugin loader approach?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, though it's not uncommon for someone to copy-paste the mu-plugin as a scaffold for a standard plugin, in which case it's helpful to have this in place.
phpcs.xml
Outdated
<!-- Scan these directories --> | ||
<file>./themes/*</file> | ||
<file>./mu-plugins/*</file> | ||
|
||
<!-- Don't scan these directories --> | ||
<exclude-pattern>dist/</exclude-pattern> | ||
<exclude-pattern>plugins/*</exclude-pattern> | ||
<exclude-pattern>./plugins/*</exclude-pattern> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this will cause issues pretty soon. To me there are valid reasons why I may need to add custom plugins to the plugins directory and 3rd party plugins to the mu-plugins folder.
Maybe it makes more sense to not use any wildcards but explicitly specify the folders we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with that. Updated to exclude node_modules
and vendor
but include plugins
by default
Description of the Change
This PR does a couple of things:
Closes #219
Closes #216
Closes #198
How to test the Change
Credits
Props @darylldoyle @Jamesking56
Checklist: