public function __construct() { parent::__construct(); $this->optionsArrayName = EPR_PRO_MAIN_OPTIONS_ARRAY_NAME; $this->defaults = erpPRODefaults::$mainOpts + erpPRODefaults::$comOpts; $this->loadOptions(); }
public function __construct() { parent::__construct(); $this->optionsArrayName = erpPROShortCodeOpts::$shortCodeProfilesArrayName; $profiles = get_option(erpPROShortCodeOpts::$shortCodeProfilesArrayName); $this->profiles = is_array($profiles) ? $profiles : array(); $this->defaults = erpPRODefaults::$shortCodeOpts + erpPRODefaults::$comOpts; }
public function __construct(array $instance = NULL) { parent::__construct(); $this->optionsArrayName = 'widget_' . erpPRODefaults::erpPROWidgetOptionsArrayName; $this->defaults = erpPRODefaults::$widOpts + erpPRODefaults::$comOpts; if ($instance !== NULL && !empty($instance)) { $this->options = $instance; } else { $this->options = $this->defaults; } }