Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#30324 closed defect (bug) (wontfix)

get_plugin_data does not return License

Reported by: jkmassel's profile jkmassel Owned by: chriscct7's profile chriscct7
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Plugins Keywords: has-patch
Focuses: Cc:


get_plugin_data doesn't return the License field

Attachments (2)

30324.diff (446 bytes) - added by voldemortensen 9 years ago.
30324(1).diff (1.3 KB) - added by voldemortensen 9 years ago.

Download all attachments as: .zip

Change History (9)

9 years ago

#1 @voldemortensen
9 years ago

  • Keywords has-patch added

Adds 'License' to the default headers sent to get_file_data.

#2 @voldemortensen
9 years ago

Added unit tests to the patch.

#3 @chriscct7
8 years ago

  • Owner set to chriscct7
  • Status changed from new to reviewing

#4 @nacin
8 years ago

I don't believe "License" is a real supported header.

#5 @voldemortensen
8 years ago 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.

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 @dd32
8 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 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.

#7 @swissspidy
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

I don't see the need for this change


Note: See TracTickets for help on using tickets.