Commit Graph

129 Commits

Author SHA1 Message Date
spacedmonkey
e2e15f1876 Users: Introduce the concept of a large site to single site installations.
Currently in WordPress multisite there is a concept of large networks. The function `wp_is_large_network` is used to determine if a network has a large number of sites or users. If a network is marked as large, then 
expensive queries to calculate user counts are not run on page load but deferred to scheduled events. However there are a number of places in a single site installation where this functionality would also be useful, as 
expensive calls to count users and roles can make screens in the admin extremely slow.

In this change, the `get_user_count` function and related functionality around it is ported to be available in a single site context. This means that expensive calls to the `count_users` function are replaced with 
calls to `get_user_count`. This change also includes a new function called `wp_is_large_user_count` and a filter of the same name, to mark if a site is large.

Props johnbillion, Spacedmonkey, Mista-Flo, lumpysimon, tharsheblows, obenland, miss_jwo, jrchamp, flixos90, macbookandrew, pento, desrosj, johnjamesjacoby, jb510, davidbaumwald, costdev. 
Fixes #38741.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-03-29 12:42:13 +00:00
Sergey Biryukov
0bc24dd81f Coding Standards: Use strict comparison in wp-admin/includes/class-wp-users-list-table.php.
This mirrors a similar check a few lines below and includes minor code layout fixes for better readability.

Follow-up to [9955], [13931], [14176], [15315], [45407], [50129].

See #54728.
Built from https://develop.svn.wordpress.org/trunk@52581


git-svn-id: http://core.svn.wordpress.org/trunk@52171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-01-15 20:49:06 +00:00
audrasjb
c8050da1d3 Users: Use the "Posts" post type general name to contextualize the string used in Users posts count column label.
Since some locales may differentiate "Posts" generic post type name (works for both posts, pages, and custom post types) and "Posts" when speaking about blogposts, this change aims to contextualize the use of the "Posts" string in the "Users" admin screen. This change reuses the string used for the "Posts" post type registration, to avoid introducing any new string to translate.

Props audrasjb, jdy68, SergeyBiryukov.
Fixes #54712.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-31 15:30:01 +00:00
John Blackbourn
39bff93b6b Docs: Various inline documentation corrections and improvements.
See #53399

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


git-svn-id: http://core.svn.wordpress.org/trunk@51924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 12:20:02 +00:00
whyisjake
1b7df89e93 Administration: Escape the values of data-colname.
Adds a `esc_attr` wrapper to `strip_all_tags`.

See [33016].

Fixes #40401.

Props rellect, SergeyBiryukov, hareesh-pillai, audrasjb.


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


git-svn-id: http://core.svn.wordpress.org/trunk@50724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-08 22:21:57 +00:00
John Blackbourn
9cd08881ba Users: Coding standards fixes after [50228].
See #52238

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


git-svn-id: http://core.svn.wordpress.org/trunk@49890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 14:43:03 +00:00
John Blackbourn
523e292d8c Users: Allow the role of users to be bulk changed to no role from the Users listing screen.
This option is already available when editing an individual user, but it was previously missing from the bulk actions.

Props bonniebeeman, sabernhardt, ovidiul, jeroenrotty

Fixes #52238

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


git-svn-id: http://core.svn.wordpress.org/trunk@49889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-05 14:40:08 +00:00
Adam Silverstein
315b1c185d Users: enable admins to send users a reset password link.
Add a feature so Admins can send users a 'password reset' email. This doesn't change the password or force a password change. It only emails the user the password reset link.

The feature appears in several places:
* A "Send Reset Link" button on user profile screen.
* A "Send password reset" option in the user list bulk action dropdown.
* A "Send password reset" quick action when hovering over a username in the user list.

Props Ipstenu, DrewAPicture, eventualo, wonderboymusic, knutsp, ericlewis, afercia, JoshuaWold, johnbillion, paaljoachim, hedgefield.
Fixes #34281.


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


git-svn-id: http://core.svn.wordpress.org/trunk@49808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-02-01 22:13:03 +00:00
John Blackbourn
bc5b34672c Quick/Bulk Edit: By the power vested in me, I hereby declare the top bulk actions and the bottom bulk actions joined forever in MatrimonyScript.
This joyous marriage means that users will no longer find a selected top bulk action on a list table unexpectedly being applied instead of their selected bottom bulk action. The top and bottom controls for changing user roles are equally wedded forever too.

Props clayray, subrataemfluence, garrett-eclipse, pbiron, hareesh-pillai

Fixes #46872

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


git-svn-id: http://core.svn.wordpress.org/trunk@49643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-01-07 16:23:07 +00:00
John Blackbourn
a01f94cad8 Administration: Allow WP_List_Table::get_bulk_items() to receive a nested array in order to output optgroups.
The allowed format for bulk actions is now an associative array where each element represents either a top level option value and label, or an array representing an optgroup and its options.

For a standard option, the array element key is the field value and the array element value is the field label.

For an optgroup, the array element key is the label and the array element value is an associative array of options as above.

Props goldenapples, mattkeys, valentinbora, davidbaumwald

Fixes #19278

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


git-svn-id: http://core.svn.wordpress.org/trunk@48952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-18 16:22:10 +00:00
Sergey Biryukov
897f004a9c General: Replace older-style PHP type conversion functions with type casts.
This improves performance, readability, and consistency throughout core.

* `intval()` → `(int)`
* `strval()` → `(string)`
* `floatval()` → `(float)`

Props ayeshrajans.
Fixes #42918.
Built from https://develop.svn.wordpress.org/trunk@49108


git-svn-id: http://core.svn.wordpress.org/trunk@48870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-08 21:15:13 +00:00
Sergey Biryukov
38676936ba Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47550


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
d5be8f0635 I18N: Correct translator comments in WP_Users_List_Table::get_views() to provide information about each placeholder.
Props ramiy.
Fixes #49242.
Built from https://develop.svn.wordpress.org/trunk@47089


git-svn-id: http://core.svn.wordpress.org/trunk@46889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-20 14:08:05 +00:00
John Blackbourn
eda6a9e111 Docs: Docs on docs. Further improve documentation of known return types, plus other docs fixes.
See #48303

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


git-svn-id: http://core.svn.wordpress.org/trunk@46462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-05 21:30:03 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov
16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
John Blackbourn
ca028cfc4c Users: Allow Super Admins to remove themselves from a site on a Multisite network.
Props Mista-Flo, birgire

Fixes #41439

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


git-svn-id: http://core.svn.wordpress.org/trunk@45218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-25 00:13:53 +00:00
Gary Pendergast
7a617078fa Coding Standards: Upgrade WPCS to 1.2.1.
This upgrade fixes quite a few false positives, as well as auto-fixing some indenting issues.

Fixes #45956.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-12 06:41:52 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Sergey Biryukov
ca6f54cfce Users: After [42256], remove unnecessary double quotes around first_name and last_name properties.
See #42713.
Built from https://develop.svn.wordpress.org/trunk@42257


git-svn-id: http://core.svn.wordpress.org/trunk@42086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 15:28:53 +00:00
Dion Hulse
05d60f74ed Users: Display partial names in the user listing tables.
This allows showing a name when only the first or last name is provided.

Props shital-patel, antipole.
Fixes #42713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-29 03:41:46 +00:00
John Blackbourn
50948669eb Users: Revert [41613], [41614], and [41623] as this feature needs some more work.
See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 22:17:46 +00:00
Andrea Fercia
6a6795382a Accessibility: List Tables: use aria-current for the views current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:44:47 +00:00
John Blackbourn
807bc5a6c9 Users: Introduce the concept of a large site in order to speed up the Users screen when there are many users.
Calling the `count_users()` function is expensive, regardless of the counting strategy that's used, and it gets
slower the more users there are on a site. In order to speed up the Users screen in the admin area, calling
`count_users()` can be avoided entirely while still displaying the total count for users.

This introduces some new functions:

* `wp_is_large_user_count()`
* `wp_get_active_user_count()`
* `wp_update_active_user_count()`

A corresponding `wp_is_large_user_count` filter is also introduced.

Props tharsheblows, johnbillion

Fixes #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:04:47 +00:00
Sergey Biryukov
acb9773212 Users: After [41027], assign $author_posts_url outside of the condition to simplify the logic.
See #38085.
Built from https://develop.svn.wordpress.org/trunk@41180


git-svn-id: http://core.svn.wordpress.org/trunk@41020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-28 14:21:45 +00:00
Drew Jaynes
1a28ec87e1 Docs: Remove @access notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
John Blackbourn
2dfea4210b Users: Show a Super Admin label next to Super Admins on all user listing screens when the current user can manage network users.
Fixes #41165

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


git-svn-id: http://core.svn.wordpress.org/trunk@40990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 17:43:42 +00:00
John Blackbourn
b4c2f16d01 Users: Ensure that users with no role on a site are taken into consideration when listing users on Multisite.
This ensures that users who are a member of a site but have no role are correctly listed on the Users screen and can be filtered from the 'None' role filter.

Props tobi823, flixos90, scottlee

Fixes #36196

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


git-svn-id: http://core.svn.wordpress.org/trunk@40978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-25 00:24:43 +00:00
Sergey Biryukov
6724151d41 Users: Add a "View" link to users listed on the Users screen that points to the user's author archive.
Props ryanplas, johnjamesjacoby, viralsampat, Girishpanchal, xkon.
Fixes #38085.
Built from https://develop.svn.wordpress.org/trunk@41027


git-svn-id: http://core.svn.wordpress.org/trunk@40877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-11 13:30:44 +00:00
Drew Jaynes
903d23be34 Users: Introduce the manage_users_extra_tablenav action, fired immediately outside the closing "actions" div in the Users list table tablenav.
A similar `manage_posts_extra_tablenav` hook fires in the same location and context in the Posts list table tablenav.

Props GunGeekATX, adamsilverstein.
Fixes #36990.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-01 03:02:41 +00:00
Sergey Biryukov
25e94961b4 Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
Props Girishpanchal, yahil.
Fixes #40628.
Built from https://develop.svn.wordpress.org/trunk@40956


git-svn-id: http://core.svn.wordpress.org/trunk@40806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-06-27 00:27:39 +00:00
Andrea Fercia
3aabc09e9c Administration: Fix some HTML validation errors.
Fixes some minor HTML issues in the admin and, most notably, changes the rel
attribute used in the List Tables from `rel="permalink"` to `rel="bookmark"`.

Props mihai2u, pento, arena, topher1kenobe, michalzuber, stubgo.
Fixes #37004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-23 17:58:43 +00:00
Sergey Biryukov
c07571de67 Docs: Change @param type for $user_object in WP_Users_List_Table::single_row() from object to WP_User to be more accurate.
Props sebastian.pisula.
Fixes #39536.
Built from https://develop.svn.wordpress.org/trunk@39757


git-svn-id: http://core.svn.wordpress.org/trunk@39695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-10 12:45:44 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Dominik Schilling
251274abf6 List Tables: Pass the $which parameter to restrict_manage_posts and restrict_manage_users.
`$which` contains the location of the extra table nav markup: 'top' or 'bottom'.

Props martin.krcho.
Fixes #35307.
Built from https://develop.svn.wordpress.org/trunk@37422


git-svn-id: http://core.svn.wordpress.org/trunk@37388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-12 15:13:27 +00:00
Rachel Baker
56c18bb5af Users: Remove the “Name” column of the Users table from appearing sortable.
The “Name” column of the Users WP List Table is not sortable because this column displays a concatenation of two optional values, `first_name` and `last_name`. Even if WP_User_Query supported ordering queries in this manner, the resulting sequence would be chaotic.

Fixes #28064.

Props jesin, and rachelbaker.
Built from https://develop.svn.wordpress.org/trunk@37314


git-svn-id: http://core.svn.wordpress.org/trunk@37280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-26 20:35:29 +00:00
Drew Jaynes
8a386cb24f Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 15:13:25 +00:00
Sergey Biryukov
2c12662eff Remove obsolete code from `WP_Users_List_Table::get_sortable_columns().
Sorting by post count was disabled in [17024].

Props jdgrimes.
See #15861.
Built from https://develop.svn.wordpress.org/trunk@35110


git-svn-id: http://core.svn.wordpress.org/trunk@35075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 02:25:25 +00:00
Scott Taylor
57c2ef2655 Users List Table: after [35011], just use wp_roles(), no global import. #winning
See #22959.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 15:36:26 +00:00
Scott Taylor
ab2905da84 Users List Table: after [34963], remove unused code/add doc for global import.
See #22959.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-10 15:26:24 +00:00
John Blackbourn
b62e798c17 Introduce the ability to filter the Users admin listing screen by users with no role, if such users exist.
Fixes #22993
Props spmlucas, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@34930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 22:07:47 +00:00
John Blackbourn
1451ebc0d1 On the Users list table, show all the roles of a user in a comma-separated list if they have more than one role. This prevents role obfuscation in situations where a user has had more than one role programmatically assigned to them.
Fixes #22959
Props scribu, JustinSainton, DrewAPicture, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@34928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 21:59:25 +00:00
Drew Jaynes
b453c9e976 Users: Don't pass the current WP_Users_List_Table or WP_MS_Users_List_Table instance to the users_list_table_query_args filter after all.
After some discussion, it was decided that Multisite vs single site context can just as easily be derived using available functions like `is_network_admin()`, `get_current_screen()`, etc., rendering the second parameter moot. The hook was introduced in [34796].

Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:49:24 +00:00
Drew Jaynes
b38569a5fc Users: Introduce the users_list_table_query_args filter, for modifying the WP_User_Query arguments used within the prepare_items() methods in the users list tables.
The current list table is passed as a second parameter, `$this`, and can take the form of either a `WP_Users_List_Table` or `WP_MS_Users_List_Table` instance depending on the context in which the filter was evaluated.

Props juliobox for the initial patch.
Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 07:24:25 +00:00
Scott Taylor
882c34d555 List Tables: only hide bulk actions when there are no items, don't hide all of the extra table nav.
Fixes #33824.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 00:47:27 +00:00
Scott Taylor
f78170934a Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 19:11:26 +00:00