rtForm::get_select PHP Method

get_select() public method

Get rtmedia html input type select in admin options.
public get_select ( string/array $attributes = '' ) : string
$attributes string/array
return string
        public function get_select($attributes = '')
        {
            return $this->generate_select($attributes);
        }

Usage Example

 public static function selectBox($args)
 {
     global $rtmedia;
     $options = $rtmedia->options;
     $defaults = array('key' => '', 'desc' => '', 'default' => '', 'show_desc' => false, 'selects' => array());
     $args = wp_parse_args($args, $defaults);
     extract($args);
     if (!empty($key)) {
         $args['name'] = 'rtmedia-options[' . $key . ']';
     }
     $args['rtForm_options'] = array();
     foreach ($selects as $value => $key) {
         $args['rtForm_options'][] = array($key => $value, 'selected' => $default == $value ? true : false);
     }
     $chkObj = new rtForm();
     echo $chkObj->get_select($args);
 }
All Usage Examples Of rtForm::get_select