$plugin
$plugin :\Barn2\PTP_Lib\Plugin\Licensed_Plugin
Handles plugin update checks for our EDD plugins.
$plugin :\Barn2\PTP_Lib\Plugin\Licensed_Plugin
$license_api :\Barn2\PTP_Lib\Plugin\License\License_API
__construct(\Barn2\PTP_Lib\Plugin\Licensed_Plugin $plugin,\Barn2\PTP_Lib\Plugin\License\License_API $license_api)
\Barn2\PTP_Lib\Plugin\Licensed_Plugin | $plugin | |
\Barn2\PTP_Lib\Plugin\License\License_API | $license_api |
check_update(array $transient_data): 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.
array | $transient_data | Plugin update object built by WordPress. |
Modified update array with custom plugin data.
format_version_info_for_plugin_update(object $version_info): object
Remove unrequired properties from EDD version info when storing in the 'update_plugins' transient.
object | $version_info | The version info from EDD |
The updated version info