Viewing 1 replies (of 1 total)
  • Plugin Author Jacob Schweitzer

    (@primetimejas)

    I’d look at using the bp_before_has_profile_parse_args filter like I how I use it in the plugin:

    add_filter( 'bp_before_has_profile_parse_args', array( $this, 'filter_tabs' ), 10, 1 );
    
    /**
    	 * Filter the tabs to show on the member page
    	 *
    	 * @param array $args Tabs arguments.
    	 *
    	 * @return mixed
    	 */
    	function filter_tabs( $args ) {
    		if ( isset( $args['exclude_groups'] ) ) {
    			$args['exclude_groups'] .= $this->tabs_to_filter;
    		} else {
    			$args['exclude_groups'] = $this->tabs_to_filter;
    		}
    
    		return $args;
    	}

    In this case I am excluding tabs but perhaps there is a way to include new ones, it is not something I’ve looked into before.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding custom tab with functionality of another plugin’ is closed to new replies.