* @link http://wp-dreams.com, http://codecanyon.net/user/anago/portfolio
* @copyright Copyright (c) 2014, Ernest Marcinko
*/
class wpdreamsCustomFSelect extends wpdreamsType {
function getType() {
parent::getType();
$this->processData();
echo "
";
echo "
";
echo "
";
echo "
";
}
function processData() {
$this->selects = array();
$this->selects = $this->data['selects'];
$this->selected = $this->data['value'];
}
final function getData() {
return $this->data;
}
final function getSelected() {
return $this->selected;
}
final function get_custom_fields_list() {
global $wpdb;
$ret = array();
$types = $wpdb->get_results("SELECT * FROM " . $wpdb->postmeta . " GROUP BY meta_key LIMIT 300", ARRAY_A);
if ($types != null && is_array($types)) {
foreach ($types as $k => $v) {
$_t = array();
$_t['option'] = $v['meta_key'];
$_t['value'] = $v['meta_key'];
$ret[] = $_t;
}
}
return $ret;
}
}
}