Update WordPress API with fix for #115 and #238