Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

  • Jenny Wong
    Participant

    @miss_jwo

    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!
    :)


    Jenny Wong
    Participant

    @miss_jwo

    @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’


    Jenny Wong
    Participant

    @miss_jwo

    i 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 .


    Jenny Wong
    Participant

    @miss_jwo

    Sorry, yes I meant bb_get_topicmeta()

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar