When is is_admin() available?
I see a lot of plugins that consist of a class that is instantiated in the same file, eg: class My_Plugin { function __construct() { add_action(‘init’, array( __CLASS__, ‘baz’ ) ); } static function baz() { // some stuff that should happen in admin } } new My_Plugin(); Now, it would work to wrap the … Read more