Commit 4f59f974 authored by webchick's avatar webchick
Browse files

Issue #2049207 by dlu, blakehall, janstoeckler, ramlev, Moderate | Cottser:...

Issue #2049207 by dlu, blakehall, janstoeckler, ramlev, Moderate | Cottser: Replace .tpl.php with .html.twig in documentation.
parent 9ba259be
......@@ -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
......
......@@ -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.
......
......@@ -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.
......
......@@ -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
......
......@@ -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') {
......
......@@ -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') {
......
......@@ -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') {
......
......@@ -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'];
......
......@@ -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') {
......
......@@ -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') {
......
......@@ -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') {
......
......@@ -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) {
......
......@@ -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') {
......
......@@ -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
*/
......
......@@ -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') {
......
......@@ -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.
*
......
......@@ -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'];
......
......@@ -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') {
......
......@@ -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
......
......@@ -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') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment