Opened 10 years ago
Closed 8 years ago
#30324 closed defect (bug) (wontfix)
get_plugin_data does not return License
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.0 |
Component: | Plugins | Keywords: | has-patch |
Focuses: | Cc: |
Description
get_plugin_data doesn't return the License field
Attachments (2)
Change History (9)
#5
@
9 years ago
https://wordpress.org/plugins/about/ states that the plugin must be licensed with a GPLv2 or later compatible license (we all know that).
The example readme file given to plugin authors has this header in it.
https://wordpress.org/plugins/about/readme.txt
And the validator given to plugin authors the check their readme complains if you don't have a license specified.
While it's not technically required, mostly because if you don't specify a license its just assumed to be compatible, we might want to support it if there's that much emphasis on it.
#6
@
9 years ago
The Readme Validator suggests the License field for the readme.txt
file, It does this as it's designed to be used by the WordPress.org plugins directory (Even though it's not surfaced, we like to ensure that plugin authors are aware of what license they're submitting a plugin under).
get_plugin_data()
is designed to get the plugin.php
file headers, of which, License
is not one of. WordPress hasn't used that field and has no use for it.
It's the same as WordPress not pulling out the Contributors
or Requires at least
fields which the readme supports.
Personally, I don't see the need for this change.
Adds 'License' to the default headers sent to get_file_data.