[wp-trac] [WordPress Trac] #25196: add new function get_comment_post_ID()
WordPress Trac
noreply at wordpress.org
Mon Sep 2 17:47:38 UTC 2013
#25196: add new function get_comment_post_ID()
-------------------------+------------------------------
Reporter: alexvorn2 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+------------------------------
Comment (by nofearinc):
Replying to [comment:1 nacin]:
> We should remove the by-reference for get_comment() and allow it to
return the global, like get_post(). Then it becomes
get_comment()->comment_post_ID.
I think that a function would be more elegant, but if we need it for a
"custom" ID (randomly passed) then `get_comment()` would return `null` and
calling a property of a null would result to a notice?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25196#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list