diff --git a/lib/requests/params_post_list.dart b/lib/requests/params_post_list.dart index 3ada10b..61daf6c 100644 --- a/lib/requests/params_post_list.dart +++ b/lib/requests/params_post_list.dart @@ -25,6 +25,7 @@ class ParamsPostList { final List includeTags; final List excludeTags; final bool? sticky; + final List fields; ParamsPostList({ this.context = WordPressContext.view, @@ -47,6 +48,7 @@ class ParamsPostList { this.includeTags = const [], this.excludeTags = const [], this.sticky, + this.fields = const [], }); Map toMap() { @@ -71,6 +73,7 @@ class ParamsPostList { 'tags': '${listToUrlString(includeTags)}', 'tags_exclude': '${listToUrlString(excludeTags)}', 'sticky': '${this.sticky == null ? '' : this.sticky}', + '_fields': this.fields.join(',') }; } @@ -98,7 +101,8 @@ ParamsPostList copyWith({ postStatus: postStatus, searchQuery: searchQuery, slug: slug, - sticky: sticky + sticky: sticky, + fields: fields, ); }