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.
Built from https://develop.svn.wordpress.org/trunk@52227
git-svn-id: http://core.svn.wordpress.org/trunk@51819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -558,37 +558,24 @@ function wp_plugin_update_row( $file, $plugin_data ) {
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param array $plugin_data {
|
||||
* An array of plugin metadata.
|
||||
*
|
||||
* @type string $name The human-readable name of the plugin.
|
||||
* @type string $plugin_uri Plugin URI.
|
||||
* @type string $version Plugin version.
|
||||
* @type string $description Plugin description.
|
||||
* @type string $author Plugin author.
|
||||
* @type string $author_uri Plugin author URI.
|
||||
* @type string $text_domain Plugin text domain.
|
||||
* @type string $domain_path Relative path to the plugin's .mo file(s).
|
||||
* @type bool $network Whether the plugin can only be activated network wide.
|
||||
* @type string $title The human-readable title of the plugin.
|
||||
* @type string $author_name Plugin author's name.
|
||||
* @type bool $update Whether there's an available update. Default null.
|
||||
* }
|
||||
* @param array $plugin_data An array of plugin metadata. See get_plugin_data()
|
||||
* and the {@see 'plugin_row_meta'} filter for the list
|
||||
* of possible values.
|
||||
* @param object $response {
|
||||
* An object of metadata about the available plugin update.
|
||||
*
|
||||
* @type int $id Plugin ID.
|
||||
* @type string $slug Plugin slug.
|
||||
* @type string $plugin Plugin basename.
|
||||
* @type string $new_version New plugin version.
|
||||
* @type string $url Plugin URL.
|
||||
* @type string $package Plugin update package URL.
|
||||
* @type array $icons An array of plugin icon URLs.
|
||||
* @type array $banners An array of plugin banner URLs.
|
||||
* @type array $banners_rtl An array of plugin RTL banner URLs.
|
||||
* @type string $requires The version of WordPress which the plugin requires.
|
||||
* @type string $tested The version of WordPress the plugin is tested against.
|
||||
* @type string $requires_php The version of PHP which the plugin requires.
|
||||
* @type string $id Plugin ID, e.g. `w.org/plugins/[plugin-name]`.
|
||||
* @type string $slug Plugin slug.
|
||||
* @type string $plugin Plugin basename.
|
||||
* @type string $new_version New plugin version.
|
||||
* @type string $url Plugin URL.
|
||||
* @type string $package Plugin update package URL.
|
||||
* @type string[] $icons An array of plugin icon URLs.
|
||||
* @type string[] $banners An array of plugin banner URLs.
|
||||
* @type string[] $banners_rtl An array of plugin RTL banner URLs.
|
||||
* @type string $requires The version of WordPress which the plugin requires.
|
||||
* @type string $tested The version of WordPress the plugin is tested against.
|
||||
* @type string $requires_php The version of PHP which the plugin requires.
|
||||
* }
|
||||
*/
|
||||
do_action( "in_plugin_update_message-{$file}", $plugin_data, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
Reference in New Issue
Block a user