Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ function get_users( $args = array() ) {
* 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
* @type string $order Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
* @type int $number Maximum users to return or display. Default empty (all users).
* @type bool $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
* @type bool $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this change and cross-referenced it with the actual implementation in src/wp-includes/user.php
On line 918, the $defaults array explicitly sets 'exclude_admin' => true, which confirms that the current DocBlock on line 897 was indeed incorrect (backwards). This update correctly aligns the documentation with the actual behavior of the function. Happy to see this being fixed!

* @type bool $show_fullname Whether to show the user's full name. Default false.
* @type string $feed If not empty, show a link to the user's feed and use this text as the alt
* parameter of the link. Default empty.
Expand Down
Loading