Functions which allow querying WordPress directly. Useful for AJAX callbacks.