#is', $http_result, $captures); return ($captures[1] == $the_permalink); } function digg_this() { global $id; $digg_link = get_post_meta($id, 'DIGG_CLASS_digg_link', true); if (is_single() && !$digg_link && preg_match('#^http://(www\.)?digg\.com/.+#i', $_SERVER['HTTP_REFERER']) && !preg_match('#^http://(www\.)?digg\.com/(view|users)#i', $_SERVER['HTTP_REFERER']) && _scrape_check_digg($_SERVER['HTTP_REFERER'], get_permalink())) { add_post_meta($id, 'DIGG_CLASS_digg_link', $_SERVER['HTTP_REFERER']); $digg_link = $_SERVER['HTTP_REFERER']; } if ($digg_link) { ?>