Before we get WordPress involved at all, let's make sure that Digg's button works on a simple static page. If we can't make it work outside of WordPress, it's unlikely that we can make it work inside of WordPress. Take a look at the guide at http://about.digg.com/downloads/button/smart and get familiar with the sample code and the options available. We're going to try to make a simple static HTML page that implements a "Medium Smart Digg Button". According to Digg's documentation, all we need to do is add a bit of JavaScript to the document head and then use a special anchor tag on our page. Taking Digg's lead, the following is the HTML we've saved in a file named proof_of_concept.html
:
<html> <head> <title>Proof of Concept</title> <script type="text/javascript"> (function() { var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0]; s.type = 'text/javascript'; s.async = true; ...