Make WordPress Core


Ignore:
Timestamp:
11/20/2021 02:21:15 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Update documentation for the $plugin_data parameter of various hooks:

  • Document the structure of the $plugin_data array passed to the plugin_row_meta filter.
  • Document some missing values returned by get_plugin_data():
    • PluginURI
    • AuthorName
  • Link to get_plugin_data() and the plugin_row_meta filter as the canonical sources in other various filters and actions which receive the $plugin_data parameter:
    • network_admin_plugin_action_links
    • network_admin_plugin_action_links_{$plugin_file}
    • plugin_action_links
    • plugin_action_links_{$plugin_file}
    • plugin_auto_update_setting_html
    • manage_plugins_custom_column
    • after_plugin_row
    • after_plugin_row_{$plugin_file}
    • in_plugin_update_message-{$file}
  • Update documentation for the $response parameter of the in_plugin_update_message-{$file} filter:
    • Correct type for the id value. It contains a string like w.org/plugins/[plugin-name], not a numeric ID.
    • Update $icons, $banners, and $banners_rtl values to use typed array notation.

Follow-up to [8367], [8402], [12976], [16758], [26540], [30544], [34818], [51733], [52212], [52224].

See #53399.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r52035 r52227  
    5555 *
    5656 *     @type string $Name        Name of the plugin. Should be unique.
    57  *     @type string $Title       Title of the plugin and link to the plugin's site (if set).
     57 *     @type string $PluginURI   Plugin URI.
     58 *     @type string $Version     Plugin version.
    5859 *     @type string $Description Plugin description.
    59  *     @type string $Author      Author's name.
    60  *     @type string $AuthorURI   Author's website address (if set).
    61  *     @type string $Version     Plugin version.
     60 *     @type string $Author      Plugin author's name.
     61 *     @type string $AuthorURI   Plugin author's website address (if set).
    6262 *     @type string $TextDomain  Plugin textdomain.
    63  *     @type string $DomainPath  Plugins relative directory path to .mo files.
     63 *     @type string $DomainPath  Plugin's relative directory path to .mo files.
    6464 *     @type bool   $Network     Whether the plugin can only be activated network-wide.
    6565 *     @type string $RequiresWP  Minimum required version of WordPress.
    6666 *     @type string $RequiresPHP Minimum required version of PHP.
    6767 *     @type string $UpdateURI   ID of the plugin for update purposes, should be a URI.
     68 *     @type string $Title       Title of the plugin and link to the plugin's site (if set).
     69 *     @type string $AuthorName  Plugin author's name.
    6870 * }
    6971 */
     
    130132 *                            Default true.
    131133 * @param bool   $translate   Optional. If the returned data should be translated. Default true.
    132  * @return array {
    133  *     Plugin data. Values will be empty if not supplied by the plugin.
    134  *
    135  *     @type string $Name        Name of the plugin. Should be unique.
    136  *     @type string $Title       Title of the plugin and link to the plugin's site (if set).
    137  *     @type string $Description Plugin description.
    138  *     @type string $Author      Author's name.
    139  *     @type string $AuthorURI   Author's website address (if set).
    140  *     @type string $Version     Plugin version.
    141  *     @type string $TextDomain  Plugin textdomain.
    142  *     @type string $DomainPath  Plugins relative directory path to .mo files.
    143  *     @type bool   $Network     Whether the plugin can only be activated network-wide.
    144  * }
     134 * @return array Plugin data. Values will be empty if not supplied by the plugin.
     135 *               See get_plugin_data() for the list of possible values.
    145136 */
    146137function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup = true, $translate = true ) {
Note: See TracChangeset for help on using the changeset viewer.