diff --git a/src/Comment_Command.php b/src/Comment_Command.php index 3b1578017..384af1fe9 100644 --- a/src/Comment_Command.php +++ b/src/Comment_Command.php @@ -80,6 +80,51 @@ public function __construct() { * * ## OPTIONS * + * [--comment_agent=] + * : The HTTP user agent of the comment author. + * + * [--comment_approved=] + * : Whether the comment has been approved. Default 1. + * + * [--comment_author=] + * : The name of the author of the comment. + * + * [--comment_author_email=] + * : The email address of the comment author. + * + * [--comment_author_IP=] + * : The IP address of the comment author. + * + * [--comment_author_url=] + * : The URL address of the comment author. + * + * [--comment_content=] + * : The content of the comment. + * + * [--comment_date=] + * : The date the comment was submitted. + * + * [--comment_date_gmt=] + * : The date the comment was submitted in the GMT timezone. + * + * [--comment_karma=] + * : The karma of the comment. Default 0. + * + * [--comment_parent=] + * : ID of this comment's parent, if any. Default 0. + * + * [--comment_post_ID=] + * : ID of the post that relates to the comment, if any. + * + * [--comment_type=] + * : Comment type. Default 'comment'. + * + * [--comment_meta=] + * : Array in JSON format of comment meta values keyed by their comment meta key. + * + * [--user_id=] + * : ID of the user who submitted the comment. Default 0. + * * [--=] * : Associative args for the new comment. See wp_insert_comment(). * @@ -100,6 +145,8 @@ public function __construct() { * @param array $assoc_args Associative arguments. */ public function create( $args, $assoc_args ) { + $assoc_args = Utils\parse_shell_arrays( $assoc_args, [ 'comment_meta' ] ); + $assoc_args = wp_slash( $assoc_args ); parent::_create( $args, @@ -137,6 +184,52 @@ function ( $params ) { * ... * : One or more IDs of comments to update. * + * [--comment_agent=] + * : The HTTP user agent of the comment author. + * + * [--comment_approved=] + * : Whether the comment has been approved. + * + * [--comment_author=] + * : The name of the author of the comment. + * + * [--comment_author_email=] + * : The email address of the comment author. + * + * [--comment_author_IP=] + * : The IP address of the comment author. + * + * [--comment_author_url=] + * : The URL address of the comment author. + * + * [--comment_content=] + * : The content of the comment. + * + * [--comment_date=] + * : The date the comment was submitted. + * + * [--comment_date_gmt=] + * : The date the comment was submitted in the GMT timezone. Note that + * wp_update_comment() always recalculates this from 'comment_date'. + * + * [--comment_karma=] + * : The karma of the comment. + * + * [--comment_parent=] + * : ID of this comment's parent, if any. + * + * [--comment_post_ID=] + * : ID of the post that relates to the comment, if any. + * + * [--comment_type=] + * : Comment type. + * + * [--comment_meta=] + * : Array in JSON format of comment meta values keyed by their comment meta key. + * + * [--user_id=] + * : ID of the user who submitted the comment. + * * --= * : One or more fields to update. See wp_update_comment(). * @@ -150,6 +243,8 @@ function ( $params ) { * @param array $assoc_args Associative arguments. */ public function update( $args, $assoc_args ) { + $assoc_args = Utils\parse_shell_arrays( $assoc_args, [ 'comment_meta' ] ); + $assoc_args = wp_slash( $assoc_args ); parent::_update( $args, diff --git a/src/Post_Command.php b/src/Post_Command.php index 5e10c546b..fd472fbea 100644 --- a/src/Post_Command.php +++ b/src/Post_Command.php @@ -127,6 +127,13 @@ public function __construct() { * [--meta_input=] * : Array in JSON format of post meta values keyed by their post meta key. Default empty. * + * [--page_template=] + * : Page template to use. + * + * [--import_id=] + * : The post ID to be used when inserting a new post. If specified, must not + * match any existing post ID. + * * [] * : Read post content from . If this value is present, the * `--post_content` argument will be ignored. @@ -338,6 +345,9 @@ function ( $params ) { * [--meta_input=] * : Array in JSON format of post meta values keyed by their post meta key. Default empty. * + * [--page_template=] + * : Page template to use. + * * [] * : Read post content from . If this value is present, the * `--post_content` argument will be ignored. diff --git a/src/User_Application_Password_Command.php b/src/User_Application_Password_Command.php index 0dffef714..b28e002ba 100644 --- a/src/User_Application_Password_Command.php +++ b/src/User_Application_Password_Command.php @@ -357,8 +357,8 @@ public function create( $args, $assoc_args ) { * * : The universally unique ID of the application password. * - * [--=] - * : Update the with a new . Currently supported fields: name. + * [--name=] + * : The new name of the application password. * * ## EXAMPLES * diff --git a/src/User_Command.php b/src/User_Command.php index 59d6f3d34..a508059ad 100644 --- a/src/User_Command.php +++ b/src/User_Command.php @@ -538,12 +538,42 @@ public function create( $args, $assoc_args ) { * [--rich_editing=] * : A string for whether to enable the rich editor or not. False if not empty. * + * [--syntax_highlighting=] + * : Whether to enable the rich code editor for the user. Accepts 'true' or + * 'false' as a string literal, not boolean. + * + * [--comment_shortcuts=] + * : Whether to enable comment moderation keyboard shortcuts for the user. + * Accepts 'true' or 'false' as a string literal, not boolean. + * + * [--admin_color=] + * : Admin color scheme for the user. + * + * [--use_ssl=] + * : Whether the user should always access the admin over https. + * * [--user_registered=] * : The date the user registered. * + * [--user_activation_key=] + * : Password reset key. + * + * [--spam=] + * : Multisite only. Whether the user is marked as spam. + * + * [--show_admin_bar_front=] + * : Whether to display the admin bar for the user on the site's front end. + * Accepts 'true' or 'false' as a string literal, not boolean. + * * [--role=] * : A string used to set the user's role. * + * [--locale=] + * : The user's locale. + * + * [--meta_input=] + * : Array in JSON format of user meta values keyed by their user meta key. + * * --= * : One or more fields to update. For accepted fields, see wp_update_user(). * @@ -584,6 +614,8 @@ public function update( $args, $assoc_args ) { add_filter( 'send_password_change_email', '__return_false' ); } + $assoc_args = Utils\parse_shell_arrays( $assoc_args, [ 'meta_input' ] ); + $assoc_args = wp_slash( $assoc_args ); parent::_update( $user_ids, $assoc_args, 'wp_update_user' );