Updated for WP 3.5