wppaste
WordPress

apply_filters( "update_plugins_{$hostname}", array|false $update, array $plugin_data, string $plugin_file, string[] $locales )

Since
5.8.0
Filters the update response for a given plugin hostname.

Description

The dynamic portion of the hook name, $hostname, refers to the hostname of the URI specified in the Update URI header field.

Compatibility

WordPress
since 5.8.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$updatearray|false
{ The plugin update data with the latest details. Default false.
@type string $id Optional. ID of the plugin for update purposes, should be a URI specified in the Update URI header field.
@type string $slug Slug of the plugin.
@type string $version The version of the plugin.
@type string $url The URL for details of the plugin.
@type string $package Optional. The update ZIP for the plugin.
@type string $tested Optional. The version of WordPress the plugin is tested against.
@type string $requires_php Optional. The version of PHP which the plugin requires.
@type bool $autoupdate Optional. Whether the plugin should automatically update.
@type string[] $icons Optional. Array of plugin icons.
@type string[] $banners Optional. Array of plugin banners.
@type string[] $banners_rtl Optional. Array of plugin RTL banners.
@type array $translations { Optional. List of translation updates for the plugin.
@type string $language The language the translation update is for.
@type string $version The version of the plugin this translation is for.
This is not the version of the language file.
@type string $updated The update timestamp of the translation file.
Should be a date in the YYYY-MM-DD HH:MM:SS format.
@type string $package The ZIP location containing the translation update.
@type string $autoupdate Whether the translation should be automatically installed.
} }
  • $idstring

    Optional. ID of the plugin for update purposes, should be a URI specified in the Update URI header field.
  • $slugstring

    Slug of the plugin.
  • $versionstring

    The version of the plugin.
  • $urlstring

    The URL for details of the plugin.
  • $packagestring

    Optional. The update ZIP for the plugin.
  • $testedstring

    Optional. The version of WordPress the plugin is tested against.
  • $requires_phpstring

    Optional. The version of PHP which the plugin requires.
  • $autoupdatebool

    Optional. Whether the plugin should automatically update.
  • $iconsstring[]

    Optional. Array of plugin icons.
  • $bannersstring[]

    Optional. Array of plugin banners.
  • $banners_rtlstring[]

    Optional. Array of plugin RTL banners.
  • $translationsarray

    Optional. List of translation updates for the plugin.
    • $languagestring

      The language the translation update is for.
    • $versionstring

      The version of the plugin this translation is for. This is not the version of the language file.
    • $updatedstring

      The update timestamp of the translation file. Should be a date in the YYYY-MM-DD HH:MM:SS format.
    • $packagestring

      The ZIP location containing the translation update.
    • $autoupdatestring

      Whether the translation should be automatically installed.
$plugin_dataarray
Plugin headers.
$plugin_filestring
Plugin filename.
$localesstring[]
Installed locales to look up translations for.

Where this hook fires · 1

  • wp-includes/update.php:524wp_update_plugins()

Source code

		 *     }		 * }		 * @param array       $plugin_data      Plugin headers.		 * @param string      $plugin_file      Plugin filename.		 * @param string[]    $locales          Installed locales to look up translations for.		 */		$update = apply_filters( "update_plugins_{$hostname}", false, $plugin_data, $plugin_file, $locales ); 		if ( ! $update ) {			continue;		} 		$update = (object) $update;

Changelog

Introduced in 5.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.