first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-08 12:19:53 -04:00
commit 7c8c8b1c76
4586 changed files with 2050693 additions and 0 deletions
@@ -0,0 +1,358 @@
<?php
/**
* The file contains the class defining sharing networks and their sharer urls
*
* @since 1.0.0
*
*/
/**
* This class defines sharing networks and their sharer urls
*
* @since 1.0.0
*
*/
class Sassy_Social_Share_Sharing_Networks {
/**
* Options saved in database.
*
* @since 2.4
*/
private $options;
/**
* Constructor
*
* @since 1.0.0
*/
public function __construct( $options ) {
$this->options = $options;
}
/**
* Supported Social sharing networks
*
* @since 1.0.0
*/
private $sharing_networks = array(
'facebook_share' => '<li style="padding:%padding%px 0!important" class="heateor_sss_%network%">%like_count_container%<div class="fb-share-button" data-href="%post_url%" data-layout="button_count"></div></li>',
'facebook_like' => '<li style="padding:%padding%px 0!important" class="heateor_sss_%network%">%like_count_container%<div class="fb-like" data-href="%post_url%" data-layout="button_count" data-action="like" data-show-faces="false" data-share="false"></div></li>',
'facebook_recommend' => '<li style="padding:%padding%px 0!important" class="heateor_sss_%network%">%like_count_container%<div class="fb-like" data-href="%post_url%" data-layout="button_count" data-action="recommend" data-show-faces="false" data-share="false"></div></li>',
'twitter_tweet' => '<li style="padding:%padding%px 0!important" class="heateor_sss_%network%" heateor-sss-data-href="%post_url%">%like_count_container%<a href="https://twitter.com/share" class="twitter-share-button" data-url="%post_url%" data-counturl="%post_url%" data-text="%decoded_post_title%" data-via="%twitter_username%" data-lang="%language%" >Tweet</a><script>!function(d,s,id) {var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?"http":"https";if ( !d.getElementById(id) ) {js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document, "script", "twitter-wjs");</script></li>',
'linkedin_share' => '<li style="padding:7.35px 0!important;margin-top:-2px!important;" class="heateor_sss_%network%">%like_count_container%<script src="//platform.linkedin.com/in.js" type="text/javascript">lang: %language%</script><script type="IN/Share" data-url="%post_url%" data-counter="right"></script></li>',
'pinterest_pin' => '<li style="padding:%padding%px 0!important;margin-top:-1px!important" class="heateor_sss_%network%">%like_count_container%<a data-pin-lang="%language%" href="//www.pinterest.com/pin/create/button/?url=%post_url%" data-pin-do="buttonPin" data-pin-config="beside"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" /></a><script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script></li>',
'buffer_share' => '<li style="padding:%padding%px 0!important" class="heateor_sss_%network%">%like_count_container%<a href="http://bufferapp.com/add" class="buffer-add-button" data-text="%post_title%" data-url="%post_url%" data-count="horizontal" data-via="%buffer_username%" ></a><script type="text/javascript" src="https://d389zggrogs7qo.cloudfront.net/js/button.js"></script></li>',
'xing_share' => '<li style="padding:%padding%px 0 !important" class="heateor_sss_xing">%like_count_container%<div data-type="XING/Share" data-counter="right" data-url="%post_url%" data-lang="%language%"></div><script>(function (d, s) {var x = d.createElement(s), s = d.getElementsByTagName(s)[0]; x.src = "https://www.xing-share.com/js/external/share.js"; s.parentNode.insertBefore(x, s); })(document, "script");</script></li>',
'yummly_share' => '<li style="padding:%padding%px 0!important" class="heateor_sss_yummly">%like_count_container%<a href="//yummly.com" class="YUMMLY-YUM-BUTTON">Yum</a><script src="https://www.yummly.com/js/widget.js?general"></script></li>',
'reddit_badge' => '<li style="padding:%padding%px 0!important" class="heateor_sss_reddit">%like_count_container%<script type="text/javascript" src="//www.reddit.com/static/button/button1.js"></script></li>',
'facebook' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.facebook.com/sharer/sharer.php?u=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'twitter' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://twitter.com/intent/tweet?%via_twitter_username%text=%wpseo_post_title%&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'linkedin' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.linkedin.com/shareArticle?mini=true&url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'print' => '<li class="%li_class%"><i %style% alt="%title%" Title="Print" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'window.print()\'><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'email' => '<li class="%li_class%"><i %style% alt="%title%" Title="Email" class="heateorSssSharing heateorSss%ucfirst_network%Background" %amp_email% onclick="window.location.href = \'mailto:?subject=\' + decodeURIComponent(\'%post_title%\' ).replace(\'&\', \'%26\') + \'&body=\' + decodeURIComponent(\'%encoded_post_url%\' )"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'reddit' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://reddit.com/submit?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'digg' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://digg.com/submit?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'float_it' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.designfloat.com/submit.php?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'tumblr' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.tumblr.com/widgets/share/tool?posttype=link&canonicalUrl=%encoded_post_url%&title=%post_title%&caption=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'vkontakte' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://vkontakte.ru/share.php?&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'pinterest' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick="javascript:void( (function() {var e=document.createElement(\'script\' );e.setAttribute(\'type\',\'text/javascript\' );e.setAttribute(\'charset\',\'UTF-8\' );e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)})());"><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'xing' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.xing.com/spi/shares/new?cb=0&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'whatsapp' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a %amp_whatsapp% href="https://api.whatsapp.com/send?text=%post_title% %encoded_post_url%" rel="nofollow noopener" target="_blank"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'instagram' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="https://www.instagram.com/%instagram_username%" rel="nofollow noopener" target="_blank"><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'yummly' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.yummly.com/urb/verify?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'buffer' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://buffer.com/add?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'AIM' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://lifestream.aol.com/?url=%%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Amazon_Wish_List' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.amazon.com/wishlist/add?u=%encoded_post_url%&t=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'AOL_Mail' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?subject=%post_title%&body=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'App.net' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://account.app.net/login/")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Balatarin' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.balatarin.com/login")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'BibSonomy' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.bibsonomy.org/login")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Bitty_Browser' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.bitty.com/manual/?contenttype=&contentvalue=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Blinklist' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://blinklist.com/blink?t=%post_title%&d=&u=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Blogger_Post' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.blogger.com/blog_this.pyra?t&u=%encoded_post_url%&l&n=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'BlogMarks' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://blogmarks.net/my/new.php?mini=1&simple=1&title=%post_title%&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Bookmarks.fr' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.bookmarks.fr/Connexion/?action=add&address=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Box.net' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.box.com/api/1.0/import?url=%encoded_post_url%&name=%post_title%&description=&import_as=link")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'BuddyMarks' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://buddymarks.com/login.php?bookmark_title=%post_title%&bookmark_url=%encoded_post_url%&bookmark_desc=&bookmark_tags=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Care2_News' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.care2.com/passport/login.html?promoID=10&pg=http://www.care2.com/news/compose?sharehint=news&share[share_type]news&bookmarklet=Y&share[title]=%post_title%&share[link_url]=%encoded_post_url%&share[content]=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'CiteULike' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.citeulike.org/posturl?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Comment' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="%post_url%#%comment_container_id%" rel="nofollow"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'Copy_Link' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Diary.Ru' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.diary.ru/?newpost&title=%post_title%&text=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Diaspora' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://joindiaspora.com/bookmarklet?url=%encoded_post_url%&title=%post_title%&v=1&")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Diigo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.diigo.com/post?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Draugiem' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.draugiem.lv/say/ext/add.php?link=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Douban' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.douban.com/share/service?name=%post_title%&href=%encoded_post_url%&image=&updated=&bm=&url=%encoded_post_url%&title=%post_title%&sel=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'DZone' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.dzone.com/links/add.html?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Evernote' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.evernote.com/clip.action?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Fark' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.fark.com/submit?new_url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Fintel' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://fintel.io/submit?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Flipboard' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://share.flipboard.com/bookmarklet/popout?v=2&url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Folkd' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.folkd.com/page/social-bookmarking.html?addurl=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'GentleReader' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://app.gentlereader.com/bookmark?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Google_Bookmarks' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.google.com/bookmarks/mark?op=edit&bkmk=%encoded_post_url%&title=%post_title%&annotation=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Google_Classroom' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://classroom.google.com/u/0/share?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Google_Gmail' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=%post_title%&body=Link:%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Hacker_News' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://news.ycombinator.com/submitlink?u=%encoded_post_url%&t=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Hatena' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://b.hatena.ne.jp/bookmarklet?url=%encoded_post_url%&btitle=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Instapaper' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.instapaper.com/edit?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Jamespot' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//my.jamespot.com/")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Kakao' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://story.kakao.com/share?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Kik' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.kik.com/send/article/?app_name=Share&text=&title=%post_title%&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Kindle_It' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//fivefilters.org/kindle-it/send.php?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Known' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://withknown.com/share/?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Line' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="https://social-plugins.line.me/lineit/share?url=%encoded_post_url%"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'LiveJournal' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.livejournal.com/update.bml?subject=%post_title%&event=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Mail.Ru' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://connect.mail.ru/share?share_url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Mendeley' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.mendeley.com/sign-in/")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Meneame' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.meneame.net/submit.php?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'MeWe' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://mewe.com/share?link=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'mix' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://mix.com/mixit?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Mixi' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://mixi.jp/share.pl?mode=login&u=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'MySpace' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'var heateorSssMyspaceShareUrl = "https://myspace.com/post?u=" + encodeURIComponent("%encoded_post_url%") + "&t=%post_title%&l=3&c=%post_title%";heateorSssPopup(heateorSssMyspaceShareUrl)\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Netvouz' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.netvouz.com/action/submitBookmark?url=%encoded_post_url%&title=%post_title%&popup=no&description=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'NewsVine' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.newsvine.com/_tools/seed?popoff=0&u=%encoded_post_url%&h=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'NUjij' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.nujij.nl/nieuw-bericht.2051051.lynkx?title=%post_title%&url=%encoded_post_url%&bericht=&topic=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Odnoklassniki' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://connect.ok.ru/dk?cmd=WidgetSharePreview&st.cmd=WidgetSharePreview&st.shareUrl=%encoded_post_url%&st.client_id=-1")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Outlook.com' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://mail.live.com/default.aspx?rru=compose?subject=%post_title%&body=%encoded_post_url%&lc=1033&id=64855&mkt=en-us&cbcxt=mai")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Papaly' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://papaly.com/api/share.html?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Pinboard' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://pinboard.in/popup_login/?url=%encoded_post_url%&title=%post_title%&later=&description=&next=same")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Plurk' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.plurk.com/m?content=%encoded_post_url%&qualifier=shares")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Pocket' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://readitlaterlist.com/save?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'PrintFriendly' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.printfriendly.com/print?url=%encoded_post_url%&partner=a2a")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Protopage_Bookmarks' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.protopage.com/add-button-site?url=%encoded_post_url%&label=&type=page")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Pusha' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.pusha.se/posta?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Qzone' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Rediff MyPage' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//share.rediff.com/bookmark/addbookmark?bookmarkurl=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Refind' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://refind.com/?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Renren' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.connect.renren.com/share/sharer?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Segnalo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://segnalo.virgilio.it/post.html.php?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Sina Weibo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//service.weibo.com/share/share.php?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'SiteJot' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("http://www.sitejot.com/loginform.php?iSiteAdd=&iSiteDes=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Skype' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://web.skype.com/share?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Slashdot' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//slashdot.org/submission?url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'SMS' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="sms://?&body=%post_title% %encoded_post_url%" rel="nofollow"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'StockTwits' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://stocktwits.com/widgets/share?body=%post_title%%20%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Stumpedia' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.stumpedia.com/submit?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Svejo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://svejo.net/story/submit_by_url?url=%encoded_post_url%&title=%post_title%&summary=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Symbaloo_Feeds' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.symbaloo.com/")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Telegram' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://telegram.me/share/url?url=%encoded_post_url%&text=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Threema' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="threema://compose?text=%post_title% %encoded_post_url%" rel="nofollow"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'Trello' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://trello.com/add-card?mode=popup&url=%encoded_post_url%&name=%post_title%&desc=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Tuenti' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.tuenti.com/share?p=b5dd6602&url=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Twiddla' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.twiddla.com/New.aspx?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'TypePad_Post' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title=%post_title%&qp_href=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Viadeo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.viadeo.com/shareit/share/?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Viber' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="viber://forward?text=%post_title% %encoded_post_url%" rel="nofollow"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>',
'Wanelo' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//wanelo.com/p/post?bookmarklet=&images%5B%5D=&url=%encoded_post_url%&title=%post_title%&price=&shop=")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Webnews' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.webnews.de/login")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'WordPress' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.addtoany.com/ext/wordpress/press_this?linkurl=%encoded_post_url%&linkname=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Wykop' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//www.wykop.pl/dodaj?url=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Yahoo_Mail' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//compose.mail.yahoo.com/?Subject=%post_title%&body=Link:%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'Yoolink' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//yoolink.to/addorshare?url_value=%encoded_post_url%&title=%post_title%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'YouMob' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("//youmob.com/startmob.aspx?cookietest=true&mob=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>',
'youtube' => '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a href="%youtube_username%" rel="nofollow noopener" target="_blank"><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>'
);
/**
* Social sharing networks for AMP
*
* @since 3.1.7
*/
private $amp_sharing_networks = array(
'facebook_share' => '',
'facebook_like' => '',
'facebook_recommend' => '',
'twitter_tweet' => '',
'linkedin_share' => '',
'pinterest_pin' => '',
'buffer_share' => '',
'xing_share' => '',
'yummly_share' => '',
'facebook' => '<a class="heateor_sss_amp heateor_sss_amp_facebook" href="https://www.facebook.com/sharer/sharer.php?u=%encoded_post_url%" title="Facebook" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/facebook.svg" width="%width%" height="%height%" alt="Facebook" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'twitter' => '<a class="heateor_sss_amp heateor_sss_amp_twitter" href="http://twitter.com/intent/tweet?%via_twitter_username%text=%wpseo_post_title%&url=%encoded_post_url%" title="Twitter" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/twitter.svg" width="%width%" height="%height%" alt="Twitter" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'linkedin' => '<a class="heateor_sss_amp heateor_sss_amp_linkedin" href="http://www.linkedin.com/shareArticle?mini=true&url=%encoded_post_url%&title=%post_title%" title="Linkedin" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/linkedin.svg" width="%width%" height="%height%" alt="Linkedin" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'print' => '<a class="heateor_sss_amp heateor_sss_amp_print" href="javascript:void(0)" onclick="window.print()" title="Print" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/print.svg" width="%width%" height="%height%" alt="Print" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'email' => '<a class="heateor_sss_amp heateor_sss_amp_email" href="mailto:?subject=%post_title%&body=%encoded_post_url%" title="Email" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/email.svg" width="%width%" height="%height%" alt="Email" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'reddit' => '<a class="heateor_sss_amp heateor_sss_amp_reddit" href="http://reddit.com/submit?url=%encoded_post_url%&title=%post_title%" title="Reddit" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/reddit.svg" width="%width%" height="%height%" alt="Reddit" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'digg' => '<a class="heateor_sss_amp heateor_sss_amp_digg" href="http://digg.com/submit?url=%encoded_post_url%&title=%post_title%" title="Digg" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/digg.svg" width="%width%" height="%height%" alt="Digg" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'float_it' => '<a class="heateor_sss_amp heateor_sss_amp_float_it" href="http://www.designfloat.com/submit.php?url=%encoded_post_url%&title=%post_title%" title="Float it" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/float_it.svg" width="%width%" height="%height%" alt="Float it" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'tumblr' => '<a class="heateor_sss_amp heateor_sss_amp_tumblr" href="https://www.tumblr.com/widgets/share/tool?posttype=link&canonicalUrl=%encoded_post_url%&title=%post_title%&caption=" title="Tumblr" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/tumblr.svg" width="%width%" height="%height%" alt="Tumblr" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'vkontakte' => '<a class="heateor_sss_amp heateor_sss_amp_vkontakte" href="http://vkontakte.ru/share.php?&url=%encoded_post_url%" title="Vkontakte" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/vkontakte.svg" width="%width%" height="%height%" alt="Vkontakte" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'pinterest' => '<a class="heateor_sss_amp heateor_sss_amp_pinterest" href="javascript:void( (function() {var e=document.createElement(\'script\' );e.setAttribute(\'type\',\'text/javascript\' );e.setAttribute(\'charset\',\'UTF-8\' );e.setAttribute(\'src\',\'//assets.pinterest.com/js/pinmarklet.js?r=\'+Math.random()*99999999);document.body.appendChild(e)})());" title="Pinterest" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/pinterest.svg" width="%width%" height="%height%" alt="Pinterest" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'xing' => '<a class="heateor_sss_amp heateor_sss_amp_xing" href="https://www.xing.com/spi/shares/new?cb=0&url=%encoded_post_url%" title="Xing" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/xing.svg" width="%width%" height="%height%" alt="Xing" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'whatsapp' => '<a class="heateor_sss_amp heateor_sss_amp_whatsapp" href="https://api.whatsapp.com/send?text=%post_title% %encoded_post_url%" title="Whatsapp" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/whatsapp.svg" width="%width%" height="%height%" alt="Whatsapp" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'instagram' => '<a class="heateor_sss_amp heateor_sss_amp_instagram" href="https://www.instagram.com/%instagram_username%" title="Instagram" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/instagram.svg" width="%width%" height="%height%" alt="Instagram" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'yummly' => '<a class="heateor_sss_amp heateor_sss_amp_yummly" href="http://www.yummly.com/urb/verify?url=%encoded_post_url%&title=%post_title%" title="Yummly" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/yummly.svg" width="%width%" height="%height%" alt="Yummly" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'buffer' => '<a class="heateor_sss_amp heateor_sss_amp_buffer" href="https://buffer.com/add?url=%encoded_post_url%&title=%post_title%" title="Buffer" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/buffer.svg" width="%width%" height="%height%" alt="Buffer" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'AIM' => '<a class="heateor_sss_amp heateor_sss_amp_aim" href="http://lifestream.aol.com/?url=%%encoded_post_url%&title=%post_title%" title="AIM" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/aim.svg" width="%width%" height="%height%" alt="AIM" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Amazon_Wish_List' => '<a class="heateor_sss_amp heateor_sss_amp_amazon_wish_list" href="http://www.amazon.com/wishlist/add?u=%encoded_post_url%&t=%post_title%" title="Amazon Wish List" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/amazon_wish_list.svg" width="%width%" height="%height%" alt="Amazon Wish List" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'AOL_Mail' => '<a class="heateor_sss_amp heateor_sss_amp_aol_mail" href="http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?subject=%post_title%&body=%encoded_post_url%" title="AOL Mail" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/aol_mail.svg" width="%width%" height="%height%" alt="AOL Mail" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'App.net' => '<a class="heateor_sss_amp heateor_sss_amp_app_net" href="https://account.app.net/login/" title="App.net" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/app_net.svg" width="%width%" height="%height%" alt="App.net" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Balatarin' => '<a class="heateor_sss_amp heateor_sss_amp_balatarin" href="https://www.balatarin.com/login" title="Balatarin" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/balatarin.svg" width="%width%" height="%height%" alt="Balatarin" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'BibSonomy' => '<a class="heateor_sss_amp heateor_sss_amp_bibsonomy" href="http://www.bibsonomy.org/login" title="BibSonomy" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/bibsonomy.svg" width="%width%" height="%height%" alt="BibSonomy" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Bitty_Browser' => '<a class="heateor_sss_amp heateor_sss_amp_bitty_browser" href="http://www.bitty.com/manual/?contenttype=&contentvalue=%encoded_post_url%" title="Bitty Browser" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/bitty_browser.svg" width="%width%" height="%height%" alt="Bitty Browser" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Blinklist' => '<a class="heateor_sss_amp heateor_sss_amp_blinklist" href="http://blinklist.com/blink?t=%post_title%&d=&u=%encoded_post_url%" title="Blinklist" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/blinklist.svg" width="%width%" height="%height%" alt="Blinklist" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Blogger_Post' => '<a class="heateor_sss_amp heateor_sss_amp_blogger_post" href="https://www.blogger.com/blog_this.pyra?t&u=%encoded_post_url%&l&n=%post_title%" title="Blogger Post" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/blogger_post.svg" width="%width%" height="%height%" alt="Blogger Post" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'BlogMarks' => '<a class="heateor_sss_amp heateor_sss_amp_blogmarks" href="http://blogmarks.net/my/new.php?mini=1&simple=1&title=%post_title%&url=%encoded_post_url%" title="BlogMarks" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/blogmarks.svg" width="%width%" height="%height%" alt="BlogMarks" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Bookmarks.fr' => '<a class="heateor_sss_amp heateor_sss_amp_bookmarks_fr" href="http://www.bookmarks.fr/Connexion/?action=add&address=%encoded_post_url%&title=%post_title%" title="Bookmarks.fr" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/bookmarks_fr.svg" width="%width%" height="%height%" alt="Bookmarks.fr" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Box.net' => '<a class="heateor_sss_amp heateor_sss_amp_box_net" href="https://www.box.com/api/1.0/import?url=%encoded_post_url%&name=%post_title%&description=&import_as=link" title="Box.net" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/box_net.svg" width="%width%" height="%height%" alt="Box.net" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'BuddyMarks' => '<a class="heateor_sss_amp heateor_sss_amp_buddymarks" href="http://buddymarks.com/login.php?bookmark_title=%post_title%&bookmark_url=%encoded_post_url%&bookmark_desc=&bookmark_tags=" title="BuddyMarks" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/buddymarks.svg" width="%width%" height="%height%" alt="BuddyMarks" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Care2_News' => '<a class="heateor_sss_amp heateor_sss_amp_care2_news" href="http://www.care2.com/passport/login.html?promoID=10&pg=http://www.care2.com/news/compose?sharehint=news&share[share_type]news&bookmarklet=Y&share[title]=%post_title%&share[link_url]=%encoded_post_url%&share[content]=" title="Care2 News" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/care2_news.svg" width="%width%" height="%height%" alt="Care2 News" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'CiteULike' => '<a class="heateor_sss_amp heateor_sss_amp_citeulike" href="http://www.citeulike.org/posturl?url=%encoded_post_url%&title=%post_title%" title="CiteULike" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/citeulike.svg" width="%width%" height="%height%" alt="CiteULike" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Comment' => '<a class="heateor_sss_amp heateor_sss_amp_comment" href="%post_url%#%comment_container_id%" title="Comment" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/comment.svg" width="%width%" height="%height%" alt="Comment" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Diary.Ru' => '<a class="heateor_sss_amp heateor_sss_amp_diary_ru" href="http://www.diary.ru/?newpost&title=%post_title%&text=%encoded_post_url%" title="Diary.Ru" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/diary_ru.svg" width="%width%" height="%height%" alt="Diary.Ru" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Diaspora' => '<a class="heateor_sss_amp heateor_sss_amp_diaspora" href="https://joindiaspora.com/bookmarklet?url=%encoded_post_url%&title=%post_title%&v=1&" title="Diaspora" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/diaspora.svg" width="%width%" height="%height%" alt="Diaspora" class="amp-wp-enforced-sizes" style="width: %width%px;"><i-amphtml-sizer style= "display: block; padding-top: 100%;"></i-amphtml-sizer></amp-img></a>',
'Diigo' => '<a class="heateor_sss_amp heateor_sss_amp_diigo" href="http://www.diigo.com/post?url=%encoded_post_url%&title=%post_title%" title="Diigo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/diigo.svg" width="%width%" height="%height%" alt="Diigo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Draugiem' => '<a class="heateor_sss_amp heateor_sss_amp_draugiem" href="https://www.draugiem.lv/say/ext/add.php?link=%encoded_post_url%&title=%post_title%" title="Draugiem" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/draugiem.svg" width="%width%" height="%height%" alt="Draugiem" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Douban' => '<a class="heateor_sss_amp heateor_sss_amp_douban" href="https://www.douban.com/share/service?name=%post_title%&href=%encoded_post_url%&image=&updated=&bm=&url=%encoded_post_url%&title=%post_title%&sel=" title="Douban" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/douban.svg" width="%width%" height="%height%" alt="Douban" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'DZone' => '<a class="heateor_sss_amp heateor_sss_amp_dzone" href="http://www.dzone.com/links/add.html?url=%encoded_post_url%&title=%post_title%" title="DZone" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/dzone.svg" width="%width%" height="%height%" alt="DZone" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Evernote' => '<a class="heateor_sss_amp heateor_sss_amp_evernote" href="https://www.evernote.com/clip.action?url=%encoded_post_url%&title=%post_title%" title="Evernote" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/evernote.svg" width="%width%" height="%height%" alt="Evernote" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Fark' => '<a class="heateor_sss_amp heateor_sss_amp_fark" href="https://www.fark.com/submit?new_url=%encoded_post_url%" title="Fark" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/fark.svg" width="%width%" height="%height%" alt="Fark" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Fintel' => '<a class="heateor_sss_amp heateor_sss_amp_fintel" href="https://fintel.io/submit?url=%encoded_post_url%" title="Fintel" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/fintel.svg" width="%width%" height="%height%" alt="Fintel" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Flipboard' => '<a class="heateor_sss_amp heateor_sss_amp_flipboard" href="https://share.flipboard.com/bookmarklet/popout?v=2&url=%encoded_post_url%&title=%post_title%" title="Flipboard" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/flipboard.svg" width="%width%" height="%height%" alt="Flipboard" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Folkd' => '<a class="heateor_sss_amp heateor_sss_amp_folkd" href="http://www.folkd.com/page/social-bookmarking.html?addurl=%encoded_post_url%" title="Folkd" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/folkd.svg" width="%width%" height="%height%" alt="Folkd" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'GentleReader' => '<a class="heateor_sss_amp heateor_sss_amp_gentlereader" href="https://app.gentlereader.com/bookmark?url=%encoded_post_url%" title="GentleReader" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/gentlereader.svg" width="%width%" height="%height%" alt="GentleReader" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Google_Bookmarks' => '<a class="heateor_sss_amp heateor_sss_amp_google_bookmarks" href="https://www.google.com/bookmarks/mark?op=edit&bkmk=%encoded_post_url%&title=%post_title%&annotation=" title="Google Bookmarks" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/google_bookmarks.svg" width="%width%" height="%height%" alt="Google Bookmarks" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Google_Classroom' => '<a class="heateor_sss_amp heateor_sss_amp_google_classroom" href="https://classroom.google.com/u/0/share?url=%encoded_post_url%" title="Google Classroom" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/google_classroom.svg" width="%width%" height="%height%" alt="Google Classroom" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Google_Gmail' => '<a class="heateor_sss_amp heateor_sss_amp_google_gmail" href="https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=%post_title%&body=Link:%encoded_post_url%" title="Gmail" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/google_gmail.svg" width="%width%" height="%height%" alt="Gmail" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Hacker_News' => '<a class="heateor_sss_amp heateor_sss_amp_hacker_news" href="https://news.ycombinator.com/submitlink?u=%encoded_post_url%&t=%post_title%" title="Hacker News" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/hacker_news.svg" width="%width%" height="%height%" alt="Hacker News" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Hatena' => '<a class="heateor_sss_amp heateor_sss_amp_hatena" href="http://b.hatena.ne.jp/bookmarklet?url=%encoded_post_url%&btitle=%post_title%" title="Hatena" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/hatena.svg" width="%width%" height="%height%" alt="Hatena" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Instapaper' => '<a class="heateor_sss_amp heateor_sss_amp_instapaper" href="http://www.instapaper.com/edit?url=%encoded_post_url%&title=%post_title%" title="Instapaper" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/instapaper.svg" width="%width%" height="%height%" alt="Instapaper" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Jamespot' => '<a class="heateor_sss_amp heateor_sss_amp_jamespot" href="//my.jamespot.com/" title="Jamespot" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/jamespot.svg" width="%width%" height="%height%" alt="Jamespot" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Kakao' => '<a class="heateor_sss_amp heateor_sss_amp_kakao" href="https://story.kakao.com/share?url=%encoded_post_url%" title="Kakao" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/kakao.svg" width="%width%" height="%height%" alt="Kakao" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Kik' => '<a class="heateor_sss_amp heateor_sss_amp_kik" href="https://www.kik.com/send/article/?app_name=Share&text=&title=%post_title%&url=%encoded_post_url%" title="Kik" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/kik.svg" width="%width%" height="%height%" alt="Kik" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Kindle_It' => '<a class="heateor_sss_amp heateor_sss_amp_kindle_it" href="//fivefilters.org/kindle-it/send.php?url=%encoded_post_url%" title="Kindle It" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/kindle_it.svg" width="%width%" height="%height%" alt="Kindle It" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Known' => '<a class="heateor_sss_amp heateor_sss_amp_known" href="https://withknown.com/share/?url=%encoded_post_url%&title=%post_title%" title="Known" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/known.svg" width="%width%" height="%height%" alt="Known" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Line' => '<a class="heateor_sss_amp heateor_sss_amp_line" href="https://social-plugins.line.me/lineit/share?url=%encoded_post_url%" title="Line" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/line.svg" width="%width%" height="%height%" alt="Line" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'LiveJournal' => '<a class="heateor_sss_amp heateor_sss_amp_livejournal" href="http://www.livejournal.com/update.bml?subject=%post_title%&event=%encoded_post_url%" title="LiveJournal" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/livejournal.svg" width="%width%" height="%height%" alt="LiveJournal" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Mail.Ru' => '<a class="heateor_sss_amp heateor_sss_amp_mail_ru" href="https://connect.mail.ru/share?share_url=%encoded_post_url%" title="Mail.Ru" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/mail_ru.svg" width="%width%" height="%height%" alt="Mail.Ru" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Mendeley' => '<a class="heateor_sss_amp heateor_sss_amp_mendeley" href="https://www.mendeley.com/sign-in/" title="Mendeley" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/mendeley.svg" width="%width%" height="%height%" alt="Mendeley" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Meneame' => '<a class="heateor_sss_amp heateor_sss_amp_meneame" href="https://www.meneame.net/submit.php?url=%encoded_post_url%" title="Meneame" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/meneame.svg" width="%width%" height="%height%" alt="Meneame" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'MeWe' => '<a class="heateor_sss_amp heateor_sss_amp_mewe" href="https://mewe.com/share?link=%encoded_post_url%" title="MeWe" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/mewe.svg" width="%width%" height="%height%" alt="MeWe" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'mix' => '<a class="heateor_sss_amp heateor_sss_amp_mix" href="https://mix.com/mixit?url=%encoded_post_url%" title="Mix" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/mix.svg" width="%width%" height="%height%" alt="Mix" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Mixi' => '<a class="heateor_sss_amp heateor_sss_amp_mixi" href="https://mixi.jp/share.pl?mode=login&u=%encoded_post_url%" title="Mixi" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/mixi.svg" width="%width%" height="%height%" alt="Mixi" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'MySpace' => '<a class="heateor_sss_amp heateor_sss_amp_myspace" href=\'var heateorSssMyspaceShareUrl = "https://myspace.com/post?u=" + encodeURIComponent("%encoded_post_url%") + "&t=%post_title%&l=3&c=%post_title%";heateorSssPopup(heateorSssMyspaceShareUrl)\' title="MySpace" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/myspace.svg" width="%width%" height="%height%" alt="MySpace" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Netvouz' => '<a class="heateor_sss_amp heateor_sss_amp_netvouz" href="http://www.netvouz.com/action/submitBookmark?url=%encoded_post_url%&title=%post_title%&popup=no&description=" title="Netvouz" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/netvouz.svg" width="%width%" height="%height%" alt="Netvouz" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'NewsVine' => '<a class="heateor_sss_amp heateor_sss_amp_newsvine" href="http://www.newsvine.com/_tools/seed?popoff=0&u=%encoded_post_url%&h=%post_title%" title="NewsVine" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/newsvine.svg" width="%width%" height="%height%" alt="NewsVine" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'NUjij' => '<a class="heateor_sss_amp heateor_sss_amp_nujij" href="http://www.nujij.nl/nieuw-bericht.2051051.lynkx?title=%post_title%&url=%encoded_post_url%&bericht=&topic=" title="NUjij" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/nujij.svg" width="%width%" height="%height%" alt="NUjij" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Odnoklassniki' => '<a class="heateor_sss_amp heateor_sss_amp_odnoklassniki" href="https://connect.ok.ru/dk?cmd=WidgetSharePreview&st.cmd=WidgetSharePreview&st.shareUrl=%encoded_post_url%&st.client_id=-1" title="Odnoklassniki" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/odnoklassniki.svg" width="%width%" height="%height%" alt="Odnoklassniki" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Outlook.com' => '<a class="heateor_sss_amp heateor_sss_amp_outlook_com" href="https://mail.live.com/default.aspx?rru=compose?subject=%post_title%&body=%encoded_post_url%&lc=1033&id=64855&mkt=en-us&cbcxt=mai" title="Outlook.com" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/outlook_com.svg" width="%width%" height="%height%" alt="Outlook.com" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Papaly' => '<a class="heateor_sss_amp heateor_sss_amp_papaly" href="https://papaly.com/api/share.html?url=%encoded_post_url%&title=%post_title%" title="Papaly" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/papaly.svg" width="%width%" height="%height%" alt="Papaly" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Pinboard' => '<a class="heateor_sss_amp heateor_sss_amp_pinboard" href="https://pinboard.in/popup_login/?url=%encoded_post_url%&title=%post_title%&later=&description=&next=same" title="Pinboard" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/pinboard.svg" width="%width%" height="%height%" alt="Pinboard" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Plurk' => '<a class="heateor_sss_amp heateor_sss_amp_plurk" href="//www.plurk.com/m?content=%encoded_post_url%&qualifier=shares" title="Plurk" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/plurk.svg" width="%width%" height="%height%" alt="Plurk" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Pocket' => '<a class="heateor_sss_amp heateor_sss_amp_pocket" href="https://readitlaterlist.com/save?url=%encoded_post_url%&title=%post_title%" title="Pocket" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/pocket.svg" width="%width%" height="%height%" alt="Pocket" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'PrintFriendly' => '<a class="heateor_sss_amp heateor_sss_amp_printfriendly" href="http://www.printfriendly.com/print?url=%encoded_post_url%&partner=a2a" title="PrintFriendly" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/printfriendly.svg" width="%width%" height="%height%" alt="PrintFriendly" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Protopage_Bookmarks' => '<a class="heateor_sss_amp heateor_sss_amp_protopage_bookmarks" href="http://www.protopage.com/add-button-site?url=%encoded_post_url%&label=&type=page" title="Protopage Bookmarks" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/protopage_bookmarks.svg" width="%width%" height="%height%" alt="Protopage Bookmarks" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Pusha' => '<a class="heateor_sss_amp heateor_sss_amp_pusha" href="//www.pusha.se/posta?url=%encoded_post_url%" title="Pusha" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/pusha.svg" width="%width%" height="%height%" alt="Pusha" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Qzone' => '<a class="heateor_sss_amp heateor_sss_amp_qzone" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=%encoded_post_url%" title="Qzone" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/qzone.svg" width="%width%" height="%height%" alt="Qzone" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Rediff MyPage' => '<a class="heateor_sss_amp heateor_sss_amp_rediff_mypage" href="//share.rediff.com/bookmark/addbookmark?bookmarkurl=%encoded_post_url%&title=%post_title%" title="Rediff MyPage" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/rediff_mypage.svg" width="%width%" height="%height%" alt="Rediff MyPage" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Refind' => '<a class="heateor_sss_amp heateor_sss_amp_refind" href="https://refind.com/?url=%encoded_post_url%" title="Refind" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/refind.svg" width="%width%" height="%height%" alt="Refind" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Renren' => '<a class="heateor_sss_amp heateor_sss_amp_renren" href="//www.connect.renren.com/share/sharer?url=%encoded_post_url%&title=%post_title%" title="Renren" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/renren.svg" width="%width%" height="%height%" alt="Renren" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Segnalo' => '<a class="heateor_sss_amp heateor_sss_amp_segnalo" href="http://segnalo.virgilio.it/post.html.php?url=%encoded_post_url%&title=%post_title%" title="Segnalo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/segnalo.svg" width="%width%" height="%height%" alt="Segnalo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Sina Weibo' => '<a class="heateor_sss_amp heateor_sss_amp_sina_weibo" href="//service.weibo.com/share/share.php?url=%encoded_post_url%&title=%post_title%" title="Sina Weibo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/sina_weibo.svg" width="%width%" height="%height%" alt="Sina Weibo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'SiteJot' => '<a class="heateor_sss_amp heateor_sss_amp_sitejot" href="http://www.sitejot.com/loginform.php?iSiteAdd=&iSiteDes=" title="SiteJot" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/sitejot.svg" width="%width%" height="%height%" alt="SiteJot" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Skype' => '<a class="heateor_sss_amp heateor_sss_amp_skype" href="https://web.skype.com/share?url=%encoded_post_url%" title="Skype" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/skype.svg" width="%width%" height="%height%" alt="Skype" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Slashdot' => '<a class="heateor_sss_amp heateor_sss_amp_slashdot" href="//slashdot.org/submission?url=%encoded_post_url%" title="Slashdot" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/slashdot.svg" width="%width%" height="%height%" alt="Slashdot" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'SMS' => '<a class="heateor_sss_amp heateor_sss_amp_sms" href="sms://?&body=%post_title% %encoded_post_url%" title="SMS" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/sms.svg" width="%width%" height="%height%" alt="SMS" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'StockTwits' => '<a class="heateor_sss_amp heateor_sss_amp_stocktwits" href="https://stocktwits.com/widgets/share?body=%post_title%%20%encoded_post_url%" title="StockTwits" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/stocktwits.svg" width="%width%" height="%height%" alt="StockTwits" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Stumpedia' => '<a class="heateor_sss_amp heateor_sss_amp_stumpedia" href="//www.stumpedia.com/submit?url=%encoded_post_url%&title=%post_title%" title="Stumpedia" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/stumpedia.svg" width="%width%" height="%height%" alt="Stumpedia" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Svejo' => '<a class="heateor_sss_amp heateor_sss_amp_svejo" href="https://svejo.net/story/submit_by_url?url=%encoded_post_url%&title=%post_title%&summary=" title="Svejo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/svejo.svg" width="%width%" height="%height%" alt="Svejo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Symbaloo_Feeds' => '<a class="heateor_sss_amp heateor_sss_amp_symbaloo_feeds" href="//www.symbaloo.com/" title="Symbaloo Feeds" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/symbaloo_feeds.svg" width="%width%" height="%height%" alt="Symbaloo Feeds" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Telegram' => '<a class="heateor_sss_amp heateor_sss_amp_telegram" href="https://telegram.me/share/url?url=%encoded_post_url%&text=%post_title%" title="Telegram" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/telegram.svg" width="%width%" height="%height%" alt="Telegram" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Threema' => '<a class="heateor_sss_amp heateor_sss_amp_threema" href="threema://compose?text=%post_title% %encoded_post_url%" title="Threema" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/threema.svg" width="%width%" height="%height%" alt="Threema" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Trello' => '<a class="heateor_sss_amp heateor_sss_amp_trello" href="https://trello.com/add-card?mode=popup&url=%encoded_post_url%&name=%post_title%&desc=" title="Trello" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/trello.svg" width="%width%" height="%height%" alt="Trello" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Tuenti' => '<a class="heateor_sss_amp heateor_sss_amp_tuenti" href="https://www.tuenti.com/share?p=b5dd6602&url=%encoded_post_url%" title="Tuenti" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/tuenti.svg" width="%width%" height="%height%" alt="Tuenti" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Twiddla' => '<a class="heateor_sss_amp heateor_sss_amp_twiddla" href="//www.twiddla.com/New.aspx?url=%encoded_post_url%&title=%post_title%" title="Twiddla" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/twiddla.svg" width="%width%" height="%height%" alt="Twiddla" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'TypePad_Post' => '<a class="heateor_sss_amp heateor_sss_amp_typepad_post" href="https://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title=%post_title%&qp_href=%encoded_post_url%" title="TypePad Post" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/typepad_post.svg" width="%width%" height="%height%" alt="TypePad Post" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Viadeo' => '<a class="heateor_sss_amp heateor_sss_amp_viadeo" href="//www.viadeo.com/shareit/share/?url=%encoded_post_url%&title=%post_title%" title="Viadeo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/viadeo.svg" width="%width%" height="%height%" alt="Viadeo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Viber' => '<a class="heateor_sss_amp heateor_sss_amp_viber" href="viber://forward?text=%post_title% %encoded_post_url%" title="Viber" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/viber.svg" width="%width%" height="%height%" alt="Viber" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Wanelo' => '<a class="heateor_sss_amp heateor_sss_amp_wanelo" href="//wanelo.com/p/post?bookmarklet=&images%5B%5D=&url=%encoded_post_url%&title=%post_title%&price=&shop=" title="Wanelo" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/wanelo.svg" width="%width%" height="%height%" alt="Wanelo" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Webnews' => '<a class="heateor_sss_amp heateor_sss_amp_webnews" href="//www.webnews.de/login" title="Webnews" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/webnews.svg" width="%width%" height="%height%" alt="Webnews" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'WordPress' => '<a class="heateor_sss_amp heateor_sss_amp_wordpress" href="//www.addtoany.com/ext/wordpress/press_this?linkurl=%encoded_post_url%&linkname=%post_title%" title="WordPress" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/wordpress.svg" width="%width%" height="%height%" alt="WordPress" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Wykop' => '<a class="heateor_sss_amp heateor_sss_amp_wykop" href="//www.wykop.pl/dodaj?url=%encoded_post_url%&title=%post_title%" title="Wykop" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/wykop.svg" width="%width%" height="%height%" alt="Wykop" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Yahoo_Mail' => '<a class="heateor_sss_amp heateor_sss_amp_yahoo_mail" href="//compose.mail.yahoo.com/?Subject=%post_title%&body=Link:%encoded_post_url%" title="Yahoo Mail" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/yahoo_mail.svg" width="%width%" height="%height%" alt="Yahoo Mail" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Yahoo_Messenger' => '<a class="heateor_sss_amp heateor_sss_amp_yahoo_messenger" href="ymsgr:sendim?m=%encoded_post_url%" title="Yahoo Messenger" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/yahoo_messenger.svg" width="%width%" height="%height%" alt="Yahoo Messenger" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'Yoolink' => '<a class="heateor_sss_amp heateor_sss_amp_yoolink" href="//yoolink.to/addorshare?url_value=%encoded_post_url%&title=%post_title%" title="Yoolink" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/yoolink.svg" width="%width%" height="%height%" alt="Yoolink" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'YouMob' => '<a class="heateor_sss_amp heateor_sss_amp_youmob" href="//youmob.com/startmob.aspx?cookietest=true&mob=%encoded_post_url%" title="YouMob" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/youmob.svg" width="%width%" height="%height%" alt="YouMob" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>',
'youtube' => '<a class="heateor_sss_amp heateor_sss_amp_youtube" href="%youtube_username%" title="Youtube" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/youtube.svg" width="%width%" height="%height%" alt="Youtube" class="amp-wp-enforced-sizes" style="width: %width%px;"></amp-img></a>'
);
/**
* Fetch social share networks
*
* @since 1.0.0
*/
public function fetch_sharing_networks( $sharing_type ) {
$this->sharing_networks['instagram'] = str_replace( '%instagram_username%', $this->options['instagram_username'] != '' ? $this->options['instagram_username'] : $this->options['vertical_instagram_username'], $this->sharing_networks['instagram'] );
$this->sharing_networks['youtube'] = str_replace( '%youtube_username%', $this->options['youtube_username'] != '' ? $this->options['youtube_username'] : $this->options['vertical_youtube_username'], $this->sharing_networks['youtube'] );
$this->sharing_networks['Comment'] = str_replace( '%comment_container_id%', $this->options['comment_container_id'] != '' ? $this->options['comment_container_id'] : $this->options['vertical_comment_container_id'], $this->sharing_networks['Comment'] );
$this->sharing_networks['facebook_share'] = '<li style="padding:%padding%px 0 !important" class="heateor_sss_%network%">%like_count_container%<div class="fb-share-button" data-href="%post_url%" data-layout="button' . ( isset( $this->options[$sharing_type . '_counts'] ) ? '_count' : '' ) . '"></div></li>';
$this->sharing_networks['facebook_like'] = '<li style="padding:%padding%px 0 !important" class="heateor_sss_%network%">%like_count_container%<div class="fb-like" data-href="%post_url%" data-layout="button' . ( isset( $this->options[$sharing_type . '_counts'] ) ? '_count' : '' ) . '" data-action="like" data-show-faces="false" data-share="false"></div></li>';
$this->sharing_networks['facebook_recommend'] = '<li style="padding:%padding%px 0 !important" class="heateor_sss_%network%">%like_count_container%<div class="fb-like" data-href="%post_url%" data-layout="button' . ( isset( $this->options[$sharing_type . '_counts'] ) ? '_count' : '' ) . '" data-action="recommend" data-show-faces="false" data-share="false"></div></li>';
$this->sharing_networks['xing_share'] = '<li style="padding:%padding%px 0 !important" class="heateor_sss_xing">%like_count_container%<div data-type="XING/Share" ' . ( isset( $this->options[$sharing_type . '_counts'] ) ? 'data-counter="right" ' : '' ) . 'data-url="%post_url%" data-lang="%language%"></div><script>(function (d, s) {var x = d.createElement(s), s = d.getElementsByTagName(s)[0]; x.src = "https://www.xing-share.com/js/external/share.js"; s.parentNode.insertBefore(x, s); })(document, "script");</script></li>';
$fb_key = '1904103319867886';
if ( $this->options['fb_key'] != '' ) {
$fb_key = $this->options['fb_key'];
}
$this->sharing_networks['Facebook_Messenger'] = '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background" onclick=\'heateorSssPopup("https://www.facebook.com/dialog/send?app_id=' . $fb_key . '&display=popup&link=%encoded_post_url%&redirect_uri=%encoded_post_url%")\'><ss style="%inner_style%" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></i></li>';
$whatsapp_share_url = $this->whatsapp_share_api();
$this->sharing_networks['whatsapp'] = '<li class="%li_class%"><i %style% alt="%title%" Title="%title%" class="heateorSssSharing heateorSss%ucfirst_network%Background"><a %amp_whatsapp% href="https://' . $whatsapp_share_url . '.whatsapp.com/send?text=%post_title% %encoded_post_url%" rel="nofollow noopener" target="_blank"><ss style="display:block" class="heateorSssSharingSvg heateorSss%ucfirst_network%Svg"></ss></a></i></li>';
return $this->sharing_networks;
}
/**
* Fetch social share networks to display for AMP
*
* @since 3.1.7
*/
public function fetch_amp_sharing_networks() {
$this->amp_sharing_networks['instagram'] = str_replace( '%instagram_username%', $this->options['instagram_username'] != '' ? $this->options['instagram_username'] : $this->options['vertical_instagram_username'], $this->amp_sharing_networks['instagram'] );
$this->amp_sharing_networks['youtube'] = str_replace( '%youtube_username%', $this->options['youtube_username'] != '' ? $this->options['youtube_username'] : $this->options['vertical_youtube_username'], $this->amp_sharing_networks['youtube'] );
$this->amp_sharing_networks['Comment'] = str_replace( '%comment_container_id%', $this->options['comment_container_id'] != '' ? $this->options['comment_container_id'] : $this->options['vertical_comment_container_id'], $this->amp_sharing_networks['Comment'] );
$fb_key = '1904103319867886';
if ( $this->options['fb_key'] ) {
$fb_key = $this->options['fb_key'];
}
$this->amp_sharing_networks['Facebook_Messenger'] = '<a class="heateor_sss_amp heateor_sss_amp_facebook_messenger" href="https://www.facebook.com/dialog/send?app_id=' . $fb_key . '&display=popup&link=%encoded_post_url%&redirect_uri=%encoded_post_url%" title="Facebook Messenger" rel="nofollow noopener" target="_blank"><amp-img src="%img_url%/facebook_messenger.svg" width="%width%" height="%height%" alt="Facebook Messenger" class="amp-wp-enforced-sizes" style="width:%width%px;"></amp-img></a>';
return $this->amp_sharing_networks;
}
/**
* Determine which Whatsapp share url to use
*
* @since 3.2.13
*/
private function whatsapp_share_api() {
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
// detect the device for Whatsapp share API
$iphone = strpos( $_SERVER['HTTP_USER_AGENT'], "iPhone" );
$android = strpos( $_SERVER['HTTP_USER_AGENT'], "Android" );
$palmpre = strpos( $_SERVER['HTTP_USER_AGENT'], "webOS" );
$berry = strpos( $_SERVER['HTTP_USER_AGENT'], "BlackBerry" );
$ipod = strpos( $_SERVER['HTTP_USER_AGENT'], "iPod" );
// check if is a mobile
if ( $iphone || $android || $palmpre || $ipod || $berry == true ) {
return 'api';
} else {
return 'web';
}
}
return 'api';
}
}
@@ -0,0 +1,208 @@
<?php
/**
* The file that defines Shortcodes class
*
* A class definition that includes functions used for Shortcodes.
*
* @since 1.0.0
*
*/
/**
* Shortcodes class.
*
* This is used to define functions for Shortcodes.
*
* @since 1.0.0
*/
class Sassy_Social_Share_Shortcodes {
/**
* Options saved in database.
*
* @since 1.0.0
*/
private $options;
/**
* Member to assign object of Sassy_Social_Share_Public Class.
*
* @since 1.0.0
*/
private $public_class_object;
/**
* Assign plugin options to private member $options.
*
* @since 1.0.0
*/
public function __construct( $options, $public_class_object ) {
$this->options = $options;
$this->public_class_object = $public_class_object;
}
/**
* Shortcode for Social Sharing.
*/
public function follow_icons_shortcode( $params ) {
extract( shortcode_atts( array(
'style' => '',
'width' => '32',
'height' => '32',
'shape' => 'square',
'social_networks' => '',
'type' => 'standard',
'theme' => '',
'left' => '0',
'right' => '0',
'top' => '100',
'align' => 'left',
'title' => ''
), $params ) );
$html = '';
if ( $social_networks ) {
$networks = explode( ',', $social_networks );
$icon_style = 'width:' . $width . 'px;height:' . $height . 'px;' . ( $shape == 'round' ? 'border-radius:999px;' : '' );
if ( $theme == '' ) {
$icon_theme = $theme;
} elseif ( $theme == 'standard' ) {
$icon_theme = $theme . '_';
} elseif ( $theme == 'floating' ) {
$icon_theme = $theme . '_';
}
$html .= '<div ' . ( $type == 'floating' ? 'style="position:fixed;top:' . $top . 'px;' . $align . ':' . $$align . 'px;width:' . $width . 'px;"' : '' ) . 'class="heateor_sss_' . $icon_theme . 'follow_icons_container">';
if ( ! empty( $title ) ) {
if ( $type == 'floating' ) {
$html .= '<div class="heateor_sss_follow_icons_title" style="text-align:center;font-size:' . $width*30/100 . 'px">';
}
$html .= $title;
if ( $type == 'floating' ) {
$html .= '</div>';
}
}
$html .= '<ul class="heateor_sss_follow_ul">';
// follow icons
foreach ( $networks as $value ) {
$networks_link = explode( '=', trim( $value ) );
$html .= '<li class="heateorSssSharingRound"><i style="' . $icon_style . '" alt="' . ucfirst( trim( $networks_link[0] ) ) . '" title="' . ucfirst( trim( $networks_link[0] ) ) . '" class="heateorSssSharing heateorSss' . ucfirst( $networks_link[0] ) . 'Background"><a target="_blank" aria-label="' . ucfirst( trim( $networks_link[0] ) ) . '" href="' . trim( $networks_link[1] ) . '" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSss' . ucfirst( trim( $networks_link[0] ) ) . 'Svg"></ss></a></i></li>';
}
$html .= '</ul>';
$html .= '<div style="clear:both"></div>';
$html .= '</div>';
}
return $html;
}
/**
* Shortcode for Social Sharing
*
* @since 1.0.0
*/
public function sharing_shortcode( $params ) {
extract( shortcode_atts( array(
'style' => '',
'type' => 'standard',
'left' => '0',
'right' => '0',
'top' => '100',
'url' => '',
'count' => 0,
'align' => 'left',
'title' => '',
'total_shares' => 'OFF'
), $params ) );
$type = strtolower( $type );
if ( ( $type == 'standard' && ! isset( $this->options['hor_enable'] ) ) || ( $type == 'floating' && ! isset( $this->options['vertical_enable'] ) ) || ( ! isset( $this->options['amp_enable'] ) && $this->public_class_object->is_amp_page() ) ) {
return;
}
global $post;
if ( ! is_object( $post ) ) {
return;
}
if ( $url ) {
$target_url = $url;
$post_id = 0;
} elseif ( is_front_page() ) {
$target_url = esc_url( home_url() );
$post_id = 0;
} elseif ( ! is_singular() && $type == 'vertical' ) {
$target_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
$post_id = 0;
} elseif ( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] ) {
$target_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
$post_id = $post -> ID;
} elseif ( get_permalink( $post -> ID ) ) {
$target_url = get_permalink( $post -> ID );
$post_id = $post -> ID;
} else {
$target_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
$post_id = 0;
}
$share_count_url = $target_url;
if ( $url == '' && is_singular() ) {
$share_count_url = get_permalink( $post -> ID );
}
$custom_post_url = $this->public_class_object->apply_target_share_url_filter( $target_url, $type, false );
if ( $custom_post_url != $target_url ) {
$target_url = $custom_post_url;
$share_count_url = $target_url;
}
// generate short url
$short_url = $this->public_class_object->get_short_url( $target_url, $post_id );
$alignment_offset = 0;
if ( $left) {
$alignment_offset = $left;
} elseif ( $right) {
$alignment_offset = $right;
}
// share count transient ID
$this->public_class_object->share_count_transient_id = $this->public_class_object->get_share_count_transient_id( $target_url );
$cached_share_count = $this->public_class_object->get_cached_share_count( $this->public_class_object->share_count_transient_id );
$html = '<div class="heateor_sss_sharing_container heateor_sss_' . ( $type == 'standard' ? 'horizontal' : 'vertical' ) . '_sharing' . ( $type == 'floating' && isset( $this->options['hide_mobile_sharing'] ) ? ' heateor_sss_hide_sharing' : '' ) . ( $type == 'floating' && isset( $this->options['bottom_mobile_sharing'] ) ? ' heateor_sss_bottom_sharing' : '' ) . '" ss-offset="' . $alignment_offset . '" ' . ( $this->public_class_object->is_amp_page() ? "" : "heateor-sss-data-href='" . ( isset( $share_count_url ) && $share_count_url ? $share_count_url : $target_url ) . "'" ) . ( ( $cached_share_count === false || $this->public_class_object->is_amp_page() ) ? "" : 'heateor-sss-no-counts="1" ' );
$vertical_offsets = '';
if ( $type == 'floating' ) {
$vertical_offsets = $align . ': ' . $$align . 'px; top: ' . $top . 'px;width:' . ( ( $this->options['vertical_sharing_size'] ? $this->options['vertical_sharing_size'] : '35' ) + 4 ) . "px;";
}
// style
if ( $style != "" || $vertical_offsets != '' ) {
$html .= 'style="';
if ( strpos( $style, 'background' ) === false ) { $html .= '-webkit-box-shadow:none;box-shadow:none;'; }
$html .= $vertical_offsets;
$html .= $style;
$html .= '"';
}
$html .= '>';
if ( $type == 'standard' && $title != '' ) {
$html .= '<div class="heateor_sss_sharing_title" style="font-weight:bold">' . ucfirst( $title ) . '</div>';
}
$html .= $this->public_class_object->prepare_sharing_html( $short_url ? $short_url : $target_url, $type == 'standard' ? 'horizontal' : 'vertical', $count, $total_shares == 'ON' ? 1 : 0 );
$html .= '</div>';
if ( ( $count || $total_shares == 'ON' ) && $cached_share_count === false ) {
$html .= '<script>heateorSssLoadEvent(function(){heateorSssCallAjax(function(){heateorSssGetSharingCounts();});});</script>';
}
return $html;
}
}
@@ -0,0 +1,832 @@
<?php
/**
* The file that defines classes for widgets
*
* Class definitions that include functions used for widgets.
*
* @since 1.0.0
*
*/
/**
* Standard Widget class.
*
* This is used to define functions for Standard Sharing Widget.
*
* @since 1.0.0
*/
class Sassy_Social_Share_Standard_Widget extends WP_Widget {
/**
* Options saved in database.
*
* @since 1.0.0
*/
private $options;
/**
* Member to assign object of Sassy_Social_Share_Public Class.
*
* @since 1.0.0
*/
private $public_class_object;
/**
* Assign plugin options to private member $options and define widget title, description etc.
*
* @since 1.0.0
*/
public function __construct() {
global $heateor_sss;
$this->options = $heateor_sss->options;
$this->public_class_object = new Sassy_Social_Share_Public( $heateor_sss->options, HEATEOR_SSS_VERSION );
parent::__construct(
'Heateor_SSS_Sharing', // unique id
__( 'Sassy Social Share - Standard Widget' ), // Widget title
array( 'description' => __( 'Standard sharing widget. Let your website users share content on popular Social networks like Facebook, Twitter, Tumblr, Whatsapp and many more', 'sassy-social-share' ) )
);
}
/**
* Render widget at front-end
*
* @since 1.0.0
*/
public function widget( $args, $instance ) {
// return if standard sharing is disabled
if ( ! isset( $this->options['hor_enable'] ) ) {
return;
}
extract( $args );
if ( $instance['hide_for_logged_in'] == 1 && is_user_logged_in() ) return;
global $post;
if ( NULL === $post ) {
$post_id = 0;
} else {
$post_id = $post->ID;
}
if ( isset( $instance['target_url'] ) ) {
if ( $instance['target_url'] == 'default' ) {
$sharing_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
if ( is_home() ) {
$sharing_url = home_url();
$post_id = 0;
} elseif ( ! is_singular() ) {
$post_id = 0;
} elseif ( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] ) {
$sharing_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
} elseif ( get_permalink( $post -> ID ) ) {
$sharing_url = get_permalink( $post->ID );
}
} elseif ( $instance['target_url'] == 'homepage' ) {
$sharing_url = home_url();
$post_id = 0;
} elseif ( $instance['target_url'] == 'custom' ) {
$sharing_url = isset( $instance['target_url_custom'] ) ? trim( $instance['target_url_custom'] ) : get_permalink( $post->ID );
$post_id = 0;
}
} else {
$sharing_url = get_permalink( $post->ID );
}
$share_count_url = $sharing_url;
if ( isset( $instance['target_url'] ) && $instance['target_url'] == 'default' && is_singular() ) {
$share_count_url = get_permalink( $post -> ID );
}
$custom_post_url = $this->public_class_object->apply_target_share_url_filter( $sharing_url, 'horizontal', ! is_singular() ? true : false );
if ( $custom_post_url != $sharing_url ) {
$sharing_url = $custom_post_url;
$share_count_url = $sharing_url;
}
// share count transient ID
$this->public_class_object->share_count_transient_id = $this->public_class_object->get_share_count_transient_id( $sharing_url );
$cached_share_count = $this->public_class_object->get_cached_share_count( $this->public_class_object->share_count_transient_id );
echo "<div class='heateor_sss_sharing_container heateor_sss_horizontal_sharing' " . ( $this->public_class_object->is_amp_page() ? "" : "heateor-sss-data-href='" . ( isset( $share_count_url ) && $share_count_url ? $share_count_url : $sharing_url ) . "'" ) . ( ( $cached_share_count === false || $this->public_class_object->is_amp_page() ) ? "" : 'heateor-sss-no-counts="1"' ) .">";
echo $before_widget;
if ( ! empty( $instance['title'] ) ) {
$title = apply_filters( 'widget_title', $instance[ 'title' ] );
echo $before_title . $title . $after_title;
}
if ( ! empty( $instance['before_widget_content'] ) ) {
echo '<div>' . $instance['before_widget_content'] . '</div>';
}
$short_url = $this->public_class_object->get_short_url( $sharing_url, $post_id );
echo $this->public_class_object->prepare_sharing_html( $short_url ? $short_url : $sharing_url, 'horizontal', isset( $instance['show_counts'] ), isset( $instance['total_shares'] ), ! is_singular() ? true : false );
if ( ! empty( $instance['after_widget_content'] ) ) {
echo '<div>' . $instance['after_widget_content'] . '</div>';
}
echo '</div>';
if ( ( isset( $instance['show_counts'] ) || isset( $instance['total_shares'] ) ) && $cached_share_count === false ) {
echo '<script>heateorSssLoadEvent(
function() {
// sharing counts
heateorSssCallAjax(function() {
heateorSssGetSharingCounts();
});
}
);</script>';
}
echo $after_widget;
}
/**
* Everything which should happen when user edit widget at admin panel.
*
* @since 1.0.0
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['show_counts'] = $new_instance['show_counts'];
$instance['total_shares'] = $new_instance['total_shares'];
$instance['target_url'] = $new_instance['target_url'];
$instance['target_url_custom'] = $new_instance['target_url_custom'];
$instance['before_widget_content'] = $new_instance['before_widget_content'];
$instance['after_widget_content'] = $new_instance['after_widget_content'];
$instance['hide_for_logged_in'] = $new_instance['hide_for_logged_in'];
return $instance;
}
/**
* Widget options form at admin panel.
*
* @since 1.0.0
*/
public function form( $instance ) {
// default widget settings
$defaults = array( 'title' => 'Share the joy', 'show_counts' => '', 'total_shares' => '', 'target_url' => 'default', 'target_url_custom' => '', 'before_widget_content' => '', 'after_widget_content' => '', 'hide_for_logged_in' => '' );
foreach ( $instance as $key => $value ) {
if ( is_string( $value ) ) {
$instance[ $key ] = esc_attr( $value );
}
}
$instance = wp_parse_args( ( array ) $instance, $defaults );
?>
<script type="text/javascript">
function heateorSssToggleHorSharingTargetUrl(val) {
if (val == 'custom' ) {
jQuery( '.heateorSssHorSharingTargetUrl' ).css( 'display', 'block' );
} else {
jQuery( '.heateorSssHorSharingTargetUrl' ).css( 'display', 'none' );
}
}
</script>
<p>
<p><strong>Note:</strong> <?php _e( 'Make sure "Standard Sharing Interface" is enabled in "Standard Interface" section at "Sassy Social Share" page.', 'sassy-social-share' ) ?></p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $instance['title']; ?>" /> <br/><br/>
<label for="<?php echo $this->get_field_id( 'show_counts' ); ?>"><?php _e( 'Show individual share counts:', 'sassy-social-share' ); ?></label>
<input id="<?php echo $this->get_field_id( 'show_counts' ); ?>" name="<?php echo $this->get_field_name( 'show_counts' ); ?>" type="checkbox" value="1" <?php echo isset( $instance['show_counts'] ) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/>
<label for="<?php echo $this->get_field_id( 'total_shares' ); ?>"><?php _e( 'Show total shares:', 'sassy-social-share' ); ?></label>
<input id="<?php echo $this->get_field_id( 'total_shares' ); ?>" name="<?php echo $this->get_field_name( 'total_shares' ); ?>" type="checkbox" value="1" <?php echo isset( $instance['total_shares'] ) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>
<label for="<?php echo $this->get_field_id( 'target_url' ); ?>"><?php _e( 'Target Url:', 'sassy-social-share' ); ?></label>
<select style="width: 95%" onchange="heateorSssToggleHorSharingTargetUrl(this.value)" class="widefat" id="<?php echo $this->get_field_id( 'target_url' ); ?>" name="<?php echo $this->get_field_name( 'target_url' ); ?>">
<option value="">--<?php _e( 'Select', 'sassy-social-share' ) ?>--</option>
<option value="default" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>><?php _e( 'Url of the webpage where icons are located (default)', 'sassy-social-share' ) ?></option>
<option value="homepage" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>><?php _e( 'Url of the homepage of your website', 'sassy-social-share' ) ?></option>
<option value="custom" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>><?php _e( 'Custom Url', 'sassy-social-share' ) ?></option>
</select>
<input placeholder="Custom url" style="margin-top: 5px; <?php echo ! isset( $instance['target_url'] ) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>" class="widefat heateorSssHorSharingTargetUrl" id="<?php echo $this->get_field_id( 'target_url_custom' ); ?>" name="<?php echo $this->get_field_name( 'target_url_custom' ); ?>" type="text" value="<?php echo isset( $instance['target_url_custom'] ) ? $instance['target_url_custom'] : ''; ?>" />
<label for="<?php echo $this->get_field_id( 'before_widget_content' ); ?>"><?php _e( 'Before widget content:', 'sassy-social-share' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'before_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'before_widget_content' ); ?>" type="text" value="<?php echo $instance['before_widget_content']; ?>" />
<label for="<?php echo $this->get_field_id( 'after_widget_content' ); ?>"><?php _e( 'After widget content:', 'sassy-social-share' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'after_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'after_widget_content' ); ?>" type="text" value="<?php echo $instance['after_widget_content']; ?>" />
<br /><br /><label for="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>"><?php _e( 'Hide for logged in users:', 'sassy-social-share' ); ?></label>
<input type="checkbox" id="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>" name="<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>" type="text" value="1" <?php if ( isset( $instance['hide_for_logged_in'] ) && $instance['hide_for_logged_in'] == 1 ) echo 'checked="checked"'; ?> />
</p>
<?php
}
}
/**
* Floating Widget class
*
* This is used to define functions for Floating Sharing Widget.
*
* @since 1.0.0
*/
class Sassy_Social_Share_Floating_Widget extends WP_Widget {
/**
* Options saved in database.
*
* @since 1.0.0
*/
private $options;
/**
* Member to assign object of Sassy_Social_Share_Public Class.
*
* @since 1.0.0
*/
private $public_class_object;
/**
* Assign plugin options to private member $options and define widget title, description etc.
*
* @since 1.0.0
*/
public function __construct() {
global $heateor_sss;
$this->options = $heateor_sss->options;
$this->public_class_object = new Sassy_Social_Share_Public( $heateor_sss->options, HEATEOR_SSS_VERSION );
parent::__construct(
'Heateor_SSS_Floating_Sharing', // unique id
'Sassy Social Share - Floating Widget', // widget title
// additional parameters
array(
'description' => __( 'Floating sharing widget. Let your website users share content on popular Social networks like Facebook, Twitter, Tumblr, Whatsapp and many more', 'sassy-social-share' ) )
);
}
/**
* Render widget at front-end
*
* @since 1.0.0
*/
public function widget( $args, $instance ) {
// return if vertical sharing is disabled
if ( ! isset( $this->options['vertical_enable'] ) ) {
return;
}
extract( $args );
if ( $instance['hide_for_logged_in'] == 1 && is_user_logged_in() ) return;
global $post;
$post_id = $post -> ID;
if ( isset( $instance['target_url'] ) ) {
if ( $instance['target_url'] == 'default' ) {
$sharing_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
if ( is_home() ) {
$sharing_url = home_url();
$post_id = 0;
} elseif ( ! is_singular() ) {
$post_id = 0;
} elseif ( isset( $_SERVER['QUERY_STRING'] ) && $_SERVER['QUERY_STRING'] ) {
$sharing_url = html_entity_decode( esc_url( $this->public_class_object->get_http_protocol() . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ) );
} elseif ( get_permalink( $post -> ID ) ) {
$sharing_url = get_permalink( $post->ID );
}
} elseif ( $instance['target_url'] == 'homepage' ) {
$sharing_url = home_url();
$post_id = 0;
} elseif ( $instance['target_url'] == 'custom' ) {
$sharing_url = isset( $instance['target_url_custom'] ) ? trim( $instance['target_url_custom'] ) : get_permalink( $post->ID );
$post_id = 0;
}
} else {
$sharing_url = get_permalink( $post->ID );
}
$share_count_url = $sharing_url;
if ( isset( $instance['target_url'] ) && $instance['target_url'] == 'default' && is_singular() ) {
$share_count_url = get_permalink( $post -> ID );
}
$custom_post_url = $this->public_class_object->apply_target_share_url_filter( $sharing_url, 'vertical', false );
if ( $custom_post_url != $sharing_url ) {
$sharing_url = $custom_post_url;
$share_count_url = $sharing_url;
}
$ssOffset = 0;
if ( isset( $instance['alignment'] ) && isset( $instance[$instance['alignment'] . '_offset'] ) ) {
$ssOffset = $instance[$instance['alignment'] . '_offset'];
}
// share count transient ID
$this->public_class_object->share_count_transient_id = $this->public_class_object->get_share_count_transient_id( $sharing_url );
$cached_share_count = $this->public_class_object->get_cached_share_count( $this->public_class_object->share_count_transient_id );
echo "<div class='heateor_sss_sharing_container heateor_sss_vertical_sharing" . ( isset( $this->options['hide_mobile_sharing'] ) ? ' heateor_sss_hide_sharing' : '' ) . ( isset( $this->options['bottom_mobile_sharing'] ) ? ' heateor_sss_bottom_sharing' : '' ) . "' ss-offset='" . $ssOffset . "' style='width:" . ( ( $this->options['vertical_sharing_size'] ? $this->options['vertical_sharing_size'] : 35) + 4) . "px;".( isset( $instance['alignment'] ) && $instance['alignment'] != '' && isset( $instance[$instance['alignment'].'_offset'] ) ? $instance['alignment'].': '. ( $instance[$instance['alignment'].'_offset'] == '' ? 0 : $instance[$instance['alignment'].'_offset'] ) .'px;' : '' ).( isset( $instance['top_offset'] ) ? 'top: '. ( $instance['top_offset'] == '' ? 0 : $instance['top_offset'] ) .'px;' : '' ) . ( isset( $instance['vertical_bg'] ) && $instance['vertical_bg'] != '' ? 'background-color: '.$instance['vertical_bg'] . ';' : '-webkit-box-shadow:none;box-shadow:none;' ) . "' " . ( $this->public_class_object->is_amp_page() ? "" : "heateor-sss-data-href='" . ( isset( $share_count_url ) && $share_count_url ? $share_count_url : $sharing_url ) . "'" ) . ( ( $cached_share_count === false || $this->public_class_object->is_amp_page() ) ? "" : 'heateor-sss-no-counts="1"' ) .">";
$short_url = $this->public_class_object->get_short_url( $sharing_url, $post_id );
//echo $before_widget;
echo $this->public_class_object->prepare_sharing_html( $short_url ? $short_url : $sharing_url, 'vertical', isset( $instance['show_counts'] ), isset( $instance['total_shares'] ) );
echo '</div>';
if ( ( isset( $instance['show_counts'] ) || isset( $instance['total_shares'] ) ) && $cached_share_count === false ) {
echo '<script>heateorSssLoadEvent(
function() {
// sharing counts
heateorSssCallAjax(function() {
heateorSssGetSharingCounts();
});
}
);</script>';
}
//echo $after_widget;
}
/**
* Everything which should happen when user edit widget at admin panel.
*
* @since 1.0.0
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['target_url'] = $new_instance['target_url'];
$instance['show_counts'] = $new_instance['show_counts'];
$instance['total_shares'] = $new_instance['total_shares'];
$instance['target_url_custom'] = $new_instance['target_url_custom'];
$instance['alignment'] = $new_instance['alignment'];
$instance['left_offset'] = $new_instance['left_offset'];
$instance['right_offset'] = $new_instance['right_offset'];
$instance['top_offset'] = $new_instance['top_offset'];
$instance['vertical_bg'] = $new_instance['vertical_bg'];
$instance['hide_for_logged_in'] = $new_instance['hide_for_logged_in'];
return $instance;
}
/**
* Widget options form at admin panel.
*
* @since 1.0.0
*/
public function form( $instance ) {
/* Set up default widget settings. */
$defaults = array( 'alignment' => 'left', 'show_counts' => '', 'total_shares' => '', 'left_offset' => '40', 'right_offset' => '0', 'target_url' => 'default', 'target_url_custom' => '', 'top_offset' => '100', 'vertical_bg' => '', 'hide_for_logged_in' => '' );
foreach ( $instance as $key => $value ) {
if ( is_string( $value ) ) {
$instance[ $key ] = esc_attr( $value );
}
}
$instance = wp_parse_args( ( array ) $instance, $defaults );
?>
<p>
<script>
function heateorSssToggleSharingOffset(alignment) {
if (alignment == 'left' ) {
jQuery( '.heateorSssSharingLeftOffset' ).css( 'display', 'block' );
jQuery( '.heateorSssSharingRightOffset' ).css( 'display', 'none' );
} else {
jQuery( '.heateorSssSharingLeftOffset' ).css( 'display', 'none' );
jQuery( '.heateorSssSharingRightOffset' ).css( 'display', 'block' );
}
}
function heateorSssToggleVerticalSharingTargetUrl(val) {
if (val == 'custom' ) {
jQuery( '.heateorSssVerticalSharingTargetUrl' ).css( 'display', 'block' );
} else {
jQuery( '.heateorSssVerticalSharingTargetUrl' ).css( 'display', 'none' );
}
}
</script>
<p><strong>Note:</strong> <?php _e( 'Make sure "Floating Interface" is enabled in "Floating Interface" section at "Sassy Social Share" page.', 'sassy-social-share' ) ?></p>
<label for="<?php echo $this->get_field_id( 'show_counts' ); ?>"><?php _e( 'Show individual share counts:', 'sassy-social-share' ); ?></label>
<input id="<?php echo $this->get_field_id( 'show_counts' ); ?>" name="<?php echo $this->get_field_name( 'show_counts' ); ?>" type="checkbox" value="1" <?php echo isset( $instance['show_counts'] ) && $instance['show_counts'] == 1 ? 'checked' : ''; ?> /><br/><br/>
<label for="<?php echo $this->get_field_id( 'total_shares' ); ?>"><?php _e( 'Show total shares:', 'sassy-social-share' ); ?></label>
<input id="<?php echo $this->get_field_id( 'total_shares' ); ?>" name="<?php echo $this->get_field_name( 'total_shares' ); ?>" type="checkbox" value="1" <?php echo isset( $instance['total_shares'] ) && $instance['total_shares'] == 1 ? 'checked' : ''; ?> /><br/> <br/>
<label for="<?php echo $this->get_field_id( 'target_url' ); ?>"><?php _e( 'Target Url:', 'sassy-social-share' ); ?></label>
<select style="width: 95%" onchange="heateorSssToggleVerticalSharingTargetUrl(this.value)" class="widefat" id="<?php echo $this->get_field_id( 'target_url' ); ?>" name="<?php echo $this->get_field_name( 'target_url' ); ?>">
<option value="">--<?php _e( 'Select', 'sassy-social-share' ) ?>--</option>
<option value="default" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'default' ? 'selected' : '' ; ?>><?php _e( 'Url of the webpage where icons are located (default)', 'sassy-social-share' ) ?></option>
<option value="homepage" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'homepage' ? 'selected' : '' ; ?>><?php _e( 'Url of the homepage of your website', 'sassy-social-share' ) ?></option>
<option value="custom" <?php echo isset( $instance['target_url'] ) && $instance['target_url'] == 'custom' ? 'selected' : '' ; ?>><?php _e( 'Custom Url', 'sassy-social-share' ) ?></option>
</select>
<input placeholder="Custom url" style="width:95%; margin-top: 5px; <?php echo ! isset( $instance['target_url'] ) || $instance['target_url'] != 'custom' ? 'display: none' : '' ; ?>" class="widefat heateorSssVerticalSharingTargetUrl" id="<?php echo $this->get_field_id( 'target_url_custom' ); ?>" name="<?php echo $this->get_field_name( 'target_url_custom' ); ?>" type="text" value="<?php echo isset( $instance['target_url_custom'] ) ? $instance['target_url_custom'] : ''; ?>" />
<label for="<?php echo $this->get_field_id( 'alignment' ); ?>"><?php _e( 'Alignment', 'sassy-social-share' ); ?></label>
<select onchange="heateorSssToggleSharingOffset(this.value)" style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'alignment' ); ?>" name="<?php echo $this->get_field_name( 'alignment' ); ?>">
<option value="left" <?php echo $instance['alignment'] == 'left' ? 'selected' : ''; ?>><?php _e( 'Left', 'sassy-social-share' ) ?></option>
<option value="right" <?php echo $instance['alignment'] == 'right' ? 'selected' : ''; ?>><?php _e( 'Right', 'sassy-social-share' ) ?></option>
</select>
<div class="heateorSssSharingLeftOffset" <?php echo $instance['alignment'] == 'right' ? 'style="display: none"' : ''; ?>>
<label for="<?php echo $this->get_field_id( 'left_offset' ); ?>"><?php _e( 'Left Offset', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'left_offset' ); ?>" name="<?php echo $this->get_field_name( 'left_offset' ); ?>" type="text" value="<?php echo $instance['left_offset']; ?>" />px<br/>
</div>
<div class="heateorSssSharingRightOffset" <?php echo $instance['alignment'] == 'left' ? 'style="display: none"' : ''; ?>>
<label for="<?php echo $this->get_field_id( 'right_offset' ); ?>"><?php _e( 'Right Offset', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'right_offset' ); ?>" name="<?php echo $this->get_field_name( 'right_offset' ); ?>" type="text" value="<?php echo $instance['right_offset']; ?>" />px<br/>
</div>
<label for="<?php echo $this->get_field_id( 'top_offset' ); ?>"><?php _e( 'Top Offset', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'top_offset' ); ?>" name="<?php echo $this->get_field_name( 'top_offset' ); ?>" type="text" value="<?php echo $instance['top_offset']; ?>" />px<br/>
<label for="<?php echo $this->get_field_id( 'vertical_bg' ); ?>"><?php _e( 'Background Color', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'vertical_bg' ); ?>" name="<?php echo $this->get_field_name( 'vertical_bg' ); ?>" type="text" value="<?php echo $instance['vertical_bg']; ?>" />
<br /><br /><label for="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>"><?php _e( 'Hide for logged in users:', 'sassy-social-share' ); ?></label>
<input type="checkbox" id="<?php echo $this->get_field_id( 'hide_for_logged_in' ); ?>" name="<?php echo $this->get_field_name( 'hide_for_logged_in' ); ?>" type="text" value="1" <?php if ( isset( $instance['hide_for_logged_in'] ) && $instance['hide_for_logged_in'] == 1 ) echo 'checked="checked"'; ?> />
</p>
<?php
}
}
/**
* Follow Icons Widget class
*
* This is used to define functions for Follow Icons Widget
*
* @since 3.1.7
*/
class Sassy_Social_Share_Follow_Widget extends WP_Widget {
/**
* Member to assign object of Sassy_Social_Share_Public Class.
*
* @since 3.3
*/
private $public_class_object;
/**
* Assign plugin options to private member $options and define widget title, description etc.
*
* @since 3.1.7
*/
public function __construct() {
global $heateor_sss;
$this->public_class_object = new Sassy_Social_Share_Public( $heateor_sss->options, HEATEOR_SSS_VERSION );
parent::__construct(
'Heateor_SSS_Follow', // unique id
__( 'Sassy Social Share - Follow Icons' ), // Widget title
array( 'description' => __( 'These icons link to your Social Media accounts', 'sassy-social-share' ) )
);
}
/**
* Render widget at front-end
*
* @since 3.1.7
*/
public function widget( $args, $instance ) {
if ( $this->public_class_object->is_amp_page() ) {
return;
}
extract( $args );
echo $before_widget;
if ( ! empty( $instance['before_widget_content'] ) ) {
echo '<div>' . $instance['before_widget_content'] . '</div>';
}
$check_theme = '';
if ( $instance['custom_color'] == '' ) {
$check_theme = '';
} elseif ( $instance['custom_color'] == 'standard' ) {
$check_theme = 'standard_';
} elseif ( $instance['custom_color'] == 'floating' ) {
$check_theme = 'floating_';
}
echo '<div ' . ( $instance['type'] == 'floating' ? 'style="position:fixed;top:' . $instance['top_offset'] . 'px;' . $instance['alignment'] . ':' . $instance['alignment_value'] . 'px;width:' . $instance['size'] . 'px;"' : '' ) . 'class="heateor_sss_' . $check_theme . 'follow_icons_container">';
if ( ! empty( $instance['title'] ) ) {
$title = apply_filters( 'widget_title', $instance[ 'title' ] );
echo $before_title;
if ( $instance['type'] == 'floating' ) {
echo '<div class="heateor_sss_follow_icons_title" style="text-align:center;font-size:' . $instance['size']*30/100 . 'px">';
}
echo $title;
if ( $instance['type'] == 'floating' ) {
echo '</div>';
}
echo $after_title;
}
echo $this->follow_icons( $instance );
echo '<div style="clear:both"></div>';
echo '</div>';
if ( ! empty( $instance['after_widget_content'] ) ) {
echo '<div>' . $instance['after_widget_content'] . '</div>';
}
echo $after_widget;
}
/**
* Render follow icons
*
* @since 3.1.7
*/
private function follow_icons( $instance ) {
$html = '';
$icon_style = 'width:'. $instance['size'] .'px;height:'. $instance['size'] .'px;'. ( $instance['icon_shape'] == 'round' ? 'border-radius:999px;' : '' );
$html .= '<ul class="heateor_sss_follow_ul">';
if ( $instance['facebook'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Facebook" title="Facebook" class="heateorSssSharing heateorSssFacebookBackground"><a target="_blank" aria-label="Facebook" href="'. $instance['facebook'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssFacebookSvg"></ss></a></i></li>';
}
if ( $instance['twitter'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Twitter" title="Twitter" class="heateorSssSharing heateorSssTwitterBackground"><a target="_blank" aria-label="Twitter" href="'. $instance['twitter'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssTwitterSvg"></ss></a></i></li>';
}
if ( $instance['instagram'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Instagram" title="Instagram" class="heateorSssSharing heateorSssInstagramBackground"><a target="_blank" aria-label="Instagram" href="'. $instance['instagram'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssInstagramSvg"></ss></a></i></li>';
}
if ( $instance['pinterest'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Pinterest" title="Pinterest" class="heateorSssSharing heateorSssPinterestBackground"><a target="_blank" aria-label="Pinterest" href="'. $instance['pinterest'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssPinterestSvg"></ss></a></i></li>';
}
if ( $instance['behance'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Behance" title="Behance" class="heateorSssSharing heateorSssBehanceBackground"><a target="_blank" aria-label="Behance" href="'. $instance['behance'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssBehanceSvg"></ss></a></i></li>';
}
if ( $instance['flickr'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Flickr" title="Flickr" class="heateorSssSharing heateorSssFlickrBackground"><a target="_blank" aria-label="Flickr" href="'. $instance['flickr'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssFlickrSvg"></ss></a></i></li>';
}
if ( $instance['foursquare'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Foursquare" title="Foursquare" class="heateorSssSharing heateorSssFoursquareBackground"><a target="_blank" aria-label="Foursquare" href="'. $instance['foursquare'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssFoursquareSvg"></ss></a></i></li>';
}
if ( $instance['github'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Github" title="Github" class="heateorSssSharing heateorSssGithubBackground"><a target="_blank" aria-label="Github" href="'. $instance['github'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssGithubSvg"></ss></a></i></li>';
}
if ( $instance['linkedin'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Linkedin" title="Linkedin" class="heateorSssSharing heateorSssLinkedinBackground"><a target="_blank" aria-label="Linkedin" href="'. $instance['linkedin'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssLinkedinSvg"></ss></a></i></li>';
}
if ( $instance['linkedin_company'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Linkedin Company" title="Linkedin Company" class="heateorSssSharing heateorSssLinkedinBackground"><a target="_blank" aria-label="Linkedin Company" href="'. $instance['linkedin_company'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssLinkedinSvg"></ss></a></i></li>';
}
if ( $instance['medium'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Medium" title="Medium" class="heateorSssSharing heateorSssMediumBackground"><a target="_blank" aria-label="Medium" href="'. $instance['medium'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssMediumSvg"></ss></a></i></li>';
}
if ( $instance['mewe'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="MeWe" title="MeWe" class="heateorSssSharing heateorSssMeWeBackground"><a target="_blank" aria-label="MeWe" href="'. $instance['mewe'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssMeWeSvg"></ss></a></i></li>';
}
if ( $instance['odnoklassniki'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Odnoklassniki" title="Odnoklassniki" class="heateorSssSharing heateorSssOdnoklassnikiBackground"><a target="_blank" aria-label="Odnoklassniki" href="'. $instance['odnoklassniki'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssOdnoklassnikiSvg"></ss></a></i></li>';
}
if ( $instance['snapchat'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Snapchat" title="Snapchat" class="heateorSssSharing heateorSssSnapchatBackground"><a target="_blank" aria-label="Snapchat" href="'. $instance['snapchat'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssSnapchatSvg"></ss></a></i></li>';
}
if ( $instance['telegram'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Telegram" title="Telegram" class="heateorSssSharing heateorSssTelegramBackground"><a target="_blank" aria-label="Telegram" href="'. $instance['telegram'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssTelegramSvg"></ss></a></i></li>';
}
if ( $instance['tumblr'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Tumblr" title="Tumblr" class="heateorSssSharing heateorSssTumblrBackground"><a target="_blank" aria-label="Tumblr" href="'. $instance['tumblr'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssTumblrSvg"></ss></a></i></li>';
}
if ( $instance['vimeo'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Vimeo" title="Vimeo" class="heateorSssSharing heateorSssVimeoBackground"><a target="_blank" aria-label="Vimeo" href="'. $instance['vimeo'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssVimeoSvg"></ss></a></i></li>';
}
if ( $instance['vkontakte'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Vkontakte" title="Vkontakte" class="heateorSssSharing heateorSssVkontakteBackground"><a target="_blank" aria-label="Vkontakte" href="'. $instance['vkontakte'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssVkontakteSvg"></ss></a></i></li>';
}
if ( $instance['whatsapp'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Whatsapp" title="Whatsapp" class="heateorSssSharing heateorSssWhatsappBackground"><a target="_blank" aria-label="Whatsapp" href="'. $instance['whatsapp'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssWhatsappSvg"></ss></a></i></li>';
}
if ( $instance['xing'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Xing" title="Xing" class="heateorSssSharing heateorSssXingBackground"><a target="_blank" aria-label="Xing" href="'. $instance['xing'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssXingSvg"></ss></a></i></li>';
}
if ( $instance['youtube'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Youtube" title="Youtube" class="heateorSssSharing heateorSssYoutubeBackground"><a target="_blank" aria-label="Youtube" href="'. $instance['youtube'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssYoutubeSvg"></ss></a></i></li>';
}
if ( $instance['youtube_channel'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="Youtube Channel" title="Youtube Channel" class="heateorSssSharing heateorSssYoutubeBackground"><a target="_blank" aria-label="Youtube Channel" href="'. $instance['youtube_channel'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssYoutubeSvg"></ss></a></i></li>';
}
if ( $instance['rss_feed'] ) {
$html .= '<li class="heateorSssSharingRound"><i style="'. $icon_style .'" alt="RSS Feed" title="RSS Feed" class="heateorSssSharing heateorSssRSSBackground"><a target="_blank" aria-label="RSS Feed" href="'. $instance['rss_feed'] .'" rel="noopener"><ss style="display:block" class="heateorSssSharingSvg heateorSssRSSSvg"></ss></a></i></li>';
}
$html = apply_filters( 'heateor_sss_follow_icons', $html, $instance, $icon_style );
$html .= '</ul>';
return $html;
}
/**
* Validate the widget options
*
* @since 3.1.7
*/
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;
$instance['title'] = strip_tags( $new_instance['title'] );
$instance['type'] = $new_instance['type'];
$instance['top_offset'] = $new_instance['top_offset'];
$instance['alignment_value'] = $new_instance['alignment_value'];
$instance['alignment'] = $new_instance['alignment'];
$instance['size'] = intval( $new_instance['size'] );
$instance['icon_shape'] = $new_instance['icon_shape'];
$instance['custom_color'] = $new_instance['custom_color'];
$instance['facebook'] = $new_instance['facebook'];
$instance['twitter'] = $new_instance['twitter'];
$instance['instagram'] = $new_instance['instagram'];
$instance['pinterest'] = $new_instance['pinterest'];
$instance['behance'] = $new_instance['behance'];
$instance['flickr'] = $new_instance['flickr'];
$instance['foursquare'] = $new_instance['foursquare'];
$instance['github'] = $new_instance['github'];
$instance['gitlab'] = $new_instance['gitlab'];
$instance['linkedin'] = $new_instance['linkedin'];
$instance['linkedin_company'] = $new_instance['linkedin_company'];
$instance['medium'] = $new_instance['medium'];
$instance['mewe'] = $new_instance['mewe'];
$instance['odnoklassniki'] = $new_instance['odnoklassniki'];
$instance['snapchat'] = $new_instance['snapchat'];
$instance['telegram'] = $new_instance['telegram'];
$instance['tumblr'] = $new_instance['tumblr'];
$instance['vimeo'] = $new_instance['vimeo'];
$instance['vkontakte'] = $new_instance['vkontakte'];
$instance['whatsapp'] = $new_instance['whatsapp'];
$instance['xing'] = $new_instance['xing'];
$instance['youtube'] = $new_instance['youtube'];
$instance['youtube_channel'] = $new_instance['youtube_channel'];
$instance['rss_feed'] = $new_instance['rss_feed'];
$instance['before_widget_content'] = $new_instance['before_widget_content'];
$instance['after_widget_content'] = $new_instance['after_widget_content'];
return $instance;
}
/**
* Widget options form
*
* @since 3.1.7
*/
public function form( $instance ) {
/* default widget settings. */
$defaults = array( 'title' => '', 'type' => 'standard', 'alignment' => 'right', 'size' => '32', 'icon_shape' => 'round', 'custom_color' => '', 'facebook' => '', 'twitter' => '', 'instagram' => '', 'pinterest' => '', 'behance' => '', 'flickr' => '', 'foursquare' => '', 'github' => '', 'gitlab' => '', 'linkedin' => '', 'linkedin_company' => '', 'medium' => '', 'mewe' => '', 'odnoklassniki' => '', 'snapchat' => '', 'telegram' => '', 'tumblr' => '', 'vimeo' => '', 'vkontakte' => '', 'whatsapp' => '', 'xing' => '', 'youtube' => '', 'youtube_channel' => '', 'rss_feed' => '', 'before_widget_content' => '', 'after_widget_content' => '', 'top_offset' => '200', 'alignment_value' => '0' );
foreach ( $instance as $key => $value ) {
if ( is_string( $value ) ) {
$instance[ $key ] = esc_attr( $value );
}
}
$instance = wp_parse_args( ( array ) $instance, $defaults );
?>
<script type="text/javascript">
function heateorSssFloatingAlignment(val) {
if (val == 'floating' ) {
jQuery( '.heateorSssFloatingAlignment' ).css( 'display', 'block' );
} else {
jQuery( '.heateorSssFloatingAlignment' ).css( 'display', 'none' );
}
jQuery( '#<?php echo $this->get_field_id( 'alignment_value_label' ); ?>' ).text('<?php _e( 'Right offset', 'sassy-social-share' ) ?>' );
}
function heateorSssAlignmentOffsetLabel(val) {
if (val == 'left' ) {
jQuery( '#<?php echo $this->get_field_id( 'alignment_value_label' ); ?>' ).text('<?php _e( 'Left offset', 'sassy-social-share' ) ?>' );
} else {
jQuery( '#<?php echo $this->get_field_id( 'alignment_value_label' ); ?>' ).text('<?php _e( 'Right offset', 'sassy-social-share' ) ?>' );
}
}
</script>
<p>
<label for="<?php echo $this->get_field_id( 'before_widget_content' ); ?>"><?php _e( 'Before widget content:', 'sassy-social-share' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'before_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'before_widget_content' ); ?>" type="text" value="<?php echo $instance['before_widget_content']; ?>" /><br/><br/>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $instance['title']; ?>" /><br/><br/>
<label for="<?php echo $this->get_field_id( 'mode_standard' ); ?>"><?php _e( 'Type:', 'sassy-social-share' ) ?></label><br>
<input id="<?php echo $this->get_field_id( 'mode_standard' ); ?>" type="radio" onclick='heateorSssFloatingAlignment(this.value)' name="<?php echo $this->get_field_name( 'type' ); ?>" value="standard" <?php if($instance['type'] == 'standard' ) {
echo "checked";
} ?>><label for="<?php echo $this->get_field_id( 'mode_standard' ); ?>"> <?php _e( 'Standard', 'sassy-social-share' ) ?></label><br>
<input id="<?php echo $this->get_field_id( 'mode_floating' ); ?>" type="radio" name="<?php echo $this->get_field_name( 'type' ); ?>" onclick='heateorSssFloatingAlignment(this.value)' value="floating" <?php if($instance['type'] == 'floating' ) {
echo "checked";
}?>><label for="<?php echo $this->get_field_id( 'mode_floating' ); ?>"> <?php _e( 'Floating', 'sassy-social-share' ) ?></label><br><br>
<div class="heateorSssFloatingAlignment"
<?php echo $instance['type'] == 'standard' ? 'style="display:none"' : '' ?>>
<label for="<?php echo $this->get_field_id( 'top_offset' ); ?>">
<?php _e( 'Top offset:', 'sassy-social-share' ) ?>
</label>
<input id="<?php echo $this->get_field_id('top_offset' ); ?>" type="text" name="<?php echo $this->get_field_name( 'top_offset' ); ?>" value="<?php echo $instance['top_offset']; ?>"/>px<br><br>
<label for="<?php echo $this->get_field_id( 'floating_left' ); ?>">
<?php _e( 'Alignment:', 'sassy-social-share' ) ?>
</label>
<input id="<?php echo $this->get_field_id( 'floating_left' ); ?>" type="radio" name="<?php echo $this->get_field_name( 'alignment' ); ?>" value="left" onclick='heateorSssAlignmentOffsetLabel(this.value)'
<?php if ($instance['alignment'] == 'left' ) {
echo 'checked';
} ?>>
<label for="<?php echo $this->get_field_id( 'floating_left' ); ?>">
<?php _e( 'Left', 'sassy-social-share' ) ?>
</label>
<input id="<?php echo $this->get_field_id( 'floating_right' ); ?>" type="radio" name="<?php echo $this->get_field_name( 'alignment' ); ?>" value="right" onclick='heateorSssAlignmentOffsetLabel(this.value)'
<?php if ($instance['alignment'] == 'right' ) {
echo 'checked';
} ?> />
<label for="<?php echo $this->get_field_id( 'floating_right' ); ?>" >
<?php _e( 'Right', 'sassy-social-share' ) ?>
</label>
<br>
<br>
<label id="<?php echo $this->get_field_id( 'alignment_value_label' ); ?>" for="<?php echo $this->get_field_id( 'alignment_value' ); ?>">
<?php echo $instance['alignment'] == 'right' ? __( 'Right offset', 'sassy-social-share' ) : __( 'Left offset', 'sassy-social-share' ) ?>
</label>
<br>
<input id='<?php echo $this->get_field_id( 'alignment_value' ); ?>' type="text" name="<?php echo $this->get_field_name( 'alignment_value' ); ?>" value="<?php echo $instance['alignment_value']; ?>" />px<br><br>
</div>
<label for="<?php echo $this->get_field_id( 'size' ); ?>"><?php _e( 'Size of icons', 'sassy-social-share' ); ?></label>
<input style="width: 82%" class="widefat" id="<?php echo $this->get_field_id( 'size' ); ?>" name="<?php echo $this->get_field_name( 'size' ); ?>" type="text" value="<?php echo $instance['size']; ?>" />px<br/><br/>
<label for="<?php echo $this->get_field_id( 'icon_shape' ); ?>"><?php _e( 'Icon Shape', 'sassy-social-share' ); ?></label>
<select style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'icon_shape' ); ?>" name="<?php echo $this->get_field_name( 'icon_shape' ); ?>">
<option value="round" <?php echo ! isset( $instance['icon_shape'] ) || $instance['icon_shape'] == 'round' ? 'selected' : '' ; ?>><?php _e( 'Round', 'sassy-social-share' ); ?></option>
<option value="square" <?php echo isset( $instance['icon_shape'] ) && $instance['icon_shape'] == 'square' ? 'selected' : '' ; ?>><?php _e( 'Square', 'sassy-social-share' ); ?></option>
</select><br/><br/>
<label for="<?php echo $this->get_field_id( 'custom_color' ); ?>"><?php _e( 'Apply icon color and background color from Theme Selection section:', 'sassy-social-share' ); ?></label>
<select style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'custom_color' ); ?>" name="<?php echo $this->get_field_name( 'custom_color' ); ?>">
<option value="" <?php echo ! isset( $instance['custom_color'] ) || $instance['custom_color'] == '' ? 'selected' : '' ; ?>><?php _e( 'No', 'sassy-social-share' ); ?></option>
<option value="standard" <?php echo isset( $instance['custom_color'] ) && $instance['custom_color'] == 'standard' ? 'selected' : '' ; ?>><?php _e( 'Yes, Standard Interface Theme', 'sassy-social-share' ); ?></option>
<option value="floating" <?php echo isset( $instance['custom_color'] ) && $instance['custom_color'] == 'floating' ? 'selected' : '' ; ?>><?php _e( 'Yes, Floating Interface Theme', 'sassy-social-share' ); ?></option>
</select><br/><br/>
<label for="<?php echo $this->get_field_id( 'facebook' ); ?>"><?php _e( 'Facebook URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'facebook' ); ?>" name="<?php echo $this->get_field_name( 'facebook' ); ?>" type="text" value="<?php echo $instance['facebook']; ?>" /><br/>
<span>https://www.facebook.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'twitter' ); ?>"><?php _e( 'Twitter URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'twitter' ); ?>" name="<?php echo $this->get_field_name( 'twitter' ); ?>" type="text" value="<?php echo $instance['twitter']; ?>" /><br/>
<span>https://twitter.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'instagram' ); ?>"><?php _e( 'Instagram URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'instagram' ); ?>" name="<?php echo $this->get_field_name( 'instagram' ); ?>" type="text" value="<?php echo $instance['instagram']; ?>" /><br/>
<span>https://www.instagram.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'pinterest' ); ?>"><?php _e( 'Pinterest URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'pinterest' ); ?>" name="<?php echo $this->get_field_name( 'pinterest' ); ?>" type="text" value="<?php echo $instance['pinterest']; ?>" /><br/>
<span>https://www.pinterest.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'behance' ); ?>"><?php _e( 'Behance URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'behance' ); ?>" name="<?php echo $this->get_field_name( 'behance' ); ?>" type="text" value="<?php echo $instance['behance']; ?>" /><br/>
<span>https://www.behance.net/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'flickr' ); ?>"><?php _e( 'Flickr URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'flickr' ); ?>" name="<?php echo $this->get_field_name( 'flickr' ); ?>" type="text" value="<?php echo $instance['flickr']; ?>" /><br/>
<span>https://www.flickr.com/photos/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'foursquare' ); ?>"><?php _e( 'Foursquare URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'foursquare' ); ?>" name="<?php echo $this->get_field_name( 'foursquare' ); ?>" type="text" value="<?php echo $instance['foursquare']; ?>" /><br/>
<span>https://foursquare.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'github' ); ?>"><?php _e( 'Github URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'github' ); ?>" name="<?php echo $this->get_field_name( 'github' ); ?>" type="text" value="<?php echo $instance['github']; ?>" /><br/>
<span>https://github.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'linkedin' ); ?>"><?php _e( 'LinkedIn URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'linkedin' ); ?>" name="<?php echo $this->get_field_name( 'linkedin' ); ?>" type="text" value="<?php echo $instance['linkedin']; ?>" /><br/>
<span>https://www.linkedin.com/in/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'linkedin_company' ); ?>"><?php _e( 'LinkedIn Company URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'linkedin_company' ); ?>" name="<?php echo $this->get_field_name( 'linkedin_company' ); ?>" type="text" value="<?php echo $instance['linkedin_company']; ?>" /><br/>
<span>https://www.linkedin.com/company/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'medium' ); ?>"><?php _e( 'Medium URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'medium' ); ?>" name="<?php echo $this->get_field_name( 'medium' ); ?>" type="text" value="<?php echo $instance['medium']; ?>" /><br/>
<span>https://medium.com/@ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'mewe' ); ?>"><?php _e( 'MeWe URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'mewe' ); ?>" name="<?php echo $this->get_field_name( 'mewe' ); ?>" type="text" value="<?php echo $instance['mewe']; ?>" /><br/>
<span>https://mewe.com/profile/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'odnoklassniki' ); ?>"><?php _e( 'Odnoklassniki URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'odnoklassniki' ); ?>" name="<?php echo $this->get_field_name( 'odnoklassniki' ); ?>" type="text" value="<?php echo $instance['odnoklassniki']; ?>" /><br/>
<span>https://ok.ru/profile/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'snapchat' ); ?>"><?php _e( 'Snapchat URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'snapchat' ); ?>" name="<?php echo $this->get_field_name( 'snapchat' ); ?>" type="text" value="<?php echo $instance['snapchat']; ?>" /><br/>
<span>https://www.snapchat.com/add/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'telegram' ); ?>"><?php _e( 'Telegram URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'telegram' ); ?>" name="<?php echo $this->get_field_name( 'telegram' ); ?>" type="text" value="<?php echo $instance['telegram']; ?>" /><br/>
<span>https://t.me/username</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'tumblr' ); ?>"><?php _e( 'Tumblr URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'tumblr' ); ?>" name="<?php echo $this->get_field_name( 'tumblr' ); ?>" type="text" value="<?php echo $instance['tumblr']; ?>" /><br/>
<span>https://ID.tumblr.com</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'vimeo' ); ?>"><?php _e( 'Vimeo URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'vimeo' ); ?>" name="<?php echo $this->get_field_name( 'vimeo' ); ?>" type="text" value="<?php echo $instance['vimeo']; ?>" /><br/>
<span>https://vimeo.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'vkontakte' ); ?>"><?php _e( 'Vkontakte URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'vkontakte' ); ?>" name="<?php echo $this->get_field_name( 'vkontakte' ); ?>" type="text" value="<?php echo $instance['vkontakte']; ?>" /><br/>
<span>https://vk.com/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'whatsapp' ); ?>"><?php _e( 'Whatsapp URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'whatsapp' ); ?>" name="<?php echo $this->get_field_name( 'whatsapp' ); ?>" type="text" value="<?php echo $instance['whatsapp']; ?>" /><br/>
<span>https://wa.me/PHONE_NUMBER</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'xing' ); ?>"><?php _e( 'Xing URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'xing' ); ?>" name="<?php echo $this->get_field_name( 'xing' ); ?>" type="text" value="<?php echo $instance['xing']; ?>" /><br/>
<span>https://www.xing.com/profile/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'youtube' ); ?>"><?php _e( 'Youtube URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'youtube' ); ?>" name="<?php echo $this->get_field_name( 'youtube' ); ?>" type="text" value="<?php echo $instance['youtube']; ?>" /><br/>
<span>https://www.youtube.com/user/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'youtube_channel' ); ?>"><?php _e( 'Youtube Channel URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'youtube_channel' ); ?>" name="<?php echo $this->get_field_name( 'youtube_channel' ); ?>" type="text" value="<?php echo $instance['youtube_channel']; ?>" /><br/>
<span>https://www.youtube.com/channel/ID</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'rss_feed' ); ?>"><?php _e( 'RSS Feed URL:', 'sassy-social-share' ); ?></label>
<input style="width: 95%" class="widefat" id="<?php echo $this->get_field_id( 'rss_feed' ); ?>" name="<?php echo $this->get_field_name( 'rss_feed' ); ?>" type="text" value="<?php echo $instance['rss_feed']; ?>" /><br/>
<span>http://www.example.com/feed/</span><br/><br/>
<label for="<?php echo $this->get_field_id( 'after_widget_content' ); ?>"><?php _e( 'After widget content:', 'sassy-social-share' ); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'after_widget_content' ); ?>" name="<?php echo $this->get_field_name( 'after_widget_content' ); ?>" type="text" value="<?php echo $instance['after_widget_content']; ?>" />
</p>
<?php
}
}
@@ -0,0 +1,277 @@
<?php
/**
* The file that defines the core plugin class
*
* A class definition that includes attributes and functions used across both the
* public-facing side of the site and the admin area.
*
* @since 1.0.0
*
*/
/**
* The core plugin class.
*
* This is used to define hooks.
*
* Also maintains the unique identifier of this plugin as well as the current
* version of the plugin.
*
* @since 1.0.0
*/
class Sassy_Social_Share {
/**
* The unique identifier of this plugin.
*
* @since 1.0.0
*/
protected $plugin_slug;
/**
* Current version of the plugin.
*
* @since 1.0.0
*/
protected $version;
/**
* Options saved in database.
*
* @since 1.0.0
*/
public $options;
/**
* Member to assign object of Sassy_Social_Share_Public Class.
*
* @since 1.0.0
*/
public $plugin_public;
/**
* Define the core functionality of the plugin.
*
* @since 1.0.0
*/
public function __construct( $version ) {
$this->plugin_slug = 'sassy-social-share';
$this->version = $version;
$this->options = get_option( 'heateor_sss' );
$this->load_dependencies();
$this->set_locale();
$this->call_admin_hooks();
$this->call_public_hooks();
$this->define_shortcodes();
$this->define_widgets();
}
/**
* Load the required dependencies for this plugin.
*
* @since 1.0.0
*/
private function load_dependencies() {
/**
* The class responsible for defining all functions for the functionality that occur in the admin area.
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-sassy-social-share-admin.php';
/**
* The class responsible for defining all functions for the functionality that occur at front-end of website.
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-sassy-social-share-public.php';
/**
* The class responsible for defining all functions for widgets.
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-sassy-social-share-widgets.php';
/**
* The class responsible for defining all shortcode functions.
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-sassy-social-share-shortcodes.php';
/**
* The class responsible for defining sharing networks and their sharer urls.
*/
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-sassy-social-share-sharing-networks.php';
}
/**
* Define the locale for this plugin for internationalization.
*
* @since 1.0.0
*/
private function set_locale() {
load_plugin_textdomain( 'sassy-social-share', false, plugin_dir_path( dirname( __FILE__ ) ) . '/languages/' );
}
/**
* Register all of the hooks related to the admin area functionality of the plugin
*
* @since 1.0.0
*/
private function call_admin_hooks() {
// create object of admin class to pass options
$plugin_admin = new Sassy_Social_Share_Admin( $this->options, $this->version );
// hook to upate plugin db/options based on version
add_action( 'plugins_loaded', array( $plugin_admin, 'update_db_check' ) );
// save GDPR notification flag in DB
add_action( 'wp_ajax_heateor_sss_gdpr_notification_read', array( $plugin_admin, 'gdpr_notification_read' ) );
// save FB share count notification flag in DB
add_action( 'wp_ajax_heateor_sss_fb_count_notification_read', array( $plugin_admin, 'fb_count_notification_read' ) );
// save Twitter share count notification flag in DB
add_action( 'wp_ajax_heateor_sss_twitter_share_notification_read', array( $plugin_admin, 'twitter_share_notification_read' ) );
// save Twitcount notification flag in DB
add_action( 'wp_ajax_heateor_sss_twitcount_notification_read', array( $plugin_admin, 'twitcount_notification_read' ) );
// create admin menu
add_action( 'admin_menu', array( $plugin_admin, 'create_admin_menu' ) );
// set sanitization callback for plugin options
add_action( 'admin_init', array( $plugin_admin, 'options_init' ) );
// check if BuddyPress is active
add_action( 'bp_include', array( $plugin_admin, 'is_bp_loaded' ) );
// if multisite is enabled and this is the main website
if ( is_multisite() && is_main_site() ) {
// replicate the options to the new blog created
add_action( 'wpmu_new_blog', array( $plugin_admin, 'replicate_settings' ) );
// update the options in all the old blogs
add_action( 'update_option_heateor_sss', array( $plugin_admin, 'update_old_blogs' ) );
}
// ajax function to clear bitly short url cache
add_action( 'wp_ajax_heateor_sss_clear_shorturl_cache', array( $plugin_admin, 'clear_shorturl_cache' ) );
// ajax function to clear share counts cache
add_action( 'wp_ajax_heateor_sss_clear_share_count_cache', array( $plugin_admin, 'clear_share_count_cache' ) );
// show notices
add_action( 'admin_notices', array( $plugin_admin, 'show_notices' ) );
// add links to settings, add-ons etc. to show at "Plugins" page
add_filter( 'plugin_action_links_sassy-social-share/sassy-social-share.php', array( $plugin_admin, 'add_links' ) );
}
/**
* Register all of the hooks related to the front-end functionality of the plugin.
*
* @since 1.0.0
*/
private function call_public_hooks() {
// create object of public class to pass options
$plugin_public = new Sassy_Social_Share_Public( $this->options, $this->version );
$this->plugin_public = $plugin_public;
// hook the plugin functions on 'init' event.
add_action( 'init', array( $plugin_public, 'init' ) );
// remove render sharing action from Excerpts, as it gets nasty due to strip_tags()
add_filter( 'get_the_excerpt', array( $plugin_public, 'remove_render_sharing' ), 9 );
// hooks to enable sharing interface
add_filter( 'the_content', array( $plugin_public, 'render_sharing' ), 99 );
add_filter( 'the_excerpt', array( $plugin_public, 'render_sharing' ), 99 );
if ( isset( $this->options['bp_activity'] ) ) {
add_action( 'bp_activity_entry_meta', array( $plugin_public, 'render_sharing' ), 999 );
}
if ( isset( $this->options['bp_group'] ) || isset( $this->options['vertical_bp_group'] ) ) {
add_action( 'bp_before_group_header', array( $plugin_public, 'render_sharing' ) );
}
add_filter( 'bbp_get_reply_content', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_before_single_forum', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_before_single_topic', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_before_lead_topic', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_after_single_forum', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_after_single_topic', array( $plugin_public, 'render_sharing' ) );
add_filter( 'bbp_template_after_lead_topic', array( $plugin_public, 'render_sharing' ) );
// Sharing at WooCommerce pages
if ( isset( $this->options['woocom_shop'] ) ) {
add_action( 'woocommerce_after_shop_loop_item', array( $plugin_public, 'render_sharing' ) );
}
if ( isset( $this->options['woocom_product'] ) ) {
add_action( 'woocommerce_share', array( $plugin_public, 'render_sharing' ) );
}
if ( isset( $this->options['woocom_thankyou'] ) ) {
add_action( 'woocommerce_thankyou', array( $plugin_public, 'render_sharing' ) );
}
// fetch share counts
add_action( 'wp_ajax_heateor_sss_sharing_count', array( $plugin_public, 'fetch_share_counts' ) );
add_action( 'wp_ajax_nopriv_heateor_sss_sharing_count', array( $plugin_public, 'fetch_share_counts' ) );
// save Facebook share counts
add_action( 'wp_ajax_heateor_sss_save_facebook_shares', array( $plugin_public, 'save_facebook_shares' ) );
add_action( 'wp_ajax_nopriv_heateor_sss_save_facebook_shares', array( $plugin_public, 'save_facebook_shares' ) );
if ( isset( $this->options['mycred_referral'] ) ) {
add_filter( 'heateor_sss_target_share_url_filter', array( $plugin_public, 'append_mycred_referral_id' ), 10, 3 );
}
}
/**
* Define widgets
*
* @since 1.0.0
*/
private function define_widgets() {
// standard widget
add_action( 'widgets_init', function() { return register_widget( "Sassy_Social_Share_Standard_Widget" ); } );
// floating widget
add_action( 'widgets_init', function() { return register_widget( "Sassy_Social_Share_Floating_Widget" ); } );
// follow icons widget
add_action( 'widgets_init', function() { return register_widget( "Sassy_Social_Share_Follow_Widget" ); } );
}
/**
* Define shortcodes
*
* @since 1.0.0
*/
private function define_shortcodes() {
// create object of shortcode class
$plugin_shortcodes = new Sassy_Social_Share_Shortcodes( $this->options, $this->plugin_public );
// shortcode for sharing
add_shortcode( 'Sassy_Social_Share', array( $plugin_shortcodes, 'sharing_shortcode' ) );
// shortcode for follow icons
add_shortcode( 'Sassy_Follow_Icons', array( $plugin_shortcodes, 'follow_icons_shortcode' ) );
}
/**
* Returns the plugin slug
*
* @since 1.0.0
* @return string The plugin slug.
*/
public function get_plugin_slug() {
return $this->plugin_slug;
}
/**
* Retrieve the version number of the plugin
*
* @since 1.0.0
* @return string The version number of the plugin.
*/
public function get_version() {
return $this->version;
}
}
@@ -0,0 +1 @@
<?php // Silence is golden