Getting user roles in plugin files
Figured my comment would actually make a better answer, so here we go. You can hook other methods within the plugin class onto admin_init (for the admin side) within the constructor, like so: class Plugin_Class { public function __construct() { add_action( ‘admin_init’, array( $this, ‘some_other_method’ ) ); } public function some_other_method() { // do something … Read more