public function plugin_callback() { $options = ""; foreach ($this->plugins as $plugin) { //print_r($plugin); if (AfterShip_Dependencies::plugin_active_check($plugin['path'])) { $option = '<option value="' . $plugin['value'] . '"'; if (isset($this->options['plugin']) && esc_attr($this->options['plugin']) == $plugin['value']) { $option .= ' selected="selected"'; } $option .= '>' . $plugin['label'] . '</option>'; $options .= $option; } } printf('<select id="plugin" name="aftership_option_name[plugin]" class="aftership_dropdown">' . $options . '</select>'); }