theme

Versions
mediamosa-21
theme($hook, $variables = array())

Generate the themed output.

All requests for theme hooks must go through this function. It examines the request and routes it to the appropriate theme function. The theme registry is checked to determine which implementation to use, which may be a function or a template.

If the implementation is a template, the following functions may be used to modify the $variables array. They are processed in two distinct phases; "preprocess" and "process" functions. The order listed here is the order in which they execute.

  • template_preprocess(&$variables) This sets a default set of variables for all template implementations.
  • template_preprocess_HOOK(&$variables) This is the first preprocessor called specific to the hook; it should be implemented by the module that registers it.
  • MODULE_preprocess(&$variables) This will be called for all templates; it should only be used if there is a real need. It's purpose is similar to template_preprocess().
  • MODULE_preprocess_HOOK(&$variables) This is for modules that want to alter or provide extra variables for theming hooks not registered to itself. For example, if a module named "foo" wanted to alter the $classes_array variable for the hook "node" a preprocess function of foo_preprocess_node() can be created to intercept and alter the variable.
  • ENGINE_engine_preprocess(&$variables) This function should only be implemented by theme engines and exists so that it can set necessary variables for all hooks.
  • ENGINE_engine_preprocess_HOOK(&$variables) This is the same as the previous function, but it is called for a single theming hook.
  • THEME_preprocess(&$variables) This is for themes that want to alter or provide extra variables. For example, if a theme named "foo" wanted to alter the $classes_array variable for the hook "node" a preprocess function of foo_preprocess_node() can be created to intercept and alter the variable.
  • THEME_preprocess_HOOK(&$variables) The same applies from the previous function, but it is called for a specific hook.
  • template_process(&$variables) This sets a default set of variables for all template implementations.
  • template_process_HOOK(&$variables) This is the first processor called specific to the hook; it should be implemented by the module that registers it.
  • MODULE_process(&$variables) This will be called for all templates; it should only be used if there is a real need. It's purpose is similar to template_process().
  • MODULE_process_HOOK(&$variables) This is for modules that want to alter or provide extra variables for theming hooks not registered to itself. For example, if a module named "foo" wanted to alter the $classes_array variable for the hook "node" a process function of foo_process_node() can be created to intercept and alter the variable.
  • ENGINE_engine_process(&$variables) This function should only be implemented by theme engines and exists so that it can set necessary variables for all hooks.
  • ENGINE_engine_process_HOOK(&$variables) This is the same as the previous function, but it is called for a single theming hook.
  • ENGINE_process(&$variables) This is meant to be used by themes that utilize a theme engine. It is provided so that the processor is not locked into a specific theme. This makes it easy to share and transport code but theme authors must be careful to prevent fatal re-declaration errors when using sub-themes that have their own processor named exactly the same as its base theme. In the default theme engine (PHPTemplate), sub-themes will load their own template.php file in addition to the one used for its parent theme. This increases the risk for these errors. A good practice is to use the engine name for the base theme and the theme name for the sub-themes to minimize this possibility.
  • ENGINE_process_HOOK(&$variables) The same applies from the previous function, but it is called for a specific hook.
  • THEME_process(&$variables) These functions are based upon the raw theme; they should primarily be used by themes that do not use an engine or by sub-themes. It serves the same purpose as ENGINE_process().
  • THEME_process_HOOK(&$variables) The same applies from the previous function, but it is called for a specific hook.

If the implementation is a function, only the hook-specific preprocess and process functions (the ones ending in _HOOK) are called from the above list. This is because theme hooks with function implementations need to be fast, and calling the non-hook-specific preprocess and process functions for them would incur a noticeable performance penalty.

There are two special variables that these preprocess and process functions can set: 'theme_hook_suggestion' and 'theme_hook_suggestions'. These will be merged together to form a list of 'suggested' alternate hooks to use, in reverse order of priority. theme_hook_suggestion will always be a higher priority than items in theme_hook_suggestions. theme() will use the highest priority implementation that exists. If none exists, theme() will use the implementation for the theme hook it was called with. These suggestions are similar to and are used for similar reasons as calling theme() with an array as the $hook parameter (see below). The difference is whether the suggestions are determined by the code that calls theme() or by a preprocess or process function.

Parameters

$hook The name of the theme hook to call. If the name contains a double-underscore ('__') and there isn't an implementation for the full name, the part before the '__' is checked. This allows a fallback to a more generic implementation. For example, if theme('links__node', ...) is called, but there is no implementation of that hook, then the 'links' implementation is used. This process is iterative, so if theme('links__contextual__node', ...) is called, theme() checks for the following implementations, and uses the first one that exists:

  • links__contextual__node
  • links__contextual
  • links

This allows themes to create specific theme implementations for named objects and contexts of otherwise generic theme hooks. The $hook parameter may also be an array, in which case the first hook that has an implementation is used. This allows for the code that calls theme() to explicitly specify the fallback order in a situation where using the '__' convention is not desired or insufficient.

$variables An associative array of variables to merge with defaults from the theme registry, pass to preprocess and process functions for modification, and finally, pass to the function or template implementing the theme hook. Alternatively, this can be a renderable array, in which case, its properties are mapped to variables expected by the theme hook implementations.

Return value

An HTML string that generates the themed output.

▾ 411 functions call theme()

aggregator_aggregator_parse in modules/aggregator/aggregator.parser.inc
Implements hook_aggregator_parse().
aggregator_block_view in modules/aggregator/aggregator.module
Implements hook_block_view().
aggregator_categorize_items in modules/aggregator/aggregator.pages.inc
Form builder; build the page list form.
aggregator_page_categories in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the categories used by the aggregator.
aggregator_page_opml in modules/aggregator/aggregator.pages.inc
Menu callback; generates an OPML representation of all feeds.
aggregator_page_rss in modules/aggregator/aggregator.pages.inc
Menu callback; generate an RSS 0.92 feed of aggregator items or categories.
aggregator_page_source in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the items captured from a particular feed.
aggregator_page_sources in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the feeds used by the aggregator.
aggregator_view in modules/aggregator/aggregator.admin.inc
Displays the aggregator administration page.
ajax_deliver in includes/ajax.inc
Package and send the result of a page callback to the browser as an AJAX response.
blog_block_view in modules/blog/blog.module
Implements hook_block_view().
blog_page_user in modules/blog/blog.pages.inc
Menu callback; displays a Drupal page containing recent blog entries of a given user.
book_admin_overview in modules/book/book.admin.inc
Returns an administrative overview of all books.
book_block_view in modules/book/book.module
Implements hook_block_view().
book_export_html in modules/book/book.pages.inc
This function is called by book_export() to generate HTML for export.
book_node_export in modules/book/book.module
Generates printer-friendly HTML for a node.
book_node_view in modules/book/book.module
Implements hook_node_view().
book_render in modules/book/book.pages.inc
Menu callback; prints a listing of all books.
coder_review_page_form in sites/all/modules/coder/coder_review/coder_review.module
Implements hook_form().
comment_admin_overview in modules/comment/comment.admin.inc
Form builder; Builds the comment overview form for the admin.
comment_block_view in modules/comment/comment.module
Implements hook_block_view().
comment_form in modules/comment/comment.module
Generate the basic commenting form, for appending to a node or display on a separate page.
comment_links in modules/comment/comment.module
Helper function, build links for an individual comment.
comment_node_view in modules/comment/comment.module
Implements hook_node_view().
contact_personal_form in modules/contact/contact.pages.inc
Form builder; the personal contact form.
dashboard_show_disabled in modules/dashboard/dashboard.module
AJAX callback to show disabled blocks in the dashboard customization mode.
dblog_event in modules/dblog/dblog.admin.inc
Menu callback; displays details about a log message.
dblog_overview in modules/dblog/dblog.admin.inc
Menu callback; displays a listing of log messages.
devel_function_reference in sites/all/modules/devel/devel.module
Returns a list of all currently defined user functions in the current request lifecycle, with links their documentation.
devel_generate_taxonomy_data in sites/all/modules/devel/devel_generate.inc
devel_node_access_block_view in sites/all/modules/devel/devel_node_access.module
devel_query_table in sites/all/modules/devel/devel.module
Adds a table at the bottom of the page cataloguing data on all the database queries that were made to generate the page.
devel_session in sites/all/modules/devel/devel.module
Menu callback: display the session.
devel_switch_user_list in sites/all/modules/devel/devel.module
devel_themer_log in sites/all/modules/devel/devel_themer.module
Show all theme templates and functions that could have been used on this page.
dna_summary in sites/all/modules/devel/devel_node_access.module
do_coder_reviews in sites/all/modules/coder/coder_review/coder_review.module
Perform batch coder reviews for multiple files.
drupal_add_feed in includes/common.inc
Add a feed URL for the current page.
drupal_deliver_html_page in includes/common.inc
Package and send the result of a page callback to the browser as HTML.
drupal_get_js in includes/common.inc
Returns a themed presentation of all JavaScript code for the current page.
drupal_render in includes/common.inc
Renders HTML given a structured array tree.
field_help in modules/field/field.module
Implements hook_help().
field_ui_fields_list in modules/field_ui/field_ui.admin.inc
Menu callback; lists all defined fields for quick reference.
field_ui_inactive_message in modules/field_ui/field_ui.admin.inc
Helper function to display a message about inactive fields.
file_ajax_upload in modules/file/file.module
Menu callback; Shared AJAX callback for file uploads and deletions.
file_field_widget_form in modules/file/file.field.inc
Implements hook_field_widget_form().
file_managed_file_process in modules/file/file.module
Process function to expand the managed_file element type.
file_save_upload in includes/file.inc
Saves a file upload to a new location.
filter_tips_long in modules/filter/filter.pages.inc
Menu callback; show a page with long filter tips.
forum_block_view_pre_render in modules/forum/forum.module
A #pre_render callback. Lists nodes based on the element's #query property. *
forum_help in modules/forum/forum.module
Implements hook_help().
forum_page in modules/forum/forum.pages.inc
Menu callback; prints a forum listing.
garland_preprocess_page in themes/garland/template.php
Override or insert variables into the page template.
help_page in modules/help/help.admin.inc
Menu callback; prints a page listing general help for a module.
hook_ajax_render_alter in modules/system/system.api.php
Alter the commands that are sent to the user through the AJAX framework.
hook_search_execute in modules/search/search.api.php
Execute a search for a set of key words.
hook_search_page in modules/search/search.api.php
Override the rendering of search results.
hook_view in modules/node/node.api.php
Display a node.
image_field_widget_form in modules/image/image.field.inc
Implements hook_field_widget_form().
image_field_widget_process in modules/image/image.field.inc
An element #process callback for the image_image field type.
image_style_form in modules/image/image.admin.inc
Form builder; Edit an image style name and effects order.
image_style_list in modules/image/image.admin.inc
Menu callback; Listing of all current image styles.
install_display_output in includes/install.core.inc
Display themed installer output and end the page request.
install_verify_requirements in includes/install.core.inc
Installation task; verify the requirements for installing Drupal.
l in includes/common.inc
Format an internal Drupal link.
locale_block_view in modules/locale/locale.module
Implements hook_block_view().
locale_date_format_language_overview_page in modules/locale/locale.admin.inc
Display edit date format links for each language.
locale_translate_overview_screen in modules/locale/locale.admin.inc
Overview screen for translations.
mediamosa_app_view in sites/all/modules/mediamosa/core/node/mediamosa_node_mediamosa_app.inc
Implements hook_view().
mediamosa_batch_jobs_current in sites/all/modules/mediamosa/modules/batch_jobs/mediamosa_batch_jobs.callbacks.inc
Callback function to display the current job.
mediamosa_batch_jobs_history in sites/all/modules/mediamosa/modules/batch_jobs/mediamosa_batch_jobs.callbacks.inc
Callback function to display the job history.
mediamosa_batch_jobs_queue in sites/all/modules/mediamosa/modules/batch_jobs/mediamosa_batch_jobs.callbacks.inc
Callback function to display the queued jobs.
mediamosa_browse_asset_list_form in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_asset.inc
Form builder; asset listing page.
mediamosa_browse_collection_list_form in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_collection.inc
Form builder; collection listing page.
mediamosa_configuration_menu_block_page in sites/all/modules/mediamosa/configuration/mediamosa_configuration.module
Block code copied from drupal system.inc.
mediamosa_connector_block in sites/all/modules/mediamosa_connector/mediamosa_connector.module
Implement hook_block().
mediamosa_integrity_check_page in sites/all/modules/mediamosa/modules/integrity_check/mediamosa_integrity_check.module
Integrity check page / list.
mediamosa_maintenance_browse_revision_form in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_revision.inc
Show listing of the revisions (of our nodes).
mediamosa_server_view in sites/all/modules/mediamosa/core/node/mediamosa_node_mediamosa_server.inc
Implements hook_view().
mediamosa_transcode_profile_view in sites/all/modules/mediamosa/core/node/mediamosa_node_mediamosa_transcode_profile.inc
Implements hook_view().
menu_overview_page in modules/menu/menu.admin.inc
Menu callback which shows an overview page of all the custom menus and their descriptions.
node_add_page in modules/node/node.pages.inc
node_admin_nodes in modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_block_view in modules/node/node.module
Implements hook_block_view().
node_overview_types in modules/node/content_types.inc
Displays the content type admin overview page.
node_page_default in modules/node/node.module
Menu callback; Generate a listing of promoted nodes.
node_preview in modules/node/node.pages.inc
Generate a node preview.
node_revision_overview in modules/node/node.pages.inc
Generate an overview table of older revisions of a node.
node_search_execute in modules/node/node.module
Implements hook_search_execute().
node_title_list in modules/node/node.module
Gather a listing of links to nodes.
overlay_close_dialog in modules/overlay/overlay.module
Close the overlay and redirect the parent window to a new path.
overlay_form_submit in modules/overlay/overlay.module
Generic form submit handler.
overlay_preprocess_page in modules/overlay/overlay.module
Preprocess template variables for page.tpl.php.
performance_view_details in sites/all/modules/devel/performance/performance.module
performance_view_summary in sites/all/modules/devel/performance/performance.module
poll_page in modules/poll/poll.pages.inc
Menu callback to provide a simple list of all polls available.
poll_view_results in modules/poll/poll.module
Generates a graphical representation of the results of a poll.
poll_votes in modules/poll/poll.pages.inc
Callback for the 'votes' tab for polls you can see other votes on
profile_block_view in modules/profile/profile.module
Implements hook_block_view().
profile_browse in modules/profile/profile.pages.inc
Menu callback; display a list of user information.
rdf_process in modules/rdf/rdf.module
Template process function for adding extra tags to hold RDFa attributes.
search_data in modules/search/search.module
Perform a standard search on the given keys, and return the formatted results.
seven_tablesort_indicator in themes/seven/template.php
Override of theme_tablesort_indicator().
shortcut_set_admin in modules/shortcut/shortcut.admin.inc
Menu page callback: builds the page for administering shortcut sets.
simpletest_result_status_image in modules/simpletest/simpletest.pages.inc
Get the appropriate image for the status.
statistics_access_log in modules/statistics/statistics.admin.inc
Menu callback; Displays recent page accesses.
statistics_node_tracker in modules/statistics/statistics.pages.inc
statistics_recent_hits in modules/statistics/statistics.admin.inc
Menu callback; presents the "recent hits" page.
statistics_top_visitors in modules/statistics/statistics.admin.inc
Menu callback; presents the "top visitors" page.
syslog_watchdog in modules/syslog/syslog.module
Implements hook_watchdog().
system_actions_manage in modules/system/system.admin.inc
Menu callback; Displays an overview of available and configured actions.
system_admin_by_module in modules/system/system.admin.inc
Menu callback; prints a listing of admin tasks for each installed module.
system_admin_config_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
system_admin_menu_block_page in modules/system/system.admin.inc
Provide a single block from the administration menu as a page. This function is often a destination for these blocks. For example, 'admin/structure/types' needs to have a destination to be valid in the Drupal menu system, but too much...
system_block_view in modules/system/system.module
Implements hook_block_view().
system_main_admin_page in modules/system/system.admin.inc
Menu callback; Provide the administration overview page.
system_modules_confirm_form in modules/system/system.admin.inc
Display confirmation form for required modules.
system_modules_uninstall_confirm_form in modules/system/system.admin.inc
Confirm uninstall of selected modules.
system_requirements in modules/system/system.install
Test and report Drupal installation requirements.
system_settings_overview in modules/system/system.admin.inc
Menu callback; displays a module's settings page.
system_status in modules/system/system.admin.inc
Menu callback: displays the site status report. Can also be used as a pure check.
system_themes_page in modules/system/system.admin.inc
Menu callback; displays a listing of all themes.
tablesort_header in includes/tablesort.inc
Format a column header.
taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Menu callback; displays all nodes associated with a term.
template_preprocess_aggregator_feed_source in modules/aggregator/aggregator.pages.inc
Process variables for aggregator-feed-source.tpl.php.
template_preprocess_aggregator_summary_items in modules/aggregator/aggregator.pages.inc
Process variables for aggregator-summary-items.tpl.php.
template_preprocess_aggregator_wrapper in modules/aggregator/aggregator.pages.inc
Process variables for aggregator-wrapper.tpl.php.
template_preprocess_comment in modules/comment/comment.module
Process variables for comment.tpl.php.
template_preprocess_forums in modules/forum/forum.module
Process variables for forums.tpl.php
template_preprocess_forum_list in modules/forum/forum.module
Process variables to format a forum listing.
template_preprocess_forum_submitted in modules/forum/forum.module
Process variables to format submission info for display in the forum list and topic list.
template_preprocess_forum_topic_list in modules/forum/forum.module
Preprocess variables to format the topic listing.
template_preprocess_maintenance_page in includes/theme.inc
The variables array generated here is a mirror of template_preprocess_page(). This preprocessor will run its course when theme_maintenance_page() is invoked. It is also used in theme_install_page() and theme_update_page() to keep all the variables...
template_preprocess_node in modules/node/node.module
Process variables for node.tpl.php
template_preprocess_page in includes/theme.inc
Preprocess variables for page.tpl.php
template_preprocess_poll_results in modules/poll/poll.module
Preprocess the poll_results theme hook.
template_preprocess_profile_block in modules/profile/profile.module
Process variables for profile-block.tpl.php.
template_preprocess_profile_listing in modules/profile/profile.module
Process variables for profile-listing.tpl.php.
template_preprocess_restcall_doc in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_restcalls.inc
Process variables for restcall-doc.tpl.php.
template_preprocess_search_results in modules/search/search.pages.inc
Process variables for search-results.tpl.php.
template_preprocess_user_picture in modules/user/user.module
Process variables for user-picture.tpl.php.
theme_admin_page in modules/system/system.admin.inc
This function formats an administrative page for viewing.
theme_aggregator_categorize_items in modules/aggregator/aggregator.pages.inc
Theme the page list form for assigning categories.
theme_authorize_report in includes/theme.maintenance.inc
Generate a report of the results from an operation run via authorize.php.
theme_book_admin_table in modules/book/book.admin.inc
Theme function for the book administration page form.
theme_coder_review in sites/all/modules/coder/coder_review/coder_review.module
Format coder_review form and results.
theme_coder_review_table_cols in sites/all/modules/coder/coder_review/coder_review.module
Implement theme_cols to theme the radiobuttons and checkboxes form elements in a table column.
theme_coder_review_warning in sites/all/modules/coder/coder_review/coder_review.module
Format a coder_review warning to be included in results.
theme_coder_review_warning_msg in sites/all/modules/coder/coder_review/coder_review.module
Format a coder_review warning to be included in results, creating the text.
theme_comment_block in modules/comment/comment.module
Returns a formatted list of recent comments to be displayed in the comment block.
theme_dashboard_disabled_blocks in modules/dashboard/dashboard.module
Theme a set of disabled blocks, for display in dashboard customization mode.
theme_devel_querylog in sites/all/modules/devel/devel.module
theme_feed_icon in includes/theme.inc
Return code that emits an feed icon.
theme_field_multiple_value_form in modules/field/field.form.inc
Theme an individual form element.
theme_file_formatter_table in modules/file/file.field.inc
Theme function for the 'table' formatter.
theme_file_link in modules/file/file.module
Output a link to a file.
theme_file_widget_multiple in modules/file/file.field.inc
Theme a group of file upload widgets.
theme_filter_admin_format_filter_order in modules/filter/filter.admin.inc
Theme text format filter order form elements as tabledrag.
theme_filter_admin_overview in modules/filter/filter.admin.inc
Theme the text format administration overview form.
theme_filter_guidelines in modules/filter/filter.module
Format guidelines for a text format.
theme_form_element in includes/form.inc
Theme a form element.
theme_form_element_label in includes/form.inc
Theme a form element label and required marker.
theme_image_anchor in modules/image/image.admin.inc
Theme callback for displaying a grid of checkboxes.
theme_image_crop_summary in modules/image/image.admin.inc
Theme callback for image crop effect summary output.
theme_image_formatter in modules/image/image.field.inc
Theme function for image field formatters.
theme_image_scale_summary in modules/image/image.admin.inc
Theme callback for image scale effect summary output.
theme_image_style in modules/image/image.module
Return a themed image using a specific image style.
theme_image_style_effects in modules/image/image.admin.inc
Theme callback for listing the effects within a specific image style.
theme_image_style_list in modules/image/image.admin.inc
Display the page containing the list of image styles.
theme_image_style_preview in modules/image/image.admin.inc
Theme callback for displaying a preview of an image style.
theme_install_page in includes/theme.maintenance.inc
Generate a themed installation page.
theme_locale_date_format_form in modules/locale/locale.admin.inc
Theme locale date format form.
theme_locale_languages_configure_form in modules/locale/locale.admin.inc
Theme the language configure form.
theme_locale_languages_overview_form in modules/locale/locale.admin.inc
Theme the language overview form.
theme_mediamosa_maintenance_browse_properties in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse.inc
Our asset/collection detail view.
theme_mediamosa_maintenance_browse_revision_info in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_revision.inc
Show information of revision.
theme_mediamosa_maintenance_pager in sites/all/modules/mediamosa/maintenance/mediamosa_maintenance.admin.inc
Our pager wrapper.
theme_mediamosa_maintenance_table in sites/all/modules/mediamosa/maintenance/mediamosa_maintenance.admin.inc
Our default themed table.
theme_mediamosa_simpletest_test_table in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_simpletest.inc
Reuse simpletest test table.
theme_menu_overview_form in modules/menu/menu.admin.inc
Theme the menu overview form into a table.
theme_node_list in modules/node/node.module
Format a listing of links to nodes.
theme_node_recent_block in modules/node/node.module
Returns a formatted list of recent nodes.
theme_node_recent_content in modules/node/node.module
Returns a formatted recent node to be displayed in the recent content block.
theme_node_search_admin in modules/node/node.module
Theme the content ranking part of the search settings admin page.
theme_pager in includes/pager.inc
Format a query pager.
theme_pager_first in includes/pager.inc
Format a "first page" link.
theme_pager_last in includes/pager.inc
Format a "last page" link.
theme_pager_next in includes/pager.inc
Format a "next page" link.
theme_pager_previous in includes/pager.inc
Format a "previous page" link.
theme_poll_choices in modules/poll/poll.module
Theme the admin poll form for choices.
theme_profile_admin_overview in modules/profile/profile.admin.inc
Theme the profile field overview into a drag and drop enabled table.
theme_shortcut_set_customize in modules/shortcut/shortcut.admin.inc
Themes the shortcut set customization form.
theme_simpletest_test_table in modules/simpletest/simpletest.pages.inc
Theme the test list generated by simpletest_test_form() into a table.
theme_submit in includes/form.inc
Theme a submit button form element.
theme_system_admin_by_module in modules/system/system.admin.inc
Theme output of the dashboard page.
theme_system_date_time_settings in modules/system/system.admin.inc
Theme function for date settings form.
theme_system_modules_fieldset in modules/system/system.admin.inc
Theme callback for the modules form.
theme_system_modules_uninstall in modules/system/system.admin.inc
Themes a table of currently disabled modules.
theme_system_themes_page in modules/system/system.admin.inc
Theme function for the system themes form.
theme_tableselect in includes/form.inc
Formats a table with radio buttons or checkboxes.
theme_tablesort_indicator in includes/theme.inc
Return a themed sort icon.
theme_taxonomy_overview_terms in modules/taxonomy/taxonomy.admin.inc
Theme the terms overview as a sortable list of terms.
theme_taxonomy_overview_vocabularies in modules/taxonomy/taxonomy.admin.inc
Theme the vocabulary overview as a sortable list of vocabularies.
theme_trigger_display in modules/trigger/trigger.admin.inc
Displays actions assigned to this hook in a table.
theme_update_manager_update_form in modules/update/update.manager.inc
Theme the first page in the update manager wizard to select projects.
theme_update_page in includes/theme.maintenance.inc
Generate a themed update page.
theme_update_report in modules/update/update.report.inc
Theme project status report.
theme_update_version in modules/update/update.report.inc
Theme the version display of a project.
theme_user_admin_new_role in modules/user/user.admin.inc
Theme the new-role form.
theme_user_admin_permissions in modules/user/user.admin.inc
Theme the administer permissions page.
theme_user_list in modules/user/user.module
Make a list of users.
tracker_page in modules/tracker/tracker.pages.inc
Menu callback; prints a listing of active nodes on the site.
update_check_requirements in ./update.php
Check update requirements and report any errors.
update_manager_download_batch_finished in modules/update/update.manager.inc
Batch callback invoked when the download batch is completed.
update_manager_update_form in modules/update/update.manager.inc
Build the form for the update manager page to update existing projects.
update_results_page in ./update.php
update_script_selection_form in ./update.php
update_status in modules/update/update.report.inc
Menu callback. Generate a page about the update status of projects.
update_task_list in ./update.php
Add the update task list to the current page.
user_account_form in modules/user/user.module
Helper function to add default user account fields to user registration and edit form.
user_admin_account in modules/user/user.admin.inc
Form builder; User administration page.
user_block_view in modules/user/user.module
Implements hook_block_view().
user_login_block in modules/user/user.module
user_user_view in modules/user/user.module
Implements hook_user_view().
_aggregator_page_list in modules/aggregator/aggregator.pages.inc
Prints an aggregator page listing a number of feed items.
_batch_progress_page_nojs in includes/batch.inc
Output a batch processing page without JavaScript support.
_coder_review_47_array2object_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_conf_url_rewrite_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_file_directory_path_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_file_directory_temp_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_format_name_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_hook_node_info_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_hook_onload_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_message_access_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_module_get_name_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_node_delete_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_node_list_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_node_load_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_node_tablesort_pager_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_47_node_validate_title_warning in sites/all/modules/coder/coder_review/includes/coder_review_47.inc
_coder_review_5x_drupal_call_js_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_form_render_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_message_na_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_module_exist_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_node_get_name_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_system_listing_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_theme_add_style_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_user_mail_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_5x_user_mail_wrapper_warning in sites/all/modules/coder/coder_review/includes/coder_review_5x.inc
_coder_review_6x_book_admin_edit_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_admin_orphan_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_content_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_export_html_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_export_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_form_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_insert_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_location_down_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_location_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_next_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_node_visitor_html_post_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_node_visitor_html_pre_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_outline_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_prev_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_recurse_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_toc_recurse_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_toc_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_tree_recurse_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_book_tree_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_cache_serialize_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_cache_set_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_confirm_form_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_custom_url_rewrite_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_db_next_id_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_db_num_rows_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_db_result_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_drupal_mail_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_drupal_retrieve_form_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_file_check_upload_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_file_save_upload_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_format_plural_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_form_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_form_set_value_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_hook_access_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_hook_forms_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_hook_help_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_hook_info_auth_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_hook_theme_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_link_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_locale_refresh_cache_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_mail_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_menu_get_object_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_menu_set_location_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_nodeapi_submit_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_node_access_rebuild_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_profile_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_remote_addr_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_taxonomy_get_vocabulary_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_taxonomy_node_get_terms_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_theme_get_function_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_url_l_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_user_authenticate_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_watchdog_debug_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_6x_watchdog_warning in sites/all/modules/coder/coder_review/includes/coder_review_6x.inc
_coder_review_7x_actions_synchronize_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_book_toc_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_check_markup_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_code_registry_rebuild_function_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_comment_load_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_comment_node_url_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_comment_validate_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_db_rewrite_sql_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_descriptions_permissions_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_add_css_parameters_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_add_js_external_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_add_js_parameters_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_add_js_weight_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_clone_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_execute_renamed_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_get_content_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_http_request_parameters_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_set_content_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_set_html_head_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_set_title_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_system_listing_preg_match_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_drupal_uninstall_modules_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_file_scan_directory_array_itize_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_file_scan_directory_nomask_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_file_scan_directory_preg_match_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_file_set_status_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_access_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_block_op_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_filter_tips_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_filter_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_footer_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_form_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_js_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_menu_link_alter_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_nodeapi_op_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_node_info_module_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_node_info_node_content_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_perm_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_hook_user_op_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_http_header_functions_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_module_rebuild_cache_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_build_rss_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_form_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_invoke_nodeapi_removed_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_links_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_load_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_type_get_functions_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_node_view_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_php_eval_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_process_functions_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_referer_uri_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_schema_translation_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_session_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_system_theme_data_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_del_term_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_del_vocabulary_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_get_term_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_get_tree_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_save_term_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_taxonomy_save_vocabulary_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_theme_page_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_theme_rebuild_function_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_time_limit_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_time_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_user_authenticate_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_user_delete_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_7x_user_load_warning in sites/all/modules/coder/coder_review/includes/coder_review_7x.inc
_coder_review_i18n_drupal_set_message_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_drupal_set_title_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_fapi_title_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_form_error_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_in_hook_links_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_in_install_l_without_st in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_in_install_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_l_without_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_menu_with_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_space_starts_or_ends_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_i18n_watchdog_with_t in sites/all/modules/coder/coder_review/includes/coder_review_i18n.inc
_coder_review_page_form_includes in sites/all/modules/coder/coder_review/coder_review.module
Add results to form array for display on form page.
_coder_review_security_l_check_plain_warning in sites/all/modules/coder/coder_review/includes/coder_review_security.inc
_coder_review_security_request_uri_warning in sites/all/modules/coder/coder_review/includes/coder_review_security.inc
_coder_review_security_sql_var_warning in sites/all/modules/coder/coder_review/includes/coder_review_security.inc
_coder_review_sql_db_query_in_install_function in sites/all/modules/coder/coder_review/includes/coder_review_sql.inc
_coder_review_sql_db_query_range_warning in sites/all/modules/coder/coder_review/includes/coder_review_sql.inc
_color_theme_select_form_alter in modules/color/color.module
Helper for hook_form_FORM_ID_alter() implementations.
_drupal_log_error in includes/errors.inc
Log a PHP error or exception, display an error page in fatal cases.
_filter_html_tips in modules/filter/filter.module
Filter tips callback for HTML filter.
_locale_translate_seek in includes/locale.inc
Perform a string search and display results in a table
_mediamosa_app_contacts in sites/all/modules/mediamosa/modules/app/mediamosa_app.module
Show more specific information about a application.
_mediamosa_browse_asset_page_view_collections_list in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_asset.inc
Build the mediafile listing.
_mediamosa_browse_asset_page_view_job_list in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_asset.inc
Build the job list.
_mediamosa_browse_asset_page_view_mediafile_list in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_asset.inc
Build the mediafile listing.
_mediamosa_browse_asset_page_view_properties in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_asset.inc
Build the properties.
_mediamosa_browse_collection_page_view in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_collection.inc
View the details of an collection.
_mediamosa_maintenance_admin_page in sites/all/modules/mediamosa/maintenance/mediamosa_maintenance.admin.inc
Menu callback; Provide the administration overview page.
_mediamosa_maintenance_browse_log in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_log.inc
Show a selection of the watchdog in our own log viewer.
_mediamosa_maintenance_status in sites/all/modules/mediamosa/maintenance/mediamosa_maintenance.module
Generate the status page.
_mediamosa_maintenance_view_revision in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_revision.inc
Show details of a revision.
_mediamosa_migration_batch_finished in sites/all/modules/mediamosa_migration/mediamosa_migration.admin.inc
'finished' callback
_mediamosa_server_list in sites/all/modules/mediamosa/modules/server/mediamosa_server.module
Show the mediamosa servers.
_mediamosa_transcode_profile_list in sites/all/modules/mediamosa/modules/transcode/profile/mediamosa_transcode_profile.inc
Show the listing of the current transcode profiles.
_mediamosa_webservice_list in sites/all/modules/mediamosa/modules/webservice/mediamosa_webservice.module
List of all webservices.
_node_mass_update_batch_finished in modules/node/node.admin.inc
Node Mass Update Batch 'finished' callback.
_openid_user_login_form_alter in modules/openid/openid.module
_options_get_options in modules/field/modules/options/options.module
Collects the options for a field.
_simpletest_batch_operation in modules/simpletest/simpletest.module
Batch operation callback.
_system_modules_build_row in modules/system/system.admin.inc
Build a table row for the system modules page.
_theme_test_suggestion in modules/simpletest/tests/theme_test.module
Page callback, calls a theme hook suggestion.

Code

includes/theme.inc, line 764

<?php
function theme($hook, $variables = array()) {
  static $hooks = NULL;
  if (!isset($hooks)) {
    drupal_theme_initialize();
    $hooks = theme_get_registry();
  }

  // If an array of hook candidates were passed, use the first one that has an
  // implementation.
  if (is_array($hook)) {
    foreach ($hook as $candidate) {
      if (isset($hooks[$candidate])) {
        break;
      }
    }
    $hook = $candidate;
  }

  // If there's no implementation, check for more generic fallbacks. If there's
  // still no implementation, log an error and return an empty string.
  if (!isset($hooks[$hook])) {
    // Iteratively strip everything after the last '__' delimiter, until an
    // implementation is found.
    while ($pos = strrpos($hook, '__')) {
      $hook = substr($hook, 0, $pos);
      if (isset($hooks[$hook])) {
        break;
      }
    }
    if (!isset($hooks[$hook])) {
      watchdog('theme', 'Theme key "@key" not found.', array('@key' => $hook), WATCHDOG_WARNING);
      return '';
    }
  }

  $info = $hooks[$hook];
  global $theme_path;
  $temp = $theme_path;
  // point path_to_theme() to the currently used theme path:
  $theme_path = $info['theme path'];

  // Include a file if the theme function or variable processor is held elsewhere.
  if (!empty($info['includes'])) {
    foreach ($info['includes'] as $include_file) {
      include_once DRUPAL_ROOT . '/' . $include_file;
    }
  }

  // If a renderable array is passed as $variables, then set $variables to
  // the arguments expected by the theme function.
  if (isset($variables['#theme']) || isset($variables['#theme_wrappers'])) {
    $element = $variables;
    $variables = array();
    if (isset($info['variables'])) {
      foreach (array_keys($info['variables']) as $name) {
        if (isset($element["#$name"])) {
          $variables[$name] = $element["#$name"];
        }
      }
    }
    else {
      $variables[$info['render element']] = $element;
    }
  }

  // Merge in argument defaults.
  if (!empty($info['variables'])) {
    $variables += $info['variables'];
  }
  elseif (!empty($info['render element'])) {
    $variables += array($info['render element'] => array());
  }

  // Invoke the variable processors, if any. The processors may specify
  // alternate suggestions for which hook's template/function to use. If the
  // hook is a suggestion of a base hook, invoke the variable processors of
  // the base hook, but retain the suggestion as a high priority suggestion to
  // be used unless overridden by a variable processor function.
  if (isset($info['base hook'])) {
    $base_hook = $info['base hook'];
    $base_hook_info = $hooks[$base_hook];
    if (isset($base_hook_info['preprocess functions']) || isset($base_hook_info['process functions'])) {
      $variables['theme_hook_suggestion'] = $hook;
      $hook = $base_hook;
      $info = $base_hook_info;
    }
  }
  if (isset($info['preprocess functions']) || isset($info['process functions'])) {
    $variables['theme_hook_suggestions'] = array();
    foreach (array('preprocess functions', 'process functions') as $phase) {
      if (!empty($info[$phase])) {
        foreach ($info[$phase] as $processor_function) {
          if (function_exists($processor_function)) {
            // We don't want a poorly behaved process function changing $hook.
            $hook_clone = $hook;
            $processor_function($variables, $hook_clone);
          }
        }
      }
    }
    // If the preprocess/process functions specified hook suggestions, and the
    // suggestion exists in the theme registry, use it instead of the hook that
    // theme() was called with. This allows the preprocess/process step to
    // route to a more specific theme hook. For example, a function may call
    // theme('node', ...), but a preprocess function can add 'node__article' as
    // a suggestion, enabling a theme to have an alternate template file for
    // article nodes. Suggestions are checked in the following order:
    // - The 'theme_hook_suggestion' variable is checked first. It overrides
    //   all others.
    // - The 'theme_hook_suggestions' variable is checked in FILO order, so the
    //   last suggestion added to the array takes precedence over suggestions
    //   added earlier.
    $suggestions = array();
    if (!empty($variables['theme_hook_suggestions'])) {
      $suggestions = $variables['theme_hook_suggestions'];
    }
    if (!empty($variables['theme_hook_suggestion'])) {
      $suggestions[] = $variables['theme_hook_suggestion'];
    }
    foreach (array_reverse($suggestions) as $suggestion) {
      if (isset($hooks[$suggestion])) {
        $info = $hooks[$suggestion];
        break;
      }
    }
  }

  // Generate the output using either a function or a template.
  if (isset($info['function'])) {
    if (function_exists($info['function'])) {
      $output = $info['function']($variables);
    }
  }
  else {
    // Default render function and extension.
    $render_function = 'theme_render_template';
    $extension = '.tpl.php';

    // The theme engine may use a different extension and a different renderer.
    global $theme_engine;
    if (isset($theme_engine)) {
      if ($info['type'] != 'module') {
        if (function_exists($theme_engine . '_render_template')) {
          $render_function = $theme_engine . '_render_template';
        }
        $extension_function = $theme_engine . '_extension';
        if (function_exists($extension_function)) {
          $extension = $extension_function();
        }
      }
    }

    // In some cases, a template implementation may not have had
    // template_preprocess() run (for example, if the default implementation is
    // a function, but a template overrides that default implementation). In
    // these cases, a template should still be able to expect to have access to
    // the variables provided by template_preprocess(), so we add them here if
    // they don't already exist. We don't want to run template_preprocess()
    // twice (it would be inefficient and mess up zebra striping), so we use the
    // 'directory' variable to determine if it has already run, which while not
    // completely intuitive, is reasonably safe, and allows us to save on the
    // overhead of adding some new variable to track that.
    if (!isset($variables['directory'])) {
      $default_template_variables = array();
      template_preprocess($default_template_variables, $hook);
      $variables += $default_template_variables;
    }

    // Render the output using the template file.
    $template_file = $info['template'] . $extension;
    if (isset($info['path'])) {
      $template_file = $info['path'] . '/' . $template_file;
    }
    $output = $render_function($template_file, $variables);
  }

  // restore path_to_theme()
  $theme_path = $temp;
  return $output;
}
?>