diff -u b/core/includes/theme.inc b/core/includes/theme.inc --- b/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2299,6 +2299,7 @@ ), 'indentation' => array( 'variables' => array('size' => 1), + 'function' => 'theme_indentation', ), // From theme.maintenance.inc. 'maintenance_page' => array( @@ -2315,9 +2316,11 @@ ), 'authorize_message' => array( 'variables' => array('message' => NULL, 'success' => TRUE), + 'function' => 'theme_authorize_message', ), 'authorize_report' => array( 'variables' => array('messages' => array()), + 'function' => 'theme_authorize_report', ), // From pager.inc. 'pager' => array( @@ -2327,6 +2330,9 @@ // From menu.inc. 'menu_link' => array( 'render element' => 'element', + 'function' => 'theme_menu_link', + 'path' => 'core/includes', + 'file' => 'menu.inc', ), 'menu_tree' => array( 'render element' => 'tree', @@ -2342,7 +2348,6 @@ ), 'indentation' => array( 'variables' => array('size' => 1), - 'function' => 'theme_indentation', ), // From theme.maintenance.inc. 'maintenance_page' => array( @@ -2359,11 +2364,9 @@ ), 'authorize_message' => array( 'variables' => array('message' => NULL, 'success' => TRUE), - 'function' => 'theme_authorize_message', ), 'authorize_report' => array( 'variables' => array('messages' => array()), - 'function' => 'theme_authorize_report', ), // From pager.inc. 'pager' => array( @@ -2373,9 +2376,6 @@ // From menu.inc. 'menu_link' => array( 'render element' => 'element', - 'function' => 'theme_menu_link', - 'path' => 'core/includes', - 'file' => 'menu.inc', ), 'menu_tree' => array( 'render element' => 'tree', diff -u b/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module --- b/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -66,6 +66,7 @@ return array( 'field_ui_table' => array( 'render element' => 'elements', + 'function' => 'theme_field_ui_table', ), ); } @@ -96,7 +97,6 @@ return array( 'field_ui_table' => array( 'render element' => 'elements', - 'function' => 'theme_field_ui_table', ), ); } diff -u b/core/modules/language/language.module b/core/modules/language/language.module --- b/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -100,10 +100,12 @@ 'language_negotiation_configure_browser_form_table' => array( 'render element' => 'form', 'file' => 'language.admin.inc', + 'function' => 'theme_language_negotiation_configure_browser_form_table', ), 'language_content_settings_table' => array( 'render element' => 'element', 'file' => 'language.admin.inc', + 'function' => 'theme_language_content_settings_table', ), ); } @@ -111,12 +113,10 @@ 'language_negotiation_configure_browser_form_table' => array( 'render element' => 'form', 'file' => 'language.admin.inc', - 'function' => 'theme_language_negotiation_configure_browser_form_table', ), 'language_content_settings_table' => array( 'render element' => 'element', 'file' => 'language.admin.inc', - 'function' => 'theme_language_content_settings_table', ), ); } diff -u b/core/modules/locale/locale.module b/core/modules/locale/locale.module --- b/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -181,6 +181,7 @@ 'locale_translate_edit_form_strings' => array( 'render element' => 'form', 'file' => 'locale.pages.inc', + 'function' => 'theme_locale_translate_edit_form_strings', ), 'locale_translation_last_check' => array( 'variables' => array('last' => NULL), @@ -193,7 +194,6 @@ 'locale_translate_edit_form_strings' => array( 'render element' => 'form', 'file' => 'locale.pages.inc', - 'function' => 'theme_locale_translate_edit_form_strings', ), 'locale_translation_last_check' => array( 'variables' => array('last' => NULL), diff -u b/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module --- b/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -78,6 +78,7 @@ 'menu_overview_form' => array( 'file' => 'menu_ui.admin.inc', 'render element' => 'form', + 'function' => 'theme_menu_overview_form', ), ); } @@ -89,7 +90,6 @@ 'menu_overview_form' => array( 'file' => 'menu_ui.admin.inc', 'render element' => 'form', - 'function' => 'theme_menu_overview_form', ), ); } diff -u b/core/modules/node/node.module b/core/modules/node/node.module --- b/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -140,6 +140,7 @@ ), 'node_search_admin' => array( 'render element' => 'form', + 'function' => 'theme_node_search_admin', ), 'node_add_list' => array( 'variables' => array('content' => NULL), @@ -163,7 +164,6 @@ ), 'node_search_admin' => array( 'render element' => 'form', - 'function' => 'theme_node_search_admin', ), 'node_add_list' => array( 'variables' => array('content' => NULL), diff -u b/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module --- b/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -41,9 +41,6 @@ 'render element' => 'element', 'template' => 'toolbar', ); - $items['toolbar_item'] = array( - 'render element' => 'element', - ); return $items; } @@ -52,6 +49,9 @@ 'render element' => 'element', 'template' => 'toolbar', ); + $items['toolbar_item'] = array( + 'render element' => 'element', + ); return $items; } @@ -82,7 +82,6 @@ // property contains a renderable array. $elements['toolbar_item'] = array( '#pre_render' => array('toolbar_pre_render_item'), - '#theme' => 'toolbar_item', 'tab' => array( '#type' => 'link', '#title' => NULL, @@ -93,6 +92,7 @@ // property contains a renderable array. $elements['toolbar_item'] = array( '#pre_render' => array('toolbar_pre_render_item'), + '#theme' => 'toolbar_item', 'tab' => array( '#type' => 'link', '#title' => NULL, only in patch2: unchanged: --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -1098,16 +1098,16 @@ function hook_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_ * 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 .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. + * this is the template file without an extension. If neither 'template' + * nor 'function' is specified, a default template name will be assumed. + * For example, if a module registers the 'node' theme hook, 'node' + * will be assigned to its template. 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. * - function: If specified, this will be the function name to invoke for - * this implementation. If neither 'template' nor 'function' is specified, - * a default function name will be assumed. For example, if a module - * registers the 'node' theme hook, 'theme_node' will be assigned to its - * function. If the chameleon theme registers the node hook, it will be - * assigned 'chameleon_node' as its function. + * this implementation. If the chameleon theme registers the node hook, + * it will be assigned 'chameleon_node' as its function. * - base hook: Used for _theme() suggestions only: the base theme hook name. * Instead of this suggestion's implementation being used directly, the base * hook will be invoked with this implementation as its first suggestion.