wpseek.com
A WordPress-centric search engine for devs and theme authors
find_core_update › WordPress Function
Since2.7.0
Deprecatedn/a
› find_core_update ( $version, $locale )
Parameters: (2) |
|
Returns: |
|
Defined at: |
|
Codex: |
Finds the available update for WordPress core.
Related Functions: find_core_auto_update, list_core_update, undismiss_core_update, get_core_updates, dismiss_core_update
Source
function find_core_update( $version, $locale ) {
$from_api = get_site_transient( 'update_core' );
if ( ! isset( $from_api->updates ) || ! is_array( $from_api->updates ) ) {
return false;
}
$updates = $from_api->updates;
foreach ( $updates as $update ) {
if ( $update->current === $version && $update->locale === $locale ) {
return $update;
}
}
return false;
}