Changeset 6387
- Timestamp:
- 10/04/2012 08:38:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-legacy/buddypress-functions.php
r6326 r6387 94 94 add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization 95 95 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 } 96 124 97 125 /** Ajax **************************************************************/ … … 476 504 if ( bp_has_activities ( 'include=' . $activity_id ) ) { 477 505 while ( bp_activities() ) { 478 bp_the_activity(); 506 bp_the_activity(); 479 507 bp_get_template_part( 'activity/entry' ); 480 508 } … … 548 576 * @return mixed String on error, void on success 549 577 * @since BuddyPress (1.2) 550 */ 578 */ 551 579 function bp_legacy_theme_delete_activity() { 552 580 // Bail if not a POST action … … 806 834 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>'; 807 835 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'] ) ) { 809 837 check_ajax_referer( 'friends_withdraw_friendship' ); 810 838
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)