diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 40eda67..0898c29 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -163,7 +163,7 @@ function filter_formats(AccountInterface $account = NULL) { $formats['user'][$account_id] = array(); foreach ($formats['all'] as $format) { if ($format->access('use', $account)) { - $formats['user'][$account_id][$format->format] = $format; + $formats['user'][$account_id][$format->id()] = $format; } } } @@ -253,7 +253,7 @@ function filter_default_format(AccountInterface $account = NULL) { // available is the user's default format. $formats = filter_formats($account); $format = reset($formats); - return $format->format; + return $format->id(); } /** @@ -371,7 +371,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE, $cache = $cache && !empty($format->cache); $cache_id = ''; if ($cache) { - $cache_id = $format->format . ':' . $langcode . ':' . hash('sha256', $text); + $cache_id = $format->id() . ':' . $langcode . ':' . hash('sha256', $text); if ($cached = \Drupal::cache('filter')->get($cache_id)) { return $cached->data; } @@ -655,11 +655,11 @@ function _filter_tips($format_id, $long = FALSE) { function template_preprocess_filter_guidelines(&$variables) { $format = $variables['format']; $variables['attributes']['class'][] = 'filter-guidelines-item'; - $variables['attributes']['class'][] = 'filter-guidelines-' . $format->format; + $variables['attributes']['class'][] = 'filter-guidelines-' . $format->id(); $variables['tips'] = array( '#theme' => 'filter_tips', - '#tips' => _filter_tips($format->format, FALSE), + '#tips' => _filter_tips($format->id(), FALSE), ); }