[wp-trac] [WordPress Trac] #55480: Add filter to modify description in plugin card

WordPress Trac noreply at wordpress.org
Tue Apr 26 21:44:22 UTC 2022


#55480: Add filter to modify description in plugin card
------------------------------------------+-----------------------------
 Reporter:  afragen                       |       Owner:  SergeyBiryukov
     Type:  enhancement                   |      Status:  reopened
 Priority:  normal                        |   Milestone:  6.0
Component:  Upgrade/Install               |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch add-to-field-guide  |     Focuses:  administration
------------------------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:10 pbiron]:
 > Replying to [comment:9 afragen]:
 > > 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
 >
 > To expand on the above: this is in reference to the description of that
 param in the DocBlock.  The param that is passed to
 [https://developer.wordpress.org/reference/hooks/plugin_row_meta/
 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`.

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55480#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list