Inpsyde\MultilingualPress\API\WPDBLanguages::get_fields PHP Method

get_fields() private method

Returns the according string with all valid fields included in the given arguments, or '*' if none.
private get_fields ( array $args ) : string
$args array Arguments.
return string The according string with all valid fields included in the given arguments, or '*' if none.
    private function get_fields(array $args)
    {
        if (!empty($args['fields'])) {
            $allowed_fields = array_intersect((array) $args['fields'], array_keys($this->fields));
            if ($allowed_fields) {
                return implode(', ', esc_sql($allowed_fields));
            }
        }
        return '*';
    }