Skip to content

Instantly share code, notes, and snippets.

@theukedge
Created September 14, 2013 21:25
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 theukedge/6565784 to your computer and use it in GitHub Desktop.
Save theukedge/6565784 to your computer and use it in GitHub Desktop.
<?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