Created
September 14, 2013 21:25
-
-
Save theukedge/6565784 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 | |
// SOCIAL MEDIA WIDGET // | |
class diww_social_widget extends WP_Widget { | |
function __construct() { | |
parent::__construct(false, $name = 'Social icons', array( 'description' => 'Sidebar widget showing DIWW social icons.' ) ); | |
} | |
function widget( $args, $instance ) { ?> | |
<div id="social-widget"> | |
<a href="<?php bloginfo('wpurl'); ?>/go/facebook" id="fbicon" title="<?php bloginfo('name'); ?> on Facebook" target="_blank"></a> | |
<a href="http://www.twitter.com/daclements" id="twittericon" title="<?php bloginfo('name'); ?> on Twitter" target="_blank"></a> | |
<a href="<?php bloginfo('wpurl'); ?>/go/newsletter" id="emailicon" title="<?php bloginfo('name'); ?> Newsletter & new posts by email" target="_blank"></a> | |
<a href="<?php bloginfo('wpurl'); ?>/feed/" id="rssicon" title="<?php bloginfo('name'); ?> RSS Feed" target="_blank"></a> | |
<a href="<?php bloginfo('wpurl'); ?>/go/googleplus" id="gplusicon" title="<?php bloginfo('name'); ?> on Google+" target="_blank"></a> | |
</div> | |
<?php } | |
}; | |
add_action( 'widgets_init', create_function( '', 'return register_widget( "diww_social_widget" );' ) ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment