[buddypress-trac] [BuddyPress] #1047: trunk bp_has_activities overrides a specified type due to backwards template compatability
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Sun Sep 20 01:28:07 UTC 2009
#1047: trunk bp_has_activities overrides a specified type due to backwards
template compatability
------------------------+---------------------------------------------------
Reporter: junsuijin | Owner: junsuijin
Type: defect | Status: new
Priority: major | Milestone: 1.1
Keywords: needs-patch |
------------------------+---------------------------------------------------
Comment(by junsuijin):
just thought about this a bit more and we can probably leave the
'backwards template compatibility' code where it is, but set a var
directly above it that checks for the existance of 'type' in $args, and
then include that as part of the conditional for each proposed change of
$type that happens in the 'backwards template compatibility' code. Perhaps
something like the following untested code:
{{{
$o_type = wp_parse_args( $args );
$o_type = isset( $o_type['type'] );
// The following lines are for backwards template compatibility.
if ( !$o_type && 'my-friends' == $bp->current_action &&
$bp->activity->slug == $bp->current_component )
$type = 'friends';
if ( !$o_type && $bp->displayed_user->id && $bp->activity->slug ==
$bp->current_component && ( !$bp->current_action || 'just-me' ==
$bp->current_action ) )
$type = 'personal';
if ( !$o_type && $bp->displayed_user->id && $bp->profile->slug ==
$bp->current_component )
$type = 'personal';
}}}
--
Ticket URL: <https://trac.buddypress.org/ticket/1047#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list