Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#52732 new defect (bug)

'get_posts' has been waiting for so long to have a hook

Reported by: ttodua's profile ttodua Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Query Keywords: reporter-feedback
Focuses: Cc:


I reckon get_posts is the most (frequently) used function across many plugins or scripts. I know there are internal WP_Query hooks available, but that makes things harder to get into.
I think having hook on get_posts will be very useful and easy for people / developers to remind & amend things easier.
patch attached.

Attachments (1)

52732-1.patch (424 bytes) - added by ttodua 3 years ago.

Download all attachments as: .zip

Change History (2)

3 years ago

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Query
  • Keywords reporter-feedback added

Hi there, thanks for the patch!

Could you provide a use case that would be easier to achieve with this new filter than with the existing WP_Query filters, e.g. pre_get_posts, posts_results, the_posts, and others?

Note: See TracTickets for help on using tickets.