Make WordPress Core

Opened 9 years ago

Last modified 9 years ago

#41797 new enhancement

max_num_pages for WP_User_Query

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

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

Download all attachments as: .zip

Change History (6)

#1 @birgire
9 years ago

  • Keywords has-patch has-unit-tests added

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

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

I will update the patch accordingly.

@birgire
9 years ago

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

Note: See TracTickets for help on using tickets.