Skip to content

Commit 5addbb4

Browse files
Merge pull request #365 from wp-cli/add/document-user-primary-site
Document `primary_blog` meta key for users
2 parents 66bdeae + 1e089a6 commit 5addbb4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4986,6 +4986,10 @@ wp user meta get <user> <key> [--format=<format>]
49864986
$ wp user meta get 123 bio
49874987
Mary is an WordPress developer.
49884988

4989+
# Get the primary site of a user (for multisite)
4990+
$ wp user meta get 2 primary_blog
4991+
3
4992+
49894993

49904994

49914995
### wp user meta list

src/User_Meta_Command.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ public function list_( $args, $assoc_args ) {
131131
* # Get user meta
132132
* $ wp user meta get 123 bio
133133
* Mary is an WordPress developer.
134+
*
135+
* # Get the primary site of a user (for multisite)
136+
* $ wp user meta get 2 primary_blog
137+
* 3
134138
*/
135139
public function get( $args, $assoc_args ) {
136140
$args = $this->replace_login_with_user_id( $args );

0 commit comments

Comments
 (0)