showOnboarding(); self::$showAssist = self::$launchCompleted || self::$showOnboarding; // Add the config. // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents $config = file_get_contents(EXTENDIFY_PATH . 'config.json'); self::$config = json_decode($config, true); } /** * Conditionally load Extendify Launch. * * @return boolean */ private function showOnboarding() { // Always show it for dev mode. if (self::$environment === 'DEVELOPMENT') { return true; } // Currently we require a flag to be set. if (!defined('EXTENDIFY_SHOW_ONBOARDING')) { return false; } // Check if they disabled it and respect that. if (constant('EXTENDIFY_SHOW_ONBOARDING') === false) { return false; } return true; } }