Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit e2b75a8

Browse files
authored
Merge pull request #640 from wordpress-mobile/task/add-tag-parameter-revert
Add tag parameter (again)
2 parents c314cbe + 5e25997 commit e2b75a8

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

CHANGELOG.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ _None._
3636

3737
_None._
3838

39-
### New Features
40-
41-
_None._
42-
4339
### Bug Fixes
4440

4541
_None._
@@ -48,6 +44,16 @@ _None._
4844

4945
_None._
5046

47+
### New Features
48+
49+
- Add `tag` parameter to `PostServiceRemoteOptions` [#634]
50+
51+
## 8.10.0
52+
53+
### New Features
54+
55+
- Add optional `tag` parameter to `PostServiceRemoteOptions` [#640]
56+
5157
## 8.9.1
5258

5359
### Bug Fixes

WordPressKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'WordPressKit'
5-
s.version = '8.9.1'
5+
s.version = '8.10.0'
66

77
s.summary = 'WordPressKit offers a clean and simple WordPress.com and WordPress.org API.'
88
s.description = <<-DESC

WordPressKit/PostServiceRemoteOptions.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,10 @@ typedef NS_ENUM(NSUInteger, PostServiceResultsOrdering) {
7777
*/
7878
- (NSString *)meta;
7979

80+
/**
81+
The tag to filter by.
82+
*/
83+
@optional
84+
- (NSString *)tag;
85+
8086
@end

WordPressKit/PostServiceRemoteREST.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
static NSString * const RemoteOptionKeySearch = @"search";
1818
static NSString * const RemoteOptionKeyAuthor = @"author";
1919
static NSString * const RemoteOptionKeyMeta = @"meta";
20+
static NSString * const RemoteOptionKeyTag = @"tag";
2021

2122
static NSString * const RemoteOptionValueOrderAscending = @"ASC";
2223
static NSString * const RemoteOptionValueOrderDescending = @"DESC";
@@ -418,7 +419,10 @@ - (NSDictionary *)dictionaryWithRemoteOptions:(id <PostServiceRemoteOptions>)opt
418419
if (options.meta.length > 0) {
419420
[remoteParams setObject:options.meta forKey:RemoteOptionKeyMeta];
420421
}
421-
422+
if ([options respondsToSelector:@selector(tag)] && options.tag.length > 0) {
423+
[remoteParams setObject:options.tag forKey:RemoteOptionKeyTag];
424+
}
425+
422426
return remoteParams.count ? [NSDictionary dictionaryWithDictionary:remoteParams] : nil;
423427
}
424428

0 commit comments

Comments
 (0)