Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#16965 closed enhancement (worksforme)

Additional documentation for get_comment_meta

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

Description

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 16 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nprasath002
16 years ago

  • Cc n.prasath.002@… added

#2 @scribu
16 years ago

  • Component Comments → Inline Docs

#3 @dd32
16 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
14 years ago

  • Milestone Awaiting Review
  • Resolution → worksforme
  • Status new → closed
Note: See TracTickets for help on using tickets.