Is there a class or function that anyone has came up with to utilize switching between WP and CP on plugin activation?
I know you can simply check for ‘if version < 4.9’ of a WP (or CP) install but has anyone found a smooth “system” to toggle the whole plugin to load only the CP “parts” (files/functions/classes) of a plugin if the instance is CP?
This is not real important but it would be a nice thing to have on activation and for the autoloader/loader class, to be able to detect and load separte instances of a plugin. (maybe… opinions?)
@viktor Yes, this will help. I guess it is all one really needs. If Boolean fails then I can assume it is WP and not CP - or - double up on WP by looking for version of WP if CP fails.
I just wasn’t sure if someone had a script written for a plugin activation callback. But thanks for the link and this thread can be closed if no one else has anything to add.