How to overwrite a core buddypress function?
-
First question is
1) Should this be done by building a plugin or using bp-custom.php?My main concern is that im trying to overwrite a function in bp-core.php using a plugin file.
The function is:
`function bp_core_get_username( $user_id, $user_nicename = false, $user_login = false )`
For some reason the arguments passed in this function are not being picked up in the custom function which I called:
`function bp_core_get_username_custom( $user_id, $user_nicename = false, $user_login = false )`
I used the following add action:
`add_action( ‘bp_core_get_username’, ‘bp_core_get_username_custom’, 1,3 );`
Am I doing something obviously wrong or does anyone think there is a deeper problem with my code?
- The topic ‘How to overwrite a core buddypress function?’ is closed to new replies.