Closed christianwach closed 10 years ago
Glad you like it, @christianwach ! Surprised that people are already working on extending an extension (follow-blogs) to an extension (bp-follow) to an extension (BuddyPress) :smile:
I haven't finalized all the API hooks yet, so let me know if you are doing anything funky that I should fix in bp-follow.
About the PR, I was actually planning on removing this class method since it isn't really being used any more in follow-blogs. The code is useful for setting the scope via the URL.
I'm trying to figure out how you're using the set_activity_scope_on_activity_directory()
method as it's not meant to return anything. The 'bp_activity_screen_index'
hook is an action not a filter.
Let me know if I'm missing anything or if removing the set_activity_scope_on_activity_directory()
method will fix your problem.
BTW, if you're curious, here's how I'm using Follow Blogs functionality: https://github.com/christianwach/bp-working-papers/blob/master/includes/bpwpapers-follow.php
In essence, I'm separating out "working papers" from other blogs via a number of filters. Papers have their own directory and can be followed via BuddyPress Followers. However, I also wanted to separate out "Followed Papers" from "Followed Sites" which is what I do with the code above.
For Papers, I fixed a number of issues with activity filtering on displayed/logged-in member pages and the activity directory, however these probably remain in BuddyPress Followers plugin in a more general context. I'll spin up a simple multisite instance when I get a moment and see if I can port those fixes back to BuddyPress Followers. In the meantime (or if you want to do this yourself!) the file I link to here should provide clues.
I'm not using the method - the PR addresses the fact that bp_activity_screen_index is both an action and a filter. The filter returns the template to load. So not returning anything clears the activity stream template :-(
Ahh, well that sucks! :disappointed:
Seems more like a bug with how WordPress uses its hook system. I've removed this class method anyway, so that should solve this problem :smile:
Am absolutely loving the new blog-following feature. I'll detail what I've had to do to adapt it to the needs of the bp-working-papers plugin at another time. Just thought you'd like to have this fix PRed as currently the activity stream page loses the reference to its template.