Skip to content

Commit aea719b

Browse files
committed
Fixing the social buttons
Code updated for Twitter. Unsafe javascript warning coming from the G+ button can safely be ignored.
1 parent 4d6f775 commit aea719b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

loop.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,21 @@
136136
if( $sa_settings['social_buttons'] == '1' ) :
137137
?>
138138
<div class="post_social_buttons">
139+
139140
<iframe src="http://www.facebook.com/plugins/like.php?app_id=124765724272783&amp;href=<?php the_permalink(); ?>&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=lucida+grande&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:20px;" allowTransparency="true"></iframe>
140-
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
141+
142+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-count="horizontal">Tweet</a>
143+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
141144

142-
<div class="g-plusone" data-size="medium" data-href="<?php the_permalink(); ?>"></div>
145+
<g:plusone size="medium" href="<?php the_permalink(); ?>"></g:plusone>
143146
<script type="text/javascript">
144147
(function() {
145148
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
146149
po.src = 'https://apis.google.com/js/plusone.js';
147150
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
148151
})();
149152
</script>
153+
150154
</div>
151155
<?php endif; ?>
152156

single.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
</div>
7575

7676
<div class="box_count">
77-
<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
77+
<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-count="vertical">Tweet</a>
78+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
7879
</div>
7980

8081
<div class="box_count">

0 commit comments

Comments
 (0)