Warning: Missing argument 1 for displaysocial
-
Hello guys i can’t get rit of this problem:
Warning: Missing argument 1 for displaysocial(), called in /public/sites/www.tadeuszsiudak.nl/wp-content/themes/konzept/page.php on line 14 and defined in /public/sites/www.tadeuszsiudak.nl/wp-content/plugins/social-stickers/social-stickers.php on line 701
This code is in page.php:
<?php displaysocial(); ?> </div>
And the other code is in social-stickers.php:
function displaysocial($sortable) { $options = get_option('social_stickers_settings'); $output = ""; $is_any_active = false; if(!$sortable) { $output = $output.stripslashes($options['prefix']); } if($sortable) $output = $output.'<div id="sortable">'; $stickers_theme_order = $options['theme_stickers_order'][$options['theme']]; $stickers = array(); if(is_array($stickers_theme_order)) { foreach($stickers_theme_order as $sticker) { array_push($stickers, $sticker); } } else { foreach($options['stickers'] as $key => $data) { if(strlen($data['username']) > 0) { array_push($stickers, $key); } } } foreach($stickers as $key) { $data = $options['stickers'][$key]; $file = plugin_dir_path(__FILE__).'themes/'.$options['theme'].'/'.$key.'.png'; $file_url = plugin_dir_url(__FILE__).'themes/'.$options['theme'].'/'.$key.'.png'; $social_url = str_replace("[:username]", $data['username'], $data['url']); if(file_exists($file)) { $is_any_active = true; if($sortable) $options['mode'] = 0; switch($options['mode']) { case 0: if($sortable) { $output = $output.'<div id="social_'.$key.'" style="margin-left: 3px; float: left;"> <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="32px" width="32px" /></a></div>'; } else { if($options['link_new']) { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="32px" width="32px" /></a>'; } else { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="32px" width="32px" /></a>'; } } break; case 1: if($options['link_new']) { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="64px" width="64px" /></a>'; } else { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="64px" width="64px" /></a>'; } break; case 2: if($options['link_new']) { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="128px" width="128px" /></a>'; } else { $output = $output.' <a href="'.$social_url.'" title="'.$data['name'].'"><img src="'.$file_url.'" height="128px" width="128px" /></a>'; } break; case 3: if($options['link_new']) { $output = $output.'<img src="'.$file_url.'" height="16px" width="16px" alt="'.$data['name'].'" /> <a href="'.$social_url.'">'.$data['name'].'</a>'; } else { $output = $output.'<img src="'.$file_url.'" height="16px" width="16px" alt="'.$data['name'].'" /> <a href="'.$social_url.'">'.$data['name'].'</a>'; } break; } } } if($sortable) { $output = $output."</div>"; } if(!$is_any_active) { if($sortable) $output = $output.'<span class="description">Please enter a username for any of the available profiles to see the preview.</span>'; else $output = $output.'<span class="description">No social profiles are available.</span>'; } if(!$sortable && $options['powered_by_msg']) { $output = $output.' Powered by <a href="https://wpplugz.is-leet.com">wpPlugz</a>.'; } if(!$sortable) { $output = $output.stripslashes($options['suffix']); } echo $output; } // Here, the widget code begins class social_stickers_widget extends WP_Widget { function social_stickers_widget() { $widget_ops = array('classname' => 'social_stickers_widget', 'description' => 'Display the social networks you use!' ); $this->WP_Widget('social_stickers_widget', 'Social Stickers', $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if($title) { echo $before_title . $title . $after_title; } // The widget code and the widgeet output display_social_stickers(false); // End of widget output echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); return $instance; } function form($instance) { $title = esc_attr($instance['title']); ?> <p> <label for="<?php echo $this->get_field_id('title'); ?>"> <?php _e('Title: '); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /> </p> <?php } } ?>
[Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use the pastebin. As it stands, your code may now have been permanently damaged/corrupted by the forum’s parser.]
I will appreciate if somebody can solve this warning.
Greetz
- The topic ‘Warning: Missing argument 1 for displaysocial’ is closed to new replies.