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
5ff1f144
Commit
5ff1f144
authored
Aug 15, 2009
by
webchick
Browse files
#545580
by moshe weitzman: Simplify block render structure.
parent
f2f34a87
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/block/block.module
View file @
5ff1f144
...
...
@@ -277,10 +277,10 @@ function block_get_blocks_by_region($region) {
$build
[
$key
]
=
$block
->
content
;
unset
(
$block
->
content
);
$build
[
$key
]
+=
array
(
'#theme_wrappers'
=>
array
(
'block'
),
'#block'
=>
$block
,
'#weight'
=>
++
$weight
,
);
$build
[
$key
][
'#theme_wrappers'
][]
=
'block'
;
}
$build
[
'#sorted'
]
=
TRUE
;
}
...
...
@@ -735,7 +735,9 @@ function _block_render_blocks($region_blocks) {
}
if
(
isset
(
$block
->
content
)
&&
$block
->
content
)
{
// Normalize to the drupal_render() structure.
$block
->
content
=
array
(
'content'
=>
is_string
(
$block
->
content
)
?
array
(
'#markup'
=>
$block
->
content
)
:
$block
->
content
);
if
(
is_string
(
$block
->
content
))
{
$block
->
content
=
array
(
'#markup'
=>
$block
->
content
);
}
// Override default block title if a custom display title is present.
if
(
$block
->
title
)
{
// Check plain here to allow module generated titles to keep any
...
...
modules/filter/filter.admin.inc
View file @
5ff1f144
...
...
@@ -66,7 +66,8 @@ function filter_admin_overview_submit($form, &$form_state) {
*/
function
theme_filter_admin_overview
(
$form
)
{
$rows
=
array
();
foreach
(
$form
as
$id
=>
$element
)
{
foreach
(
element_children
(
$form
)
as
$id
)
{
$element
=
$form
[
$id
];
if
(
isset
(
$element
[
'roles'
])
&&
is_array
(
$element
[
'roles'
]))
{
$element
[
'weight'
][
'#attributes'
][
'class'
]
=
'text-format-order-weight'
;
$rows
[]
=
array
(
...
...
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