Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created August 10, 2016 18:05
Show Gist options
  • Save billerickson/37b88e3c3a7c06f1ab9e4a66ac34b302 to your computer and use it in GitHub Desktop.
Save billerickson/37b88e3c3a7c06f1ab9e4a66ac34b302 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Icon Styles for EA Share Count
* Description: This adds an icon-only style option to the EA Share Count plugin.
* Version: 1.0.0
* Author: Bill Erickson
*/
/**
* Add Icons style in EA Share Count
*
*/
function ea_icons_style_in_easc( $styles ) {
$styles['icons'] = 'Icons';
return $styles;
}
add_filter( 'ea_share_count_styles', 'ea_icons_style_in_easc' );
/**
* Add CSS
*
*/
function ea_icons_style_css() {
$css = ".ea-share-count-button.style-icons .ea-share-count-label {display: none; }"
wp_add_inline_style( 'ea-share-count', $css );
}
add_action( 'wp_enqueue_scripts', 'ea_icons_style_css' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment