choices)) return; $name = $this->id; $value = $this->value(); ?> label)): ?> label); ?> description)): ?> description; ?> '; foreach($this->choices as $list_key => $list_value){ $selected = ''; if($list_key == $value) $selected = ' class="cpotheme-imagelist-selected"'; $output .= ''; } $output .= ''; echo $output; } } class CPO_Customize_Collection_Control extends WP_Customize_Control { public function render_content(){ if(empty($this->choices)) return; $name = $this->id; $value = $this->value(); ?> label)): ?> label); ?> description)): ?> description; ?> '; foreach($value as $current_key => $current_value){ $counter++; $output .= '
'; foreach($this->choices as $list_key => $list_value){ //Save field data-- collections can be of any field type $field_name = $name.'['.$current_key.']['.$list_key.']'; $field_type = isset($list_value['type']) ? $list_value['type'] : 'text'; $field_width = isset($list_value['width']) ? $list_value['width'] : '100'; $field_args = isset($list_value['args']) ? $list_value['args'] : null; $field_options = isset($list_value['option']) ? $list_value['option'] : null; $field_value = isset($current_value[$list_key]) ? $current_value[$list_key] : ''; $output .= '
'; //Display corresponding type of field if($field_type == 'text'){ if(isset($field_args['placeholder'])) $field_placeholder = ' placeholder="'.$field_args['placeholder'].'"'; else $field_placeholder = ''; $output .= 'get_link().' value="'.$field_value.'" name="'.$field_name.'" id="'.$field_name.'"'.$field_placeholder.'/>'; }elseif($field_type == 'select'){ $field_class = (isset($field_args['class']) ? $field_args['class'] : ''); $output .= ''; } $output .= '
'; } $output .= ''.__('Remove', 'cpocore').''; $output .= '
'; } $output .= '
'; $output .= ''.__('Add Row', 'cpocore').''; $output .= '
'; $output .= ''; echo $output; } } class CPO_Customize_Label_Control extends WP_Customize_Control { public function render_content(){ $name = $this->id; $value = $this->value(); ?> label)): ?> label); ?> description)): ?> description; ?>