adds function to flush rewrite for CPTs and Taxonomies when switch the theme