Could a plugin developer protect his functions?
-
I kinda know how filters work right now and I’ve used them a few times to hide or change default bbPress functions.
As you can see at my screenshot I’ve completely removed the Merge, Split, Move and Reply links from my admin_links() function because I don’t need them. It’s a fun thing to do if you start to understand how it works.
The only problem is,
bbp_topic_admin_links(); is just a wrapper for all the links, each link has it’s own function and if you play nice with them you can copy them and use them straight into your page templates and you’ll see your link-/button show up wherever you want them to show up.
This is great, I’ve done something like this shmoo_bbp_topic_edit_link(); changed and reused the default topic link function and placed it at the top of the content as you can see in my screenshot.Great, only thing is, if I try to do the same with a function from a plugin developer it says; Fatal error: Call to undefined function get_topic_report_link()
Why is this function undefined ??
The developer has made that function in his plugin file – which hooks straight into my functions.php , why can’t I use his functions the way I do use the Core bbPress functions inside my functions.php file..I would like to remove the report link from the admin_links and bring it solo to the top of the content.
- You must be logged in to reply to this topic.