Make WordPress Core

Opened 8 years ago

Last modified 8 years ago

#41797 new enhancement

max_num_pages for WP_User_Query

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

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 8 years ago.
class-wp-user-query-test.patch (1.1 KB) - added by birgire 8 years ago.
41797.2.patch (2.0 KB) - added by birgire 8 years ago.
Removed @access and combined the patch into a single file.

Download all attachments as: .zip

Change History (6)

#1 @birgire
8 years ago

  • Keywords has-patch has-unit-tests added

#2 @Soean
8 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
8 years ago

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

I will update the patch accordingly.

@birgire
8 years ago

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

Note: See TracTickets for help on using tickets.