Documentation

Didn't find anything? Ask your questions in the forum.
Documentation Filters helpful_admin_feedback_item

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 feedback fields.
 * @return array
 */
function custom_function( $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;
}

add_filter( 'helpful_admin_feedback_item', 'custom_function' );

Now the name of the user will be shown when using a custom form for the feedback form and a field named “name” will be added. This can also be any other field.

You can read here how to create your own form with your own fields: Create custom fields for feedback

Was this post helpful?