public function update($new, $old) { $new = parent::update($new, $old); $new['random_order'] = intval($new['random_order']) == 1 ? 1 : 0; return $new; }
public function __construct() { parent::__construct(_x('Business Directory - Random Listings', 'widgets', 'WPBDM'), _x('Displays a list of random listings from the Business Directory.', 'widgets', 'WPBDM')); $this->set_default_option_value('title', _x('Random Listings', 'widgets', 'WPBDM')); }
public function __construct() { parent::__construct(_x('Business Directory - Latest Listings', 'widgets', 'WPBDM'), _x('Displays a list of the latest listings in the Business Directory.', 'widgets', 'WPBDM')); $this->set_default_option_value('title', _x('Latest Listings', 'widgets', 'WPBDM')); }