Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • hypnoscient
    Participant

    @hypnoscient

    This seems to work, wondering if there is a better way, to not display it at all instead of using a CSS display:none.

    Comments welcome :

    function action_bp_before_activity_entry(  ) { 
        global $activities_template;
        
    $postid = url_to_postid( $activities_template->activity->primary_link ); 
        echo do_shortcode('
            [mbr_is_allowed_access post_id='.$postid.']
            [ELSE_is_allowed_access]
                <div style="display:none">
            [/mbr_is_allowed_access]
            ');
    }; 
    add_action( 'bp_before_activity_entry', 'action_bp_before_activity_entry', 10, 0 ); 
    
    function action_bp_after_activity_entry(  ) { 
        global $activities_template;
        
        $postid = url_to_postid( $activities_template->activity->primary_link ); 
        echo do_shortcode('
            [mbr_is_allowed_access post_id='.$postid.']
            </div>
            [ELSE_is_allowed_access]
                </div>
            [/mbr_is_allowed_access]
            ');
    }; 
    add_action( 'bp_after_activity_entry', 'action_bp_before_activity_entry', 10, 0 ); 
Viewing 1 replies (of 1 total)
Skip to toolbar