diff --git a/functions/theme-sidebars.php b/functions/theme-sidebars.php
index 19bf320..4b141d9 100644
--- a/functions/theme-sidebars.php
+++ b/functions/theme-sidebars.php
@@ -1,4 +1,4 @@
- '',
));
-
+
register_sidebar(array(
'name' => 'Startseite - Artikel',
'description' => 'Artikel auf der Startseite',
@@ -43,9 +43,9 @@ if (!function_exists('kr8_register_sidebars')) {
'before_title' => "\n\t" . '
',
'after_title' => '
',
));
-
-
-
+
+
+
register_sidebar(array(
'name' => 'Kampagnenseite - Actionbox',
'description' => 'Drei Widgets: Werde aktiv',
@@ -54,8 +54,8 @@ if (!function_exists('kr8_register_sidebars')) {
'after_widget' => '',
'before_title' => "\n\t" . '',
'after_title' => '
',
- ));
-
+ ));
+
register_sidebar(array(
'name' => 'Kampagnenseite - Infobox',
'description' => 'Drei Widgets: Erfahre mehr',
@@ -64,9 +64,9 @@ if (!function_exists('kr8_register_sidebars')) {
'after_widget' => '',
'before_title' => "\n\t" . '',
'after_title' => '
',
- ));
-
-
+ ));
+
+
register_sidebar(array(
'name' => 'Startseite - Infoleiste',
'description' => 'Infospalte der Startseite',
@@ -75,9 +75,9 @@ if (!function_exists('kr8_register_sidebars')) {
'after_widget' => '',
'before_title' => "\n\t" . '',
'after_title' => '
',
- ));
-
-
+ ));
+
+
register_sidebar(array(
'name' => 'Presse',
'description' => 'Widgets in der Kategory Presse',
@@ -87,7 +87,7 @@ if (!function_exists('kr8_register_sidebars')) {
'before_title' => "\n\t" . '',
));
-
+
register_sidebar(array(
'name' => 'Fussleiste',
'description' => 'Platz für Widgets in der Fußleiste.',
@@ -98,12 +98,12 @@ if (!function_exists('kr8_register_sidebars')) {
'after_title' => '',
));
-
-
+
+
}
}
-
-
+
+
}
@@ -118,19 +118,23 @@ function kr8_wpsearch($form) {
';
return $form;
-}
+}
/************* SOCIAL MEDIA WIDGET *****************/
class kr8_socialmedia extends WP_Widget {
- function kr8_socialmedia() {
+ public function __construct() {
$widget_ops = array('description' => 'Links zu deinen Profilen in den Sozialen Netzwerken.');
- parent::WP_Widget(false, __('Social Media Links'),$widget_ops);
+ parent::__construct(
+ 'kr8_socialmedia',
+ __('Social Media Links'),
+ $widget_ops
+ );
}
- function widget($args, $instance) {
+ function widget($args, $instance) {
extract( $args );
$title = $instance['title'];
$twitter = $instance['twitter'];
@@ -146,20 +150,20 @@ function kr8_wpsearch($form) {
$tumblr = $instance['tumblr'];
$rss = $instance['rss'];
$rsscomments = $instance['rsscomments'];
-
-
+
+
echo $before_widget; ?>
'.$title.''; ?>
- Twitter';
}
?>
- Facebook';
}
@@ -169,7 +173,7 @@ function kr8_wpsearch($form) {
echo '- Flickr
';
}
?>
-
+
Instagram';
}
@@ -194,7 +198,7 @@ function kr8_wpsearch($form) {
echo '- Foursquare
';
}
?>
-
+
Pinterest';
}
@@ -204,12 +208,12 @@ function kr8_wpsearch($form) {
echo '- Xing
';
}
?>
-
+
Tumblr';
}
?>
-
+
RSS Feed';
}
@@ -222,15 +226,15 @@ function kr8_wpsearch($form) {
-
@@ -263,12 +267,12 @@ function kr8_wpsearch($form) {
-
+
-
+
@@ -278,12 +282,12 @@ function kr8_wpsearch($form) {
-
+
-
+
@@ -309,34 +313,34 @@ function kr8_wpsearch($form) {
-
-
-
+
+
+
-
+
-
+
'',
- 'day_interval' => '30',
+ 'day_interval' => '30',
'limit' => '5'
);
$instance = wp_parse_args((array)$instance, $defaults);
-
- $title = $instance['title'];
- $url = $instance['url'];
- $subhead = $instance['subhead'];
- $desc = $instance['desc'];
- $image_id = $instance['image_id'];
- $image_size = $instance['image_size'];
- $image_url = $instance['image_url'];
-
+
+ $title = $instance['title'] ?? '';
+ $url = $instance['url'] ?? '';
+ $subhead = $instance['subhead'] ?? '';
+ $desc = $instance['desc'] ?? '';
+ $image_id = $instance['image_id'] ?? 0;
+ $image_size = $instance['image_size'] ?? 0;
+ $image_url = $instance['image_url'] ?? '';
+
?>
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
+ ?>
- ';
?>
-
+
- id="get_field_id('show_desc'); ?>" name="get_field_name('show_desc'); ?>" />
+ id="get_field_id('show_desc'); ?>" name="get_field_name('show_desc'); ?>" />
-
-
+
+
+
+
';
}
-
+
if(!empty($img))
{
if(!empty($url)) { echo '';}
echo '';
if(!empty($url)) { echo '';}
}
-
-
+
+
if(!empty($subhead))
{
echo ''. $subhead .'
';
}
-
+
if(!empty($title))
{
echo $before_title;
@@ -559,20 +563,20 @@ class kr8_teaserarticle extends WP_Widget
if(!empty($url)) { echo '';}
echo $after_title;
}
-
-
+
+
if(!empty($desc))
{
echo ''. $desc .'
';
}
-
+
if('on' == $instance['show_desc'] ) {
echo '';
}
-
-
+
+
echo $after_widget;
}
}
@@ -584,4 +588,4 @@ add_action( 'widgets_init', function(){
-?>
\ No newline at end of file
+?>