Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to overwrite a core buddypress function?


  • Design Cloud
    Participant

    @designcloud

    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?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to overwrite a core buddypress function?’ is closed to new replies.
Skip to toolbar