summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-07-19 18:15:13 (GMT)
committerAlex Pott2013-07-19 18:15:13 (GMT)
commit5d649f8bfc134348384b935e8478ddc23502ac37 (patch)
tree8cad1dd8b2b44692edb696c5eda37c0b0da89acb
parent4e1c0fed539767d22ced38527397a3d8811ebf12 (diff)
Issue #1589968 by cr0ss, Cottser, Pancho, DarthDrupal, Mark Carver: Move Title from process to preprocess, remove template_process_page().
-rw-r--r--core/includes/menu.inc2
-rw-r--r--core/includes/theme.inc17
-rw-r--r--core/modules/system/templates/page.html.twig1
-rw-r--r--core/themes/bartik/templates/page.html.twig1
-rw-r--r--core/themes/seven/templates/page.html.twig1
5 files changed, 2 insertions, 20 deletions
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 626b634..c90575e 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -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.
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index caea1f4..7bff76e 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -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'])) {
@@ -2815,21 +2815,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.
*
* This is typically called for adding to the 'theme_hook_suggestions' or
diff --git a/core/modules/system/templates/page.html.twig b/core/modules/system/templates/page.html.twig
index 71b66f6..b072919 100644
--- a/core/modules/system/templates/page.html.twig
+++ b/core/modules/system/templates/page.html.twig
@@ -59,7 +59,6 @@
*
* @see template_preprocess_page()
* @see template_process()
- * @see template_process_page()
* @see html.html.twig
*
* @ingroup themeable
diff --git a/core/themes/bartik/templates/page.html.twig b/core/themes/bartik/templates/page.html.twig
index 240db7d..35c7102 100644
--- a/core/themes/bartik/templates/page.html.twig
+++ b/core/themes/bartik/templates/page.html.twig
@@ -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
*
diff --git a/core/themes/seven/templates/page.html.twig b/core/themes/seven/templates/page.html.twig
index d899393..aa8fd01 100644
--- a/core/themes/seven/templates/page.html.twig
+++ b/core/themes/seven/templates/page.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