Пример #1
0
 /**
  * There are several WP bugs that prevent correct activation in multisitie:
  *   http://core.trac.wordpress.org/ticket/14170
  *   http://core.trac.wordpress.org/ticket/14718) 
  * These bugs have been open for months.  A workaround is to just 'activate' the plugin whenever it runs 
  * (the tables are only created if they don't exist already)
  * 
  */
 function init()
 {
     // Load text domain
     load_plugin_textdomain('mappress', false, dirname($this->basename) . '/languages');
     // Create database tables if they don't exist
     Mappress_Map::db_create();
     // Check if database upgrade is needed
     $current_version = get_option('mappress_version');
     update_option('mappress_version', $this->version);
     if (!$current_version) {
         $this->activation_171();
     }
 }