Location: PHPKode > scripts > Minecraft Admin > minecraft-admin/loader.php
<?php
/*
Plugin Name: Minecraft Admin
Plugin URI: http://profenter.de/portal/gruppen/minecraft-admin-fur-wordpress/frontpage/
Description:“Minecraft Admin for Wordpress” is a plugin for Wordpress, you can configure and manage your Minecraft/Bukkit Server with your wordpress blog.
Version: 0.6.5
Author: Profenter Games
Author URI: http://profenter.de
*/
if (!defined('ABSPATH'))
		exit;
define('MC_VERSION', '0.6.5');
define('MC_PLUGIN_DIR', dirname(plugin_basename(__FILE__)));
define('MC_OPTION_NAME', 'MC_ADMIN');
class MCA {
		function __construct() {
				load_plugin_textdomain('minecraft-admin', false, dirname(plugin_basename(__FILE__)) . '/languages/');
				$this->load = array(
						'mc-core'
				);
				$this->load_option();
				$this->load();
				$this->init();
		}
		function __destruct() {
		}
		function save($MC = false, $parameter = "replace") {
				if ($MC) {
						if ($parameter == "replace") {
								update_option('MC', $MC);
								$this->MC = (object) $MC;
						} //$parameter == "replace"
						elseif ($parameter == "add") {
								$new_MC = (object) array_merge((array) $this->MC, (array) $MC);
								update_option('MC', (array) $new_MC);
								$this->MC = (object) $new_MC;
						} //$parameter == "add"
				} //$MC
		}
		function load() {
				foreach ($this->load as $id => $plugin) {
						if (is_file(WP_PLUGIN_DIR . '/' . MC_PLUGIN_DIR . '/includes/' . $plugin . '.php')) {
								$plugins = str_replace("mc-", "", $plugin);
								if ($this->MC->$plugins->aktive == "ja") {
										include_once(dirname(__FILE__) . '/includes/' . $plugin . '.php');
								} //empty($this->MC->$plugin->aktive) or $this->MC->$plugin->aktive == true
						} //is_file(WP_PLUGIN_DIR . '/' . MC_PLUGIN_DIR . '/' . $plugin . '.php')
						else {
								die(__('MC-ERROR: The MC component ' . $plugin . ' couldn\'t be load. Please check your path settings.', 'minecraft-admin'));
						}
				} //$this->load as $id => $plugin
		}
		function init() {
				foreach ($this->load as $id => $plugin) {
						$plugins = str_replace("mc-", "", $plugin);
						if ($this->MC->$plugins->aktive == "ja") {
								$plugin                 = str_replace("-", "_", $plugin);
								$class                  = 'MC_' . $plugin;
								$this->plugins->$plugin = new $class($this->MC);
								$this->plugins->$plugin->save();
						} //$this->MC->$plugins->aktive == "ja"
				} //$this->load as $id => $plugin
		}
		function load_option() {
				$MC = (object) maybe_unserialize((object) get_option('MC'));
				if (empty($MC) or !isset($MC->version) or $MC->version != MC_VERSION) {
						$MC          = new stdClass;
						$MC->version = MC_VERSION;
						add_option(MC_OPTION_NAME, (array) $MC);
						update_option(MC_OPTION_NAME, (array) $MC);
						$MC = (object) maybe_unserialize((object) get_option('MC'));
				} //empty($MC)
				foreach ($this->load as $id => $plugin) {
						$plugins = str_replace("mc-", "", $plugin);
						if (empty($MC->$plugins)) {
								$MC->$plugins         = new stdClass;
								$MC->$plugins->aktive = "ja";
						} //empty($MC->$plugins)
				} //$this->load as $id => $plugin
				if (!isset($MC->server)) {
						$MC->server = new stdClass;
				} //empty($this->MC->games)
				if (!isset($MC->server->installed)) {
						$MC->server->installed = "nein";
				} //empty($this->MC->games)
				$this->MC = (object) $MC;
		}
		function includes($pfad, $includes) {
				foreach ($includes as $id => $path) {
						if (is_file($pfad . $path)) {
								include_once($pfad . $path);
						} //is_file(WP_PLUGIN_DIR . '/' . MC_PLUGIN_DIR . '/' . $plugin . '.php')
						else {
								die(__('MC-ERROR: The MC component file ' . $pfad . $path . ' couldn\'t be load. Please check your path settings.', 'minecraft-admin'));
						}
				} //$includes as $id => $path
		}
}
function INIT_MCA() {
		$init_minecraft = new MCA();
}
add_action('init', 'INIT_MCA');
Return current item: Minecraft Admin