Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#19882 closed enhancement (fixed)

Make $key parameter optional in get_post_meta()

Reported by: scribu's profile scribu Owned by: nacin's profile nacin
Milestone: 3.4 Priority: normal
Severity: minor Version:
Component: General Keywords: has-patch commit
Focuses: 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 13 years ago.
19882.2.diff (726 bytes) - added by scribu 13 years ago.

Download all attachments as: .zip

Change History (7)

@scribu
13 years ago

#1 @scribu
13 years ago

  • Milestone changed from Awaiting Review to 3.4

Related: #19708

@scribu
13 years ago

#2 @scribu
13 years ago

  • Keywords commit added

#3 @nacin
13 years ago

  • 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.

#4 @nacin
13 years ago

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.

#5 @nacin
13 years ago

In [19910]:

Docs, see ##19882.

Note: See TracTickets for help on using tickets.