Carbon_Fields\Helper\Helper::get_comment_meta PHP Method

get_comment_meta() public static method

Retrieve comment meta field for a comment.
public static get_comment_meta ( integer $id, string $name, string $type = null ) : mixed
$id integer Comment ID.
$name string Custom field name.
$type string Custom field type (optional).
return mixed Meta value.
    public static function get_comment_meta($id, $name, $type = null)
    {
        $name = $name[0] == '_' ? $name : '_' . $name;
        return self::get_field_value('comment_meta', $name, $type, $id);
    }

Usage Example

Example #1
0
 function carbon_get_comment_meta($id, $name, $type = null)
 {
     return Helper::get_comment_meta($id, $name, $type);
 }