Opened 6 weeks ago
Last modified 6 weeks ago
#8447 new feature request
Themes & Plugins API: Expose closure, suspension, and outdated metadata for Core consumption
| Reported by: | mralidoosti | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | API | Keywords: | |
| Cc: |
Description (last modified by )
Currently, when plugins or themes are closed, removed, suspended, or no longer maintained in the WordPress repository, the API either returns generic 404 / 'not found' errors (for suspended themes) or lacks machine-readable flags in standard API representations (such as whether a theme is delisted or outdated).
To enable WordPress Core (and site health/monitoring tools) to provide meaningful status feedback to site administrators regarding closed or outdated dependencies, this patch enhances the Plugin and Theme Info APIs as follows:
- Theme API (
Themes_API):- Queries suspended themes (
post_status = 'suspend') instead of a generic 404 miss, returningerror => 'closed',closed => true,status => 'suspend',is_suspended => true,closed_date, andreason. - In
fill_theme(), includesclosed,status,is_suspended,is_outdated, andoutdated_notice(triggered when a theme has not received updates in over 2 years). - Updates
themes/info/1.0/index.phpto prevent cachingclosedthemes asnot_foundintheme_information_error. - Adds cache purge hooks on
suspend_repopackageandpublish_repopackage.
- Queries suspended themes (
- Plugin API (
Plugin&Plugins_Info_API_Request):- Enhances
plugin_info()withstatus,is_outdated,outdated_notice, andis_securitywhen closed or disabled. - Adds
closed => false,is_outdated, andstatus => 'publish'toplugin_info_data()for active plugins. - Registers the new fields in
Plugins_Info_API_Request::$fieldsand default field mappings so they are not stripped during field filtering. - Adds closure metadata attachment in
plugin-update-helpers.php(alter_update()).
- Enhances
Attachments (1)
Note:
See TracTickets
for help on using tickets.