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

Handle "license" and "license URL" as header fields #246

Open
1 task done
ponsfrilus opened this issue Dec 12, 2019 · 2 comments
Open
1 task done

Handle "license" and "license URL" as header fields #246

ponsfrilus opened this issue Dec 12, 2019 · 2 comments

Comments

@ponsfrilus
Copy link

Feature Request

Note: This feature request is related to wp-cli/i18n-command/pull/198.

When scaffolding a new plugin, all the header fields are not handled, more specifically it would be great to be able to specify the License and License URI fields:

License: The short name (slug) of the plugin’s license (e.g. GPL2). More information about licensing can be found in the WordPress.org guidelines.
License URI: A link to the full text of the license (e.g. https://www.gnu.org/licenses/gpl-2.0.html).

Describe the solution you'd like
Looking a the file scaffold-command/src/Scaffold_Command.php, I suggest to add two options as follow:

 * [--plugin_license=<license>]
 * : What to put in the 'License:' header, e.g. GPLv2
 *
 * [--plugin_license_uri=<url>]
 * : What to put in the 'License URI:' header, e.g. https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 *

Questions

  • Would it be possible to set a default license ?
  • Would that change also be needed by others scaffoldable elements, surch as underscodre, child or test themes, ...?

PS:

@schlessera
Copy link
Member

Yes, the above makes sense.

However, an added complexity is that for some licenses, the actual license needs to be included as a LICENSE file into the scaffolded package.

As for the questions:

Would it be possible to set a default license ?

I think we should go with the WordPress license as a default.

Would that change also be needed by others scaffoldable elements, surch as underscodre, child or test themes, ...?

Yes, if we add the possibility to directly manage the license, we should do so for all subcommands that include a license (reference) in some form.

@ponsfrilus
Copy link
Author

However, an added complexity is that for some licenses, the actual license needs to be included as a LICENSE file into the scaffolded package.

Do you have a particular license in mind ? It looks very difficult to be able to handle all the license and theirs different versions... I would rely on the fact that the user knows what he's doing when choosing a license...

As for the questions:

Would it be possible to set a default license ?

I think we should go with the WordPress license as a default.

I agree, GPLv2.

Would that change also be needed by others scaffoldable elements, surch as underscodre, child or test themes, ...?

Yes, if we add the possibility to directly manage the license, we should do so for all subcommands that include a license (reference) in some form.

Ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants