What’s the best way to edit/override core functions?
I’d like to edit or override some core buddypress functions, for example, ‘bp_get_page_title()’.
I don’t want to edit the core files directly, so I’ve set up a child theme. Can I copy the function from the file ‘bp-core-templatetags.php’ and paste it into my own ‘functions.php’ file and then somehow tell WordPress to unregister the core function (I know I can’t declare the same function twice). Or, should I copy the original function into my ‘functions.php’ file and rename it, effectively creating a new function?
- The topic ‘What’s the best way to edit/override core functions?’ is closed to new replies.