";
} else {
$commentcount = "";
}
$commentcount .= " ".$options['countmsg']."
";
}
if ($options['title'] != '') {
if ($options['titleclass'] == '') {
$commenttitle = "";
} else {
$commenttitle = "";
}
$commenttitle .= $options['title']."
";
}
//$content .= "".$commenttitle.$commentcount;
$content .= $commenttitle.$commentcount;
if ($options['html5'] == 'on') {
$content .= "";
} else {
$content .= "";
}
}
return $content;
}
add_filter ('the_content', 'fbcommentbox', 100);
function fbcommentshortcode($fbatts) {
extract(shortcode_atts(array(
"fbcomments" => get_option('fbcomments'),
"url" => get_permalink(),
), $fbatts));
if (!empty($fbatts)) {
foreach ($fbatts as $key => $option)
$fbcomments[$key] = $option;
}
if ($fbcomments[count] == 'on') {
if ($fbcomments[countstyle] == '') {
$commentcount = "
";
} else {
$commentcount = "
";
}
if ($fbcomments[title] != '') {
if ($fbcomments[titleclass] == '') {
$commenttitle = "";
} else {
$commenttitle = "";
}
$fbcommentbox = $commenttitle.$commentcount;
if ($fbcomments[html5] == 'on') {
$fbcommentbox .= "";
} else {
$fbcommentbox .= "";
}
if (!empty($fbcomments[linklove])) {
$fbcommentbox .= '
Powered by Facebook Comments
';
}
return $fbcommentbox;
}
add_filter('widget_text', 'do_shortcode');
add_shortcode('fbcomments', 'fbcommentshortcode');
?>