Skip to:
Content

BuddyPress.org

Changeset 6387


Ignore:
Timestamp:
10/04/2012 08:38:28 AM (14 years ago)
Author:
r-a-y
Message:

Theme Compat:

  • Add back missing buttons to bp-legacy theme
  • Basically a copy-paste from the bp-default theme
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-legacy/buddypress-functions.php

    r6326 r6387  
    9494                add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization
    9595                add_action( 'bp_head',            array( $this, 'head_scripts'     ) ); // Output some extra JS in the <head>
     96
     97                /** Buttons ***********************************************************/
     98
     99                if ( !is_admin() ) {
     100                        // Register buttons for the relevant component templates
     101                        // Friends button
     102                        if ( bp_is_active( 'friends' ) )
     103                                add_action( 'bp_member_header_actions',    'bp_add_friend_button',           5 );
     104
     105                        // Activity button
     106                        if ( bp_is_active( 'activity' ) )
     107                                add_action( 'bp_member_header_actions',    'bp_send_public_message_button',  20 );
     108
     109                        // Messages button
     110                        if ( bp_is_active( 'messages' ) )
     111                                add_action( 'bp_member_header_actions',    'bp_send_private_message_button', 20 );
     112
     113                        // Group buttons
     114                        if ( bp_is_active( 'groups' ) ) {
     115                                add_action( 'bp_group_header_actions',     'bp_group_join_button',           5 );
     116                                add_action( 'bp_group_header_actions',     'bp_group_new_topic_button',      20 );
     117                                add_action( 'bp_directory_groups_actions', 'bp_group_join_button' );
     118                        }
     119
     120                        // Blog button
     121                        if ( bp_is_active( 'blogs' ) )
     122                                add_action( 'bp_directory_blogs_actions',  'bp_blogs_visit_blog_button' );
     123                }
    96124
    97125                /** Ajax **************************************************************/
     
    476504        if ( bp_has_activities ( 'include=' . $activity_id ) ) {
    477505                while ( bp_activities() ) {
    478                         bp_the_activity(); 
     506                        bp_the_activity();
    479507                        bp_get_template_part( 'activity/entry' );
    480508                }
     
    548576 * @return mixed String on error, void on success
    549577 * @since BuddyPress (1.2)
    550  */ 
     578 */
    551579function bp_legacy_theme_delete_activity() {
    552580        // Bail if not a POST action
     
    806834                        echo '<a id="friend-' . $_POST['fid'] . '" class="remove" rel="remove" title="' . __( 'Cancel Friendship Request', 'buddypress' ) . '" href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/cancel/' . (int) $_POST['fid'] . '/', 'friends_withdraw_friendship' ) . '" class="requested">' . __( 'Cancel Friendship Request', 'buddypress' ) . '</a>';
    807835
    808         } elseif ( 'pending' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), (int) $_POST['fid'] ) ) {               
     836        } elseif ( 'pending' == BP_Friends_Friendship::check_is_friend( bp_loggedin_user_id(), (int) $_POST['fid'] ) ) {
    809837                check_ajax_referer( 'friends_withdraw_friendship' );
    810838
Note: See TracChangeset for help on using the changeset viewer.