[buddypress-trac] [BuddyPress Trac] #5687: Activity Load more button doesn't work for custom non-components scopes
buddypress-trac
noreply at wordpress.org
Sat Jun 7 15:17:55 UTC 2014
#5687: Activity Load more button doesn't work for custom non-components scopes
--------------------------+------------------------------
Reporter: slaFFik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Activity | Version:
Severity: major | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by imath):
Thanks for your reply, ok i haven't completely understood your need at
first. So you are using the custom scope to know '''when''' to override
activity arguments. Thought you needed to actually pass an object argument
to filter the activity stream to display activities having the component
set to the scope..
Well actually the page argument and the scope is catched into
bp_ajax_querystring, so you don't need to get the value of the cookie/post
vars, it should already be in the scope attribute of the ajax_querystring.
This is what i've tested :
{{{
function slaffik_li() {
// scope is js parsed to what is after "activity-" in the LI id.
?>
<li id="activity-slaffik"><a href="#"
title="testing">Slaffik</a></li>
<?php
}
add_action( 'bp_activity_type_tabs', 'slaffik_li' );
function slaffik_qs( $qs, $object ) {
if ( 'activity' != $object ) {
return $qs;
}
$args = wp_parse_args( $qs, array() );
// Dumping args
var_dump( $args );
return $qs;
}
add_filter( 'bp_ajax_querystring', 'slaffik_qs', 99, 2 );
}}}
And i get when on the slaffik scope :
{{{array(1) { ["scope"]=> string(7) "slaffik" }}}}
When hitting the load more button :
{{{array(2) { ["scope"]=> string(7) "slaffik" ["page"]=> string(1) "2"
}}}}
So if you don't get it, there may be a plugin that is filtering the ajax
querystring before 99 priority and that is resetting the scope before
returning the query string..
I'll reply on #5688 but it's the same result scope is passed
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5687#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list