@@ -80,6 +80,51 @@ public function __construct() {
8080 *
8181 * ## OPTIONS
8282 *
83+ * [--comment_agent=<comment_agent>]
84+ * : The HTTP user agent of the comment author.
85+ *
86+ * [--comment_approved=<comment_approved>]
87+ * : Whether the comment has been approved. Default 1.
88+ *
89+ * [--comment_author=<comment_author>]
90+ * : The name of the author of the comment.
91+ *
92+ * [--comment_author_email=<comment_author_email>]
93+ * : The email address of the comment author.
94+ *
95+ * [--comment_author_IP=<comment_author_IP>]
96+ * : The IP address of the comment author.
97+ *
98+ * [--comment_author_url=<comment_author_url>]
99+ * : The URL address of the comment author.
100+ *
101+ * [--comment_content=<comment_content>]
102+ * : The content of the comment.
103+ *
104+ * [--comment_date=<yyyy-mm-dd-hh-ii-ss>]
105+ * : The date the comment was submitted.
106+ *
107+ * [--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>]
108+ * : The date the comment was submitted in the GMT timezone.
109+ *
110+ * [--comment_karma=<comment_karma>]
111+ * : The karma of the comment. Default 0.
112+ *
113+ * [--comment_parent=<comment_parent>]
114+ * : ID of this comment's parent, if any. Default 0.
115+ *
116+ * [--comment_post_ID=<comment_post_ID>]
117+ * : ID of the post that relates to the comment, if any.
118+ *
119+ * [--comment_type=<comment_type>]
120+ * : Comment type. Default 'comment'.
121+ *
122+ * [--comment_meta=<comment_meta>]
123+ * : Array in JSON format of comment meta values keyed by their comment meta key.
124+ *
125+ * [--user_id=<user_id>]
126+ * : ID of the user who submitted the comment. Default 0.
127+ *
83128 * [--<field>=<value>]
84129 * : Associative args for the new comment. See wp_insert_comment().
85130 *
@@ -100,6 +145,8 @@ public function __construct() {
100145 * @param array<string, mixed> $assoc_args Associative arguments.
101146 */
102147 public function create ( $ args , $ assoc_args ) {
148+ $ assoc_args = Utils \parse_shell_arrays ( $ assoc_args , [ 'comment_meta ' ] );
149+
103150 $ assoc_args = wp_slash ( $ assoc_args );
104151 parent ::_create (
105152 $ args ,
@@ -137,6 +184,52 @@ function ( $params ) {
137184 * <id>...
138185 * : One or more IDs of comments to update.
139186 *
187+ * [--comment_agent=<comment_agent>]
188+ * : The HTTP user agent of the comment author.
189+ *
190+ * [--comment_approved=<comment_approved>]
191+ * : Whether the comment has been approved.
192+ *
193+ * [--comment_author=<comment_author>]
194+ * : The name of the author of the comment.
195+ *
196+ * [--comment_author_email=<comment_author_email>]
197+ * : The email address of the comment author.
198+ *
199+ * [--comment_author_IP=<comment_author_IP>]
200+ * : The IP address of the comment author.
201+ *
202+ * [--comment_author_url=<comment_author_url>]
203+ * : The URL address of the comment author.
204+ *
205+ * [--comment_content=<comment_content>]
206+ * : The content of the comment.
207+ *
208+ * [--comment_date=<yyyy-mm-dd-hh-ii-ss>]
209+ * : The date the comment was submitted.
210+ *
211+ * [--comment_date_gmt=<yyyy-mm-dd-hh-ii-ss>]
212+ * : The date the comment was submitted in the GMT timezone. Note that
213+ * wp_update_comment() always recalculates this from 'comment_date'.
214+ *
215+ * [--comment_karma=<comment_karma>]
216+ * : The karma of the comment.
217+ *
218+ * [--comment_parent=<comment_parent>]
219+ * : ID of this comment's parent, if any.
220+ *
221+ * [--comment_post_ID=<comment_post_ID>]
222+ * : ID of the post that relates to the comment, if any.
223+ *
224+ * [--comment_type=<comment_type>]
225+ * : Comment type.
226+ *
227+ * [--comment_meta=<comment_meta>]
228+ * : Array in JSON format of comment meta values keyed by their comment meta key.
229+ *
230+ * [--user_id=<user_id>]
231+ * : ID of the user who submitted the comment.
232+ *
140233 * --<field>=<value>
141234 * : One or more fields to update. See wp_update_comment().
142235 *
@@ -150,6 +243,8 @@ function ( $params ) {
150243 * @param array<string, mixed> $assoc_args Associative arguments.
151244 */
152245 public function update ( $ args , $ assoc_args ) {
246+ $ assoc_args = Utils \parse_shell_arrays ( $ assoc_args , [ 'comment_meta ' ] );
247+
153248 $ assoc_args = wp_slash ( $ assoc_args );
154249 parent ::_update (
155250 $ args ,
0 commit comments