/** * Removes data/procedures associated with this class. * * @param boolean $confirmation Defaults to FALSE. Set this to TRUE as a confirmation. * If this is FALSE, nothing will happen; and this method returns FALSE. * * @return boolean TRUE if successfully uninstalled. * * @see deps_x_xd_v141226_dev::___uninstall___() * * @throws exception If invalid types are passed through arguments list. */ public static function ___uninstall___($confirmation = FALSE) { if (!is_bool($confirmation)) { throw new exception(sprintf(xd_v141226_dev::__('Invalid arguments: `%1$s`'), print_r(func_get_args(), TRUE))); } if (!$confirmation) { return FALSE; } // Added security. delete_option('xd__deps__last_ok'); delete_option('xd__deps__notice__dismissals'); if (!class_exists('deps_x_xd_v141226_dev')) { require_once dirname(__FILE__) . '/deps-x.php'; } $x = new deps_x_xd_v141226_dev(); return $x->___uninstall___(TRUE); }
<?php /** * XDaRk Core (WP plugin). * * Copyright: © 2012 (coded in the USA) * {@link http://www.websharks-inc.com XDaRk} * * @author JasWSInc * @package XDaRk\Core * @since 130310 */ if (!defined('WPINC')) { exit('Do NOT access this file directly: ' . basename(__FILE__)); } /* * Load dependency utilities. */ $GLOBALS['autoload_xd_v141226_dev'] = FALSE; require_once dirname(__FILE__) . '/stub.php'; require_once xd_v141226_dev::deps(); /* * Check dependencies (and load framework; if possible). */ if (deps_xd_v141226_dev::check(xd_v141226_dev::$core_name, dirname(__FILE__)) === TRUE) { require_once xd_v141226_dev::framework(); }
/** * Initializes XDaRk Core stub. * * @return boolean Returns the `$initialized` property w/ a TRUE value. * * @throws exception If attempting to run the XDaRk Core from a root directory. */ public static function initialize() { if (self::$initialized) { return TRUE; } // Initialized already. /* * Do NOT run this file from a root directory. */ if (substr(self::n_dir_seps_up(__FILE__, 1, TRUE), -1) === '/') { throw new exception(sprintf(self::__('This file should NOT be accessed from a root directory: `%1$s`'), __FILE__)); } /* * Handle some dynamic regex replacement codes in class properties (as follows). */ $webshark_home_dir = !empty($_SERVER['WEBSHARK_HOME']) ? (string) $_SERVER['WEBSHARK_HOME'] : '/webshark/home'; self::$local_wp_dev_dir = str_replace('%%$_SERVER[WEBSHARK_HOME]%%', $webshark_home_dir, self::$local_wp_dev_dir); self::$local_core_repo_dir = str_replace('%%$_SERVER[WEBSHARK_HOME]%%', $webshark_home_dir, self::$local_core_repo_dir); self::$regex_valid_core_ns_version = str_replace('%%self::$core_ns_stub_v%%', preg_quote(self::$core_ns_stub_v, '/'), self::$regex_valid_core_ns_version); self::$regex_valid_core_ns_version_with_dashes = str_replace('%%self::$core_ns_stub_v_with_dashes%%', preg_quote(self::$core_ns_stub_v_with_dashes, '/'), self::$regex_valid_core_ns_version_with_dashes); /* * Easier access for those who DON'T CARE about the version (PHP v5.3+ only). */ if (!class_exists(self::$core_ns_stub . '__stub') && function_exists('class_alias')) { class_alias(__CLASS__, self::$core_ns_stub . '__stub'); } return self::$initialized = TRUE; }