Skip to:
Content
Pages
Categories
Search
Top
Bottom

'wp' action not firing on all pages?


  • Boone Gorges
    Keymaster

    @boonebgorges

    I’m writing a plugin that uses bp_core_add_message to give feedback. The message is being written to the cookie but for some reason wasn’t showing up on the screen after bp_core_redirect. I traced the problem a bit and found out that bp_core_setup_message (in bp_core.php), which is hooked to ‘wp’, is not firing on the necessary pages.

    So I built a little function that echoes a message and hooked it to ‘wp’. Turns out that it’s only working on the front page of the installation (the blog view) and blog pages – none of the directory, groups, members pages etc. When I changed bp_core_setup_message to activate on ‘init’, the messages were loaded on all BP pages, as expected – so I don’t think it’s a problem with that function in particular.

    Is it a bug or a peculiarity of my setup? Or am I missing something?

    WPMU 2.9.2, BP trunk (rev 2889).

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

  • r-a-y
    Keymaster

    @r-a-y

    Hmm… interesting.

    Not sure if this will do anything, but have you tried fiddling with the priority of the ‘wp’ action for your function?

    If this doesn’t work, best to note it on Trac so Andy et. al are aware of it.


    Boone Gorges
    Keymaster

    @boonebgorges

    Good call, r-a-y. My function doesn’t hook to wp – it’s the core function that’s causing me problems. But changing the priority on bp_core_setup_message does the trick. https://trac.buddypress.org/ticket/2270

    JJJ did commit a patch to the trunk just before 1.2 was tagged, although Andy reverted it. It fixed up (or at least seemed to) a lot of these issues.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘'wp' action not firing on all pages?’ is closed to new replies.
Skip to toolbar