I know this has been asked before however my question is different.
So. I have a plugin that creates custom post types on the fly. the plugin also has a function to create template files for each of those custom post types.
it simply goes to those theme folder and create template page for each of the current theme. this works perfectly for the current themes. however what happened if the admin added another theme and active it ?
So i am looking for a way to detect activation and then run the function to create the template page for that theme.
My first idea was to check theme activation hook which i dont think going to work.
Anyone with a different idea ?