-
-
Save billerickson/37b88e3c3a7c06f1ab9e4a66ac34b302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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