Skip to content

Commit

Permalink
add component class from imadalin
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwach committed Jun 5, 2014
1 parent ce875c1 commit b7a9e07
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions component/component.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

if ( !\defined( 'ABSPATH' ) ) { exit; }

class BPSP_Courseware_Component extends BP_Component {
function __construct() {
global $bp;

parent::start(
'courseware',
__( 'Courseware', 'bpsp' ),
BPSP_PLUGIN_DIR
);

$bp->active_components[$this->id] = '1';

add_action( 'init', array( &$this, 'bpsp_registration' ) );

add_action( 'bp_init', array( &$this, 'bpsp_init' ), 6 );
}

/* Initiate the componenets */
function bpsp_init() {
new BPSP_WordPress();
new BPSP_Roles();
new BPSP_Groups();
new BPSP_Courses();
new BPSP_Lectures();
new BPSP_Assignments();
new BPSP_Responses();
new BPSP_Gradebook();
new BPSP_Bibliography();
new BPSP_Schedules();
new BPSP_Dashboards();
new BPSP_Static();
new BPSP_Activity();
new BPSP_Notifications();
}

/**
* Register post types and taxonomies
*/
function bpsp_registration() {
BPSP_Courses::register_post_types();
BPSP_Lectures::register_post_types();
BPSP_Assignments::register_post_types();
BPSP_Responses::register_post_types();
BPSP_Gradebook::register_post_types();
BPSP_Bibliography::register_post_types();
BPSP_Schedules::register_post_types();
}
}

0 comments on commit b7a9e07

Please sign in to comment.