Get the Flattr WordPress plugin ready for HTML5

If you are using the Flattr WordPress plugin you can choose between three different modes of button presentation:

  • Dynamic javascript version
  • Static image version
  • Static text version

If you choose one of the static variants everything is fine using HTML5 markup. Now, if you choose the Dynamic javascript version this will result in an non-valid source code. The reason for that is that the rel attribute is no longer supported in HTML5, what is also said on the Flattr website. However, the fix for that issue is quite simple. Just replace the function getButtonCode (line 644) in the flattr.php in the plugins directory. Note that I don’t check for empty values for the category and the tags field anymore, as my workflow does not include empty categories or tags.

Now your markup should be valid.