示例#1
0
 /**
  * Activate all BUP Plugins
  * 
  * @return NULL Check if it's site or multisite and activate.
  */
 public static function activatePlugin()
 {
     /*global $wpdb;
       if (function_exists('is_multisite') && is_multisite()) {
           $orig_id = $wpdb->blogid;
           $blog_id = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
           foreach ($blog_id as $id) {
               if (switch_to_blog($id)) {
                   installerBup::init();
               }
           }
           switch_to_blog($orig_id);
           return;
       } else {
           installerBup::init();
       }*/
     if (BUP_TEST_MODE) {
         add_action('activated_plugin', array(frameBup::_(), 'savePluginActivationErrors'));
     }
     installerBup::init();
 }
示例#2
0
文件: utils.php 项目: VSVS/vs_wp_4.0
 /**
  * Activate all BUP Plugins
  * 
  * @return NULL Check if it's site or multisite and activate.
  */
 public function activatePlugin()
 {
     /*global $wpdb;
       if (function_exists('is_multisite') && is_multisite()) {
           $orig_id = $wpdb->blogid;
           $blog_id = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
           foreach ($blog_id as $id) {
               if (switch_to_blog($id)) {
                   installerBup::init();
               } 
           }
           switch_to_blog($orig_id);
           return;
       } else {
           installerBup::init();
       }*/
     installerBup::init();
 }