Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#15483 closed enhancement (duplicate)

get_post_custom() should use use get_metadata()

Reported by: scribu's profile scribu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

I found out that get_post_custom() is equivalent to calling get_metadata() without a meta key, so we should use that.

Attachments (2)

15483.diff (543 bytes) - added by scribu 14 years ago.
15483.2.diff (441 bytes) - added by scribu 14 years ago.
almost equivalent

Download all attachments as: .zip

Change History (9)

@scribu
14 years ago

#1 @scribu
14 years ago

  • Keywords has-patch commit added

@scribu
14 years ago

almost equivalent

#2 @scribu
13 years ago

Related: #17013

#3 @scribu
13 years ago

  • Milestone changed from Future Release to 3.2

Patch still applies cleanly.

#4 @hakre
13 years ago

Hmm, get_metadata() contains much more and different lines of code as what you remove with the proposed patch.

#5 @scribu
13 years ago

You've got it backwards: I'm replacing get_post_meta() with get_metadata(), not the other way around.

Of course get_metadata() contains much more code, since it's a more general function.

Version 0, edited 13 years ago by scribu (next)

#6 @nacin
13 years ago

  • Keywords commit removed
  • Milestone changed from 3.2 to Future Release

I doubt this got the testing or considerations required here. First patch was marked for commit but it wouldn't have worked when ID = 0. As said in IRC, seems fine but not really a necessary change at this time. Punting.

#7 @scribu
13 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.