BuddyPress: Stop overriding default parameters passed to the template loop?
How do I stop BP from overriding default parameters passed to the template loop?
For example, on the Activity page, let's say you want BP to "forget" the user's last viewed parameter (like "My Forums" or "@user 开发者_如何学运维Mentions") and go right back to All Members or My Friends every time you reload the page.
I tried deleting the contents of ajax.php and global.js, and the overriding behavior still happens. Where do I look next?
The function that handles this is bp_init_activity(). If you comment the call to this function out (around line 15 of global.js), it should stop the cookie from overriding your default settings.
精彩评论