array( 'slug' => 'delicious', 'name' => 'Del.icio.us', 'label' => 'Del.icio.us', 'url' => 'http://del.icio.us/post?url=[URL]&title=[TITLE]]&notes=[DESCRIPTION]' ), 'evernote' => array( 'slug' => 'evernote', 'name' => 'Evernote', 'label' => 'Evernote', 'url' => 'http://www.evernote.com/clip.action?url=[URL]&title=[TITLE]' ), 'facebook' => array( 'slug' => 'facebook', 'name' => 'Facebook', 'label' => 'Facebook', 'url' => 'http://www.facebook.com/share.php?u=[URL]&title=[TITLE]' ), 'gplus' => array( 'slug' => 'google-plus', 'name' => 'Google+', 'label' => 'Google+', 'url' => 'https://plus.google.com/share?url=[URL]' ), 'linkedin' => array( 'slug' => 'linkedin', 'name' => 'LinkedIn', 'label' => 'LinkedIn', 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=[URL]&title=[TITLE]&source=[DOMAIN]' ), 'pinterest' => array( 'slug' => 'pinterest', 'name' => 'Pinterest', 'label' => 'Pinterest', 'url' => 'http://pinterest.com/pin/create/button/?url=[URL]&media=[URL]&description=[DESCRIPTION]' ), 'stumbleupon' => array( 'slug' => 'stumbleupon', 'name' => 'StumbleUpon', 'label' => 'StumbleUpon', 'url' => 'http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]' ), 'tumblr' => array( 'slug' => 'tumblr', 'name' => 'Tumblr', 'label' => 'Tumblr', 'url' => 'http://www.tumblr.com/share?v=3&u=[URL]&t=[TITLE]' ), 'twitter' => array( 'slug' => 'twitter', 'name' => 'Twitter', 'label' => 'Twitter', 'url' => 'http://twitter.com/home?status=[TITLE]+[URL]' ) , 'yahoo' => array( 'slug' => 'yahoo', 'name' => 'Yahoo Bookmarks', 'label' => 'Yahoo Bookmarks', 'url' => 'http://bookmarks.yahoo.com/toolbar/savebm?u=[URL]&t=[TITLE]' ), 'email' => array( 'slug' => 'envelope', 'name' => 'Email this', 'label' => 'Email this', 'url' => 'mailto:?Subject=[TITLE]&Body=[URL]' ) ); // $social_shares = pogo_get_option('social_shares',array()); $social_shares = array ( "disabled" => array ( "placebo" => "placebo", //REQUIRED! 'delicious' => 'Del.icio.us', 'digg' => 'Digg', 'evernote' => 'Evernote', 'linkedin' => 'LinkedIn', 'stumbleupon' => 'StumbleUpon', 'tumblr' => 'Tumblr', 'yahoo' => 'Yahoo Bookmarks', 'email' => 'Email this', ), "enabled" => array ( "placebo" => "placebo", //REQUIRED! 'facebook' => 'Facebook', 'twitter' => 'Twitter', 'gplus' => 'Google+', 'pinterest' => 'Pinterest', ), ); $enabled_services = $social_shares['enabled']; if($is_widget){ $title = ($title!='') ? $title : $_SERVER["SERVER_NAME"]; $description = ($description!='') ? $description : get_bloginfo( 'description', 'display' ); $url = ($url!='') ? $url : amanda_get_current_url(); }else{ $title = get_the_title(); $description = get_the_excerpt(); $url = get_permalink(); } $str = ''; $str .= ''; return $str; } function amanda_share_button($enabled_services=array('facebook'=>'facebook', 'twitter'=>'twitter')){ $services = array( 'facebook' => array( 'slug' => 'facebook', 'name' => 'Facebook', 'label' => 'Facebook', 'url' => 'http://www.facebook.com/share.php?u=[URL]&title=[TITLE]' ), 'gplus' => array( 'slug' => 'google-plus-sign', 'name' => 'Google+', 'label' => 'Google+', 'url' => 'https://plus.google.com/share?url=[URL]' ), 'pinterest' => array( 'slug' => 'pinterest-sign', 'name' => 'Pinterest', 'label' => 'Pinterest', 'url' => 'http://pinterest.com/pin/create/button/?url=[URL]&media=[URL]&description=[DESCRIPTION]' ), 'stumbleupon' => array( 'slug' => 'stumbleupon', 'name' => 'StumbleUpon', 'label' => 'StumbleUpon', 'url' => 'http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]' ), 'tumblr' => array( 'slug' => 'tumblr-sign', 'name' => 'Tumblr', 'label' => 'Tumblr', 'url' => 'http://www.tumblr.com/share?v=3&u=[URL]&t=[TITLE]' ), 'twitter' => array( 'slug' => 'twitter', 'name' => 'Twitter', 'label' => 'Twitter', 'url' => 'http://twitter.com/home?status=[TITLE]+[URL]' ) ); $title = get_the_title(); $description = get_the_excerpt(); $url = get_permalink(); $str = ''; $str .= ''; return $str; } // get URL function function amanda_get_current_url() { $isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on"); $port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443"))); $port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : ''; $url = ($isHTTPS ? 'https://' : 'http://').$_SERVER["SERVER_NAME"].$port.$_SERVER["REQUEST_URI"]; return $url; } ?>