1. drupal
    1. 4.7
    2. 5
    3. 6 theme.inc
    4. 7 theme.inc
Versions
4.7 – 6 theme()
7 theme($hook, $variables = array())

Generate the themed representation of a Drupal object.

All requests for themed functions must go through this function. It examines the request and routes it to the appropriate theme function. If the current theme does not implement the requested function, then the current theme engine is checked. If neither the engine nor theme implement the requested function, then the base theme function is called.

For example, to retrieve the HTML that is output by theme_page($output), a module should call theme('page', $output).

Parameters

$function The name of the theme function to call.

... Additional arguments to pass along to the theme function.

Return value

An HTML string that generates the themed output.

▾ 275 functions call theme()

aggregator_admin_remove_feed in modules/aggregator.module
aggregator_block in modules/aggregator.module
Implementation of hook_block().
aggregator_form_category_submit in modules/aggregator.module
Process aggregator_form_category form submissions. @todo Add delete confirmation dialog.
aggregator_form_category_validate in modules/aggregator.module
Validate aggregator_form_feed form submissions.
aggregator_form_feed_submit in modules/aggregator.module
Process aggregator_form_feed form submissions. @todo Add delete confirmation dialog.
aggregator_form_feed_validate in modules/aggregator.module
Validate aggregator_form_feed form submissions.
aggregator_page_categories in modules/aggregator.module
Menu callback; displays all the categories used by the aggregator.
aggregator_page_source in modules/aggregator.module
Menu callback; displays all the items captured from a particular feed.
aggregator_page_sources in modules/aggregator.module
Menu callback; displays all the feeds used by the aggregator.
aggregator_parse_feed in modules/aggregator.module
aggregator_refresh in modules/aggregator.module
Checks a news feed for new items.
aggregator_remove in modules/aggregator.module
aggregator_view in modules/aggregator.module
archive_page in modules/archive.module
Menu callback; lists all nodes posted on a given date.
block_admin_configure in modules/block.module
Menu callback; displays the block configuration form.
block_box_delete in modules/block.module
Menu callback; confirm deletion of custom blocks.
block_box_delete_confirm_submit in modules/block.module
Deletion of custom blocks.
blogapi_blogger_edit_post in modules/blogapi.module
Blogging API callback. Modifies the specified blog node.
blogapi_blogger_new_post in modules/blogapi.module
Blogging API callback. Inserts a new blog post as a node.
blog_page_last in modules/blog.module
Displays a Drupal page containing recent blog entries of all users.
blog_page_user in modules/blog.module
Displays a Drupal page containing recent blog entries of a given user.
book_admin_edit_submit in modules/book.module
book_admin_overview in modules/book.module
Returns an administrative overview of all books.
book_export_html in modules/book.module
This function is called by book_export() to generate HTML for export.
book_nodeapi in modules/book.module
Implementation of hook_nodeapi().
book_render in modules/book.module
Menu callback; prints a listing of all books.
chameleon_comment in themes/chameleon/chameleon.theme
chameleon_node in themes/chameleon/chameleon.theme
chameleon_page in themes/chameleon/chameleon.theme
comment_admin_overview in modules/comment.module
Menu callback; present an administrative comment listing.
comment_admin_overview_submit in modules/comment.module
Execute the chosen 'Update option' on the selected comments, such as publishing, unpublishing or deleting.
comment_block in modules/comment.module
Implementation of hook_block().
comment_delete in modules/comment.module
Menu callback; delete a comment.
comment_form in modules/comment.module
comment_form_add_preview in modules/comment.module
comment_link in modules/comment.module
Implementation of hook_link().
comment_links in modules/comment.module
comment_render in modules/comment.module
comment_reply in modules/comment.module
comment_save in modules/comment.module
Accepts a submission of new or changed comment content.
contact_admin_categories in modules/contact.module
Categories/list tab.
contact_admin_delete in modules/contact.module
Category delete page.
contact_admin_delete_submit in modules/contact.module
Process category delete form submission.
contact_admin_edit_submit in modules/contact.module
Process the contact category edit page form submission.
contact_admin_edit_validate in modules/contact.module
Validate the contact category edit page form submission.
contact_mail_page_submit in modules/contact.module
Process the site-wide contact page form submission.
contact_mail_user_submit in modules/contact.module
Process the personal contact page form submission.
db_connect in includes/database.mysql.inc
Initialize a database connection.
db_connect in includes/database.mysqli.inc
Initialise a database connection.
db_connect in includes/database.pgsql.inc
Initialize a database connection.
db_set_active in includes/database.inc
Activate a database for future queries.
drupal_access_denied in includes/common.inc
Generates a 403 error if the request is not allowed.
drupal_auth in modules/drupal.module
Implementation of hook_auth().
drupal_client_page in modules/drupal.module
Formats a list of all clients.
drupal_client_ping in modules/drupal.module
Callback function from drupal_xmlrpc() called when another site pings this one.
drupal_get_html_head in includes/common.inc
Retrieve output to be displayed in the head tag of the HTML page.
drupal_notify in modules/drupal.module
Sends a ping to the Drupal directory server.
drupal_not_found in includes/common.inc
Generates a 404 error if the request can not be handled.
drupal_site_offline in includes/common.inc
Generates a site off-line message
drupal_xml_parser_create in includes/unicode.inc
Prepare a new XML parser.
fileupload_view in developer/examples/fileupload.module
Implementation of hook_view.
file_check_directory in includes/file.inc
Check that the directory exists and is writable. Directories need to have execute permissions to be considered a directory by FTP servers, etc.
file_check_upload in includes/file.inc
file_copy in includes/file.inc
Copies a file to a new location. This is a powerful function that in many ways performs like an advanced version of copy().
file_move in includes/file.inc
Moves a file to a new location.
filter_admin_delete in modules/filter.module
Menu callback; confirm deletion of a format.
filter_admin_delete_submit in modules/filter.module
Process filter delete form submission.
filter_admin_format_form in modules/filter.module
Generate a filter format form.
filter_admin_format_form_submit in modules/filter.module
Process filter format form submissions.
filter_admin_format_form_validate in modules/filter.module
Validate filter format form submissions.
filter_filter_tips in modules/filter.module
Implementation of hook_filter_tips().
filter_form in modules/filter.module
Generate a selector for choosing a format in a form.
filter_form_validate in modules/filter.module
filter_tips_long in modules/filter.module
Menu callback; show a page with long filter tips.
form_render in includes/form.inc
Renders a HTML form given a form tree. Recursively iterates over each of the form elements, generating HTML code. This function is usually called from within a theme. To render a form from within a module, use drupal_get_form().
forum_confirm_delete_submit in modules/forum.module
Implementation of forms api _submit call. Deletes a forum after confirmation.
forum_form_submit in modules/forum.module
Process forum form and container form submissions.
forum_overview in modules/forum.module
Returns an overview list of existing forums and containers
forum_page in modules/forum.module
Menu callback; prints a forum listing.
forum_validate in modules/forum.module
Implementation of hook_validate().
forum_view in modules/forum.module
Implementation of hook_view().
hook_search in developer/hooks/core.php
Define a custom search routine.
locale_add_language_form_validate in includes/locale.inc
Validate the language addition form.
locale_admin_manage_delete_form in modules/locale.module
User interface for the language deletion confirmation screen.
locale_admin_manage_delete_form_submit in modules/locale.module
Process language deletion submissions.
menu_block in modules/menu.module
Implementation of hook_block().
menu_confirm_delete_form_submit in modules/menu.module
Process menu delete form submissions.
menu_disable_item in modules/menu.module
Menu callback; hide a menu item.
menu_edit_item_form in modules/menu.module
Present the menu item editing form.
menu_edit_item_save in modules/menu.module
Save changes to a menu item into the database.
menu_get_active_help in includes/menu.inc
Returns the help associated with the active menu item.
menu_help in modules/menu.module
Implementation of hook_help().
menu_item_delete_form in modules/menu.module
Menu callback; delete a single custom item.
menu_item_link in includes/menu.inc
Returns the rendered link to a menu item.
menu_overview_tree in modules/menu.module
Present the menu tree, rendered along with links to edit menu items.
menu_primary_local_tasks in includes/menu.inc
Returns the rendered HTML of the primary local tasks.
menu_reset_item in modules/menu.module
Menu callback; reset a single modified item.
menu_secondary_local_tasks in includes/menu.inc
Returns the rendered HTML of the secondary local tasks.
menu_tree in includes/menu.inc
Returns a rendered menu tree.
multipage_form_example_view in developer/examples/multipage_form_example.module
Implementation of hook_view().
nodeapi_example_nodeapi in developer/examples/nodeapi_example.module
Implementation of hook_nodeapi().
node_admin_nodes in modules/node.module
Menu callback: content administration.
node_block in modules/node.module
Implementation of hook_block().
node_delete in modules/node.module
Delete a node.
node_delete_confirm in modules/node.module
Menu callback -- ask for confirmation of node deletion
node_example_view in developer/examples/node_example.module
Implementation of hook_view().
node_form_array in modules/node.module
Generate the node editing form array.
node_form_submit in modules/node.module
node_page_default in modules/node.module
Generate a listing of promoted nodes.
node_preview in modules/node.module
Generate a node preview.
node_revisions in modules/node.module
Menu callback for revisions related activities.
node_revision_delete in modules/node.module
Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a revision is deleted.
node_revision_delete_confirm_submit in modules/node.module
node_revision_overview in modules/node.module
Generate an overview table of older revisions of a node.
node_revision_revert in modules/node.module
Revert to the revision with the specified revision number. A node and nodeapi "update" event is triggered (via the node_save() call) when a revision is reverted.
node_revision_revert_confirm_submit in modules/node.module
node_search in modules/node.module
Implementation of hook_search().
node_title_list in modules/node.module
Gather a listing of links to nodes.
node_types_configure in modules/node.module
Menu callback; presents each node type configuration page.
node_validate in modules/node.module
Perform validation checks on the given node.
node_view in modules/node.module
Generate a display of the given node.
page_example_baz in developer/examples/page_example.module
A more complex page callback that takes arguments.
path_admin_delete_confirm in modules/path.module
Menu callback; confirms deleting an URL alias
path_form_validate in modules/path.module
Verify that URL alias is valid.
path_overview in modules/path.module
Return a listing of all defined URL aliases.
phptemplate_comment in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_comment function to be passed into a pluggable template engine.
phptemplate_node in themes/engines/phptemplate/phptemplate.engine
phptemplate_page in themes/engines/phptemplate/phptemplate.engine
Prepare the values passed to the theme_page function to be passed into a pluggable template engine.
poll_page in modules/poll.module
poll_view_results in modules/poll.module
Generates a graphical representation of the results of a poll.
profile_admin_overview in modules/profile.module
Menu callback; display a listing of all editable profile fields.
profile_block in modules/profile.module
Implementation of hook_block().
profile_browse in modules/profile.module
Menu callback; display a list of user information.
profile_field_delete in modules/profile.module
Menu callback; deletes a field from all user profiles.
profile_field_delete_submit in modules/profile.module
Process a field delete form submission.
profile_field_form_submit in modules/profile.module
Process profile_field_form submissions.
profile_validate_profile in modules/profile.module
search_data in modules/search.module
Perform a standard search on the given keys, and return the formatted results.
search_view in modules/search.module
Menu callback; presents the search form and/or search results.
statistics_access_log in modules/statistics.module
statistics_node_tracker in modules/statistics.module
statistics_recent_hits in modules/statistics.module
Menu callback; presents the "recent hits" page.
statistics_top_pages in modules/statistics.module
Menu callback; presents the "top pages" page.
statistics_top_referrers in modules/statistics.module
Menu callback; presents the "referrer" page.
statistics_top_visitors in modules/statistics.module
Menu callback; presents the "top visitors" page.
statistics_user_tracker in modules/statistics.module
system_themes in modules/system.module
Menu callback; displays a listing of all themes.
system_theme_select_form in modules/system.module
Returns a fieldset containing the theme select form.
tablesort_header in includes/tablesort.inc
Format a column header.
taxonomy_form_term_submit in modules/taxonomy.module
Accept the form submission for a taxonomy term and save the result.
taxonomy_form_vocabulary_submit in modules/taxonomy.module
Accept the form submission for a vocabulary and save the results.
taxonomy_node_validate in modules/taxonomy.module
Make sure incoming vids are free tagging enabled.
taxonomy_overview_terms in modules/taxonomy.module
Display a tree of all the terms in a vocabulary, with options to edit each one.
taxonomy_overview_vocabularies in modules/taxonomy.module
List and manage vocabularies.
taxonomy_render_nodes in modules/taxonomy.module
Accepts the result of a pager_query() call, such as that performed by taxonomy_select_nodes(), and formats each node along with a pager.
taxonomy_term_confirm_delete_submit in modules/taxonomy.module
taxonomy_term_page in modules/taxonomy.module
Menu callback; displays all nodes associated with a term.
taxonomy_vocabulary_confirm_delete_submit in modules/taxonomy.module
theme_aggregator_block_item in modules/aggregator.module
Format an individual feed item for display in the block.
theme_aggregator_feed in modules/aggregator.module
Format a news feed.
theme_aggregator_page_list in modules/aggregator.module
theme_blocks in includes/theme.inc
Return a set of blocks available for the current user.
theme_block_admin_display in modules/block.module
Theme main block administration form submission.
theme_book_admin_table in modules/book.module
theme_checkbox in includes/form.inc
Format a checkbox.
theme_checkboxes in includes/form.inc
Format a set of checkboxes.
theme_comment in modules/comment.module
theme_comment_admin_overview in modules/comment.module
theme_comment_block in modules/comment.module
theme_comment_controls in modules/comment.module
theme_comment_flat_collapsed in modules/comment.module
theme_comment_flat_expanded in modules/comment.module
theme_comment_folded in modules/comment.module
theme_comment_preview in modules/comment.module
theme_comment_thread_collapsed in modules/comment.module
theme_comment_thread_expanded in modules/comment.module
theme_comment_view in modules/comment.module
theme_date in includes/form.inc
Format a date selection element.
theme_feed_icon in includes/theme.inc
Return code that emits an feed icon.
theme_file in includes/form.inc
Format a file upload field.
theme_filter_admin_order in modules/filter.module
Theme filter order configuration form.
theme_filter_admin_overview in modules/filter.module
theme_forum_display in modules/forum.module
Format the forum body.
theme_forum_icon in modules/forum.module
Format the icon for each individual topic.
theme_forum_list in modules/forum.module
Format the forum listing.
theme_forum_topic_list in modules/forum.module
Format the topic listing.
theme_get_styles in includes/theme.inc
Return the HTML for a theme's stylesheets.
theme_item in includes/form.inc
Format a form item.
theme_locale_admin_manage_screen in includes/locale.inc
Theme the locale admin manager form.
theme_maintenance_page in includes/theme.inc
theme_node in includes/theme.inc
Return a themed node.
theme_node_admin_nodes in modules/node.module
Theme node administration overview.
theme_node_list in modules/node.module
Format a listing of links to nodes.
theme_node_search_admin in modules/node.module
theme_page in includes/theme.inc
Return an entire Drupal page displaying the supplied content.
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_list in includes/pager.inc
Format a list of nearby pages with additional query results.
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_password in includes/form.inc
Format a password field. *
theme_password_confirm in includes/form.inc
Format a password_confirm item.
theme_poll_results in modules/poll.module
theme_profile_block in modules/profile.module
theme_profile_listing in modules/profile.module
theme_radio in includes/form.inc
Format a radio button.
theme_radios in includes/form.inc
Format a set of radio buttons.
theme_search_page in modules/search.module
Format the result page of a search query.
theme_select in includes/form.inc
Format a dropdown menu or scrolling selection box.
theme_submit in includes/form.inc
theme_system_modules in modules/system.module
theme_system_themes in modules/system.module
theme_system_theme_select_form in modules/system.module
theme_tablesort_indicator in includes/theme.inc
Return a themed sort icon.
theme_taxonomy_term_select in modules/taxonomy.module
theme_textarea in includes/form.inc
Format a textarea.
theme_textfield in includes/form.inc
Format a textfield.
theme_token in includes/form.inc
theme_upload_attachments in modules/upload.module
Displays file attachments in table
theme_upload_form_current in modules/upload.module
Theme the attachments list.
theme_user_admin_new_role in modules/user.module
theme_user_admin_perm in modules/user.module
theme_user_list in modules/user.module
Make a list of users.
theme_user_picture in modules/user.module
theme_user_profile in modules/user.module
Theme a user page
theme_xml_icon in includes/theme.inc
Return code that emits an XML icon.
tracker_page in modules/tracker.module
Menu callback. Prints a listing of active nodes on the site.
update_finished_page in ./update.php
update_progress_page_nojs in ./update.php
Perform updates for the non-JS version and return the status page.
upload_js in modules/upload.module
Menu-callback for JavaScript-based uploads.
upload_nodeapi in modules/upload.module
Implementation of hook_nodeapi().
upload_settings in modules/upload.module
upload_settings_form_validate in modules/upload.module
Form API callback to validate the upload settings form.
user_admin_access in modules/user.module
Menu callback: list all access rules
user_admin_access_check_submit in modules/user.module
user_admin_access_delete in modules/user.module
Menu callback: delete an access rule
user_admin_account in modules/user.module
user_authenticate in modules/user.module
user_block in modules/user.module
Implementation of hook_block().
user_confirm_delete_submit in modules/user.module
user_edit in modules/user.module
user_edit_form in modules/user.module
user_login_submit in modules/user.module
user_login_validate in modules/user.module
user_logout in modules/user.module
Menu callback; logs the current user out, and redirects to the home page.
user_pass_reset in modules/user.module
Menu callback; process one time login link and redirects to the user page on success.
user_pass_submit in modules/user.module
user_pass_validate in modules/user.module
user_register_submit in modules/user.module
user_validate_mail in modules/user.module
user_validate_name in modules/user.module
Verify the syntax of the given name.
user_view in modules/user.module
watchdog_event in modules/watchdog.module
Menu callback; displays details about a log message.
watchdog_overview in modules/watchdog.module
Menu callback; displays a listing of log messages.
_aggregator_page_list in modules/aggregator.module
Prints an aggregator page listing a number of feed items. Various menu callbacks use this function to print their feeds.
_comment_delete_thread in modules/comment.module
_form_validate in includes/form.inc
_forum_confirm_delete in modules/forum.module
Returns a confirmation page for deleting a forum taxonomy term.
_forum_format in modules/forum.module
Formats a topic for display
_locale_add_language in includes/locale.inc
Helper function to add a language
_locale_admin_import_submit in includes/locale.inc
Process the locale import form submission.
_locale_export_po in includes/locale.inc
Exports a Portable Object (Template) file for a language
_locale_import_parse_plural_forms in includes/locale.inc
Parses a Plural-Forms entry from a Gettext Portable Object file header
_locale_import_po in includes/locale.inc
Parses Gettext Portable Object file information and inserts into database
_locale_import_read_po in includes/locale.inc
Parses Gettext Portable Object file into an array
_locale_string_seek in includes/locale.inc
Perform a string search and display results in a table
_phptemplate_default in themes/engines/phptemplate/phptemplate.engine
Default callback for PHPTemplate.
_phptemplate_default_variables in themes/engines/phptemplate/phptemplate.engine
Adds additional helper variables to all templates.
_taxonomy_confirm_del_term in modules/taxonomy.module
_taxonomy_confirm_del_vocabulary in modules/taxonomy.module
_throttle_validate in modules/throttle.module
_upload_image in modules/upload.module
Check an upload, if it is an image, make sure it fits within the maximum dimensions allowed.
_upload_validate in modules/upload.module
_user_edit_validate in modules/user.module

Code

includes/theme.inc, line 161

<?php
function theme() {
  $args = func_get_args();
  $function = array_shift($args);

  if ($func = theme_get_function($function)) {
    return call_user_func_array($func, $args);
  }
}
?>