| Server IP : 188.114.97.2 / Your IP : 104.23.197.231 Web Server : Apache/2.4.59 (Debian) System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : edlftp ( 1002) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/nicolasj/www/blog.ecoledelangues.be/wp-content/themes/metro/functions/ |
Upload File : |
<?php
function om_facebook_ids_add() {
$admin_id=get_option(OM_THEME_PREFIX . 'fb_comments_admin_id');
$app_id=get_option(OM_THEME_PREFIX . 'fb_comments_admin_id');
if($admin_id)
echo '<meta property="fb:admins" content="'.$admin_id.'"/>';
if($app_id)
echo '<meta property="fb:app_id" content="'.$app_id.'"/>';
}
add_action('wp_head', 'om_facebook_ids_add');
function om_facebook_comments() {
$count=get_option( OM_THEME_PREFIX . 'fb_comments_count' );
$color=get_option( OM_THEME_PREFIX . 'fb_comments_color' );
$count=intval($count);
if(!$count)
$count=2;
if($color == 'dark')
$color=' data-colorscheme="dark"';
else
$color='';
?>
<div class="clear anti-mar"> </div>
<!-- FB Comments -->
<div class="block-full bg-color-main">
<div class="block-inner">
<div class="widget-header"><?php _e('Comments', 'om_theme') ?></div>
<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/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="<?php the_permalink() ?>" data-num-posts="<?php echo $count; ?>" data-width="300"<?php echo $color; ?>></div>
</div>
</div>
<!-- /FB Comments -->
<?php
}