Skip to:

Re: Overwriting Template functions



So 7 hours later and i can’t find a solution to this.

The weird thing is that ‘some’ functions can be overwritten with filters or added to with actions but others are refusing to play ball. Here’s the code that i have:


add_action(‘post_ip_link’, ‘output_what_i_want’);

add_action(‘topic_pages’, ‘output_what_i_want’);

// does not work



add_action(‘bb_get_footer’, ‘output_what_i_want’);

When that code runs, the first 2 add_actions’s run fine, but the bottom 3 don’t. For some reason i can’t overwrite those functions.

Now to the filters:

// Working

add_filter(‘post_ip_link’, ‘output_what_i_want, 11’);

add_filter(‘topic_pages’, ‘output_what_i_want, 11’);

add_filter(‘post_form’,’output_what_i_want, 11′);

// Not Working

add_filter(‘bb_post_header’,’output_what_i_want, 11′);

add_filter(‘bb_get_footer’, ‘output_what_i_want, 11’);

This is where it’s a bit weird, as POST_FORM can be added to via a filter (great), but can not be overwritten. BB_POST_HEADER and BB_POST_FOOT cant seem to overwritten or added to via a filter.

So in the short term, i’m looking for a solution to overwriting the BB_POST_HEADER and BB_POST_FOOT functions. I’ve a plugin that’s stalled due to it.

Moving on from there though, i think this is something we need to look at and maybe get some documentation/information posted about somewhere. Because as far as i can tell there are only a few options here:

1) My code is wrong

2) Some functions cannot be overwritten

3) Some functions cannot be added to with an action

4) There’s a bug at play.

Any help would be really appreciated.

Skip to toolbar