Info
- 5 posts
- 3 voices
- Started 5 years ago by Null
- Latest reply from Null
- This topic is not a support question
How to: add code to an exisiting function using a plugin?
-
- Posted 5 years ago #
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 5 years ago #
you can't add code but can add functionality - IF it has filter hooks in for the function
-
- Posted 5 years ago #
So in this case, there is no way to extend it?
-
- Posted 5 years ago #
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 5 years ago #
Hmm going to play with that, thx
-
You must log in to post.