Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active August 10, 2016 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/fcc1bf1467cd8401d4c8 to your computer and use it in GitHub Desktop.
Save billerickson/fcc1bf1467cd8401d4c8 to your computer and use it in GitHub Desktop.
jQuery(function($){
// Move total share count number
$('.ea-share-count-wrap').each(function(){
var count = $(this).find('.ea-share-count-button.included_total');
if( count.length ) {
$(count).find('.ea-share-count').prependTo(count).css('display', 'block');
}
});
});
<?php
/**
* SharedCount Icons
*
*/
function be_sharedcount_icons( $link ) {
$link['class'] = 'style-box';
if( 'included_total' == $link['type'] ) {
$link['icon'] = '';
$link['label'] = 'Shares';
} else {
$link['count'] = '';
$link['label'] = '';
}
return $link;
}
add_filter( 'ea_share_count_link', 'be_sharedcount_icons' );
.ea-share-count-button.style-box {
background: #47403A;
color: #fff;
display: block;
float: left;
width: 36px;
height: 36px;
text-align: center;
line-height: 32px;
margin-right: 5px;
}
.ea-share-count-wrap .ea-share-count-button.style-box:last-child {
margin-left: 0;
}
.ea-share-count-button.style-box:hover {
opacity: .8;
}
.ea-share-count-button.style-box.facebook {
background: #395B9A;
}
.ea-share-count-button.style-box.twitter {
background: #51AEF0;
}
.ea-share-count-button.style-box.linkedin {
background: #1F76B7;
}
.ea-share-count-button.style-box.google {
background: #DC4B3E;
}
.ea-share-count-button.style-box.pinterest {
background: #CE2428;
}
.ea-share-count-button.style-box.instagram {
background: #47403A;
}
.ea-share-count-button.style-box.stumbleupon {
background: #F24E23;
}
.ea-share-count-button.style-box.included_total {
background: transparent;
color: #000;
line-height: 1;
width: 48px;
}
.ea-share-count-button.style-box.included_total .ea-share-count {
display: none;
font-size: 18px;
font-weight: 700;
width: 48px;
}
.ea-share-count-button.style-box.included_total .ea-share-count-label {
font-size: 12px;
text-transform: uppercase;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment