find_core_update( string $version, string $locale )


Description Description


Parameters Parameters

$version

(string) (Required)

$locale

(string) (Required)


Top ↑

Return Return

(object|false)


Top ↑

Source Source

File: wp-admin/includes/update.php

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;
}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.