Skip to:
Content

BuddyPress.org

Ticket #4736: trac4736_bp_ajax_missing_buttons.patch

File trac4736_bp_ajax_missing_buttons.patch, 2.2 KB (added by magnus78, 13 years ago)

proposed fix

  • bp-themes/bp-default/functions.php

     
    112112                add_theme_support( 'custom-header', $custom_header_args );
    113113        }
    114114
    115         if ( !is_admin() ) {
    116                 // Register buttons for the relevant component templates
    117                 // Friends button
    118                 if ( bp_is_active( 'friends' ) )
    119                         add_action( 'bp_member_header_actions',    'bp_add_friend_button',           5 );
     115        // Register buttons for the relevant component templates
     116        // Friends button
     117        if ( bp_is_active( 'friends' ) )
     118                add_action( 'bp_member_header_actions',    'bp_add_friend_button',           5 );
    120119
    121                 // Activity button
    122                 if ( bp_is_active( 'activity' ) )
    123                         add_action( 'bp_member_header_actions',    'bp_send_public_message_button',  20 );
     120        // Activity button
     121        if ( bp_is_active( 'activity' ) )
     122                add_action( 'bp_member_header_actions',    'bp_send_public_message_button',  20 );
    124123
    125                 // Messages button
    126                 if ( bp_is_active( 'messages' ) )
    127                         add_action( 'bp_member_header_actions',    'bp_send_private_message_button', 20 );
     124        // Messages button
     125        if ( bp_is_active( 'messages' ) )
     126                add_action( 'bp_member_header_actions',    'bp_send_private_message_button', 20 );
    128127
    129                 // Group buttons
    130                 if ( bp_is_active( 'groups' ) ) {
    131                         add_action( 'bp_group_header_actions',     'bp_group_join_button',           5 );
    132                         add_action( 'bp_group_header_actions',     'bp_group_new_topic_button',      20 );
    133                         add_action( 'bp_directory_groups_actions', 'bp_group_join_button' );
    134                 }
    135 
    136                 // Blog button
    137                 if ( bp_is_active( 'blogs' ) )
    138                         add_action( 'bp_directory_blogs_actions',  'bp_blogs_visit_blog_button' );
     128        // Group buttons
     129        if ( bp_is_active( 'groups' ) ) {
     130                add_action( 'bp_group_header_actions',     'bp_group_join_button',           5 );
     131                add_action( 'bp_group_header_actions',     'bp_group_new_topic_button',      20 );
     132                add_action( 'bp_directory_groups_actions', 'bp_group_join_button' );
    139133        }
     134
     135        // Blog button
     136        if ( bp_is_active( 'blogs' ) )
     137                add_action( 'bp_directory_blogs_actions',  'bp_blogs_visit_blog_button' );
    140138}
    141139add_action( 'after_setup_theme', 'bp_dtheme_setup' );
    142140endif;