public static function checkbox($args, $echo = true)
{
global $rtmedia;
$options = $rtmedia->options;
$defaults = array('key' => '', 'desc' => '', 'show_desc' => false);
$args = wp_parse_args($args, $defaults);
extract($args);
if (!isset($value)) {
trigger_error(__('Please provide "value" in the argument.', 'rtmedia'));
return;
}
if (!empty($key)) {
$args['name'] = 'rtmedia-options[' . $key . ']';
}
$args['rtForm_options'] = array(array('' => 1, 'checked' => $value));
$chkObj = new rtForm();
// echo $chkObj->get_checkbox($args);
if ($echo) {
echo $chkObj->get_switch($args);
} else {
return $chkObj->get_switch($args);
}
// echo $chkObj->get_switch_square($args);
}