[Resolved] Buddypress 2.1.1 removes custom buttons from profile
-
I created a plugin that adds a Call button to the profile page. With Buddypress 2.0.1 it worked, but when I updated to 2.1.1 the button disappeared from the profile page.
This is the code that adds the button :
function videocall_get_slug() { global $bp; return $videocall_slug = isset( $bp->videocall->slug ) ? $bp->videocall->slug : ”; } function videocall_is_user_online( $user_id ) { if ( bp_has_members( ‘type=online&include=’. $user_id ) ) { return true; } else { return false; } } function videocall_get_video_chat_link() { return bp_loggedin_user_domain() . videocall_get_slug() . ‘/call?user=’.bp_displayed_user_id().’&id=’ . rand() } function videocall_invite_button() { if ( videocall_is_user_online( bp_displayed_user_id() ) ) { $link_class = ‘start-videocall online'; } else { $link_class = ‘start-videocall'; } bp_button( array( ‘id’ => ‘videocall’, ‘must_be_logged_in’ => true, ‘block_self’ => true, ‘wrapper_id’ => ‘videocall’, ‘link_href’ => videocall_get_video_chat_link(), ‘link_title’ => __( ‘Video call with this user.’, ‘videocall’ ), ‘link_text’ => __( ‘Video call’, ‘videocall’ ), ‘link_class’ => $link_class, ) ); } add_action( ‘bp_member_header_actions’, ‘videocall_invite_button’,99);
With WordPress 4.0 and Buddypress 2.0.1 it workes just fine.
Any suggestions?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Resolved] Buddypress 2.1.1 removes custom buttons from profile’ is closed to new replies.