Opened 3 years ago

Closed 16 months ago

#15483 closed enhancement (duplicate)

get_post_custom() should use use get_metadata()

Reported by: scribu Owned by:
Priority: normal Milestone:
Component: General Version:
Severity: normal Keywords: has-patch
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 3 years ago.
15483.2.diff (441 bytes) - added by scribu 3 years ago.
almost equivalent

Download all attachments as: .zip

Change History (9)

scribu3 years ago

  • Keywords has-patch commit added

scribu3 years ago

almost equivalent

Related: #17013

  • Milestone changed from Future Release to 3.2

Patch still applies cleanly.

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

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 2 years ago by scribu (next)
  • 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.

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