diff -u b/core/modules/update/src/ProjectCoreCompatibility.php b/core/modules/update/src/ProjectCoreCompatibility.php
--- b/core/modules/update/src/ProjectCoreCompatibility.php
+++ b/core/modules/update/src/ProjectCoreCompatibility.php
@@ -139,6 +139,9 @@
foreach ($releases_to_set as &$release) {
if (!empty($release['core_compatibility'])) {
$release['core_compatible'] = $this->isCoreCompatible($release['core_compatibility']);
+ if (!$release['core_compatible']) {
+ $release['hide_download_link'] = TRUE;
+ }
$release['core_compatibility_range'] = $this->createMessageFromCoreCompatibility($release['core_compatibility']);
$release['core_compatibility_details'] = $this->createCoreCompatibilityDetails($release['core_compatible'], $release['core_compatibility_range']);
}
diff -u b/core/modules/update/templates/update-version.html.twig b/core/modules/update/templates/update-version.html.twig
--- b/core/modules/update/templates/update-version.html.twig
+++ b/core/modules/update/templates/update-version.html.twig
@@ -13,6 +13,7 @@
* - release_link: The URL for the release notes.
* - core_compatible (bool): Is it compatible with the installed core or not?
* - core_compatibility_details: Render array of core compatibility details.
+ * - hide_download_link (bool|NULL): Should the download link be hidden?
*
* @ingroup themeable
*/
@@ -26,7 +27,7 @@
- {% if version.show_download_link %}
+ {% if version.hide_download_link is empty %}
-
{{ 'Download'|t }}
reverted:
--- b/core/modules/update/update.report.inc
+++ a/core/modules/update/update.report.inc
@@ -114,14 +114,6 @@
// Storing by reference because we are sorting the project values.
$project = &$variables['project'];
- $set_download_link_flag = function (&$version) use ($project) {
- if ($project['name'] === 'drupal' || !empty($version['core_compatible'])) {
- $version['show_download_link'] = TRUE;
- return;
- }
- $version['show_download_link'] = FALSE;
- };
-
// Set the project title and URL.
$variables['title'] = (isset($project['title'])) ? $project['title'] : $project['name'];
$variables['url'] = (isset($project['link'])) ? Url::fromUri($project['link'])->toString() : NULL;
@@ -165,7 +157,6 @@
) {
$version_class[] = 'project-update__version--recommended-strong';
}
- $set_download_link_flag($project['releases'][$project['recommended']]);
$versions_inner[] = [
'#theme' => 'update_version',
'#version' => $project['releases'][$project['recommended']],
@@ -178,7 +169,6 @@
if (!empty($project['security updates'])) {
$security_class[] = 'version-security';
foreach ($project['security updates'] as $security_update) {
- $set_download_link_flag($security_update);
$versions_inner[] = [
'#theme' => 'update_version',
'#version' => $security_update,
@@ -190,7 +180,6 @@
}
if ($project['recommended'] !== $project['latest_version']) {
- $set_download_link_flag($project['releases'][$project['latest_version']]);
$versions_inner[] = [
'#theme' => 'update_version',
'#version' => $project['releases'][$project['latest_version']],
@@ -202,7 +191,6 @@
&& $project['status'] != UpdateManagerInterface::CURRENT
&& isset($project['dev_version'])
&& $project['recommended'] !== $project['dev_version']) {
- $set_download_link_flag($project['releases'][$project['dev_version']]);
$versions_inner[] = [
'#theme' => 'update_version',
'#version' => $project['releases'][$project['dev_version']],
@@ -214,7 +202,6 @@
if (isset($project['also'])) {
foreach ($project['also'] as $also) {
- $set_download_link_flag($project['releases'][$also]);
$versions_inner[] = [
'#theme' => 'update_version',
'#version' => $project['releases'][$also],
diff -u b/core/themes/claro/templates/admin/update-version.html.twig b/core/themes/claro/templates/admin/update-version.html.twig
--- b/core/themes/claro/templates/admin/update-version.html.twig
+++ b/core/themes/claro/templates/admin/update-version.html.twig
@@ -13,6 +13,7 @@
* - release_link: The URL for the release notes.
* - core_compatible (bool): Is it compatible with the installed core or not?
* - core_compatibility_details: Render array of core compatibility details.
+ * - hide_download_link (bool|NULL): Should the download link be hidden?
*/
#}
@@ -24,7 +25,7 @@
- {% if version.show_download_link %}
+ {% if version.hide_download_link is empty %}
-
{{ 'Download'|t }}
diff -u b/core/themes/stable/templates/admin/update-version.html.twig b/core/themes/stable/templates/admin/update-version.html.twig
--- b/core/themes/stable/templates/admin/update-version.html.twig
+++ b/core/themes/stable/templates/admin/update-version.html.twig
@@ -13,6 +13,7 @@
* - release_link: The URL for the release notes.
* - core_compatible (bool): Is it compatible with the installed core or not?
* - core_compatibility_details: Render array of core compatibility details.
+ * - hide_download_link (bool|NULL): Should the download link be hidden?
*/
#}
@@ -24,7 +25,7 @@
- {% if version.show_download_link %}
+ {% if version.hide_download_link is empty %}
-
{{ 'Download'|t }}