escaping and deprecated function  get_theme_data

Hi

I took the liberty to make a few changes.