Moved wpdb global call to the top.
Merge pull request #76 from methnen/feedback-faves-and-flags

Moved wpdb global call to the top.