Allows plugins to use their own update API.
| Since | |
|---|---|
1.0 |
|
| Methods | ||||||||
|---|---|---|---|---|---|---|---|---|
public
|
__construct(string $_api_url, string $_plugin_file, array $_api_data = null)
Class constructor.
Class constructor. Parameters
|
# | ||||||
public
|
init(): void
Set up WordPress filters to hook into WP's update process.
Set up WordPress filters to hook into WP's update process. |
# | ||||||
public
|
check_update(array $_transient_data): array
Check for Updates at the defined API endpoint and modify the update array.
Check for Updates at the defined API endpoint and modify the update array. This function dives into the update API just when WordPress creates its update array, then adds a custom API call and injects the custom plugin data retrieved from the API. It is reassembled from parts of the native WordPress plugin update code. See wp-includes/update.php line 121 for the original wp_update_plugins() function. Parameters
ReturnsModified update array with custom plugin data. |
# | ||||||
public
|
show_update_notification(string $file, array $plugin)
Show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
Show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise! Parameters
|
# | ||||||
public
|
plugins_api_filter(mixed $_data, string $_action = '', object $_args = null): object
Updates information on the "View version x.x details" page with custom data.
Updates information on the "View version x.x details" page with custom data. Parameters
Returns$_data |
# | ||||||
public
|
http_request_args(array $args, string $url): array
Disable SSL verification in order to prevent download update failures.
Disable SSL verification in order to prevent download update failures. Parameters
Returns$array |
# | ||||||
public
|
show_changelog()
Display change log
Display change log |
# | ||||||
public
|
get_cached_version_info(string $cache_key = ''): bool
Get cached version info
Get cached version info Parameters
|
# | ||||||
public
|
set_version_info_cache(string $value = '', string $cache_key = '')
Set version info cache
Set version info cache Parameters
|
# | ||||||