Commit 85c680a1 authored by webchick's avatar webchick

#588148 by JohnAlbin, sun, and effulgentsia: Make theme_links() actually themable.

parent 2d632d1a
......@@ -86,7 +86,7 @@ function blog_node_view($node, $view_mode = 'full') {
'attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($node)))),
);
$node->content['links']['blog'] = array(
'#theme' => 'links',
'#theme' => 'links__blog_node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -113,7 +113,7 @@ function book_node_view_link($node, $view_mode) {
if (!empty($links)) {
$node->content['links']['book'] = array(
'#theme' => 'links',
'#theme' => 'links__book_node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -601,7 +601,7 @@ function comment_node_view($node, $view_mode) {
}
$node->content['links']['comment'] = array(
'#theme' => 'links',
'#theme' => 'links__comment_node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......@@ -910,7 +910,7 @@ function comment_build_content($comment, $node, $view_mode = 'full') {
if (empty($comment->in_preview)) {
$comment->content['links']['comment'] = array(
'#theme' => 'links',
'#theme' => 'links__comment',
'#links' => comment_links($comment, $node),
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -146,7 +146,7 @@ function contextual_links_view($element) {
$build = array(
'#prefix' => '<div class="contextual-links-wrapper">',
'#suffix' => '</div>',
'#theme' => 'links',
'#theme' => 'links__contextual',
'#links' => $links,
'#attributes' => array('class' => array('contextual-links')),
'#attached' => array(
......
......@@ -892,7 +892,7 @@ function locale_block_view($type) {
if (isset($links->links) && count($links->links > 1)) {
$class = "language-switcher-{$links->provider}";
$variables = array('links' => $links->links, 'attributes' => array('class' => array($class)));
$block['content'] = theme('links', $variables);
$block['content'] = theme('links__locale_block', $variables);
$block['subject'] = t('Languages');
return $block;
}
......
......@@ -505,7 +505,7 @@ function node_admin_nodes() {
// Render an unordered list of operations links.
$options[$node->nid]['operations'] = array(
'data' => array(
'#theme' => 'links',
'#theme' => 'links__node_operations',
'#links' => $operations,
'#attributes' => array('class' => array('links', 'inline')),
),
......
......@@ -1256,7 +1256,7 @@ function node_build_content($node, $view_mode = 'full') {
);
}
$node->content['links']['node'] = array(
'#theme' => 'links',
'#theme' => 'links__node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -819,7 +819,7 @@ function theme_poll_choices($variables) {
* @see theme_poll_results()
*/
function template_preprocess_poll_results(&$variables) {
$variables['links'] = theme('links', array('links' => $variables['raw_links']));
$variables['links'] = theme('links__poll_results', array('links' => $variables['raw_links']));
if (isset($variables['vote']) && $variables['vote'] > -1 && user_access('cancel own vote')) {
$variables['cancel_form'] = drupal_render(drupal_get_form('poll_cancel_form', $variables['nid']));
}
......
......@@ -117,7 +117,7 @@ function statistics_node_view($node, $view_mode) {
}
$node->content['links']['statistics'] = array(
'#theme' => 'links',
'#theme' => 'links__statistics_node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -104,7 +104,7 @@
<?php if ($main_menu): ?>
<div id="navigation"><div class="section">
<?php print theme('links', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Main menu'))); ?>
<?php print theme('links__system_main_menu', array('links' => $main_menu, 'attributes' => array('id' => 'main-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Main menu'))); ?>
</div></div> <!-- /.section, /#navigation -->
<?php endif; ?>
......@@ -144,7 +144,7 @@
</div></div> <!-- /#main, /#main-wrapper -->
<div id="footer"><div class="section">
<?php print theme('links', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
<?php print theme('links__system_secondary_menu', array('links' => $secondary_menu, 'attributes' => array('id' => 'secondary-menu', 'class' => array('links', 'clearfix')), 'heading' => t('Secondary menu'))); ?>
<?php print render($page['footer']); ?>
</div></div> <!-- /.section, /#footer -->
......
......@@ -191,7 +191,7 @@ function toolbar_view() {
$links = toolbar_menu_navigation_links(toolbar_get_menu_tree());
$system_menus = menu_list_system_menus();
$build['toolbar_menu'] = array(
'#theme' => 'links',
'#theme' => 'links__toolbar_menu',
'#links' => $links,
'#attributes' => array('id' => 'toolbar-menu'),
'#heading' => array('text' => t($system_menus['management']), 'level' => 'h2', 'class' => 'element-invisible'),
......@@ -220,7 +220,7 @@ function toolbar_view() {
);
}
$build['toolbar_user'] = array(
'#theme' => 'links',
'#theme' => 'links__toolbar_user',
'#links' => $links,
'#attributes' => array('id' => 'toolbar-user'),
);
......
......@@ -188,7 +188,7 @@ function translation_node_view($node, $view_mode) {
// Do not show link to the same node.
unset($links[$node->language]);
$node->content['links']['translation'] = array(
'#theme' => 'links',
'#theme' => 'links__translation_node',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
......
......@@ -300,7 +300,7 @@ function theme_update_version($variables) {
'title' => t('Release notes'),
'href' => $version['release_link'],
);
$output .= theme('links', array('links' => $links));
$output .= theme('links__update_version', array('links' => $links));
$output .= '</td>';
$output .= '</tr>';
$output .= "</table>\n";
......
......@@ -58,7 +58,7 @@ function garland_process_html(&$vars) {
function garland_preprocess_page(&$vars) {
$vars['tabs2'] = menu_secondary_local_tasks();
if (isset($vars['main_menu'])) {
$vars['primary_nav'] = theme('links', array(
$vars['primary_nav'] = theme('links__system_main_menu', array(
'links' => $vars['main_menu'],
'attributes' => array(
'class' => array('links', 'main-menu'),
......@@ -74,7 +74,7 @@ function garland_preprocess_page(&$vars) {
$vars['primary_nav'] = FALSE;
}
if (isset($vars['secondary_menu'])) {
$vars['secondary_nav'] = theme('links', array(
$vars['secondary_nav'] = theme('links__system_secondary_menu', array(
'links' => $vars['secondary_menu'],
'attributes' => array(
'class' => array('links', 'secondary-menu'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment