ACF
Updater::get_plugin_update
Returns specific data from the 'update-check' response.
Method of the class: Updater{}
No Hooks.
Returns
Array|false.
Usage
$Updater = new Updater(); $Updater->get_plugin_update( $basename, $force_check );
- $basename(string)
- The plugin basename.
Default:'' - $force_check(true|false)
- Bypasses cached result.
Default:false
Changelog
| Since 5.7.2 | Introduced. |
Updater::get_plugin_update() Updater::get plugin update code ACF 6.8.8
public function get_plugin_update( $basename = '', $force_check = false ) {
// get updates.
$updates = $this->get_plugin_updates( $force_check );
// check for and return update.
if ( is_array( $updates ) && isset( $updates['plugins'][ $basename ] ) ) {
return $updates['plugins'][ $basename ];
}
return false;
}