Use WordPress API to generate page dropdowns.

Update Issue 683
Status: Fixed