/** * Return Instance * * @since 3.0 * @access public */ public static function getInstance() { // check if instance is avaible if (self::$__instance == null) { // create new instance if not self::$__instance = new self(); } return self::$__instance; }
# Definitions if (!defined('QMCV_PLUGIN_NAME')) { $basename = trim(dirname(plugin_basename(__FILE__)), '/'); if (!is_dir(WP_PLUGIN_DIR . '/' . $basename)) { $basename = explode('/', $basename); $basename = array_pop($basename); } define('QMCV_PLUGIN_NAME', $basename); if (!defined('QMCV_PLUGIN_BASE')) { define('QMCV_PLUGIN_BASE', WP_PLUGIN_DIR . '/' . QMCV_PLUGIN_NAME . '/' . basename(__FILE__)); } if (!defined('QMCV_PLUGIN_DIR')) { define('QMCV_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . QMCV_PLUGIN_NAME); } if (!defined('QMCV_CLASS_DIR')) { define('QMCV_CLASS_DIR', WP_PLUGIN_DIR . '/' . QMCV_PLUGIN_NAME . '/classes/'); } if (!defined('QMCV_VIEW_DIR')) { define('QMCV_VIEW_DIR', WP_PLUGIN_DIR . '/' . QMCV_PLUGIN_NAME . '/views/'); } if (!defined('QMCV_ASSETS_URL')) { define('QMCV_ASSETS_URL', plugin_dir_url(__FILE__) . 'assets/'); } } # Load Classes include_once QMCV_CLASS_DIR . 'wp-hack/abstract.admin_page.php'; include_once QMCV_CLASS_DIR . 'check_variables_options.php'; include_once QMCV_CLASS_DIR . 'io.php'; include_once QMCV_CLASS_DIR . 'init.php'; QMCV::initialize();