ID; $desc = $post->post_excerpt; if (ampforwp_has_post_thumbnail( $post_id ) ){ $image = ampforwp_get_post_thumbnail( 'url', 'full' ); } if(!ampforwp_is_associative($selected_social_icons)){ $icons_list_temp = array(); foreach ($selected_social_icons as $key => $icons) { $icons_list_temp[$icons] = ''; } $selected_social_icons = $icons_list_temp; } $social_icons_names = array(); $url = get_the_permalink(); $title = esc_attr(get_the_title()); if(isset($redux_builder_amp['enable-single-twitter-share-link']) && $redux_builder_amp['enable-single-twitter-share-link']){ $twitter_url = get_the_permalink(); } else $twitter_url = wp_get_shortlink(); foreach ($selected_social_icons as $key => $value) { $social_icons_names[] = $key; } if( isset($selected_social_icons['twitter'] ) && null == $selected_social_icons['twitter'] ){ $selected_social_icons['twitter'] = 'https://twitter.com/intent/tweet?url='. $twitter_url.'&text='. $title .' '; //https://twitter.com/intent/tweet?url={url}&text={title}&via={via}&hashtags={hashtags} } if( isset($selected_social_icons['facebook'] ) && null == $selected_social_icons['facebook'] ){ $selected_social_icons['facebook'] = 'https://www.facebook.com/sharer.php?u='. $url. ''; //or https://www.facebook.com/dialog/share?app_id={app_id}&display=page&href={url}&redirect_uri={redirect_url} } if( isset($selected_social_icons['pinterest'] ) && null == $selected_social_icons['pinterest'] ){ $selected_social_icons['pinterest'] = 'https://pinterest.com/pin/create/bookmarklet/?media='.$image.'&url='.$url.'&description='.$title.''; //https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title} } if( isset($selected_social_icons['google-plus']) && $selected_social_icons['google-plus'] == null){ $selected_social_icons['google-plus'] = 'https://plus.google.com/share?url='. $url. ''; //https://plus.google.com/share?url={url} } if( isset($selected_social_icons['linkedin']) && $selected_social_icons['linkedin'] == null){ $selected_social_icons['linkedin'] = 'https://www.linkedin.com/shareArticle?url='. $url. '&title='. $title .''; //https://www.linkedin.com/shareArticle?url={url}&title={title} } if( isset($selected_social_icons['reddit']) && $selected_social_icons['reddit'] == null){ $selected_social_icons['reddit'] = 'https://reddit.com/submit?url='. $url. '&title='. $title .''; //https://reddit.com/submit?url={url}&title={title} } if( isset($selected_social_icons['VKontakte']) && $selected_social_icons['VKontakte'] == null){ $selected_social_icons['VKontakte'] = 'https://vk.com/share.php?url='. $url. ''; //http://vk.com/share.php?url={url} } if( isset($selected_social_icons['Odnoklassniki']) && $selected_social_icons['Odnoklassniki'] == null){ $selected_social_icons['Odnoklassniki'] = 'https://ok.ru/dk?st.cmd=addShare&st._surl='. $url. ''; } if( isset($selected_social_icons['tumblr']) && $selected_social_icons['tumblr'] == null){ $selected_social_icons['tumblr'] = 'https://www.tumblr.com/widgets/share/tool?canonicalUrl='. $url. '&title='. $title .'&caption='.$desc.''; //https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={desc} } if ( isset($selected_social_icons['telegram']) && null == $selected_social_icons['telegram'] ) { $selected_social_icons['telegram'] = 'https://telegram.me/share/url?url='. $url. '&text='. $title .''; //https://telegram.me/share/url?url={url}&text={title} } if ( isset($selected_social_icons['digg']) && null == $selected_social_icons['digg'] ) { $selected_social_icons['digg'] = 'http://digg.com/submit?url='. $url. '&title='. $title .''; //http://digg.com/submit?url={url}&title={title} } if ( isset($selected_social_icons['StumbleUpon']) && null == $selected_social_icons['StumbleUpon'] ) { $selected_social_icons['StumbleUpon'] = 'http://www.stumbleupon.com/submit?url='. $url. '&title='. $title .''; //http://www.stumbleupon.com/submit?url={url}&title={title} } if ( isset($selected_social_icons['Wechat']) && null == $selected_social_icons['Wechat'] ) { $selected_social_icons['Wechat'] = 'http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url='. $url. ''; // http://api.addthis.com/oexchange/0.8/forward/wechat/offer?url={url} } if ( isset($selected_social_icons['Viber']) && null == $selected_social_icons['Viber'] ) { $selected_social_icons['Viber'] = 'viber://forward?text='. $url. ''; //viber://forward?text={url} } ?>
@font-face { font-family: 'icomoon'; src: url('fonts/icomoon.eot'); src: url('fonts/icomoon.eot') format('embedded-opentype'), url('fonts/icomoon.ttf') format('truetype'), url('fonts/icomoon.woff') format('woff'), url('fonts/icomoon.svg') format('svg'); font-weight: normal; font-style: normal; } [class^="icon-"], [class*=" icon-"]{ font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .icon-twitter:before{ content: "\f099";background:#1da1f2 } .icon-facebook:before{ content: "\f09a";background:#3b5998 } .icon-facebook-f:before{ content: "\f09a";background:#3b5998 } .icon-pinterest:before{ content: "\f0d2";background:#bd081c } .icon-google-plus:before{ content: "\f0d5";background:#dd4b39 } .icon-linkedin:before{ content: "\f0e1";background:#0077b5 } .icon-youtube-play:before{ content: "\f16a";background:#cd201f } .icon-instagram:before{ content: "\f16d";background:#c13584 } .icon-tumblr:before{ content: "\f173";background:#35465c } .icon-vk:before{ content: "\f189";background:#45668e } .icon-whatsapp:before{ content: "\f232";background:#075e54 } .icon-reddit-alien:before{ content: "\f281";background:#ff4500 } .icon-snapchat-ghost:before{ content: "\f2ac"; background:#fffc00 } .amp-social{ font-size: 15px; display: inline-block; } .amp-social ul{ list-style-type:none; padding:0;margin:0; text-align:center } .amp-social li{ box-sizing: initial; display:inline-block; } .amp-social li:before{box-sizing: initial;color: #fff;display: inline-block;width: 18px;height: 18px;line-height: 18px;} amp-facebook-like{top:8px;}