fix #1231: null check WordPress.currentPost