Metro Share Styles
Published April 3rd, 2013 under Plugins
The Metro Share plugin is an excellent social sharing icon plugin for WordPress, created by my colleague Kaspars Dambis at Metronet.
The default styles of the Metro Share plugin may not be to your taste, so you can however modify the styling of the plugin via hooks. The following code demonstrates how to unhook the existing code and attach a replacement CSS file. If your theme relies on this plugin to function, then you can include this in your functions.php file. Alternatively, you could modify a demo plugin to create your own custom add-on plugin to modify the icons.
<?php /* * Dequeue Metro Share CSS file */ function metroshare_remove_styles() { wp_dequeue_style( 'metroshare-css' ); } add_action( 'wp_enqueue_scripts', 'metroshare_remove_styles', 11 ); /* * Change Metro Share to another CSS file */ function metroshare_add_styles() { wp_enqueue_style( 'metroshare-new-css', plugins_url( '/assets/metroshare.css', __FILE__ ) ); } add_action( 'wp_enqueue_scripts', 'metroshare_add_styles' ); ?>