Skip to content

Docs: Fix backwards default value for wp_list_users()::exclude_admin.#11022

Closed
dmsnell wants to merge 1 commit intoWordPress:trunkfrom
dmsnell:docs-fix-wp-list-users-exclude-admin
Closed

Docs: Fix backwards default value for wp_list_users()::exclude_admin.#11022
dmsnell wants to merge 1 commit intoWordPress:trunkfrom
dmsnell:docs-fix-wp-list-users-exclude-admin

Conversation

@dmsnell
Copy link
Member

@dmsnell dmsnell commented Feb 24, 2026

Trac ticket: Core-64224

Resolves: WordPress/Documentation-Issue-Tracker#1849

This was previosly listed as defaulting to false when in fact it defaults to true.

As this is a documentation-only change it should include no code or functionality changes.

@dmsnell dmsnell added the bug label Feb 24, 2026
@github-actions
Copy link

github-actions bot commented Feb 24, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props dmsnell, westonruter, noruzzaman, karthickmurugan, vheemstra.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@dmsnell dmsnell force-pushed the docs-fix-wp-list-users-exclude-admin branch from 5a7cb83 to 1201f39 Compare February 24, 2026 02:56
* @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.

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!

@dmsnell
Copy link
Member Author

dmsnell commented Feb 24, 2026

just to update those tagging on to this ticket now; it would have been merged yesterday except for the flakey end-to-end tests which are failing. as soon as those pass and I’m around to do it, I will merge.

@dmsnell dmsnell force-pushed the docs-fix-wp-list-users-exclude-admin branch 2 times, most recently from 2b37e7c to c169076 Compare February 25, 2026 12:28
See: WordPress/Documentation-Issue-Tracker#1849

This was previosly listed as defaulting to `false` when in fact it
defaults to `true.`

Co-Authored-By: Philip <vHeemstra@git.wordpress.org>
@dmsnell dmsnell force-pushed the docs-fix-wp-list-users-exclude-admin branch from c169076 to f2e55ed Compare February 25, 2026 14:37
pento pushed a commit that referenced this pull request Feb 25, 2026
This was previosly listed as defaulting to `false` when in fact it defaults to `true.`

Developed in: #11022
Discussed in: https://core.trac.wordpress.org/ticket/64224
Reported in: WordPress/Documentation-Issue-Tracker#1849

Props dmsnell, noruzzaman, vHeemstra, westonruter.
See #64224.


git-svn-id: https://develop.svn.wordpress.org/trunk@61735 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Feb 25, 2026
This was previosly listed as defaulting to `false` when in fact it defaults to `true.`

Developed in: WordPress/wordpress-develop#11022
Discussed in: https://core.trac.wordpress.org/ticket/64224
Reported in: WordPress/Documentation-Issue-Tracker#1849

Props dmsnell, noruzzaman, vHeemstra, westonruter.
See #64224.

Built from https://develop.svn.wordpress.org/trunk@61735


git-svn-id: http://core.svn.wordpress.org/trunk@61042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@dmsnell
Copy link
Member Author

dmsnell commented Feb 25, 2026

Merged in [61735]
792c4ac

@dmsnell dmsnell closed this Feb 25, 2026
@dmsnell dmsnell deleted the docs-fix-wp-list-users-exclude-admin branch February 25, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DevHub] Wrong default mentioned for wp_list_users (exclude_admin)

3 participants