true]); if (!get_option('extendify_first_installed_version')) { update_option('extendify_first_installed_version', Sanitizer::sanitizeText(self::$version)); } // Here for backwards compatibility. if (isset($GLOBALS['extendify_sdk_partner']) && $GLOBALS['extendify_sdk_partner']) { self::$partnerId = $GLOBALS['extendify_sdk_partner']; } // Always use the partner ID if set as a constant. if (defined('EXTENDIFY_PARTNER_ID')) { self::$partnerId = constant('EXTENDIFY_PARTNER_ID'); } if (self::$partnerId && self::$partnerId !== 'no-partner') { self::$hasPartner = true; } // An easy way to check if we are in dev mode is to look for a dev specific file. $isDev = is_readable(EXTENDIFY_PATH . '.devbuild'); self::$environment = $isDev ? 'DEVELOPMENT' : 'PRODUCTION'; self::$launchCompleted = (bool) get_option('extendify_onboarding_completed', false); self::$showLaunch = $this->showLaunch(); } /** * Conditionally load Extendify Launch. * * @return boolean */ private function showLaunch() { // 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; } return constant('EXTENDIFY_SHOW_ONBOARDING') === true; } }