Ticket #3540: 3540.02.patch
File 3540.02.patch, 2.1 KB (added by , 13 years ago) |
---|
-
bp-themes/bp-default/_inc/ajax.php
83 83 84 84 /* This function will simply load the template loop for the current object. On an AJAX request */ 85 85 function bp_dtheme_object_template_loader() { 86 87 /** 88 * AJAX requests happen too early to be seen by bp_update_is_directory() 89 * so we do it manually here to ensure templates load with the correct 90 * context. Without this check, templates will load the 'single' version 91 * of themselves rather than the directory version. 92 */ 93 if ( !bp_current_action() ) 94 bp_update_is_directory( true, bp_current_component() ); 95 96 // Sanitize the post object 86 97 $object = esc_attr( $_POST['object'] ); 98 99 // Locate the object template 87 100 locate_template( array( "$object/$object-loop.php" ), true ); 88 101 } 89 102 add_action( 'wp_ajax_members_filter', 'bp_dtheme_object_template_loader' ); 90 add_action( 'wp_ajax_groups_filter', 'bp_dtheme_object_template_loader' );91 add_action( 'wp_ajax_blogs_filter', 'bp_dtheme_object_template_loader' );92 add_action( 'wp_ajax_forums_filter', 'bp_dtheme_object_template_loader' );103 add_action( 'wp_ajax_groups_filter', 'bp_dtheme_object_template_loader' ); 104 add_action( 'wp_ajax_blogs_filter', 'bp_dtheme_object_template_loader' ); 105 add_action( 'wp_ajax_forums_filter', 'bp_dtheme_object_template_loader' ); 93 106 94 107 // This function will load the activity loop template when activity is requested via AJAX 95 108 function bp_dtheme_activity_template_loader() { -
bp-themes/bp-default/forums/forums-loop.php
60 60 <p class="topic-meta"> 61 61 <span class="topic-by"><?php /* translators: "started by [poster] in [forum]" */ printf( __( 'Started by %1$s', 'buddypress' ), bp_get_the_topic_poster_avatar( 'height=20&width=20') . bp_get_the_topic_poster_name() ); ?></span> 62 62 63 <?php if ( bp_is_directory() || bp_is_user_forums() ) : ?>63 <?php if ( !bp_is_group_forum() ) : ?> 64 64 65 65 <span class="topic-in"> 66 66