Last active
August 29, 2015 14:01
-
-
Save bj-mcduck/89b55ff4ae2a69e2faa7 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: REW Twitter Feed Copy | |
Description: Sidebar Twitter feed | |
*/ | |
class RewTwitterFeedCopy extends WP_Widget | |
{ | |
function RewTwitterFeed() | |
{ | |
$widget_ops = array('classname' => 'RewTwitterFeed', 'description' => 'REW Twitter Feed Copy' ); | |
$this->WP_Widget('RewTwitterFeedCopy', 'REW Twitter Feed Copy', $widget_ops); | |
} | |
function widget($args, $instance) | |
{ | |
extract($args, EXTR_SKIP); | |
echo $before_widget; | |
?> | |
<a class="twitter-timeline" href="https://twitter.com/REWca" data-widget-id="385817024472952832">Tweets by @REWca</a> | |
<script> | |
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); | |
</script> | |
<?php | |
echo $after_widget; | |
} | |
} | |
add_action( 'widgets_init', create_function('', 'return register_widget("RewTwitterFeedCopy");') ); | |
?> |
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: REW Twitter Test Feed | |
Description: Sidebar Twitter feed | |
* | |
class RewTwitterFeed extends WP_Widget | |
{ | |
function RewTwitterFeed() | |
{ | |
$widget_ops = array('classname' => 'RewTwitterFeed', 'description' => 'REW Twitter Feed' ); | |
$this->WP_Widget('RewTwitterFeed', 'REW Twitter Test Feed', $widget_ops); | |
} | |
function widget($args, $instance) | |
{ | |
extract($args, EXTR_SKIP); | |
echo $before_widget; | |
?> | |
<a class="twitter-timeline" href="https://twitter.com/REWca" data-widget-id="385817024472952832">Tweets by @REWca</a> | |
<script> | |
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); | |
</script> | |
<?php | |
echo $after_widget; | |
} | |
} | |
add_action( 'widgets_init', create_function('', 'return register_widget("RewTwitterFeed");') ); | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment