This repository has been archived by the owner on Nov 19, 2023. It is now read-only.
forked from korbinian/Piratenkleider
-
Notifications
You must be signed in to change notification settings - Fork 24
/
sidebar.php
76 lines (62 loc) · 3.69 KB
/
sidebar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
global $defaultoptions;
global $options;
if ( is_active_sidebar( 'sidebar-widget-area' ) ) {
dynamic_sidebar( 'sidebar-widget-area' );
}
if ( $options['slider-defaultwerbeplakate'] == "1" ) {
if ( ((isset($options['plakate-src']) && (is_array($options['plakate-src'])))) ||
((isset($options['plakate-altadressen'])) && (strlen(trim($options['plakate-altadressen']))>5))
) {
echo '<div class="slidersidebar fs2 no-js" style="width: '.$defaultoptions['plakate-width'].'px;">';
echo '<ul class="slides">';
if (is_array($options['plakate-src'])) {
foreach ($options['plakate-src'] as $current) {
echo '<li class="slide">';
if ((isset($options['plakate-url'])) && (strlen(trim($options['plakate-url']))>2)) {
echo '<a href="'.$options['plakate-url'].'">';
echo '<img src="'.$current.'" style="max-width: '.$defaultoptions['plakate-width'].'px;" alt="';
if ((isset($options['plakate-title'])) && (strlen(trim($options['plakate-title']))>2)) {
echo $options['plakate-title'];
}
echo '">';
echo '</a>';
} else {
echo '<img src="'.$current.'" style="max-width: '.$defaultoptions['plakate-width'].'px;" alt="">';
}
echo '</li>';
}
}
if ((isset($options['plakate-altadressen'])) && (strlen(trim($options['plakate-altadressen']))>2)) {
$alturls = preg_split("/[\n\r]+/", $options['plakate-altadressen']);
if (is_array( $alturls )) {
foreach ( $alturls as $current) {
list($thisurl,$thistitel,$thisweb) = explode("|", $current);
$thisurl = esc_url( $thisurl );
$thisweb = esc_url ($thisweb);
if ($thisurl <> '') {
echo '<li class="slide">';
if ((isset($thisweb)) && (strlen(trim($thisweb))>2)) {
echo '<a href="'.$thisweb.'">';
}
echo '<img src="'.$thisurl.'" style="max-width: '.$defaultoptions['plakate-width'].'px;" alt="';
if ((isset($thistitel)) && (strlen(trim($thistitel))>2)) {
echo wp_filter_nohtml_kses($thistitel);
}
echo '">';
if ((isset($thisweb)) && (strlen(trim($thisweb))>2)) {
echo '</a>';
}
echo '</li>';
}
}
}
}
?>
</ul>
</div>
<?php }
}
if ( is_active_sidebar( 'sidebar-widget-area-afterplakate' ) ) {
dynamic_sidebar( 'sidebar-widget-area-afterplakate' );
}