Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_event
Commits
484c5cd2
Commit
484c5cd2
authored
Oct 02, 2019
by
Liam Morland
Browse files
Merge tag '7.x-2.36' into 7.x-2.x
parents
14d1e788
000d4096
Changes
2
Hide whitespace changes
Inline
Side-by-side
uw_ct_event.features.field_instance.inc
View file @
484c5cd2
...
...
@@ -679,16 +679,14 @@ function uw_ct_event_field_default_field_instances() {
'settings'
=>
array
(
'address'
=>
array
(
'show'
=>
1
,
'text'
=>
'<div property="schema:location" typeof="schema:Place">
<span property="schema:name">[node:field_event_location:name:0]</span>
'text'
=>
'<span property="schema:name">[node:field_event_location:name:0]</span>
<div property="schema:address" typeof="schema:PostalAddress">
<span property="schema:streetAddress">[node:field_event_location:additional:0]<br>[node:field_event_location:street:0]</span><br>
<span property="schema:addressLocality">[node:field_event_location:city:0]</span>,
<span property="schema:addressRegion">[node:field_event_location:province:0]</span>
<span property="schema:postalCode">[node:field_event_location:postal_code:0]</span><br>
<span property="schema:addressCountry">[node:field_event_location:country_name:0]</span><br>
</div>
</div>'
,
</div>'
,
),
'height'
=>
300
,
'icon'
=>
array
(
...
...
uw_ct_event.module
View file @
484c5cd2
...
...
@@ -1094,6 +1094,17 @@ function uw_ct_event_theme_registry_alter(&$theme_registry) {
);
}
/**
* Implements hook_preprocess_HOOK().
*
* Add typeof="schema:Place" to fields with property="schema:location".
*/
function
uw_ct_event_preprocess_field
(
&
$variables
)
{
if
(
isset
(
$variables
[
'item_attributes_array'
][
0
][
'property'
][
0
])
&&
$variables
[
'item_attributes_array'
][
0
][
'property'
][
0
]
===
'schema:location'
&&
!
isset
(
$variables
[
'item_attributes_array'
][
0
][
'typeof'
][
0
]))
{
$variables
[
'item_attributes_array'
][
0
][
'typeof'
][
0
]
=
'schema:Place'
;
}
}
/**
* Implements hook_theme().
*
...
...
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