Override a BP class function
BuddyPress version: 2.0.1
Wordpress version: 3.9.1
As part of an ongoing project, the wp_bp_friends table for us is of no use as we have our own system in place. That being said, the function bp_add_friend_button(); is regularly used and rather than changing all occurrences of this function to a custom one, we’d like to just override the function. I have noticed bp_get_add_friend_button(); has an apply_filter at the bottom so I can filter it, however filtering doesn’t help as that function still executes “bp_is_friend()” and “bp_is_friend()” tries to access the wp_bp_friends table (which has a completely different structure now)
Is there anyway I can override bp_add_friend_button(); and stop it from running any of the BP based content so we can just generate our own without having to replace the function call all over the project?
- The topic ‘Override a BP class function’ is closed to new replies.