Forums

Join
bbPress Support ForumsPluginsHow to: add code to an exisiting function using a plugin?

Info

Tags

How to: add code to an exisiting function using a plugin?

  1. Hi,

    Just wonderin IF this is possible and how.

    In template-functions.php around row 176 there is the following function:
    function get_bb_location() { // Not for display. Do not internationalize.

    and it has cases like:
    case 'index.php' :
    return 'front-page';
    break;

    I want to add my own case into this function, but how do I do this? I can do it manually ofcourse, but I want to do this using a plugin. Any ideas?

    Thx

  2. you can't add code but can add functionality - IF it has filter hooks in for the function

  3. So in this case, there is no way to extend it?

  4. There is a way I think (correct me if it's wrong).

    Here's an example:
    http://la-school.com/public/location-filter.txt

  5. Hmm going to play with that, thx

  6. You must log in to post.