Full ELMS Learning Network documentation
function theme_link
Error message
User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).cis7 theme.inc | theme_link($variables) |
cle7 theme.inc | theme_link($variables) |
elmsmedia7 theme.inc | theme_link($variables) |
icor7 theme.inc | theme_link($variables) |
meedjum_blog7 theme.inc | theme_link($variables) |
mooc7 theme.inc | theme_link($variables) |
Returns HTML for a link.
All Drupal code that outputs a link should call the l() function. That function performs some initial preprocessing, and then, if necessary, calls theme('link') for rendering the anchor tag.
To optimize performance for sites that don't need custom theming of links, the l() function includes an inline copy of this function, and uses that copy if none of the enabled modules or the active theme implement any preprocess or process functions or override this theme implementation.
Parameters
$variables: An associative array containing the keys 'text', 'path', and 'options'. See the l() function for information about these variables.
See also
l()
Related topics
- l in includes/
common.inc - Formats an internal or external URL link as an HTML anchor tag.
- book_block_view in modules/
book/ book.module - Implements hook_block_view().
- dblog_overview in modules/
dblog/ dblog.admin.inc - Page callback: Displays a listing of database log messages.
- l in includes/
common.inc - Formats an internal or external URL link as an HTML anchor tag.
- _zurb_foundation_render_link in sites/
all/ themes/ local_contrib/ zurb-foundation/ template.php - Helper function to recursively render sub-menus.
Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.
- adaptivetheme_html_head_alter in sites/
all/ themes/ ulmus/ adaptivetheme/ at_core/ inc/ alter.inc - hook_html_head_alter()
- admin_menu_links_menu in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu.inc - Build the administration menu as renderable menu links.
- admin_menu_merge_tree in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu.inc - Walk through the entire menu tree and merge in expanded dynamic menu links.
- admin_menu_toolbar_admin_menu_output_build in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu_toolbar/ admin_menu_toolbar.module - Implements hook_admin_menu_output_build().
- admin_menu_translate in sites/
all/ modules/ ulmus/ admin_menu/ admin_menu.inc - Translate an expanded router item into a menu link suitable for rendering.
File
- includes/
theme.inc, line 1645 - The theme system, which controls the output of Drupal.
Code
function theme_link($variables) {
return '<a href="' . check_plain(url($variables['path'], $variables['options'])) . '"' . drupal_attributes($variables['options']['attributes']) . '>' . ($variables['options']['html'] ? $variables['text'] : check_plain($variables['text'])) . '</a>';
}