Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#16965 closed enhancement (worksforme)

Additional documentation for get_comment_meta

Reported by: nprasath002 Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.1
Component: Inline Docs Keywords: has-patch
Focuses: Cc:


the documentation for get_comment_meta in comment.php can be improved.
The metakey and the single value are optional.

Attachments (1)

comment_meta_doc.diff (834 bytes) - added by nprasath002 10 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nprasath002
10 years ago

  • Cc n.prasath.002@… added

#2 @scribu
10 years ago

  • Component changed from Comments to Inline Docs

#3 @dd32
10 years ago

The $meta_key is not optional at present with the function as-is. You can however pass a blank string to it to retrieve all meta.

Setting a default on $key would however allow that.

function get_comment_meta($comment_id, $key, $single = false) {
   return get_metadata('comment', $comment_id, $key, $single);

#4 @nacin
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.