* @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio * @copyright Copyright (c) 2014, Ernest Marcinko */ class wpdreamsCustomSelect extends wpdreamsType { private $selects, $selected, $iconMsg, $icon = 'none'; public function getType() { parent::getType(); $this->processData(); echo "
"; echo ""; if ( $this->icon != 'none' ) { ?> name . "'>"; foreach ($this->selects as $sel) { $disabled = isset($sel['disabled']) ? ' disabled' : ''; if (is_array($sel)) { if (($sel['value'] . "") == ($this->selected . "")) echo ""; else echo ""; } else { if (($sel . "") == ($this->selected . "")) echo ""; else echo ""; } } echo ""; echo "
"; } public function processData() { $this->iconMsg = array( 'phone' => __('Phone devices, on 0px to 640px widths', 'ajax-search-pro'), 'tablet' => __('Tablet devices, on 641px to 1024px widths', 'ajax-search-pro'), 'desktop' => __('Desktop devices, 1025px width and higher', 'ajax-search-pro') ); $this->selects = array(); $this->icon = $this->data['icon'] ?? $this->icon; $this->selects = $this->data['selects']; $this->selected = $this->data['value']; } public final function getData() { return $this->data; } public final function getSelected() { return $this->selected; } } }