Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
radar-wp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
radar
radar-wp
Commits
d05f5bb2
Commit
d05f5bb2
authored
10 years ago
by
ekes
Browse files
Options
Downloads
Patches
Plain Diff
Avoid more notices.
parent
4309a70c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
radar.php
+4
-4
4 additions, 4 deletions
radar.php
with
4 additions
and
4 deletions
radar.php
+
4
−
4
View file @
d05f5bb2
...
...
@@ -173,7 +173,7 @@ add_filter('radar_shortcode_field_value', 'radar_shortcode_field_location_value'
function
radar_shortcode_field_url_value
(
$field
,
$type
,
$item
,
$parents
,
$shortcode
)
{
if
(
$field
[
'field'
]
==
'title'
)
{
foreach
(
$item
as
$other_field
)
{
if
(
$other_field
[
'field'
]
==
'url'
)
{
if
(
!
empty
(
$other_field
[
'field'
])
&&
$other_field
[
'field'
]
==
'url'
)
{
$field
[
'output'
]
=
'<a href="'
.
$other_field
[
'value'
]
.
'">'
.
$field
[
'output'
]
.
'</a>'
;
}
}
...
...
@@ -239,7 +239,7 @@ add_filter('radar_shortcode_field_html', 'radar_shortcode_field_html', 10, 6);
* by radar_shortcode_field_html (weight 8 before 10).
*/
function
radar_shortcode_field_link_html
(
$output
,
$field
,
$type
,
$item
,
$parents
,
$shortcode
)
{
if
(
$field
[
'type'
]
==
'link'
)
{
if
(
!
empty
(
$field
[
'type'
])
&&
$field
[
'type'
]
==
'link'
)
{
foreach
(
$output
as
&
$link
)
{
$link
=
'<a href="'
.
$link
.
'">'
.
$link
.
'</a>'
;
}
...
...
@@ -253,7 +253,7 @@ add_filter('radar_shortcode_field_html', 'radar_shortcode_field_link_html', 8, 6
* Title field HTML implentation of 'radar_shortcode_field_html' filter.
*/
function
radar_shortcode_field_title_html
(
$output
,
$field
,
$type
,
$item
,
$parents
,
$shortcode
)
{
if
(
$field
[
'type'
]
==
'title'
&&
!
count
(
$parents
))
{
if
(
!
empty
(
$field
[
'type'
])
&&
$field
[
'type'
]
==
'title'
&&
!
count
(
$parents
))
{
$output
=
'<h3>'
.
$output
.
'</h3>'
;
}
...
...
@@ -281,7 +281,7 @@ add_filter('radar_shortcode_field_html', 'radar_shortcode_field_subfields_html',
* For fields or the main item, not subfields.
*/
function
radar_shortcode_field_paragraph_html
(
$output
,
$field
,
$type
,
$item
,
$parents
,
$shortcode
)
{
if
(
empty
(
$parents
)
&&
in_array
(
$field
[
'type'
],
array
(
'date'
,
'url'
,
'price'
,
'email'
,
'link'
,
'phone'
,
'created'
,
'updated'
,
'opening_times'
)))
{
if
(
empty
(
$parents
)
&&
!
empty
(
$field
[
'type'
])
&&
in_array
(
$field
[
'type'
],
array
(
'date'
,
'url'
,
'price'
,
'email'
,
'link'
,
'phone'
,
'created'
,
'updated'
,
'opening_times'
)))
{
$output
=
'<p class="'
.
$field
[
'type'
]
.
'">'
.
$output
.
'</p>'
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment