Skip to:
Content
Pages
Categories
Search
Top
Bottom

is_item_admin : hook priority problem ?

  • @grosbouff

    Participant

    Hi, i’m developping a custom component from the bp-groups sources under @1.1 Beta.

    I got a little problem here :

    I have a

    <?php bp_classified3_delete_button() ?> functions in my home.php template that should load a button.

    in my bp_classified3_delete_button function; I have a permission check :

    if ($bp->is_item_admin) return false;

    $bp->is_item_admin is TRUE and is defined in classified3s_setup_nav() which is hooked like this

    add_action( 'plugins_loaded', 'classified3s_setup_nav');

    in the main file.

    But the button is not loaded; I checked and $bp->is_item_admin is false in the bp_classified3_delete_button function.

    I guess it’s a priority problem or something like this.

    I try to put the add_action at the lowest priority possible

    add_action( 'plugins_loaded', 'classified3s_setup_nav');

    but it still returns false in bp_classified3_delete_button function.

    How can I do ?

    Thanks

Viewing 1 replies (of 1 total)
  • @grosbouff

    Participant

    Ooops…

    if (!$bp->is_item_admin) return false;

    I forgot the “!” :)

Viewing 1 replies (of 1 total)
  • The topic ‘is_item_admin : hook priority problem ?’ is closed to new replies.
Skip to toolbar