#61227 closed enhancement (duplicate)
wp_get_theme(): Add "License" and "License URI" header fields
Reported by: | wildworks | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | |
Focuses: | Cc: |
Description
The License
and License URI
fields are required fields when submitting a theme to the theme directory, but these two fields cannot be retrieved with wp_get_theme()
. I thought it would be a good idea to include these two fields as well as the other required fields.
The reason behind submitting this ticket is related to the Create Block Thene plugin PR (https://github.com/WordPress/create-block-theme/pull/634). This plugin parses the active theme's style.css
and copies all header fields to the overwritten or cloned theme. Currently, these two fields cannot be obtained using wp_get_theme()
, so the only option is to use regular expressions or use get_file_data()
.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi there, thanks for the ticket!
This was previously suggested in #40034, let's continue the discussion there.
Looks like one other option would be to use the
extra_theme_headers
filter, see comment:5:ticket:40034.