/** * Prints a filter dropdown for a meta field with flexible input. * * @since 0.6.1 * @param string $column_slug the slug of the meta field column * @param WPPTD\Components\Field $field the field component * @param array $active_filters currently active filters and their values */ protected function render_meta_column_input_filter($column_slug, $field, $active_filters) { $options = Utility::get_all_meta_values($field->slug, $this->component->slug); echo '<select name="' . $column_slug . '" id="' . $column_slug . '" class="postform">'; echo '<option value="">' . esc_html($field->title) . ': ' . __('All', 'post-types-definitely') . '</option>'; foreach ($options as $option) { echo '<option value="' . esc_attr($option) . '"' . (isset($active_filters[$column_slug]) && $active_filters[$column_slug] == $option ? ' selected="selected"' : '') . '>'; echo $field->_field->parse($option, true); echo '</option>'; } echo '</select>'; }