plugin_update
Plugin updater trait - {eac}Doojigger for WordPress
Handles plugin updates from the plugins page in WordPress for self-hosted plugins
Tags
Table of Contents
- deleteUpdaterTransient() : bool
- delete updater transient
- plugin_update_after_plugin_update() : void
- cleanup after plugin update on 'upgrader_process_complete' filter occurs before new code is loaded
- plugin_update_allow_external_host() : bool
- allow access to external host on 'http_request_host_is_external' filter
- plugin_update_disable_auto_update() : string
- disable auto-update for this plugin - plugin_auto_update_setting_html
- plugin_update_get_plugin_info() : object
- get plugin information on 'plugins_api' filter
- plugin_update_update_plugins_hostname() : object
- check for plugin update on 'update_plugins_{$hostname}' filter (WP 5.8.0+)
- plugin_update_update_plugins_transient() : object
- check for plugin update on 'site_transient_update_plugins' filter.
Methods
deleteUpdaterTransient()
delete updater transient
public
deleteUpdaterTransient() : bool
Return values
bool —plugin_update_after_plugin_update()
cleanup after plugin update on 'upgrader_process_complete' filter occurs before new code is loaded
public
plugin_update_after_plugin_update(object $WP_Upgrader, array<string|int, mixed> $hook_extra) : void
Parameters
- $WP_Upgrader : object
- $hook_extra : array<string|int, mixed>
Return values
void —plugin_update_allow_external_host()
allow access to external host on 'http_request_host_is_external' filter
public
plugin_update_allow_external_host(bool $allow, string $host, string $url) : bool
Parameters
- $allow : bool
-
allow external
- $host : string
-
remote host name
- $url : string
-
remote url
Return values
bool —plugin_update_disable_auto_update()
disable auto-update for this plugin - plugin_auto_update_setting_html
public
plugin_update_disable_auto_update(string $html, string $plugin_file, array<string|int, mixed> $plugin_data) : string
Parameters
- $html : string
- $plugin_file : string
- $plugin_data : array<string|int, mixed>
Return values
string —updated html
plugin_update_get_plugin_info()
get plugin information on 'plugins_api' filter
public
plugin_update_get_plugin_info(mixed $result, string $action, object $args) : object
Parameters
- $result : mixed
- $action : string
-
'plugin_information'
- $args : object
Return values
object —plugin information used by WordPress
plugin_update_update_plugins_hostname()
check for plugin update on 'update_plugins_{$hostname}' filter (WP 5.8.0+)
public
plugin_update_update_plugins_hostname(array<string|int, mixed>|false $update, array<string|int, mixed> $plugin_data, string $plugin_file, array<string|int, mixed> $locales) : object
Parameters
- $update : array<string|int, mixed>|false
-
false or update data with latest details
- $plugin_data : array<string|int, mixed>
-
Plugin headers.
- $plugin_file : string
-
Plugin filename.
- $locales : array<string|int, mixed>
-
Installed locales to look translations for.
Return values
object —plugin information used by WordPress
plugin_update_update_plugins_transient()
check for plugin update on 'site_transient_update_plugins' filter.
public
plugin_update_update_plugins_transient(object $transient) : object
the filter is called often
Parameters
- $transient : object
-
plugin_information transient $transient->last_checked = time(); $transient->checked = array(); $transient->response = array(); $transient->translations = array(); $transient->no_update = array();
Return values
object —plugin information used by WordPress