Fixes for WordPress 3.9
Merge branch 'v1.2'