/** * Loads profile options from database and creates options object * @return boolean true if profile was found, false otherwise * @author Panagiotis Vagenas <*****@*****.**> * @since 1.0.0 */ private function loadProfileOptions() { if (empty($this->profile)) { return false; } erpPROPaths::requireOnce(erpPROPaths::$erpPROShortCodeOpts); $profiles = get_option(erpPROShortCodeOpts::$shortCodeProfilesArrayName); if (empty($profiles) || empty($profiles[$this->profile])) { return false; } $erpOptions = erpPRODefaults::$comOpts + erpPRODefaults::$shortCodeOpts; $this->optObj = new erpPROShortCodeOpts(); $this->optObj->loadOptions($this->profile); return $this->optObj->isProfileLoaded(); }