Opened 16 months ago

Closed 15 months ago

Last modified 15 months ago

#19882 closed enhancement (fixed)

Make $key parameter optional in get_post_meta()

Reported by: scribu Owned by: nacin
Priority: normal Milestone: 3.4
Component: General Version:
Severity: minor Keywords: has-patch commit
Cc:

Description

get_post_meta() is a trivial wrapper around get_metadata()

In get_metadata(), the $key parameter is optional, but in get_post_meta() it's not.

This should be fixed.

Attachments (2)

19882.diff (525 bytes) - added by scribu 16 months ago.
19882.2.diff (726 bytes) - added by scribu 15 months ago.

Download all attachments as: .zip

Change History (7)

  • Milestone changed from Awaiting Review to 3.4

Related: #19708

  • Keywords commit added
  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [19908]:

Allow get_post_meta() to be called with only a post ID, as get_metadata() handles this. props scribu, fixes #19882.

In [19909]:

Allow get_comment_meta() to be called with only a comment ID, something get_metadata() allows. Same functionality as get_user_meta() and get_post_meta(). see #19882.

In [19910]:

Docs, see ##19882.

Note: See TracTickets for help on using tickets.