bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

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

(5 posts)
  • Started 1 year ago by Null
  • Latest reply from Null
  • This topic is not a support question

No tags yet.

  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

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

    Posted 1 year ago #
  3. So in this case, there is no way to extend it?

    Posted 1 year ago #
  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

    Posted 1 year ago #
  5. Hmm going to play with that, thx

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.