Example #1
0
 function ib_edu_update_check()
 {
     if (get_option('ib_educator_version') != IBEDUCATOR_VERSION) {
         require_once 'includes/ib-educator-install.php';
         $install = new IB_Educator_Install();
         $install->activate(false, false);
     }
 }
Example #2
0
<?php

$_tests_dir = getenv('WP_TESTS_DIR');
if (!$_tests_dir) {
    $_tests_dir = '/tmp/wordpress-tests-lib';
}
require_once $_tests_dir . '/includes/functions.php';
function _manually_load_plugin()
{
    // Set plugin options.
    update_option('ib_educator_learning', array('lesson_comments' => 1));
    require dirname(__FILE__) . '/../../ibeducator.php';
}
tests_add_filter('muplugins_loaded', '_manually_load_plugin');
require $_tests_dir . '/includes/bootstrap.php';
/* CUSTOM */
require dirname(__FILE__) . '/ib-educator-tests.php';
// Activate and setup the plugin.
activate_plugin('ibeducator/ibeducator.php');
require_once IBEDUCATOR_PLUGIN_DIR . 'includes/ib-educator-install.php';
$ibe_install = new IB_Educator_Install();
$ibe_install->activate();
Example #3
0
 /**
  * Plugin activation hook.
  */
 public static function plugin_activation()
 {
     require_once IBEDUCATOR_PLUGIN_DIR . 'includes/ib-educator-install.php';
     $install = new IB_Educator_Install();
     $install->activate();
 }