Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9873c740
Commit
9873c740
authored
Jun 24, 2013
by
Alex Pott
Browse files
Issue
#2012818
by thedavidmeister: Remove #type 'markup'.
parent
431dc2e3
Changes
10
Hide whitespace changes
Inline
Side-by-side
core/includes/common.inc
View file @
9873c740
...
...
@@ -4651,12 +4651,6 @@ function drupal_render(&$elements) {
}
}
// If #markup is set, ensure #type is set. This allows to specify just #markup
// on an element without setting #type.
if
(
isset
(
$elements
[
'#markup'
])
&&
!
isset
(
$elements
[
'#type'
]))
{
$elements
[
'#type'
]
=
'markup'
;
}
// If the default values for this element have not been loaded yet, populate
// them.
if
(
isset
(
$elements
[
'#type'
])
&&
empty
(
$elements
[
'#defaults_loaded'
]))
{
...
...
core/modules/block/custom_block/custom_block.pages.inc
View file @
9873c740
...
...
@@ -66,7 +66,6 @@ function custom_block_delete_form($form, &$form_state, CustomBlock $block) {
$instances
=
$block
->
getInstances
();
$form
[
'message'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
format_plural
(
count
(
$instances
),
'This will also remove 1 placed block instance.'
,
'This will also remove @count placed block instances.'
),
'#access'
=>
!
empty
(
$instances
),
);
...
...
core/modules/file/file.module
View file @
9873c740
...
...
@@ -965,7 +965,6 @@ function file_managed_file_process($element, &$form_state, $form) {
}
else
{
$element
[
'file_'
.
$delta
][
'filename'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
theme
(
'file_link'
,
array
(
'file'
=>
$file
))
.
' '
,
'#weight'
=>
-
10
,
);
...
...
core/modules/image/image.field.inc
View file @
9873c740
...
...
@@ -346,7 +346,6 @@ function image_field_widget_process($element, &$form_state, $form) {
}
$element
[
'preview'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
theme
(
'image_style'
,
$variables
),
);
...
...
core/modules/layout/layout.admin.inc
View file @
9873c740
...
...
@@ -27,7 +27,6 @@ function layout_page_view($key) {
$regions
[
$region
]
=
'<div class="layout-region-demonstration">'
.
check_plain
(
$info
[
'label'
])
.
'</div>'
;
}
$build
[
'demonstration'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
$instance
->
renderLayout
(
TRUE
,
$regions
),
);
$build
[
'#attached'
][
'css'
][]
=
drupal_get_path
(
'module'
,
'layout'
)
.
'/css/layout.admin.css'
;
...
...
core/modules/link/lib/Drupal/link/Plugin/field/formatter/LinkFormatter.php
View file @
9873c740
...
...
@@ -167,7 +167,6 @@ public function viewElements(EntityInterface $entity, $langcode, array $items) {
if
(
!
empty
(
$settings
[
'url_only'
])
&&
!
empty
(
$settings
[
'url_plain'
]))
{
$element
[
$delta
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
check_plain
(
$link_title
),
);
}
...
...
core/modules/system/system.module
View file @
9873c740
...
...
@@ -541,9 +541,6 @@ function system_element_info() {
$types
[
'value'
]
=
array
(
'#input'
=>
TRUE
,
);
$types
[
'markup'
]
=
array
(
'#markup'
=>
''
,
);
$types
[
'link'
]
=
array
(
'#pre_render'
=>
array
(
'drupal_pre_render_link'
),
);
...
...
core/modules/system/tests/modules/plugin_test/plugin_test.module
View file @
9873c740
...
...
@@ -40,7 +40,6 @@ function plugin_test_definitions() {
$output
=
array
();
foreach
(
$manager
->
getDefinitions
()
as
$plugin_id
=>
$definition
)
{
$output
[
$plugin_id
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
$definition
[
'label'
],
);
}
...
...
core/modules/update/update.manager.inc
View file @
9873c740
...
...
@@ -258,7 +258,6 @@ function update_manager_update_form($form, $form_state = array(), $context) {
$prefix
=
'<h2>'
.
t
(
'Manual updates required'
)
.
'</h2>'
;
$prefix
.
=
'<p>'
.
t
(
'Updates of Drupal core are not supported at this time.'
)
.
'</p>'
;
$form
[
'manual_updates'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
theme
(
'table'
,
array
(
'header'
=>
$headers
,
'rows'
=>
$projects
[
'manual'
])),
'#prefix'
=>
$prefix
,
'#weight'
=>
120
,
...
...
core/modules/views/views.module
View file @
9873c740
...
...
@@ -1171,7 +1171,6 @@ function views_form_views_form($form, &$form_state, ViewExecutable $view, $outpu
// Add the output markup to the form array so that it's included when the form
// array is passed to the theme function.
$form
[
'output'
]
=
array
(
'#type'
=>
'markup'
,
'#markup'
=>
$output
,
// This way any additional form elements will go before the view
// (below the exposed widgets).
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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