• Resolved yudhisthirnahar

    (@yudhisthirnahar)


    I need to override the tutor avatar, I see your plugin uses :

    echo wp_kses(
    tutor_utils()->get_tutor_avatar( $user_id, 'xl' ),
    tutor_utils()->allowed_avatar_tags()
    );

    But what if we want to override it, or use the other profile like from buddyboss platform using the filter instead without overriding each template and replcaing manually.

    I see the filter ‘tutor_text_avatar‘ has no arguments to check for the user and size.

Viewing 2 replies - 1 through 2 (of 2 total)
  • largbasket

    (@largbasket)

    Dear Concern,

    You’re right; the ‘tutor_text_avatar’ filter seems limited in terms of customization. To achieve the avatar customization you’re looking for, you might need to extend the functionality through your theme or a custom plugin.

    function custom_tutor_avatar($avatar_html, $user_id) {

    return $avatar_html;

    }

    add_filter(‘tutor_text_avatar’, ‘custom_tutor_avatar’, 10, 2);

    Thread Starter yudhisthirnahar

    (@yudhisthirnahar)

    Hello Rashed Hossain,

    I cannot see the parameters user_id and size passed while applying filter ‘tutor_text_avatar‘ in get_tutor_avatar() function, so the example above will not work.

    return apply_filters( 'tutor_text_avatar', $output );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I need to override the tutor avatar using filter’ is closed to new replies.