<?php class ReduxFramework_radio extends ReduxFramework{	
	
	/**
	 * Field Constructor.
	 *
	 * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
	 *
	 * @since ReduxFramework 1.0.0
	*/
	function __construct($field = array(), $value ='', $parent){
		
		parent::__construct($parent->sections, $parent-&gt;args, $parent-&gt;extra_tabs);
		$this-&gt;field = $field;
		$this-&gt;value = $value;
		//$this-&gt;render();
		
        if( !empty( $this-&gt;field['data'] ) &amp;&amp; empty( $this-&gt;field['options'] ) ) {
			if (empty($this-&gt;field['args'])) {
				$this-&gt;field['args'] = array();
			}        	
        	$this-&gt;field['options'] = $parent-&gt;get_wordpress_data($this-&gt;field['data'], $this-&gt;field['args']);
        }
        $this-&gt;field['data_class'] = ( isset($this-&gt;field['multi_layout']) ) ? 'data-'.$this-&gt;field['multi_layout'] : 'data-full';

	}//function
	
	
	
	/**
	 * Field Render Function.
	 *
	 * Takes the vars and outputs the HTML for the field in the settings
	 *
	 * @since ReduxFramework 1.0.0
	*/
	function render(){
		
		if (!empty($this-&gt;field['options'])) {

			echo '<ul class="'.$this-&gt;field['data_class'].'">';
			
			foreach($this-&gt;field['options'] as $k =&gt; $v){
				
				echo '<li>';
				echo '<label for="'.$this-&gt;field['id'].'_'.array_search($k,array_keys($this-&gt;field['options'])).'">';
				echo '<input type="radio" class="radio' . $this-&gt;field['class'] . '" id="'.$this-&gt;field['id'].'_'.array_search($k,array_keys($this-&gt;field['options'])).'" name="'.$this-&gt;args['opt_name'].'['.$this-&gt;field['id'].']" value="'.$k.'">value, $k, false).'/&gt;';
				echo ' <span>'.$v.'</span>';
				echo '</label>';
				echo '</li>';
				
			}//foreach
				
			echo '</ul>';		

		}

	}//function
	
}//class