#55480 closed enhancement (fixed)
Add filter to modify description in plugin card
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Upgrade/Install | Keywords: | has-patch has-dev-note |
| Focuses: | administration | Cc: |
Description
I've found it desirable to be able to modify the description of the plugin card in the plugin install list table.
If possible I would like to add a filter for this variable.
Attachments (1)
Change History (19)
This ticket was mentioned in PR #2476 on WordPress/wordpress-develop by afragen.
4 years ago
#1
#2
@
4 years ago
- Milestone changed from Awaiting Review to 6.0
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
SergeyBiryukov commented on PR #2476:
4 years ago
#5
Thanks for the PR! Merged in https://core.trac.wordpress.org/changeset/53074.
#6
@
4 years ago
- Keywords needs-dev-note added
Marking for Dev note but really just needs mentioning in Field guide.
This ticket was mentioned in Slack in #core-auto-updates by pbiron. View the logs.
4 years ago
#9
follow-up:
↓ 10
@
4 years ago
@SergeyBiryukov I believe the reference for the @param $plugin is a reference to the output of a call to plugins_api() and not to the plugin_row_meta filter.
Thanks @pbiron
#10
in reply to:
↑ 9
;
follow-up:
↓ 11
@
4 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to afragen:
@SergeyBiryukov I believe the reference for the
@param $pluginis a reference to the output of a call toplugins_api()and not to theplugin_row_metafilter.
Thanks @pbiron
To expand on the above: this is in reference to the description of that param in the DocBlock. The param that is passed to plugin_row_meta contains a number of properties about the plugin that are only set in WP_Plugin_List_Table::single_row() and would never be set in the param that is passed to plugin_install_description.
The same discrepancy also applies to DocBlock of the plugin_install_action_links which was modified in the commit for this new filter.
#11
in reply to:
↑ 10
;
follow-up:
↓ 13
@
4 years ago
Replying to pbiron:
Replying to afragen:
I believe the reference for the
@param $pluginis a reference to the output of a call toplugins_api()and not to theplugin_row_metafilter.
Thanks @pbiron
To expand on the above: this is in reference to the description of that param in the DocBlock. The param that is passed to plugin_row_meta contains a number of properties about the plugin that are only set in
WP_Plugin_List_Table::single_row()and would never be set in the param that is passed toplugin_install_description.
Thanks! I think I went with a reference to plugin_row_meta because the plugins_api() DocBlock does not actually describe the structure of the returned array (as it depends on the arguments passed), and plugin_row_meta was the closest thing I could find. It looks like we could better document the plugins_api() response and link to that instead.
#12
@
4 years ago
Closest would likely be the plugins_api_result filter and that's also sorta documented in plugins_api().
#13
in reply to:
↑ 11
@
4 years ago
Replying to SergeyBiryukov:
Thanks! I think I went with a reference to
plugin_row_metabecause theplugins_api()DocBlock does not actually describe the structure of the returned array (as it depends on the arguments passed), andplugin_row_metawas the closest thing I could find. It looks like we could better document theplugins_api()response and link to that instead.
Yeah, plugins_api() isn't documented very well, especially since the description of the return value says to see the Code Reference for the plugins_api() function :-)
#14
@
4 years ago
Patch updated to change the @see reference to plugins_api.
I have also opened a follow-up ticket to handle the improvements in documentation for plugins_api(): #55645.
Add a filter to the plugin install list table to allow for modification of the plugin description in the plugin card.
Trac ticket: https://core.trac.wordpress.org/ticket/55480