insanelyBlog/plugins/facebook-comments/_plugin.php

11 lines
613 B
PHP
Raw Permalink Normal View History

<?php
addHead('<script>$(document).ready(function(){ $("article").append(\'<div class="fb-comments" data-href="'.get_current_link(true).'" data-width="100%" data-numposts="10" data-colorscheme="light"></div>\');});</script>', 'fb-comments');
addHead('<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
2016-06-18 10:07:35 +02:00
}(document, "script", "facebook-jssdk"));</script>', 'fb-root');