From 4f59f9746fe964e50a2efad13d83ffed8719befe Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Thu, 3 Oct 2013 13:55:34 -0700 Subject: [PATCH] Issue #2049207 by dlu, blakehall, janstoeckler, ramlev, Moderate | Cottser: Replace .tpl.php with .html.twig in documentation. --- core/includes/ajax.inc | 2 +- core/includes/common.inc | 7 ++-- core/includes/theme.inc | 14 ++++--- core/lib/Drupal/Core/Ajax/AjaxResponse.php | 2 +- core/modules/aggregator/aggregator.module | 2 +- core/modules/book/book.module | 2 +- core/modules/comment/comment.module | 2 +- core/modules/edit/edit.module | 2 +- core/modules/forum/forum.module | 2 +- core/modules/help/help.module | 2 +- core/modules/language/language.module | 2 +- core/modules/locale/locale.module | 2 +- core/modules/menu/menu.module | 2 +- core/modules/node/node.api.php | 2 +- core/modules/node/node.module | 2 +- core/modules/overlay/overlay.module | 14 ++++--- core/modules/rdf/rdf.module | 10 ++--- core/modules/search/search.module | 2 +- core/modules/shortcut/shortcut.module | 4 +- core/modules/statistics/statistics.module | 2 +- .../Tests/FileTransfer/FileTransferTest.php | 2 +- .../Tests/Theme/HtmlTplPhpAttributesTest.php | 42 ------------------- core/modules/system/system.api.php | 4 +- core/modules/system/system.module | 2 +- .../modules/theme_test/theme_test.module | 10 ++++- core/modules/taxonomy/taxonomy.api.php | 2 +- core/modules/tour/tour.module | 2 +- core/modules/user/user.api.php | 2 +- core/modules/user/user.module | 4 +- .../Drupal/views/Plugin/views/PluginBase.php | 2 +- .../views_test_data/views_test_data.module | 2 +- core/modules/views/views.module | 4 +- core/modules/views/views.theme.inc | 16 +++---- core/modules/views_ui/js/views-admin.js | 6 +-- core/modules/views_ui/views_ui.module | 2 +- core/themes/bartik/bartik.theme | 8 ++-- core/themes/seven/seven.theme | 2 +- 37 files changed, 81 insertions(+), 110 deletions(-) delete mode 100644 core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTplPhpAttributesTest.php diff --git a/core/includes/ajax.inc b/core/includes/ajax.inc index 8157f079093f..0b897b805412 100644 --- a/core/includes/ajax.inc +++ b/core/includes/ajax.inc @@ -231,7 +231,7 @@ * functions. */ function ajax_render($commands = array()) { - // Ajax responses aren't rendered with html.tpl.php, so we have to call + // Ajax responses aren't rendered with html.html.twig, so we have to call // drupal_get_css() and drupal_get_js() here, in order to have new files added // during this request to be loaded by the page. We only want to send back // files that the page hasn't already loaded, so we implement simple diffing diff --git a/core/includes/common.inc b/core/includes/common.inc index 6b4865dcc7d2..5882f4072fbd 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2930,8 +2930,8 @@ function drupal_get_library($module, $name = NULL) { * relationships. * * Note that this function should be called from the theme layer, such as in a - * .tpl.php file, theme_ function, or in a template_preprocess function, not in - * a form declaration. Though the same JavaScript could be added to the page + * .html.twig file, theme_ function, or in a template_preprocess function, not + * in a form declaration. Though the same JavaScript could be added to the page * using drupal_add_js() directly, this function helps keep template files * clean and readable. It also prevents tabledrag.js from being added twice * accidentally. @@ -2965,7 +2965,6 @@ function drupal_get_library($module, $name = NULL) { * column should not be hidden. * @param $limit * (optional) Limit the maximum amount of parenting in this table. - * @see block-admin-display-form.tpl.php * @see theme_menu_overview_form() */ function drupal_add_tabledrag($table_id, $action, $relationship, $group, $subgroup = NULL, $source = NULL, $hidden = TRUE, $limit = 0) { @@ -3915,7 +3914,7 @@ function drupal_render(&$elements) { // children. // #states and #attached have to be processed before #theme_wrappers, because // the #type 'page' render array from drupal_render_page() would render the - // $page and wrap it into the html.tpl.php template without the attached + // $page and wrap it into the html.html.twig template without the attached // assets otherwise. // If the internal #render_children property is set, do not call the // #theme_wrappers function(s) to prevent infinite recursion. diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 094a339e2bff..c77ddd0a8888 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -814,7 +814,7 @@ function drupal_find_base_themes($themes, $key, $used_keys = array()) { * (see hook_theme() for details). Default templates are implemented with the * Twig rendering engine and are named the same as the theme hook, with * underscores changed to hyphens, so for the 'taxonomy_term' theme hook, the - * default template is 'taxonomy-term.tpl.php'. + * default template is 'taxonomy-term.html.twig'. * * @subsection sub_overriding_theme_hooks Overriding Theme Hooks * Themes may also register new theme hooks within a hook_theme() @@ -2580,7 +2580,7 @@ function template_preprocess_html(&$variables) { $variables['head_title_array'] = $head_title; $variables['head_title'] = implode(' | ', $head_title); - // Display the html.tpl.php's default mobile metatags for responsive design. + // Display the html.html.twig's default mobile metatags for responsive design. $elements = array( 'MobileOptimized' => array( '#tag' => 'meta', @@ -2973,13 +2973,17 @@ function template_preprocess_install_page(&$variables) { } /** - * Preprocess variables for region.tpl.php + * Prepares variables for region templates. + * + * Default template: region.html.twig. * * Prepares the values passed to the theme_region function to be passed into a * pluggable template engine. Uses the region name to generate a template file - * suggestions. If none are found, the default region.tpl.php is used. + * suggestions. * - * @see region.tpl.php + * @param array $variables + * An associative array containing: + * - elements: An associative array containing properties of the region. */ function template_preprocess_region(&$variables) { // Create the $content variable that templates expect. diff --git a/core/lib/Drupal/Core/Ajax/AjaxResponse.php b/core/lib/Drupal/Core/Ajax/AjaxResponse.php index 3e4d8a30c998..44d146a4ebe3 100644 --- a/core/lib/Drupal/Core/Ajax/AjaxResponse.php +++ b/core/lib/Drupal/Core/Ajax/AjaxResponse.php @@ -69,7 +69,7 @@ public function prepare(Request $request) { * An array of commands ready to be returned as JSON. */ protected function ajaxRender(Request $request) { - // Ajax responses aren't rendered with html.tpl.php, so we have to call + // Ajax responses aren't rendered with html.html.twig, so we have to call // drupal_get_css() and drupal_get_js() here, in order to have new files // added during this request to be loaded by the page. We only want to send // back files that the page hasn't already loaded, so we implement simple diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 7238278fb7c0..c2da795bccca 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -466,7 +466,7 @@ function aggregator_filter_xss($value) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function aggregator_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'aggregator') { diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 282aa920e716..aef8a523a08f 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -659,7 +659,7 @@ function book_form_node_delete_confirm_alter(&$form, $form_state) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function book_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'book') { diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index b3366f84ed84..e72a9648ef20 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1442,7 +1442,7 @@ function comment_preview(CommentInterface $comment) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function comment_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'comment') { diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module index 000f67fd996c..6924afe7097a 100644 --- a/core/modules/edit/edit.module +++ b/core/modules/edit/edit.module @@ -161,7 +161,7 @@ function edit_field_formatter_info_alter(&$info) { } /** - * Implements hook_preprocess_HOOK() for field.tpl.php. + * Implements hook_preprocess_HOOK() for field templates. */ function edit_preprocess_field(&$variables) { $element = $variables['element']; diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index 0c1815f38fe1..67fa30a505fa 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -580,7 +580,7 @@ function forum_block_view_pre_render($elements) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function forum_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'forum') { diff --git a/core/modules/help/help.module b/core/modules/help/help.module index 80d517855eb2..1d127f354743 100644 --- a/core/modules/help/help.module +++ b/core/modules/help/help.module @@ -59,7 +59,7 @@ function help_help($path, $arg) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function help_preprocess_block(&$variables) { if ($variables['plugin_id'] == 'system_help_block') { diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 32d38eb50974..b65e53577297 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -761,7 +761,7 @@ function language_language_delete($language) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function language_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'language') { diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 3ae54e1fde65..5817e1b7164d 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -871,7 +871,7 @@ function locale_system_file_system_settings_submit(&$form, $form_state) { } /** - * Implements hook_preprocess_HOOK() for node.html.twig. + * Implements hook_preprocess_HOOK() for node templates. */ function locale_preprocess_node(&$variables) { if ($variables['node']->language()->id != Language::LANGCODE_NOT_SPECIFIED) { diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 5f20c48dccf4..189c479e30cc 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -643,7 +643,7 @@ function menu_get_menus($all = TRUE) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function menu_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'menu') { diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index d21721791a92..c701dce6c9d9 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -630,7 +630,7 @@ function hook_node_prepare_form(\Drupal\node\NodeInterface $node, $form_display, * theming. * * @see template_preprocess_search_result() - * @see search-result.tpl.php + * @see search-result.html.twig * * @ingroup node_api_hooks */ diff --git a/core/modules/node/node.module b/core/modules/node/node.module index fcfc94c7f088..7b01e0eadfee 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -626,7 +626,7 @@ function node_is_page(EntityInterface $node) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function node_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'node') { diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module index b6194a8ae161..b9dc531be915 100644 --- a/core/modules/overlay/overlay.module +++ b/core/modules/overlay/overlay.module @@ -327,7 +327,7 @@ function overlay_system_info_alter(&$info, $file, $type) { } /** - * Implements hook_preprocess_HOOK() for html.tpl.php. + * Implements hook_preprocess_HOOK() for HTML document templates. * * If the current page request is inside the overlay, add appropriate classes * to the <body> element, and simplify the page title. @@ -342,7 +342,7 @@ function overlay_preprocess_html(&$variables) { } /** - * Implements hook_preprocess_HOOK() for maintenance-page.html.twig. + * Implements hook_preprocess_HOOK() for maintenance page templates. * * If the current page request is inside the overlay, add appropriate classes * to the <body> element, and simplify the page title. @@ -352,12 +352,16 @@ function overlay_preprocess_maintenance_page(&$variables) { } /** - * Implements template_preprocess_HOOK() for overlay.tpl.php + * Prepares variables for overlay templates. + * + * Default template: overlay.html.twig. * * If the current page request is inside the overlay, add appropriate classes * to the <body> element, and simplify the page title. * - * @see overlay.tpl.php + * @param array $variables + * An associative array containing: + * - page: A render element representing the page. */ function template_preprocess_overlay(&$variables) { $variables['tabs'] = menu_primary_local_tasks(); @@ -381,7 +385,7 @@ function template_preprocess_overlay(&$variables) { } /** - * Implements hook_preprocess_HOOK() for page.tpl.php. + * Implements hook_preprocess_HOOK() for page templates. * * If the current page request is inside the overlay, hide the tabs. * diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module index d19f2961e0db..fce7f1cce9a1 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -249,7 +249,7 @@ function rdf_theme() { } /** - * Implements hook_preprocess_HOOK() for html.tpl.php. + * Implements hook_preprocess_HOOK() for HTML document templates. */ function rdf_preprocess_html(&$variables) { // Adds RDF namespace prefix bindings in the form of an RDFa 1.1 prefix @@ -264,7 +264,7 @@ function rdf_preprocess_html(&$variables) { } /** - * Implements hook_preprocess_HOOK() for node.html.twig. + * Implements hook_preprocess_HOOK() for node templates. */ function rdf_preprocess_node(&$variables) { // Adds RDFa markup to the node container. The about attribute specifies the @@ -350,7 +350,7 @@ function rdf_preprocess_node(&$variables) { } /** - * Implements hook_preprocess_HOOK() for user.tpl.php. + * Implements hook_preprocess_HOOK() for user templates. */ function rdf_preprocess_user(&$variables) { $account = $variables['elements']['#user']; @@ -444,7 +444,7 @@ function rdf_preprocess_username(&$variables) { } /** - * Implements hook_preprocess_HOOK() for comment.html.twig. + * Implements hook_preprocess_HOOK() for comment templates. */ function rdf_preprocess_comment(&$variables) { $comment = $variables['comment']; @@ -533,7 +533,7 @@ function rdf_preprocess_comment(&$variables) { } /** - * Implements hook_preprocess_HOOK() for taxonomy-term.tpl.php. + * Implements hook_preprocess_HOOK() for taxonomy term templates. */ function rdf_preprocess_taxonomy_term(&$variables) { $term = $variables['term']; diff --git a/core/modules/search/search.module b/core/modules/search/search.module index 8b6817f49c7e..c7bed0653a10 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -137,7 +137,7 @@ function search_permission() { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function search_preprocess_block(&$variables) { if ($variables['plugin_id'] == 'search_form_block') { diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 5432140b8cb2..175206dca9a1 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -421,7 +421,7 @@ function shortcut_renderable_links($shortcut_set = NULL) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function shortcut_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'shortcut') { @@ -430,7 +430,7 @@ function shortcut_preprocess_block(&$variables) { } /** - * Implements hook_preprocess_HOOK() for page.tpl.php. + * Implements hook_preprocess_HOOK() for page templates. */ function shortcut_preprocess_page(&$variables) { // Only display the shortcut link if the user has the ability to edit diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 37dca75eb0ba..d2dfb4c70688 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -248,7 +248,7 @@ function statistics_update_index() { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function statistics_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'statistics') { diff --git a/core/modules/system/lib/Drupal/system/Tests/FileTransfer/FileTransferTest.php b/core/modules/system/lib/Drupal/system/Tests/FileTransfer/FileTransferTest.php index 066f85413562..a08a42e78ec7 100644 --- a/core/modules/system/lib/Drupal/system/Tests/FileTransfer/FileTransferTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/FileTransfer/FileTransferTest.php @@ -38,7 +38,7 @@ function _getFakeModuleFiles() { 'fake.module', 'fake.info.yml', 'theme' => array( - 'fake.tpl.php' + 'fake.html.twig' ), 'inc' => array( 'fake.inc' diff --git a/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTplPhpAttributesTest.php b/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTplPhpAttributesTest.php deleted file mode 100644 index d06b165fb5ab..000000000000 --- a/core/modules/system/lib/Drupal/system/Tests/Theme/HtmlTplPhpAttributesTest.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/** - * @file - * Definition of Drupal\system\Tests\Theme\HtmlTplPhpAttributesTest. - */ - -namespace Drupal\system\Tests\Theme; - -use Drupal\simpletest\WebTestBase; - -/** - * Functional test for attributes of html.tpl.php. - */ -class HtmlTplPhpAttributesTest extends WebTestBase { - - /** - * Modules to enable. - * - * @var array - */ - public static $modules = array('theme_test'); - - public static function getInfo() { - return array( - 'name' => 'html.tpl.php html and body attributes', - 'description' => 'Tests attributes inserted in the html and body elements of html.tpl.php.', - 'group' => 'Theme', - ); - } - - /** - * Tests that modules and themes can alter variables in html.tpl.php. - */ - function testThemeHtmlTplPhpAttributes() { - $this->drupalGet(''); - $attributes = $this->xpath('/html[@theme_test_html_attribute="theme test html attribute value"]'); - $this->assertTrue(count($attributes) == 1, 'Attribute set in the html element via hook_preprocess_HOOK() for html.tpl.php found.'); - $attributes = $this->xpath('/html/body[@theme_test_body_attribute="theme test body attribute value"]'); - $this->assertTrue(count($attributes) == 1, 'Attribute set in the body element via hook_preprocess_HOOK() for html.tpl.php found.'); - } -} diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index e190951fadaa..076761711665 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -1530,7 +1530,7 @@ function hook_permission() { * path, include it here. This path should be relative to the Drupal root * directory. * - template: If specified, this theme implementation is a template, and - * this is the template file without an extension. Do not put .tpl.php on + * this is the template file without an extension. Do not put .html.twig on * this file; that extension will be added automatically by the default * rendering engine (which is Twig). If 'path' above is specified, the * template should also be in this path. @@ -1560,7 +1560,7 @@ function hook_permission() { * - override preprocess functions: Set to TRUE when a theme does NOT want * the standard preprocess functions to run. This can be used to give a * theme FULL control over how variables are set. For example, if a theme - * wants total control over how certain variables in the page.tpl.php are + * wants total control over how certain variables in the page.html.twig are * set, this can be set to true. Please keep in mind that when this is used * by a theme, that theme becomes responsible for making sure necessary * variables are set. diff --git a/core/modules/system/system.module b/core/modules/system/system.module index bf311187a3c8..03f90429991b 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2296,7 +2296,7 @@ function system_user_timezone(&$form, &$form_state) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function system_preprocess_block(&$variables) { // Derive the base plugin ID. diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index 7c205c88ff85..badea8129354 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -92,7 +92,7 @@ function _theme_custom_theme() { } /** - * Implements hook_preprocess_HOOK() for html.tpl.php. + * Implements hook_preprocess_HOOK() for HTML document templates. */ function theme_test_preprocess_html(&$variables) { $variables['html_attributes']['theme_test_html_attribute'] = 'theme test html attribute value'; @@ -126,7 +126,13 @@ function theme_theme_test_function_template_override($variables) { } /** - * Process variables for theme-test-render-element.tpl.php. + * Prepares variables for test render element templates. + * + * Default template: theme-test-render-element.html.twig. + * + * @param array $variables + * An associative array containing: + * - elements: An associative array containing the properties of the element. */ function template_preprocess_theme_test_render_element(&$variables) { $variables['attributes']['data-variables-are-preprocessed'] = TRUE; diff --git a/core/modules/taxonomy/taxonomy.api.php b/core/modules/taxonomy/taxonomy.api.php index bb1e932d3bef..8de2d337ec06 100644 --- a/core/modules/taxonomy/taxonomy.api.php +++ b/core/modules/taxonomy/taxonomy.api.php @@ -281,7 +281,7 @@ function hook_taxonomy_term_view(\Drupal\taxonomy\Entity\Term $term, \Drupal\ent * If the module wishes to act on the rendered HTML of the term rather than the * structured content array, it may use this hook to add a #post_render * callback. Alternatively, it could also implement - * hook_preprocess_HOOK() for taxonomy-term.tpl.php. See drupal_render() and + * hook_preprocess_HOOK() for taxonomy-term.html.twig. See drupal_render() and * theme() documentation respectively for details. * * @param $build diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module index 4e410c024254..df7eaa9023f6 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -104,7 +104,7 @@ function tour_toolbar() { } /** - * Implements hook_preprocess_HOOK() for page.tpl.php. + * Implements hook_preprocess_HOOK() for page templates. */ function tour_preprocess_page(&$variables) { if (!\Drupal::currentUser()->hasPermission('access tour')) { diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php index 5c66c0a4c678..6533c0e89150 100644 --- a/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -346,7 +346,7 @@ function hook_user_view(\Drupal\user\UserInterface $account, \Drupal\entity\Enti * If the module wishes to act on the rendered HTML of the user rather than the * structured content array, it may use this hook to add a #post_render callback. * Alternatively, it could also implement hook_preprocess_HOOK() for - * user.tpl.php. See drupal_render() and theme() documentation + * user.html.twig. See drupal_render() and theme() documentation * respectively for details. * * @param $build diff --git a/core/modules/user/user.module b/core/modules/user/user.module index c73155b5876f..f8a4fb8fd495 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -551,7 +551,7 @@ function user_validate_current_pass(&$form, &$form_state) { } /** - * Implements hook_preprocess_HOOK() for block.html.twig. + * Implements hook_preprocess_HOOK() for block templates. */ function user_preprocess_block(&$variables) { if ($variables['configuration']['module'] == 'user') { @@ -1366,7 +1366,7 @@ function user_delete_multiple(array $uids) { * - $page['content']['#user']: * The user account of the profile being viewed. * - * To theme user profiles, copy modules/user/user.tpl.php + * To theme user profiles, copy core/modules/user/templates/user.html.twig * to your theme directory, and edit it as instructed in that file's comments. * * @param $account diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php index d5c8fb9477dd..3258afbdd37f 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php @@ -25,7 +25,7 @@ * If a template file should be used, the file has to be placed in the * module's templates folder. * Example: theme = "mymodule_row" of module "mymodule" will implement either - * theme_mymodule_row() or mymodule-row.tpl.php in the + * theme_mymodule_row() or mymodule-row.html.twig in the * [..]/modules/mymodule/templates folder. * - register_theme: (optional) When set to TRUE (default) the theme is * registered automatically. When set to FALSE the plugin reuses an existing diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.module b/core/modules/views/tests/modules/views_test_data/views_test_data.module index 5f32bfbf9457..61c7fdbb3dc2 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.module +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.module @@ -56,7 +56,7 @@ function views_test_data_handler_test_access_callback_argument($argument = FALSE } /** - * Implements hook_preprocess_HOOK() for views-view-table.tpl.php. + * Implements hook_preprocess_HOOK() for views table templates. */ function views_test_data_preprocess_views_view_table(&$variables) { if ($variables['view']->storage->id() == 'test_view_render') { diff --git a/core/modules/views/views.module b/core/modules/views/views.module index f19ca8a5bdaf..11af31632aa6 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -502,8 +502,8 @@ function views_preprocess_html(&$variables) { // associated with. This we don't want; for better visual highlighting, we // prefer a smaller region to be chosen. The region we prefer differs from // theme to theme and depends on the details of the theme's markup in - // page.tpl.php, so we can only find it using JavaScript. We therefore remove - // the "contextual-region" class from the <body> tag here and add + // page.html.twig, so we can only find it using JavaScript. We therefore + // remove the "contextual-region" class from the <body> tag here and add // JavaScript that will insert it back in the correct place. if (!empty($variables['page']['#views_contextual_links'])) { $key = array_search('contextual-region', $variables['attributes']['class']); diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index d383da663e28..65f8ac4532a0 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -1183,16 +1183,16 @@ function template_preprocess_views_mini_pager(&$variables) { * The default style for all views is views-view-unformatted.html.twig. * * Many styles will then farm out the actual display of each row to a row - * style; the default row style is views-view-fields.tpl.php. + * style; the default row style is views-view-fields.html.twig. * * Here is an example of all the templates that will be tried in the following * case: * * View, named foobar. Style: unformatted. Row style: Fields. Display: Page. * - * - views-view--foobar--page.tpl.php - * - views-view--page.tpl.php - * - views-view--foobar.tpl.php + * - views-view--foobar--page.html.twig + * - views-view--page.html.twig + * - views-view--foobar.html.twig * - views-view.html.twig * * - views-view-unformatted--foobar--page.html.twig @@ -1200,10 +1200,10 @@ function template_preprocess_views_mini_pager(&$variables) { * - views-view-unformatted--foobar.html.twig * - views-view-unformatted.html.twig * - * - views-view-fields--foobar--page.tpl.php - * - views-view-fields--page.tpl.php - * - views-view-fields--foobar.tpl.php - * - views-view-fields.tpl.php + * - views-view-fields--foobar--page.html.twig + * - views-view-fields--page.html.twig + * - views-view-fields--foobar.html.twig + * - views-view-fields.html.twig * * Important! When adding a new template to your theme, be sure to flush the * theme registry cache! diff --git a/core/modules/views_ui/js/views-admin.js b/core/modules/views_ui/js/views-admin.js index b09cbeb767c6..bc5c6f0c380d 100644 --- a/core/modules/views_ui/js/views-admin.js +++ b/core/modules/views_ui/js/views-admin.js @@ -488,9 +488,9 @@ $.extend(Drupal.viewsUi.RearrangeFilterHandler.prototype, { insertAddRemoveFilterGroupLinks: function () { // Insert a link for adding a new group at the top of the page, and make it - // match the action links styling used in a typical page.tpl.php. Note that - // Drupal does not provide a theme function for this markup, so this is the - // best we can do. + // match the action link styling used in a typical page.html.twig. Since + // Drupal does not provide a theme function for this markup this is the best + // we can do. $('<ul class="action-links"><li><a id="views-add-group-link" href="#">' + this.addGroupButton.val() + '</a></li></ul>') .prependTo(this.table.parent()) // When the link is clicked, dynamically click the hidden form button for diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index 0508ff965e4b..6da533995b8f 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -217,7 +217,7 @@ function views_ui_library_info() { } /** - * Implements hook_preprocess_HOOK() for views-view.html.twig. + * Implements hook_preprocess_HOOK() for views templates. */ function views_ui_preprocess_views_view(&$variables) { $view = $variables['view']; diff --git a/core/themes/bartik/bartik.theme b/core/themes/bartik/bartik.theme index 0a7940174767..593923ae7a3b 100644 --- a/core/themes/bartik/bartik.theme +++ b/core/themes/bartik/bartik.theme @@ -8,7 +8,7 @@ use Drupal\Core\Template\RenderWrapper; /** - * Implements hook_preprocess_HOOK() for html.tpl.php. + * Implements hook_preprocess_HOOK() for HTML document templates. * * Adds body classes if certain regions have content. */ @@ -32,7 +32,7 @@ function bartik_preprocess_html(&$variables) { } /** - * Implements hook_preprocess_HOOK() for page.html.twig. + * Implements hook_preprocess_HOOK() for page templates. */ function bartik_preprocess_page(&$variables) { // Pass the main menu and secondary menu to the template as render arrays. @@ -76,7 +76,7 @@ function bartik_preprocess_page(&$variables) { } /** - * Implements hook_preprocess_HOOK() for maintenance-page.html.twig. + * Implements hook_preprocess_HOOK() for maintenance page templates. */ function bartik_preprocess_maintenance_page(&$variables) { // By default, site_name is set to Drupal if no db connection is available @@ -132,7 +132,7 @@ function bartik_library_info() { } /** - * Implements hook_preprocess_HOOK() for node.html.twig. + * Implements hook_preprocess_HOOK() for node templates. */ function bartik_preprocess_node(&$variables) { // Remove the "Add new comment" link on teasers or when the comment form is diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 2a22f0b2d527..29f171137825 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -31,7 +31,7 @@ function seven_library_info() { } /** - * Implements hook_preprocess_HOOK() for page.tpl.php. + * Implements hook_preprocess_HOOK() for page templates. */ function seven_preprocess_page(&$variables) { $variables['primary_local_tasks'] = $variables['tabs']; -- GitLab