WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 4 years ago

#3189 closed enhancement (fixed)

get_children() should use get_posts()

Reported by: mdawaffe Owned by: mdawaffe
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.1
Component: Administration Keywords: has-patch 2nd-opinion
Focuses: Cc:

Description

Attached makes get_children() more useful for plugins by going through get_posts().

  1. Alter get_posts() to accept post_parent, post_type, post_status.
  2. get_children() calls get_posts().

Please check to ensure backwards compatibility.

Attachments (2)

3189.diff (4.3 KB) - added by mdawaffe 8 years ago.
3189b.diff (4.4 KB) - added by mdawaffe 8 years ago.
Back Compat defaults

Download all attachments as: .zip

Change History (6)

mdawaffe8 years ago

comment:1 mdawaffe8 years ago

  • Keywords has-patch 2nd-opinion added
  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

comment:2 ryan8 years ago

Looks good offhand. Will test.

comment:3 mdawaffe8 years ago

I guess the defaults should be empty strings for everything but post_parent to make it back compat.

mdawaffe8 years ago

Back Compat defaults

comment:4 ryan7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4503]) get_children() uses get_posts(). Props mdawaffe. fixes #3189

Note: See TracTickets for help on using tickets.