diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 3b12a06..5ee4354 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -98,13 +98,13 @@ function theme_get_registry($complete = TRUE) { /** * Returns an array of default theme features. * - * @see \Drupal\Core\Theme\ThemeFeatures::defaults() + * @see \Drupal\Core\Theme\ThemeSettings::defaults() * * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. - * Use \Drupal\Core\Theme\ThemeFeatures::defaults() instead. + * Use \Drupal\Core\Theme\ThemeSettings::defaults() instead. */ function _system_default_theme_features() { - return ThemeFeatures::defaults(); + return ThemeSettings::defaults(); } /** @@ -332,7 +332,7 @@ function theme_get_setting($setting_name, $theme = NULL) { // If the theme does not support a particular feature, override the global // setting and set the value to NULL. if (!empty($theme_object->info['features'])) { - foreach (ThemeFeatures::defaults() as $feature) { + foreach (ThemeSettings::defaults() as $feature) { if (!in_array($feature, $theme_object->info['features'])) { $cache[$theme]->set('features.' . $feature, NULL); } diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index 65b3eca..794f963 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -5,6 +5,7 @@ use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\State\StateInterface; use Drupal\Core\Theme\ThemeFeatures; +use Drupal\Core\Theme\ThemeSettings; /** * Default theme handler using the config system to store installation statuses. @@ -252,7 +253,7 @@ public function rebuildThemeData() { 'breadcrumb' => 'Breadcrumb', ), 'description' => '', - 'features' => ThemeFeatures::defaults(), + 'features' => ThemeSettings::defaults(), 'screenshot' => 'screenshot.png', 'php' => DRUPAL_MINIMUM_PHP, 'libraries' => array(), diff --git a/core/lib/Drupal/Core/Theme/ThemeSettings.php b/core/lib/Drupal/Core/Theme/ThemeSettings.php index 9cae321..63dac38 100644 --- a/core/lib/Drupal/Core/Theme/ThemeSettings.php +++ b/core/lib/Drupal/Core/Theme/ThemeSettings.php @@ -49,4 +49,19 @@ public function getCacheTags() { return ['rendered']; } + /** + * Returns the features enabled for themes by default. + * + * @return string[] + */ + public static function defaults() { + return [ + 'favicon', + 'logo', + 'node_user_picture', + 'comment_user_picture', + 'comment_user_verification', + ]; + } + }