diff --git a/core/includes/theme.inc b/core/includes/theme.inc index f98df80..900219f 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -2794,6 +2794,7 @@ function drupal_common_theme() { ), 'table' => array( 'variables' => array('header' => NULL, 'rows' => NULL, 'attributes' => array(), 'caption' => NULL, 'colgroups' => array(), 'sticky' => FALSE, 'responsive' => TRUE, 'empty' => ''), + 'function' => 'theme_table', ), 'tablesort_indicator' => array( 'variables' => array('style' => NULL), @@ -2801,6 +2802,7 @@ function drupal_common_theme() { ), 'mark' => array( 'variables' => array('status' => MARK_NEW), + 'function' => 'theme_mark', ), 'item_list' => array( 'variables' => array('items' => array(), 'title' => '', 'list_type' => 'ul', 'attributes' => array(), 'empty' => NULL), @@ -2811,7 +2813,8 @@ function drupal_common_theme() { 'template' => 'feed-icon', ), 'more_link' => array( - 'variables' => array('url' => NULL, 'title' => NULL) + 'variables' => array('url' => NULL, 'title' => NULL), + 'function' => 'theme_more_link', ), 'progress_bar' => array( 'variables' => array('label' => NULL, 'percent' => NULL, 'message' => NULL), @@ -2819,6 +2822,7 @@ function drupal_common_theme() { ), 'indentation' => array( 'variables' => array('size' => 1), + 'function' => 'theme_indentation', ), // From theme.maintenance.inc. 'maintenance_page' => array( @@ -2831,12 +2835,15 @@ function drupal_common_theme() { ), 'task_list' => array( 'variables' => array('items' => NULL, 'active' => NULL, 'variant' => NULL), + 'function' => 'theme_task_list', ), '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( @@ -2846,22 +2853,28 @@ function drupal_common_theme() { // From menu.inc. 'menu_link' => array( 'render element' => 'element', + 'function' => 'theme_menu_link', ), 'menu_tree' => array( 'render element' => 'tree', + 'function' => 'theme_menu_tree', ), 'menu_local_task' => array( 'render element' => 'element', + 'function' => 'theme_menu_local_task', ), 'menu_local_action' => array( 'render element' => 'element', + 'function' => 'theme_menu_local_action', ), 'menu_local_tasks' => array( 'variables' => array('primary' => array(), 'secondary' => array()), + 'function' => 'theme_menu_local_tasks', ), // From form.inc. 'input' => array( 'render element' => 'element', + 'function' => 'theme_input', ), 'select' => array( 'render element' => 'element', @@ -2881,9 +2894,11 @@ function drupal_common_theme() { ), 'date' => array( 'render element' => 'element', + 'function' => 'theme_date', ), 'checkboxes' => array( 'render element' => 'element', + 'function' => 'theme_checkboxes', ), 'form' => array( 'render element' => 'element', @@ -2895,6 +2910,7 @@ function drupal_common_theme() { ), 'tableselect' => array( 'render element' => 'element', + 'function' => 'theme_tableselect', ), 'form_element' => array( 'render element' => 'element', @@ -2902,9 +2918,11 @@ function drupal_common_theme() { ), 'form_required_marker' => array( 'render element' => 'element', + 'function' => 'theme_form_required_marker', ), 'form_element_label' => array( 'render element' => 'element', + 'function' => 'theme_form_element_label', ), 'vertical_tabs' => array( 'render element' => 'element', diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php index e84b33b..449badf 100644 --- a/core/lib/Drupal/Core/Theme/Registry.php +++ b/core/lib/Drupal/Core/Theme/Registry.php @@ -426,7 +426,9 @@ protected function processExtension(&$cache, $name, $type, $theme, $path) { // If function and file are omitted, default to standard naming // conventions. if (!isset($info['template']) && !isset($info['function'])) { - $result[$hook]['function'] = ($type == 'module' ? 'theme_' : $name . '_') . $hook; + $template_name = strtr($hook, '_', '-'); + $info['template'] = $template_name; + $result[$hook]['template'] = $template_name; } if (isset($cache[$hook]['includes'])) { diff --git a/core/modules/aggregator/aggregator.module b/core/modules/aggregator/aggregator.module index 86011d6..66a4abb 100644 --- a/core/modules/aggregator/aggregator.module +++ b/core/modules/aggregator/aggregator.module @@ -78,10 +78,12 @@ function aggregator_theme() { 'aggregator_page_opml' => array( 'variables' => array('feeds' => NULL), 'file' => 'aggregator.theme.inc', + 'function' => 'theme_aggregator_page_opml', ), 'aggregator_page_rss' => array( 'variables' => array('feeds' => NULL), 'file' => 'aggregator.theme.inc', + 'function' => 'theme_aggregator_page_rss', ), ); } diff --git a/core/modules/book/book.module b/core/modules/book/book.module index fca7d44..ff1b7ec 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -56,6 +56,7 @@ function book_theme() { ), 'book_link' => array( 'render element' => 'element', + 'function' => 'theme_book_link', ), 'book_export_html' => array( 'variables' => array('title' => NULL, 'contents' => NULL, 'depth' => NULL), @@ -64,6 +65,7 @@ function book_theme() { 'book_admin_table' => array( 'render element' => 'form', 'file' => 'book.admin.inc', + 'function' => 'theme_book_admin_table', ), 'book_all_books_block' => array( 'render element' => 'book_menus', diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index 40c8f28..285a41b 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -99,6 +99,7 @@ function field_ui_theme() { return array( 'field_ui_table' => array( 'render element' => 'elements', + 'function' => 'theme_field_ui_table', ), ); } diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 3843be9..71ec63f 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -568,26 +568,33 @@ function file_theme() { // file.module. 'file_link' => array( 'variables' => array('file' => NULL, 'icon_directory' => NULL, 'description' => NULL, 'attributes' => array()), + 'function' => 'theme_file_link', ), 'file_icon' => array( 'variables' => array('file' => NULL, 'icon_directory' => NULL), + 'function' => 'theme_file_icon', ), 'file_managed_file' => array( 'render element' => 'element', + 'function' => 'theme_file_managed_file', ), // file.field.inc. 'file_widget' => array( 'render element' => 'element', + 'function' => 'theme_file_widget', ), 'file_widget_multiple' => array( 'render element' => 'element', + 'function' => 'theme_file_widget_multiple', ), 'file_formatter_table' => array( 'variables' => array('items' => NULL), + 'function' => 'theme_file_formatter_table', ), 'file_upload_help' => array( 'variables' => array('description' => NULL, 'upload_validators' => NULL, 'cardinality' => NULL), + 'function' => 'theme_file_upload_help', ), ); } diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index faca699..ee755ef 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -91,6 +91,7 @@ function forum_theme() { ), 'forum_form' => array( 'render element' => 'form', + 'function' => 'theme_forum_form', ), ); } diff --git a/core/modules/image/image.module b/core/modules/image/image.module index 472cad4..9b23003 100644 --- a/core/modules/image/image.module +++ b/core/modules/image/image.module @@ -125,46 +125,56 @@ function image_theme() { 'title' => NULL, 'attributes' => array(), ), + 'function' => 'theme_image_style', ), // Theme functions in image.admin.inc. 'image_style_effects' => array( 'render element' => 'form', 'file' => 'image.admin.inc', + 'function' => 'theme_image_style_effects', ), 'image_style_preview' => array( 'variables' => array('style' => NULL), 'file' => 'image.admin.inc', + 'function' => 'theme_image_style_preview', ), 'image_anchor' => array( 'render element' => 'element', 'file' => 'image.admin.inc', + 'function' => 'theme_image_anchor', ), 'image_resize_summary' => array( 'variables' => array('data' => NULL), 'file' => 'image.admin.inc', + 'function' => 'theme_image_resize_summary', ), 'image_scale_summary' => array( 'variables' => array('data' => NULL), 'file' => 'image.admin.inc', + 'function' => 'theme_image_scale_summary', ), 'image_crop_summary' => array( 'variables' => array('data' => NULL), 'file' => 'image.admin.inc', + 'function' => 'theme_image_crop_summary', ), 'image_rotate_summary' => array( 'variables' => array('data' => NULL), 'file' => 'image.admin.inc', + 'function' => 'theme_image_rotate_summary', ), // Theme functions in image.field.inc. 'image_widget' => array( 'render element' => 'element', 'file' => 'image.field.inc', + 'function' => 'theme_image_widget', ), 'image_formatter' => array( 'variables' => array('item' => NULL, 'item_attributes' => NULL, 'path' => NULL, 'image_style' => NULL), 'file' => 'image.field.inc', + 'function' => 'theme_image_formatter', ), ); } diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 4d82508..1b6a962 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -121,14 +121,17 @@ function language_theme() { 'language_negotiation_configure_form' => array( 'render element' => 'form', 'file' => 'language.admin.inc', + 'function' => 'theme_language_negotiation_configure_form', ), '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 --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 8d1e09d..ee59936 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -211,6 +211,7 @@ function locale_theme() { '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 --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index e89feb8..4e51f43 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -120,6 +120,7 @@ function menu_theme() { 'menu_overview_form' => array( 'file' => 'menu.admin.inc', 'render element' => 'form', + 'function' => 'theme_menu_overview_form', ), ); } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index d847788..4866758 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -154,6 +154,7 @@ function node_theme() { ), 'node_search_admin' => array( 'render element' => 'form', + 'function' => 'theme_node_search_admin', ), 'node_add_list' => array( 'variables' => array('content' => NULL), @@ -171,6 +172,7 @@ function node_theme() { ), 'field__node__title' => array( 'base hook' => 'field', + 'function' => 'theme_field__node__title', ), ); } diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module index 6865a81..6dd688c 100644 --- a/core/modules/responsive_image/responsive_image.module +++ b/core/modules/responsive_image/responsive_image.module @@ -117,6 +117,7 @@ function responsive_image_theme() { 'attributes' => array(), 'breakpoints' => array(), ), + 'function' => 'theme_responsive_image', ), 'responsive_image_formatter' => array( 'variables' => array( @@ -125,6 +126,7 @@ function responsive_image_theme() { 'image_style' => NULL, 'breakpoints' => array(), ), + 'function' => 'theme_responsive_image_formatter', ), 'responsive_image_source' => array( 'variables' => array( @@ -133,6 +135,7 @@ function responsive_image_theme() { 'dimensions' => NULL, 'media' => NULL, ), + 'function' => 'theme_responsive_image_source', ), ); } diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 436adc3..e20ad85 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -69,6 +69,7 @@ function simpletest_theme() { 'simpletest_result_summary' => array( 'render element' => 'form', 'file' => 'simpletest.theme.inc', + 'function' => 'theme_simpletest_result_summary', ), ); } diff --git a/core/modules/system/system.module b/core/modules/system/system.module index b746d01..a7e165b 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -172,6 +172,7 @@ function system_theme() { ), 'system_config_form' => array( 'render element' => 'form', + 'function' => 'theme_system_config_form', ), 'confirm_form' => array( 'render element' => 'form', @@ -180,14 +181,17 @@ function system_theme() { 'system_modules_details' => array( 'render element' => 'form', 'file' => 'system.admin.inc', + 'function' => 'theme_system_modules_details', ), 'system_modules_incompatible' => array( 'variables' => array('message' => NULL), 'file' => 'system.admin.inc', + 'function' => 'theme_system_modules_incompatible', ), 'system_modules_uninstall' => array( 'render element' => 'form', 'file' => 'system.admin.inc', + 'function' => 'theme_system_modules_uninstall', ), 'status_report' => array( 'variables' => array('requirements' => NULL), @@ -212,9 +216,11 @@ function system_theme() { 'system_admin_index' => array( 'variables' => array('menu_items' => NULL), 'file' => 'system.admin.inc', + 'function' => 'theme_system_admin_index', ), 'system_compact_link' => array( 'variables' => array(), + 'function' => 'theme_system_compact_link', ), )); } diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 29773f1..767bf56 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -52,6 +52,7 @@ function toolbar_theme($existing, $type, $theme, $path) { ); $items['toolbar_item'] = array( 'render element' => 'element', + 'function' => 'theme_toolbar_item', ); return $items;