Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Buddypress core settings file (remove action problem) (2 posts)

Started 1 year, 6 months ago by: Design Cloud

  • Profile picture of Design Cloud Design Cloud said 1 year, 6 months ago:

    Hi

    I’m trying to write my own custom functions for Buddypress:

    on the file called bp-core-settings.php there are 2 functions which define the layout + style of the users settings page.

    function bp_core_screen_general_settings_title() {

    and

    function bp_core_screen_general_settings_content() {

    I created my own functions in bp-custom.php and removed the actions:

    remove_action( 'bp_template_title', 'bp_core_screen_general_settings_title' );
    remove_action( 'bp_template_content', 'bp_core_screen_general_settings_content' );
    add_action( 'bp_template_title', 'bp_custom_core_screen_general_settings_title' );
    add_action( 'bp_template_content', 'bp_custom_core_screen_general_settings_content' );

    For some reason it will add the custom functions to the settings page, but it will not remove the default ones. Am I doing something wrong?

  • Profile picture of rich! @ etiviti rich! @ etiviti said 1 year, 6 months ago:

    i would replace the settings 'screen_function' => 'bp_core_screen_general_settings' used in the nav_item with your own set of functions