The following is my code. I'm new to plugin development. I honestly feel like I've looked everywhere there is to look for a solution. More than likely it's something stupid, but I've been banging my head against the wall trying to figure out what's wrong with this. Any help is greatly appreciated. Thank you!
<?php
global $timesheetPluginInit;
$timesheetPluginInit = new TimesheetPluginInit();
class TimesheetPluginInit {
//Calls all init functions
function timesheet_init_plugin() {
$this->timesheet_create_dbs();
$this->timesheet_create_roles();
$this->timesheet_admin_bar_removal();
$this->timesheet_add_plugin_caps();
}
//create database tables
function timesheet_create_dbs() {
//....
}
//creates roles
function timesheet_create_roles(){
//...
}
//kills admin bar
function timesheet_admin_bar_removal(){
//...
}
//adds admin plugin capabilities
function timesheet_add_plugin_caps(){
//...
}
}
register_activation_hook( __FILE__, array( 'TimesheetPluginInit', 'timesheet_init_plugin' ) );
For the full code, here's a gist: https://gist.github.com/broskees/69590f9d0baa670bd71b4fb4f6c8b2ba