<?php
add_theme_support('menus');
add_theme_support('post-thumbnails', array( 'post' ));
add_editor_style();
function DisplayPingTrackbacks() {
if(!dsq_is_installed()) return;
$current_post_ID = get_the_ID();
global $wpdb;
$sql = "SELECT comment_author_url, comment_author FROM $wpdb->comments WHERE comment_post_ID = $current_post_ID AND comment_approved = '1' AND (comment_type = 'pingback' OR comment_type = 'trackback') ORDER BY comment_date ASC";
if ($post_pingtrackbacks = $wpdb->get_results($sql) ) {
$number_of_pingtrackbacks = count($post_pingtrackbacks);
if ($number_of_pingtrackbacks == 1) {
echo "<div id='pingtrackback'><h3 style='font-size:14px;margin-bottom:10px'>En sidaa länkar hit</h3><ul>";
} else {
echo "<div id='pingtrackback'><h3 style='font-size:14px;margin-bottom:10px'>" . $number_of_pingtrackbacks . " sidor länkar hit</h3><ul>";
}
foreach ($post_pingtrackbacks as $post_pingtrackback) {
echo "\n<li><small><a href='";
echo $post_pingtrackback->comment_author_url;
echo "'>";
$author = $post_pingtrackback->comment_author;
echo html_entity_decode($author);
echo "</a>";
echo "</small></li>";
}
echo "</ul></div>";
}
}?>