update_plugins_{$hostname} WordPress Filter Hook

The update_plugins_{$hostname} hook is used to update plugin information on a WordPress site. This hook is called when the WordPress update process is initiated by a user.

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

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.


Top ↑

Parameters

$update

(array|false)The plugin update data with the latest details. Default false.

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

$plugin_data

(array)Plugin headers.

$plugin_file

(string)Plugin filename.

$locales

(array)Installed locales to look translations for.


Top ↑

Source

File: wp-includes/update.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.