da_r_get_buttons

Location:

DaReactions\Frontend::getButtons

Filters the buttons displayed for user reactions.

Parameters:

  • $buttons  (array): The array of buttons to be displayed.
  • $context  (string): The context where the buttons are being rendered (e.g., 'post', 'comment').

Example:

add_filter('da_r_get_buttons', function($buttons, $context) {
    if ($context === 'post') {
        $buttons[] = ['id' => 'surprised', 'label' => 'Surprised'];
    }
    return $buttons;
}, 10, 2);

Use Case:

Add or customize reaction buttons based on the context.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us