Improved markup and a bit of refactoring to check for the presence of plugin functions.
Merge branch 'release/3.9.1.2'