helpful_admin_feedback_item

With Helpful 4.0.0 the whole plugin has been revised. The feedback is now clearly displayed in a separate area. Individual entries are displayed like comments.

There is the possibility to display the name of a user instead of “Anonymous”. For this you can use the following WordPress filter helpful_admin_feedback_item:

/**
 * Change output from feedback on feedback admin page.
 *
 * @param array $feedback
 * @return array
 */
add_filter('helpful_admin_feedback_item', function (array $feedback) {
    // receive custom fields
    $fields = $feedback['fields'];

    // change output by taking the custom field "name"
    // the field name must be placed in a custom feedback form
    $feedback['name'] = $fields['name'];

    return $feedback;
});

Was this post helpful?

Top