Commit 5d649f8b authored by alexpott's avatar alexpott

Issue #1589968 by cr0ss, Cottser, Pancho, DarthDrupal, Mark Carver: Move Title...

Issue #1589968 by cr0ss, Cottser, Pancho, DarthDrupal, Mark Carver: Move Title from process to preprocess, remove template_process_page().
parent 4e1c0fed
......@@ -1281,7 +1281,7 @@ function menu_tree_page_data($menu_name, $max_depth = NULL, $only_active_trail =
// If we are asked for the active trail only, and $menu_name has not been
// built and cached for this page yet, then this likely means that it
// won't be built anymore, as this function is invoked from
// template_process_page(). So in order to not build a giant menu tree
// template_preprocess_page(). So in order to not build a giant menu tree
// that needs to be checked for access on all levels, we simply check
// whether we have the menu already in cache, or otherwise, build a minimum
// tree containing the breadcrumb/active trail only.
......
......@@ -2721,7 +2721,6 @@ function template_preprocess_html(&$variables) {
* template_preprocess_maintenance_page() to keep all of them consistent.
*
* @see drupal_render_page()
* @see template_process_page()
*/
function template_preprocess_page(&$variables) {
$language_interface = language(Language::TYPE_INTERFACE);
......@@ -2757,6 +2756,7 @@ function template_preprocess_page(&$variables) {
$variables['site_name'] = (theme_get_setting('features.name') ? check_plain($site_config->get('name')) : '');
$variables['site_slogan'] = (theme_get_setting('features.slogan') ? filter_xss_admin($site_config->get('slogan')) : '');
$variables['tabs'] = menu_local_tabs();
$variables['title'] = new RenderWrapper('drupal_get_title');
// Pass the main menu and secondary menu to the template as render arrays.
if (!empty($variables['main_menu'])) {
......@@ -2814,21 +2814,6 @@ function template_preprocess_page(&$variables) {
);
}
/**
* Processes variables for page.html.twig.
*
* Perform final addition of variables before passing them into the template.
* To customize these variables, simply set them in an earlier step.
*
* @see template_preprocess_page()
*/
function template_process_page(&$variables) {
if (!isset($variables['title'])) {
$variables['title'] = drupal_get_title();
}
}
/**
* Generate an array of suggestions from path arguments.
*
......
......@@ -59,7 +59,6 @@
*
* @see template_preprocess_page()
* @see template_process()
* @see template_process_page()
* @see html.html.twig
*
* @ingroup themeable
......
......@@ -75,7 +75,6 @@
* @see template_preprocess_page()
* @see bartik_preprocess_page()
* @see template_process()
* @see template_process_page()
* @see bartik_process_page()
* @see html.html.twig
*
......
......@@ -61,7 +61,6 @@
* @see template_preprocess_page()
* @see seven_preprocess_page()
* @see template_process()
* @see template_process_page()
* @see html.html.twig
*
* @ingroup themeable
......
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