Introduction

  Edit This Page

Filters

Descriptions

rtm_set_profile_pic_label


Filter is use to modify Set Profile Pic label.

add_filter( 'rtm_set_profile_pic_label', 'rtmedia_set_profile_pic_label', 10, 1 );

function rtmedia_set_profile_pic_label ( $label ) {
    return 'Make Profile Pic';
}

rtm_allow_buddypress_set_profile_pic


Filter is use to restrict Set Profile Pic button from rendering.

add_filter( 'rtm_allow_buddypress_set_profile_pic', 'rtmedia_allow_buddypress_set_profile_pic', 10, 3 );

function rtmedia_allow_buddypress_set_profile_pic (  $allow, $media_id, $interactor  ) {
    if ( $interactor == get_current_user_id() ) {
        $allow = true;
    }
    return $allow;
}

rtmedia_profile-picture_button_filter


Filter is use to modify Set Profile Pic Button.

add_filter( 'rtmedia_profile-picture_button_filter', 'rtm_profile_picture_button', 10, 1 );

function rtm_profile_picture_button ( $button ){
    return '<button type="submit" name="upload" class="button rtmedia-action-buttons">Make Profile Pic</button>';
}