Verified Commit 74b90394 authored by catch's avatar catch Committed by Dave Long
Browse files

Issue #3490222 by alexpott, nicxvan: Reinstate drupal_common_theme() and deprecate it

parent fbad2d37
Loading
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
use Drupal\Core\Config\StorageException;
use Drupal\Core\Template\Attribute;
use Drupal\Core\Template\AttributeHelper;
use Drupal\Core\Theme\ThemeCommonElements;
use Drupal\Core\Theme\ThemeSettings;
use Drupal\Core\Render\Element;
use Drupal\Core\Render\Markup;
@@ -1801,3 +1802,16 @@ function _field_multiple_value_form_sort_helper($a, $b) {
  $b_weight = (is_array($b) && isset($b['_weight']['#value']) ? $b['_weight']['#value'] : 0);
  return $a_weight - $b_weight;
}

/**
 * Provides theme registration for themes across .inc files.
 *
 * @deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use
 *   \Drupal\Core\Theme\ThemeCommonElements::commonElements() instead,
 *
 * @see https://www.drupal.org/node/3488470
 */
function drupal_common_theme(): array {
  @trigger_error('drupal_common_theme() is deprecated in drupal:11.1.0 and is removed from drupal:12.0.0. Use \Drupal\Core\Theme\ThemeCommonElements::commonElements() instead. See https://www.drupal.org/node/3488470', E_USER_DEPRECATED);
  return ThemeCommonElements::commonElements();
}