@@ -34,7 +34,7 @@ - (void)getPostWithID:(NSNumber *)postID
3434
3535 NSString *path = [NSString stringWithFormat: @" sites/%@ /posts/%@ " , self .siteID, postID];
3636 NSString *requestUrl = [self pathForEndpoint: path
37- withVersion: ServiceRemoteWordPressComRESTApiVersion_1_1 ];
37+ withVersion: ServiceRemoteWordPressComRESTApiVersion_1_2 ];
3838
3939 NSDictionary *parameters = @{ @" context" : @" edit" };
4040
@@ -67,7 +67,7 @@ - (void)getPostsOfType:(NSString *)postType
6767
6868 NSString *path = [NSString stringWithFormat: @" sites/%@ /posts" , self .siteID];
6969 NSString *requestUrl = [self pathForEndpoint: path
70- withVersion: ServiceRemoteWordPressComRESTApiVersion_1_1 ];
70+ withVersion: ServiceRemoteWordPressComRESTApiVersion_1_2 ];
7171
7272 NSDictionary *parameters = @{
7373 @" status" : @" any,trash" ,
@@ -101,7 +101,7 @@ - (void)createPost:(RemotePost *)post
101101
102102 NSString *path = [NSString stringWithFormat: @" sites/%@ /posts/new?context=edit" , self .siteID];
103103 NSString *requestUrl = [self pathForEndpoint: path
104- withVersion: ServiceRemoteWordPressComRESTApiVersion_1_1 ];
104+ withVersion: ServiceRemoteWordPressComRESTApiVersion_1_2 ];
105105
106106 NSDictionary *parameters = [self parametersWithRemotePost: post];
107107
@@ -131,7 +131,7 @@ - (void)createPost:(RemotePost *)post
131131 NSString *filename = media.file ;
132132 NSString *path = [NSString stringWithFormat: @" sites/%@ /posts/new" , self .siteID];
133133 NSString *requestUrl = [self pathForEndpoint: path
134- withVersion: ServiceRemoteWordPressComRESTApiVersion_1_1 ];
134+ withVersion: ServiceRemoteWordPressComRESTApiVersion_1_2 ];
135135
136136 NSMutableDictionary *parameters = [NSMutableDictionary dictionaryWithDictionary: @{}];
137137 parameters[@" content" ] = post.content ;
@@ -165,7 +165,7 @@ - (void)updatePost:(RemotePost *)post
165165
166166 NSString *path = [NSString stringWithFormat: @" sites/%@ /posts/%@ ?context=edit" , self .siteID, post.postID];
167167 NSString *requestUrl = [self pathForEndpoint: path
168- withVersion: ServiceRemoteWordPressComRESTApiVersion_1_1 ];
168+ withVersion: ServiceRemoteWordPressComRESTApiVersion_1_2 ];
169169
170170 NSDictionary *parameters = [self parametersWithRemotePost: post];
171171
@@ -429,7 +429,9 @@ - (NSDictionary *)parametersWithRemotePost:(RemotePost *)post
429429 parameters[@" categories" ] = [post.categories valueForKey: @" categoryID" ];
430430 }
431431 if (post.tags ) {
432- parameters[@" tags" ] = post.tags ;
432+ NSArray *tags = post.tags ;
433+ NSDictionary *postTags = @{@" post_tag" :tags};
434+ parameters[@" terms" ] = postTags;
433435 }
434436 if (post.format ) {
435437 parameters[@" format" ] = post.format ;
0 commit comments