Introduce require_if_theme_supports(), move post thumbnails functions to there own include and only included them if the theme supports them. See #10928 and [12132]