Skip to:

[RESOLVED] BP 1.6 BP_Group_Extension (extended) widget_display() – wont work

  • Profile photo of rcain


    i have run into slight prob: vis:

    using BP 1.6 and basically following code here:

    all works fine, except cant find where to administer or display group widgets as defined by the overridden widget_display().

    cant see any output anywhere, front or back end.

    i get the impression these are not ordinary wp widgets, which might be further confusing me.

    what i am doing wrong?

    thanks for any assistance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m 99% the group widgets were something that was never fully? implemented, or the logic in the templates have always been incorrect. I’m not sure what the intention with them was.

    Profile photo of rcain


    lol :) excellent answer! thanks Paul. that sort of explains why i couldnt make sense of them.

    looking a bit closer, i see that:

    in file: bp-groups-classes
    class: BP_Group_Extension
    function/method: _register


    var $ display_hook = ‘ groups_custom_group_boxes ‘;

    `if ( bp_is_group() ) {
    if ( $ this->visibility == ‘public’ || ( $ this->visibility != ‘ public ‘ && $ bp->groups->current_group->user_has_access ) ) {`

    // Hook the group home widget
    if ( !bp_current_action() && bp_is_current_action( ‘ home ‘ ) )
    add_action( $ this->display_hook, array( & $ this, ‘ widget_display ‘ ) );

    – then in file bp-groups-template.php:

    function bp_custom_group_boxes() {
    do_action( ‘ groups_custom_group_boxes ‘ );

    – which doesnt appeare to be called from anywhere in BP 1.6 (or its std theme)

    – though does i suppose make the hook available (on group home only), were i to override the default template or call the theme/template func. bp_custom_group_boxes.

    i cant think of a use for it yet either. but i’m sure i will.

    thanks again

    ps. code backquotes seem to be broken at the moment – thus i put spaces around $ signs etc above – hope its stil readable

    Right, I can’t see how this will ever be true:

    `if ( !bp_current_action() AND bp_is_current_action( ‘home’ ) )`

    If current action is set to ‘home’, then it won’t be false. It also doesn’t take into account BP_GROUPS_DEFAULT_EXTENSION which was added in 1.5 :)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[RESOLVED] BP 1.6 BP_Group_Extension (extended) widget_display() – wont work’ is closed to new replies.
Skip to toolbar