Forum Replies Created
-
In reply to: [Resolved] Accessing Topic Meta
So the solution for anyone who is reading is that as Paul said, to use do_action (‘bbpress_init’) within the function that has the bb_ function you are trying to call!! It does not work setting it to the whole file. ( I tried it). It only has to be called once per function.
Also an example of it is : https://buddypress.org/community/groups/creating-extending/forum/topic/add-custom-metadata-to-forum-topics-for-sorting-purposes/
Hope this helps someone else!
In reply to: [Resolved] Accessing Topic Meta@paul_gibbs, I have tried to create an action in bp-custom.php and then hook into it in the theme. The problem seems to be that from
…/wp-content/plugins/my-plugin/myfile.php
you cannot access any functions which are defined within
../wp-content/plugins/buddypress/bp-forums/bbpress/any-function-defined-in-here.php
At the front end, the error you get is:
‘Fatal error: Call to undefined function any_function_starting_with_bb() in …/some_location/plugins/bp-custom.php on line 102’
In reply to: [Resolved] Accessing Topic Metai have an instance of wordpress which has buddypress plugin. The groups forum is set up. I have the like plugin inside wp-content/plugins/ and i am using the bb_get_topicmeta from within a php file within the like plugin.
How am i meant to be hooked into the action?
im trying to check if there a particular meta_key is set in the topic meta table and then the code adds the topic meta key/value .
In reply to: [Resolved] Accessing Topic MetaSorry, yes I meant bb_get_topicmeta()