functions->get_custom_tab_slugs() );
}
/**
* Add tab
* For AffiliateWP versions less than 2.1.7
*
* @since 1.0.0
* @return void
*/
public function add_tab( $affiliate_id, $active_tab ) {
$tabs = affiliatewp_affiliate_area_tabs()->functions->get_all_tabs();
if ( $tabs ) : ?>
ID ) {
continue;
}
?>
functions->get_all_tabs();
// Make sure the arrays are unique. If 2 tabs are identical then the content will not be loaded twice.
$tabs = array_unique( $tabs, SORT_REGULAR );
// Get tab slugs.
$tab_slugs = affiliatewp_affiliate_area_tabs()->functions->get_custom_tab_slugs();
if ( $tabs ) : ?>
post_content ) && has_shortcode( $post->post_content, 'affiliate_area' ) ) {
continue;
}
// Current tab doesn't match slug
if ( $current_tab && $current_tab !== $tab_slug ) {
continue;
}
/**
* If we're on the Affiliate Area page (without query string)
* and the current slug matches the first slug in the array, show the content.
*/
if ( ( ! $current_tab ) && ( $tab_slugs[0] === $tab_slug ) ) :
/**
* If the active tab does not exist in the tab slugs array,
* then one of the other default tabs is active, skip
*/
if ( ! in_array( affwp_get_active_affiliate_area_tab(), $tab_slugs ) ) {
continue;
}
?>
post_content ) ); ?>
post_content ) ); ?>