Permalink
Browse files

Added an error if name is not set

  • Loading branch information...
1 parent a9194f5 commit 61cb293994adbcf4b576b8cab4e60e6f2ceea4ac @tw2113 committed Jun 19, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 social_media_shortcode_plugin.php
@@ -52,6 +52,10 @@ function smsc_shortcode_handler( $atts, $enclosed, $shortcode ) {
$link = $smsc_shortcodes[$shortcode][1];
if ( empty($text) ) $text = "$name ($service)";
-
- return "<a href=\"$link/$name\" title=\"$name's $service profile\">$text</a>";
+
+ if( empty($name) ) {
+ return "You forgot a username for the website";
+ } else {
+ return "<a href=\"$link/$name\" title=\"$name's $service profile\">$text</a>";
+ }
}

0 comments on commit 61cb293

Please sign in to comment.