@hypnoscient
7 years, 9 months ago
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 );