Ejemplo n.º 1
0
// Register the quizzes service.
function edr_get_quizzes_service()
{
    return new Edr_Quizzes();
}
Edr_Manager::add('edr_quizzes', 'edr_get_quizzes_service');
// Setup the memberships feature.
Edr_MembershipsRun::init();
// Setup the post types and taxonomies.
Edr_PostTypes::init();
// Setup Educator.
IB_Educator_Main::init();
// Ajax actions.
Edr_AjaxActions::init();
// Setup account processing (e.g. payment form).
Edr_StudentAccount::init();
// Parse incoming requests (e.g. PayPal IPN).
Edr_RequestDispatcher::init();
if (is_admin()) {
    // Setup the Educator's admin.
    Edr_Admin::init();
    // Check whether to run the update script or not.
    function ib_edu_update_check()
    {
        if (get_option('ib_educator_version') != IBEDUCATOR_VERSION) {
            $install = new Edr_Install();
            $install->activate(false, false);
        }
    }
    add_action('init', 'ib_edu_update_check', 9);
}