Ejemplo n.º 1
0
 function mycred_plugin_activation()
 {
     // Load Installer
     require_once myCRED_INCLUDES_DIR . 'mycred-install.php';
     $install = new myCRED_Install();
     // Compatibility check
     $install->compat();
     // First time activation
     if ($install->ver === false) {
         $install->activate();
     } else {
         $install->reactivate();
     }
     // Add Cron Schedule
     if (!wp_next_scheduled('mycred_reset_key')) {
         $frequency = apply_filters('mycred_cron_reset_key', 'daily');
         wp_schedule_event(date_i18n('U'), $frequency, 'mycred_reset_key');
     }
 }
Ejemplo n.º 2
0
 function mycred_plugin_activation()
 {
     // Load Installer
     require_once myCRED_INCLUDES_DIR . 'mycred-install.php';
     $install = new myCRED_Install();
     // Compatibility check
     $install->compat();
     // First time activation
     if ($install->ver === false) {
         $install->activate();
     } else {
         $install->reactivate();
     }
 }