Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to overwrite a function?


  • heini
    Participant

    @heini

    Hey folks,

    When you visit a group, the first page which opens should be the forum. So I looked at the code, where I can change it. Sadly this isn’t defined in the templates, but in the core with the following code (bp-group.php):

    bp_core_new_nav_default( array( 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_home', 'subnav_slug' => 'home' ) );

    When I change

  • ‘subnav_slug’ => ‘home’
  • to

  • ‘subnav_slug’ => ‘forum’
  • I get the change I want, but I don’t want to mess around with the core code. I’m scared that this way all my modifications will be reset after the next update.

    I think it should be possible to create a fille “modificiations.php” and upload it to the ordner “mu-plugins”. In this file I would like to overwrite the functions, so that I have the change I like. But sadly I don’t know how I can overwrite the function.

    Would be great if someone could help me.

    Regards

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