Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WordPress User DataSource #7

Merged
merged 18 commits into from
Aug 12, 2024
Merged

Conversation

zackkatz
Copy link
Contributor

@zackkatz zackkatz commented Aug 8, 2024

You can either pass a full WP_User_Query object, array, string, or null.

Array:

new WPUserDataSource( ['role__in' => ['Administrator','Editor']] );

String:

new WPUserDataSource( 'role=Administrator' );

Searches will happen within the results set of the original query.

Now you can either pass a full WP_User_Query object, array, or string.

Array:

```
new WPUserDataSource( ['role__in' => ['Administrator','Editor']] );
```

String:

```
new WPUserDataSource( 'role=Administrator' );
```

Searches will happen within the results set of the original query.
@zackkatz zackkatz requested a review from doekenorg August 8, 2024 13:39
Static analysis was taking WordPress literally when it says it can only accept ints…
I'll start using composer analyse, I swear :-)
wp_delete_user() requires user.php, which isn't loaded inside a REST request.
Seeeeeems like a good idea.
@zackkatz
Copy link
Contributor Author

zackkatz commented Aug 8, 2024

@doekenorg Please review!

@doekenorg doekenorg merged commit 0e41930 into main Aug 12, 2024
@doekenorg doekenorg deleted the feature/wordpress-user-datasource branch August 12, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants