WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#41797 new enhancement

max_num_pages for WP_User_Query

Reported by: birgire Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Query Keywords: has-patch has-unit-tests
Focuses: Cc:
PR Number:

Description

The WP_User_Query class supports pagination but doesn't have the public max_num_pages property, like most of the other query classes do.

This can be useful when using e.g. paginate_links() and also for better consistency.

Attachments (3)

class-wp-user-query.patch (951 bytes) - added by birgire 2 years ago.
class-wp-user-query-test.patch (1.1 KB) - added by birgire 2 years ago.
41797.2.patch (2.0 KB) - added by birgire 2 years ago.
Removed @access and combined the patch into a single file.

Download all attachments as: .zip

Change History (6)

#1 @birgire
2 years ago

  • Keywords has-patch has-unit-tests added

#2 @Soean
2 years ago

Hello @birgire,
thanks for your patch. You can upload the fix and the tests in one file, you don't have to separate it into two files.
Since #41452 you don't have to add the @access notations in the DocBlocks anymore.

#3 @birgire
2 years ago

Thanks @Soean, I didn't know about the @access change.

I will update the patch accordingly.

@birgire
2 years ago

Removed @access and combined the patch into a single file.

Note: See TracTickets for help on using tickets.