Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
85c680a1
Commit
85c680a1
authored
Jan 08, 2010
by
webchick
Browse files
#588148
by JohnAlbin, sun, and effulgentsia: Make theme_links() actually themable.
parent
2d632d1a
Changes
14
Hide whitespace changes
Inline
Side-by-side
modules/blog/blog.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/book/book.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/comment/comment.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/contextual/contextual.module
View file @
85c680a1
...
...
@@ -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
(
...
...
modules/locale/locale.module
View file @
85c680a1
...
...
@@ -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
;
}
...
...
modules/node/node.admin.inc
View file @
85c680a1
...
...
@@ -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'
)),
),
...
...
modules/node/node.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/poll/poll.module
View file @
85c680a1
...
...
@@ -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'
]));
}
...
...
modules/statistics/statistics.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/system/page.tpl.php
View file @
85c680a1
...
...
@@ -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 -->
...
...
modules/toolbar/toolbar.module
View file @
85c680a1
...
...
@@ -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'
),
);
...
...
modules/translation/translation.module
View file @
85c680a1
...
...
@@ -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'
)),
);
...
...
modules/update/update.report.inc
View file @
85c680a1
...
...
@@ -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
"
;
...
...
themes/garland/template.php
View file @
85c680a1
...
...
@@ -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'
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment