diff --git a/core/includes/form.inc b/core/includes/form.inc index 9e8551c..d4430da 100644 --- a/core/includes/form.inc +++ b/core/includes/form.inc @@ -7,6 +7,8 @@ use Drupal\Component\Utility\Crypt; use Drupal\Component\Utility\NestedArray; +use Drupal\Component\Utility\String; +use Drupal\Component\Utility\Xss; use Drupal\Core\Form\FormInterface; use Drupal\Core\Form\BaseFormIdInterface; use Drupal\Core\Database\Database; @@ -3615,7 +3617,6 @@ function form_process_tableselect($element) { * The processed element. * * @see form_process_tableselect() - * @see theme_tableselect() */ function form_process_table($element, &$form_state) { if ($element['#tableselect']) { @@ -4058,7 +4059,7 @@ function form_pre_render_vertical_tabs($element) { } /** - * Preapres an element's children details for vertical tabs templates. + * Prepares an element's children details for vertical tabs templates. * * Default template: vertical-tabs.html.twig. * @@ -4516,8 +4517,6 @@ function form_pre_render_color($element) { * An associative array containing: * - element: An associative array containing the properties of the element. * Properties used: #action, #method, #attributes, #children - * - * @ingroup themeable */ function template_preprocess_form(&$variables) { $element = $variables['element']; @@ -4558,7 +4557,7 @@ function template_preprocess_textarea(&$variables) { } $variables['attributes'] = $element['#attributes']; - $variables['value'] = check_plain($element['#value']); + $variables['value'] = String::checkPlain($element['#value']); } /** @@ -4755,7 +4754,7 @@ function template_preprocess_form_required_marker(&$variables) { * * Form element labels include the #title and a #required marker. The label is * associated with the element itself by the element #id. Labels may appear - * before or after elements, depending on theme_form_element() and + * before or after elements, depending on form_element template and * #title_display. * * This function will not be called for elements with no labels, depending on @@ -4781,7 +4780,7 @@ function template_preprocess_form_element_label(&$variables) { } else { // If the element is required, a required marker is appended to the label. - $variables['label'] = (isset($element['#title'])) ? filter_xss_admin($element['#title']) : NULL; + $variables['label'] = (isset($element['#title'])) ? Xss::filterAdmin($element['#title']) : NULL; $variables['required'] = (!empty($element['#required'])) ? array('#theme' => 'form_required_marker', '#element' => $element) : ''; // Associate the label with the field it is for. if (!empty($element['#id'])) { diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 1f258f0..d7d9068 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2356,8 +2356,6 @@ function theme_indentation($variables) { * An associative array containing: * - element: An associative array containing the properties of the element. * Properties used: #id, #attributes, #children. - * - * @ingroup themeable */ function template_preprocess_container(&$variables) { $element = $variables['element']; diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index d366e01..d1d8d7a 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -235,7 +235,7 @@ function hook_queue_info_alter(&$queues) { * - "#post_render": array of callables taking $children and $element. * - "#submit": array of callback functions taking $form and $form_state. * - "#title_display": optional string indicating if and how #title should be - * displayed, see theme_form_element() and theme_form_element_label(). + * displayed, see templates for form_element and form_element_label. * * @see hook_element_info_alter() * @see system_element_info() diff --git a/core/modules/system/templates/vertical-tabs.html.twig b/core/modules/system/templates/vertical-tabs.html.twig index bbd76d9..aec5da5 100644 --- a/core/modules/system/templates/vertical-tabs.html.twig +++ b/core/modules/system/templates/vertical-tabs.html.twig @@ -10,5 +10,7 @@ * * @ingroup themeable */ + @todo: remove this file once http://drupal.org/node/1819284 is resolved. + This is identical to core/modules/system/templates/container.html.twig #} {{ children }} diff --git a/core/modules/system/tests/modules/design_test/form/details.inc b/core/modules/system/tests/modules/design_test/form/details.inc index 60d153a..d271e7e 100644 --- a/core/modules/system/tests/modules/design_test/form/details.inc +++ b/core/modules/system/tests/modules/design_test/form/details.inc @@ -6,7 +6,7 @@ */ /** - * Form constructor for testing theme_details(). + * Form constructor for testing details template. */ function design_test_form_details($form, &$form_state) { $form['collapsible'] = array( diff --git a/core/modules/system/tests/modules/design_test/form/fieldset.inc b/core/modules/system/tests/modules/design_test/form/fieldset.inc index f55bfe5..d1e47a6 100644 --- a/core/modules/system/tests/modules/design_test/form/fieldset.inc +++ b/core/modules/system/tests/modules/design_test/form/fieldset.inc @@ -6,7 +6,7 @@ */ /** - * Form constructor for testing theme_fieldset(). + * Form constructor for testing fieldset template. */ function design_test_form_fieldset($form, &$form_state) { $form['regular'] = array(