get_theme_updates()WP 2.9.0

Retrieves themes with updates available.

Хуков нет.

Возвращает

Массив.

Использование

get_theme_updates();

Список изменений

С версии 2.9.0 Введена.

Код get_theme_updates() WP 6.4.3

function get_theme_updates() {
	$current = get_site_transient( 'update_themes' );

	if ( ! isset( $current->response ) ) {
		return array();
	}

	$update_themes = array();

	foreach ( $current->response as $stylesheet => $data ) {
		$update_themes[ $stylesheet ]         = wp_get_theme( $stylesheet );
		$update_themes[ $stylesheet ]->update = $data;
	}

	return $update_themes;
}