Customize Ultimate Affiliate Pro Dashboard

Hey Developers & Creators , in this blog post we will see how you can customize default ultimate affiliate Pro dashboard i.e, we will see Ultimate Affiliate Pro Dashboard Customization.

Ultimate Affiliate Pro Plugin is a powerful WordPress plugin designed to create and manage affiliate programs directly on your website. With advanced features like multi-level commissions, performance rewards, customizable referral links, and real-time tracking, it enables businesses to easily attract and reward affiliates. Its flexibility and extensive customization options make it suitable for businesses of all sizes looking to drive traffic, boost sales, and grow their online presence through affiliate marketing.

Ultimate Affiliate Pro Plugin – Official Page

This is brief information about the plugin , so when you install the plugin you get a default user dashboard but that is not fully customisable .

How To Customize Ultimate Affiliate Pro Dashboard

How To Customise UAP Dashboard in Hindi ft. Ultimate Affiliate Pro Plugin Tutorial

This video will help you in customizing dashboard where you can display today, weekly, monthly and all time earning the dashboard which is not present in default one.

Codes That are used in this Video

A. account_page-overview.php

PHP
<div class="uap-ap-wrap">

<?php if (!empty($data['title'])):?>
<?php endif;?>

<?php
global $indeed_db;
$user_id = get_current_user_id();
$affiliate_id = $indeed_db->get_affiliate_id_by_wpuid($user_id);


$reports_data = array();
$reports_data['all_time'] = $indeed_db->get_stats_for_reports('all_time', $affiliate_id);
$reports_data['last_month'] = $indeed_db->get_stats_for_reports('last_month', $affiliate_id);
$reports_data['last_week'] = $indeed_db->get_stats_for_reports('last_week', $affiliate_id);
$reports_data['today'] = $indeed_db->get_stats_for_reports('today', $affiliate_id);
$today_amount = $reports_data['today']['referrals'] * 800;
$today_passive = $reports_data['all_time']['referrals'] * 200;
	
	
?>

<?php if (!empty($data['stats'])):?>
<!-- 
<div class="uap-row">

		<div class="uapcol-md-4 uap-account-overview-tab1">

			<div class="uap-account-no-box uap-account-box-green uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo $data['stats']['referrals']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('Total Referrals', 'uap'); ?></div>

                <div class="uap-subnote"><?php echo esc_html__('rewards and commissions received by now', 'uap'); ?></div>

			 </div>

			</div>

		</div>

		<div class="uapcol-md-4 uap-account-overview-tab2">

			<div class="uap-account-no-box uap-account-box-lightyellow uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo $data['stats']['paid_referrals_count']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('Paid Referrals', 'uap'); ?></div>

                <div class="uap-subnote"><?php echo esc_html__('withdrawn number of referrals until now', 'uap'); ?></div>

			 </div>

			</div>

		</div>

		<div class="uapcol-md-4 uap-account-overview-tab3">

			<div class="uap-account-no-box uap-account-box-red uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo $data['stats']['unpaid_referrals_count']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('UnPaid Referrals', 'uap'); ?></div>

                <div class="uap-subnote"><?php echo esc_html__('which have been not withdrawn yet', 'uap'); ?></div>

			 </div>

			</div>

		</div>

		<div class="uapcol-md-4 uap-account-overview-tab4">

			<div class="uap-account-no-box uap-account-box-lightblue uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo $data['stats']['payments']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('Total Payout Transactions', 'uap'); ?></div>

			 </div>

			</div>

		</div>

</div>
-->

<div class="uap-row">		

		<div class="uapcol-md-4 uap-account-overview-tab3">

			<div class="uap-account-no-box uap-account-box-red uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"><?php echo $reports_data['today']['total_amount_referrals']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('Today Earning', 'uap'); ?></div>

			 </div>

			</div>

		</div>
		<!--
		<div class="uapcol-md-5 uap-account-overview-tab3">

			<div class="uap-account-no-box uap-account-box-lightgray uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"><?php echo $today_passive.'.00'; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('Passive Income', 'uap'); ?></div>

			 </div>

			</div>

		</div>
		-->
	
		<div class="uapcol-md-4 uap-account-overview-tab2">

			<div class="uap-account-no-box uap-account-box-lightyellow uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"><?php echo $reports_data['last_week']['total_amount_referrals']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('7 Days Earning', 'uap'); ?></div>

			 </div>

			</div>

		</div>
	
		<div class="uapcol-md-4 uap-account-overview-tab4">

			<div class="uap-account-no-box uap-account-box-lightblue uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"><?php echo $reports_data['last_month']['total_amount_referrals']; ?> </div>

				<div class="uap-detail"><?php echo esc_html__('30 Days Earning', 'uap'); ?></div>

			 </div>

			</div>

		</div>
	
	

		<div class="uapcol-md-4 uap-account-overview-tab1">

			<div class="uap-account-no-box uap-account-box-green uap-no-padding">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"><?php echo $reports_data['all_time']['total_amount_referrals']; ?></div>

				<div class="uap-detail"><?php echo esc_html__('Total Earning', 'uap'); ?></div>

			 </div>

			</div>

		</div>

</div>
<!--
<div class="uap-row">

	<div class="uapcol-md-2 uap-account-overview-tab5">

			<div class="uap-account-no-box uap-account-box-lightgray">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo uap_format_price_and_currency($data['stats']['currency'], round($data['stats']['paid_payments_value'], 2) );?> </div>

				<div class="uap-detail"><?php echo esc_html__('Total Paid Amount', 'uap'); ?></div>

			 </div>

			</div>

		</div>

		<div class="uapcol-md-2 uap-account-overview-tab6">

			<div class="uap-account-no-box uap-account-box-blue">

			 <div class="uap-account-no-box-inside">

			  	<div class="uap-count"> <?php echo uap_format_price_and_currency($data['stats']['currency'], round($data['stats']['unpaid_payments_value'], 2));?> </div>

				<div class="uap-detail"><?php echo esc_html__('UnPaid Balance', 'uap'); ?></div>

			 </div>

			</div>

		</div>

</div>
-->

<div class="uap-profile-box-wrapper">

        <div class="uap-profile-box-content">

        	<div class="uap-row ">

            	<div class="uap-col-xs-12">

   						 <div class="uap-account-help-link">

			  				<?php esc_html_e('You can learn more about Affiliate program and to start earning referrals ', 'uap');?>

              					<a href="<?php echo $data['help_url'];?>">

			  						<?php esc_html_e('here', 'uap');?>

              					</a>

                    		</div>

        		</div>

        	</div>

        </div>

     </div>

     <div class="uap-profile-box-wrapper uap-account-summary-wrapper">

        <div class="uap-profile-box-content  uap-no-padding" >

        	<div class="uap-row ">

            	<div class="uap-col-xs-8">

   					<div class="uap-account-summary-month uap-account-summary-graph-warpper">

                    	<div class="uap-account-summary-month-header">

                        	<div class="uap-account-summary-graph-title">

                            	<?php esc_html_e('Earnings Overview', 'uap');?> <span><?php esc_html_e('(for Last 30 days)', 'uap');?></span>



                            </div>

                        </div>

                    	 <div class="uap-account-summary-month-content">

                            <div class="uap-account-summary-graph-content">

                            		<?php esc_html_e('Line Graph for Earnings back to 30 days.', 'uap');?>

																<?php if ( !empty( $data['statsForLast30'] ) ):?>

																	 <div class="col-4" ><canvas id="chart-1" class="uap-canvas" ></canvas></div>

																<?php endif;?>

                            </div>

                            <div class="uap-account-summary-summary-content">

                            	<div class="uap-row">

                                	<div class="uap-col-xs-6 uap-account-summary-summary-content-first-col">

                                    	<div class="uap-account-summary-summary-data-title"><?php esc_html_e('Total Earnings', 'uap');?></div>

                                        <div class="uap-account-summary-summary-data-content"><?php echo uap_format_price_and_currency($data['stats']['currency'], $data['referralsExtraStats']['total_earnings'] );?></div>

                                    </div>



                                	<div class="uap-col-xs-6">

                                    	<div class="uap-account-summary-summary-data-title"><?php esc_html_e('Clicks', 'uap');?></div>

                                        <div class="uap-account-summary-summary-data-content"><?php echo $data['referralsExtraStats']['visits'];?></div>

                                    </div>

                                </div>

                            </div>

                         </div>

                    </div>

        		</div>

                <div class="uap-col-xs-4">

                	<div class="uap-account-summary-month">

                    	<div class="uap-account-summary-month-header">

                        	<div class="uap-account-summary-month-title">

                            	<?php esc_html_e('Summary for This Month', 'uap');?>

                            </div>

                        </div>

                        <div class="uap-account-summary-month-content">

                        	<div class="uap-account-summary-month-data">

                            	<div class="uap-account-summary-month-data-row uap-row uap-account-summary-month-data-row-first">

                                	<div class="uap-col-xs-7"><?php esc_html_e('Total Referrals:', 'uap');?></div><div class="uap-col-xs-5"><?php echo $data['referralsExtraStats']['total_referrals'];?></div>

                                </div>

                                <div class="uap-account-summary-month-data-row uap-row">

                                    <div class="uap-col-xs-7"><?php esc_html_e('Total Earnings:', 'uap');?></div>

																		<div class="uap-col-xs-5">

																			<?php echo uap_format_price_and_currency($data['stats']['currency'], $data['referralsExtraStats']['total_earnings']);?>

																		</div>

                                </div>

                                <div class="uap-account-summary-month-data-row uap-row">

                                    <div class="uap-col-xs-7"><?php esc_html_e('UnVerified Referrals:', 'uap');?></div><div class="uap-col-xs-5"><?php echo $data['referralsExtraStats']['unverified_referrals'];?></div>

                                </div>

                                <div class="uap-account-summary-month-data-row uap-row">

                                    <div class="uap-col-xs-7"><?php esc_html_e('Clicks:', 'uap');?></div><div class="uap-col-xs-5"><?php echo $data['referralsExtraStats']['visits'];?></div>

                                </div>

                                <div class="uap-account-summary-month-data-row uap-row">

                                    <div class="uap-col-xs-7"><?php esc_html_e('Conversion:', 'uap');?></div><div class="uap-col-xs-5"><?php echo $data['referralsStats']['success_rate'];?>%</div>

                                </div>

                        	</div>

                        </div>



                    </div>

                </div>

        	</div>

        </div>

     </div>

	<!--div class="uap-public-general-stats">

		<div><?php echo esc_html__('Total number of Referrals:') . $data['stats']['referrals'];?></div>

		<div><?php echo esc_html__('Total number of Payments:') . $data['stats']['payments'];?></div>

		<div><?php echo esc_html__('Total number of Paid Referrals:') . $data['stats']['paid_referrals_count'];?></div>

		<div><?php echo esc_html__('Total number of UnPaid Referrals:') . $data['stats']['unpaid_referrals_count'];?></div>

		<div><?php echo esc_html__('Total value of Paid Payments:') . uap_format_price_and_currency($data['stats']['currency'], round($data['stats']['paid_payments_value'], 2));?></div>

		<div><?php echo esc_html__('Total value of Unpaid Payments:') . uap_format_price_and_currency($data['stats']['currency'], round($data['stats']['unpaid_payments_value'], 2));?></div>

	</div-->

<?php endif;?>



<?php if (!empty($data['message'])):?>

	<p><?php echo do_shortcode($data['message']);?></p>

<?php endif;?>

</div>



<?php if ( !empty( $data['statsForLast30'] ) ):?>

<?php wp_enqueue_script( 'uap-moment.js', UAP_URL . 'assets/js/moment.min.js', [], false );?>

<?php wp_enqueue_script( 'uap-chart.js', UAP_URL . 'assets/js/chart.min.js', [], false );?>

<?php wp_enqueue_script( 'uap-public-overview', UAP_URL . 'assets/js/public-overview.js', [], false );?>



<span class="uap-js-overview-earnings-received-label" data-value="<?php echo esc_html__( 'Earnings received', 'uap' ) . ' ('.$data['stats']['currency'].')';?>"></span>

<span class="uap-js-overview-earnings-label" data-value="<?php esc_html_e('Earnings', 'uap');?>"></span>



<?php

foreach( $data['statsForLast30'] as $date => $amount ):?>

		<span class="uap-js-overview-stats-last-30"

		data-date="<?php echo uap_convert_date_to_us_format($date);?>"

		data-amount="<?php echo uap_format_price_and_currency($data['stats']['currency'], $amount );?>"

		data-base_amount="<?php echo $amount;?>"

		<?php

				$temporaryDate = explode( '-', $date);

				$day = isset($temporaryDate[2]) ? $temporaryDate[2] : $date;

				echo "data-label='$day' ";

		?>

		></span>

<?php endforeach;?>





<?php endif;?>

PHP
Expand

B. account_page-header.php

PHP
<?php
	$custom_css = ''
 ?>

<?php foreach ($data['available_tabs'] as $k=>$v):
	$custom_css .= ".fa-" . $k . "-account-uap:before{".
		"content:'\\".$v['uap_tab_' . $k . '_icon_code']."';".
	"}";
endforeach;?>

<?php   if (!empty($data['uap_account_page_custom_css'])){
	 $custom_css .= $data['uap_account_page_custom_css'];
}?>
<?php wp_enqueue_style( 'uap-croppic_css', UAP_URL . 'assets/css/croppic.css', array(), 7.0 );?>
<?php wp_enqueue_script( 'uap-jquery_mousewheel', UAP_URL . 'assets/js/jquery.mousewheel.min.js', ['jquery'], 7.4 );?>
<?php wp_enqueue_script( 'uap-croppic', UAP_URL . 'assets/js/croppic.js', ['jquery'], 7.4 );?>
<?php wp_enqueue_script( 'uap-account_page-banner', UAP_URL . 'assets/js/account_page-banner.js', ['jquery'], 7.4);?>

<div class="uap-js-account-page-header-details" data-uap_url="<?php echo UAP_URL;?>" data-nonce="<?php echo wp_create_nonce( 'publicn' );?>"></div>


<?php if(isset($data['rank']['color'])){
	$custom_css .= "
	.uap-user-page-top-wrapper .uap-top-rank-box{
		background-color:#".$data['rank']['color'].";
	}";
 }
if(isset($data['achieved'])){
	$custom_css .= "
	.uap-user-page-top-wrapper .uap-top-achievement .uap-achieved{
		width:".$data['achieved']."%;
	}";
}
?>
<?php
wp_register_style( 'dummy-handle', false );
wp_enqueue_style( 'dummy-handle' );
wp_add_inline_style( 'dummy-handle', $custom_css );
 ?>

<div class="uap-user-page-wrapper">
<?php
	$top_class='';
	if (empty($data['top-background']) && ($data['uap_ap_top_theme'] == 'uap-ap-top-theme-2' || $data['uap_ap_top_theme'] == 'uap-ap-top-theme-3' )){
		 $top_class .='uap-ap-top-theme-3-extra-padding';
	} ?>
<div class="uap-user-page-top-wrapper  <?php echo (!empty($data['uap_ap_top_theme']) ? $data['uap_ap_top_theme'] : '');?> <?php echo $top_class;?> ">

  <div class="uap-left-side">
	<div class="uap-user-page-details">
		<?php if (!empty($data['avatar'])):?>
			<div class="uap-user-page-avatar"><img src="<?php echo $data['avatar'];?>" alt="Avatar" class="uap-member-photo"/></div>
		<?php endif;?>
	 </div>
	</div>
	<div class="uap-middle-side">
		<div class="uap-account-page-top-mess"><?php echo do_shortcode($data['message']);?></div>
		<?php if (!empty($data['top-rank']) && !empty($data['rank'])):?>
		<div class="uap-top-rank">
			<?php
					$data['rank']['label'] = apply_filters(
													'wpml_translate_single_string',
													$current_rank['label'],
													'uap',
													'rank_name_' . $data['rank']['id'],
													apply_filters( 'wpml_current_language', NULL )
					);
					$atype = '%';
					if($data['rank']['amount_type'] == 'flat'):
						$atype = $data['stats']['currency'];
					endif;
			?>
			<div class="uap-top-rank-box" title="<?php echo $data['rank']['amount_value'].$atype.' '.esc_html__('reward', 'uap');?>"><?php echo $data['rank']['label'];?></div>
		</div>
		<?php endif;?>
	</div>
	<div class="uap-right-side">
		<?php if (!empty($data['top-earning'])):?>
			<div class="uap-top-earnings">
				<div class="uap-stats-label"><?php echo esc_html__('Earnings', 'uap'); ?></div>
				<div class="uap-stats-content"> <?php echo uap_format_price_and_currency($data['stats']['currency'], round($data['stats']['paid_payments_value']+$data['stats']['unpaid_payments_value'], 2)); ?></div>
			</div>
		<?php endif;?>
		<?php if (!empty($data['top-referrals'])):?>
			<div class="uap-top-referrals">
				<div class="uap-stats-label"><?php echo esc_html__('Referrals', 'uap'); ?></div>
				<div class="uap-stats-content"> <?php echo $data['stats']['referrals']; ?></div>
			</div>
		<?php endif;?>


		<?php if (!empty($data['top-achievement']) && $data['achieved']>-1 && isset($data['next_rank'])):?>
			<div class="uap-clear uap-special-clear"></div>
            <?php if(!empty($data['next_rank'])){ ?>
                <div class="uap-top-achievement">
                <?php
                    $atype = '%';
                        if($data['next_rank']->amount_type == 'flat'):
                            $atype = $data['stats']['currency'];
                        endif;
                ?>
                    <div class="uap-stats-label"><?php echo esc_html__('Until', 'uap'); ?> <strong title="<?php echo $data['next_rank']->amount_value.$atype.' '.esc_html__('reward', 'uap');?>"> <?php echo $data['next_rank']->label; ?></strong> <?php echo esc_html__('Rank...', 'uap'); ?></div>
                    <div class="uap-achievement-line" title="<?php echo $data['achieved'].'% '.esc_html__('achieved', 'uap'); ?>">
                        <div class="uap-achieved"></div>
                    </div>
                </div>
            <?php } ?>
            <div class="uap-clear uap-special-clear"></div>
		<?php endif;?>
        <?php if (!empty($data['uap_ap_edit_show_metrics'])):?>
			<div class="uap-top-metrics">
				<div class="uap-stats-content">
					<div class="uap-metris-rightside">
						<div>
								<?php echo esc_html__('3 months EPC: ', 'uap');
								echo uap_format_price_and_currency($data['stats']['currency'], $data['metrics'][3]); ?>
						</div>
						<div>
								<?php echo esc_html__('7 days EPC: ', 'uap');
								echo uap_format_price_and_currency($data['stats']['currency'], $data['metrics'][7]); ;?>
						</div>
					</div>
				</div>
			</div>
            <div class="uap-clear uap-special-clear"></div>
		<?php endif;?>

		<div class="uap-clear"></div>
	</div>
	<div class="uap-clear"></div>
	<?php if (!empty($data['top-background'])):

		///
		$bkStyl = '';
		$banner = '';
		if (!empty($data['uap_account_page_personal_header'])):
				$banner = $data ['uap_account_page_personal_header'];
		endif;

		if (empty($banner) && !empty($data ['top_banner'])):
			$banner = $data ['top_banner'];
		elseif (empty($banner) && !empty($data ['top-background-image'])):
			$banner = $data ['top-background-image'];
		endif;
		if (!empty($banner)){
				$bkStyl = 'style = " background-image:url('.$banner.');"';
		}
		///
	?>
  <div class="uap-user-page-top-background" <?php echo $bkStyl;?> data-banner="<?php echo $banner;?>">
			<div class="uap-edit-top-ap-banner" id="js_uap_edit_top_ap_banner"></div>
	</div>
  <?php endif;?>
</div>
<div class="uap-user-page-content-wrapper <?php echo $data['uap_ap_theme'];?>">


<?php //=================================== TABS ====================================//?>

<?php
$tabs = array(
					'overview' => array(
						'type' => 'tab',
						'label' => esc_html__('Overview', 'uap'),
						'slug' => 'overview',
						'print_link' => TRUE,
						'icon_code' => '',
					),
					'profile' => array(
						'type' => 'tab',
						'label' => esc_html__('Profile', 'uap'),
						'slug' => 'profile',
						'icon_code' => '',
						'print_link' => FALSE,
						'children' => array(
											'edit_account' => array(
												'type' => 'subtab',
												'label' => esc_html__('Edit Account', 'uap'),
												'slug' => 'edit_account',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'profile',
											),
											'change_pass' => array(
												'type' => 'subtab',
												'label' => esc_html__('Change Password', 'uap'),
												'slug' => 'change_pass',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'profile',
											),
											'payments_settings' => array(
												'type' => 'subtab',
												'label' => esc_html__('Payment Settings', 'uap'),
												'slug' => 'payments_settings',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'profile',
											),
											'custom_affiliate_slug' => array(
												'type' => 'subtab',
												'label' => esc_html__('Custom Affiliate Slug', 'uap'),
												'slug' => 'custom_affiliate_slug',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'profile',
											),
											'pushover_notifications' => array(
												'type' => 'subtab',
												'label' => esc_html__('Pushover Notifications', 'uap'),
												'slug' => 'pushover_notifications',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'profile',
											),
						),
					),
					'marketing' => array(
						'type' => 'tab',
						'label' => esc_html__('Marketing', 'uap'),
						'slug' => 'marketing',
						'print_link' => FALSE,
						'icon_code' => '',
						'children' =>	array(
											'affiliate_link' => array(
												'type' => 'subtab',
												'label' => esc_html__('Affiliate Links', 'uap'),
												'slug' => 'affiliate_link',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'marketing',
											),
					  						'simple_links' => array(
												'type' => 'subtab',
												'label' => esc_html__('Referrer Links', 'uap'),
												'slug' => 'simple_links',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'marketing',
											),
					  						'campaigns' => array(
												'type' => 'subtab',
												'label' => esc_html__('Campaigns', 'uap'),
												'slug' => 'campaigns',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'marketing',
											),
											'banners' => array(
												'type' => 'subtab',
												'label' => esc_html__('Banners', 'uap'),
												'slug' => 'banners',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'marketing',
											),
											'landing_pages' => array(
												'type' => 'subtab',
												'label' => esc_html__('Your Landing Pages', 'uap'),
												'slug' => 'landing_pages',
												'print_link' => true,
												'icon_code' => '',
												'parent' => 'marketing',
											),
											'coupons' => array(
												'type' => 'subtab',
												'label' => esc_html__('Coupons', 'uap'),
												'slug' => 'coupons',
												'icon_code' => '',
												'print_link' => TRUE,
												'parent' => 'marketing',
											),
											'product_links'	=> array(
												'type' 				=> 'subtab',
												'label' 			=> esc_html__('Product Links', 'uap'),
												'slug' 				=> 'product_links',
												'icon_code' 	=> '',
												'print_link' 	=> TRUE,
												'parent' 			=> 'marketing',
											),
						)
					),
					'referrals' => array(
						'type' => 'tab',
						'label' => esc_html__('Statements', 'uap'),
						'slug' => 'referrals',
						'print_link' => TRUE,
						'icon_code' => '',
					),
					'payments' => array(
						'type' => 'tab',
						'label' => esc_html__('Earnings', 'uap'),
						'slug' => 'payments',
						'print_link' => TRUE,
						'icon_code' => '',
					),
					'wallet' => array(
						'type' => 'tab',
						'label' => esc_html__('Wallet', 'uap'),
						'slug' => 'wallet',
						'print_link' => TRUE,
						'icon_code' => '',
					),
					'reports' => array(
						'type' => 'tab',
						'label' => esc_html__('Reports', 'uap'),
						'slug' => 'reports',
						'icon_code' => '',
						'print_link' => FALSE,
						'children' => array(
					  						'reports' => array(
												'type' => 'subtab',
												'label' => esc_html__('OverAll', 'uap'),
												'slug' => 'reports',
												'print_link' => TRUE,
												'icon_code' => '',
												'parent' => 'reports',
											),
					  					  	'visits' => array(
												'type' => 'subtab',
												'label' => esc_html__('Traffic Log', 'uap'),
												'slug' => 'visits',
												'print_link' => TRUE,
												'icon_code' => '',
												'parent' => 'reports',
											),
										  	'campaign_reports' => array(
												'type' => 'subtab',
												'label' => esc_html__('Campaign Reports', 'uap'),
												'slug' => 'campaign_reports',
												'print_link' => TRUE,
												'icon_code' => '',
												'parent' => 'reports',
											),
										  	'referrals_history' => array(
												'type' => 'subtab',
												'label' => esc_html__('Referrals History', 'uap'),
												'slug' => 'referrals_history',
												'print_link' => TRUE,
												'icon_code' => '',
												'parent' => 'reports',
											),
										  	'mlm' => array(
												'type' => 'subtab',
												'label' => esc_html__('MLM', 'uap'),
												'slug' => 'mlm',
												'print_link' => TRUE,
												'icon_code' => '',
												'parent' => 'reports',
											),
						)
					),
					'info_affiliate_bar' => array(
								'type' => 'tab',
								'label' => get_option('uap_tab_info_affiliate_bar_menu_label') ? get_option('uap_tab_info_affiliate_bar_menu_label') : esc_html__('Affiliate FlashBar', 'uap'),
								'slug' => 'info_affiliate_bar',
								'icon_code' => '',
								'print_link' => FALSE,
								'children' => array(
										'iab_settings'     => array(
														'type'        => 'subtab',
														'label'       => esc_html__('Settings', 'uap'),
														'slug'        => 'iab_settings',
														'print_link'  => true,
														'icon_code'   => '',
														'parent'      => 'info_affiliate_bar',
										),
										'iab_tips'     => array(
														'type'        => 'tips',
														'label'       => esc_html__('Tips', 'uap'),
														'slug'        => 'iab_tips',
														'print_link'  => true,
														'icon_code'   => '',
														'parent'      => 'info_affiliate_bar',
										),
								),
					),
				    'referral_notifications' => array(
								'type' => 'tab',
								'label' => esc_html__('Referral Notifications & Reports', 'uap'),
								'slug' => 'referral_notifications',
								'print_link' => TRUE,
								'icon_code' => '',
					),
					'help' => array(
						'type' => 'tab',
						'label' => esc_html__('Help', 'uap'),
						'slug' => 'help',
						'print_link' => TRUE,
						'icon_code' => '',
					),
					'logout' => array(
						'type' => 'tab',
						'label' => esc_html__('LogOut', 'uap'),
						'slug' => 'logout',
						'print_link' => TRUE,
						'icon_code' => '',
					),
);

foreach ($custom_menu as $temp_k=>$temp_arr){
	if (emptY($temp_arr['type'])){
		$custom_menu[$temp_k]['type'] = 'tab';
	}
}
$tabs = array_merge($tabs, $custom_menu);
$tabs = uap_reorder_menu_items($order, $tabs);


$selected_parent = '';
foreach ($tabs as $first_slug => $array){
	/// exclude item

	if (in_array($first_slug, $exclude_tabs)){
		unset($tabs[$first_slug]);
		continue;
	} else if (isset($array['children'])){
		/// parent check
		foreach ($array['children'] as $children_slug => $children_array){
			if (in_array($children_slug, $exclude_tabs)){
				unset($tabs[$first_slug]['children'][$children_slug]);
			} else if (!in_array($children_slug, $data['show_tab_list'])){
				unset($tabs[$first_slug]['children'][$children_slug]);
			}
		}
		if (count($tabs[$first_slug]['children'])==0){
			unset($tabs[$first_slug]);
			continue;
		}
	} else if (!in_array($first_slug, $data['show_tab_list'])){
		unset($tabs[$first_slug]);
		continue;
	}

	///// UPDATE MENU LABEL
	if (!empty($this->account_page_settings['uap_tab_' . $first_slug . '_menu_label'])){
		$tabs[$first_slug]['label'] = $this->account_page_settings['uap_tab_' . $first_slug . '_menu_label'];
	}

	if (!empty($tabs[$first_slug]['children'])){
		foreach ($tabs[$first_slug]['children'] as $second_slug => $second_array){

			/// exclude item
			if (in_array($second_slug, $exclude_tabs)){
				unset($tabs[$first_slug]['children'][$second_slug]);
				continue;
			} else if (!in_array($second_slug, $data['show_tab_list'])){
				unset($tabs[$first_slug]['children'][$second_slug]);
			}

			//// SET THE SELECTED PARENT
			if ($second_slug==$data['selected_tab']){
				$selected_parent = $second_array['parent'];
			}

			///// UPDATE MENU LABEL
			if (!empty($this->account_page_settings['uap_tab_' . $second_slug . '_menu_label'])){
				$tabs[$first_slug]['children'][$second_slug]['label'] = $this->account_page_settings['uap_tab_' . $second_slug . '_menu_label'];
			}
		}
	}
}

//// DO REORDER MENU ITEMS
?>
		<div class="uap-ap-menu">
			<ul>
				<?php foreach ($tabs as $slug => $array) : ?>
			        <?php if ($array['type'] == 'tab'):
							if (!empty($array['children'])){
			        			if ($selected_parent==$slug){
			        				$extra_styl = 'uap-display-block';
			        				$i_class = 'fa-account-down-uap';
									$tab_selected = ' uap-ap-menu-tab-item-selected';
			        			} else {
			        				$extra_styl = '';
									$tab_selected = '';
			        				$i_class = 'fa-account-right-uap';
			        			}
								if ($data['uap_ap_theme']=='uap-ap-theme-1'){
									$action = "onClick=uapShowSubtabs('" . $slug . "');";
								} else {
									$action = "";
								}
			        ?>
								<li class="uap-ap-submenu-item<?php echo $tab_selected;?>"><div class="uap-ap-menu-tab-item" <?php echo $action;?> ><a href="javascript:void(0);"><i class="uap-ap-menu-sign fa-uap <?php echo $i_class;?>" id="<?php echo 'uap_fa_sign-' . $slug;?>"></i><?php echo $array['label'];?></a></div>
									<ul class="uap-public-ap-menu-subtabs <?php echo $extra_styl;?>" id="<?php echo 'uap_public_ap_' . $slug;?>">
										<?php foreach ($array['children'] as $second_slug => $second_array): ?>
											<?php $extra_class = ($data['selected_tab']==$second_slug) ? 'uap-ap-menu-item-selected' : '';?>
											<li class="uap-ap-menu-item <?php echo $extra_class;?>"><a href="<?php echo $data['urls'][$second_slug];?>"><i class="<?php echo 'fa-uap fa-' . $second_slug . '-account-uap';?>"></i><?php
			        						  	echo $second_array['label'];
											?></a></li>
										<?php endforeach;?>
									</ul>
								</li>
						<?php } else { ?>

					  		<?php $extra_class = ($data['selected_tab']==$slug) ? 'uap-ap-menu-tab-item-selected' : '';?>
						  	<li class="uap-ap-menu-tab-item <?php echo $extra_class;?>"><a href="<?php
										if ( empty( $array['uap_tab_' . $slug . '_url'] ) ){
												echo $data['urls'][$slug];
										} else {
												echo $array['uap_tab_' . $slug . '_url'];
										}
								?>"><i class="<?php echo 'fa-uap fa-' . $slug . '-account-uap';?>"></i><?php
						  		echo $array['label'];
						  	?></a></li>
						<?php }?>

					<?php endif; ?>

				<?php endforeach;?>
			</ul>
		</div>

<?php //=================================== TABS ====================================//?>



<div class="uap-user-page-content">
PHP
Expand

C. Dashboard CSS For Four Tabs

CSS
element.style {
}
.uap-ap-wrap .uap-account-overview-tab3 .uap-account-no-box {
    background-color: #fff0ea;
    border-top: solid;
    border-color: #ff783d;
    border-width: 15px;
border-top-left-radius: revert;
    border-top-right-radius: revert;
    border-bottom-left-radius: revert;
    border-bottom-right-radius: revert;

}
element.style {
}
.uap-ap-wrap .uap-account-overview-tab2 .uap-account-no-box {
    background-color: #eceffe;
    border-top: solid;
    border-color: #6d81f5;
    border-width: 15px;
border-top-left-radius: revert;
    border-top-right-radius: revert;
    border-bottom-left-radius: revert;
    border-bottom-right-radius: revert;

}
.uap-ap-wrap .uap-account-overview-tab4 .uap-account-no-box {
    background-color: #ffe7f2;
    border-top: solid;
    border-color: #fd3c97;
    border-width: 15px;
border-top-left-radius: revert;
    border-top-right-radius: revert;
    border-bottom-left-radius: revert;
    border-bottom-right-radius: revert;
}
.uap-ap-wrap .uap-account-overview-tab1 .uap-account-no-box {
    background-color: #f5ecfe;
    border-top: solid;
    border-color: #b46df5;
    border-width: 15px;
border-top-left-radius: revert;
    border-top-right-radius: revert;
    border-bottom-left-radius: revert;
    border-bottom-right-radius: revert;
}
CSS
Expand

HTML
Dashboard :- https://domain/my-account-page-link/?uap_aff_subtab=overview

Referrals:- https://domain/my-account-page-link/?uap_aff_subtab=referrals

Payments :- https://domain/my-account-page-link/?uap_aff_subtab=payments

Help :- https://domain/my-account-page-link/?uap_aff_subtab=help

Profile:- 

Edit your account :- https://domain/my-account-page-link/?uap_aff_subtab=edit_account

Change Your Password :- https://domain/my-account-page-link/?uap_aff_subtab=change_pass

Payout Details :- https://domain/my-account-page-link/?uap_aff_subtab=payments_settings

Marketing:-

Affiliate Links :- https://domain/my-account-page-link/?uap_aff_subtab=affiliate_link

Campaigns :- https://domain/my-account-page-link/?uap_aff_subtab=campaigns

Creatives :-  https://domain/my-account-page-link/?uap_aff_subtab=banners

Reports :- https://domain/my-account-page-link/?uap_aff_subtab=reports

Logout :-  https://domain/my-account-page-link/?uapaction=logout
HTML
Expand

E. Helpful Shortcodes

Click here To Download

Today|7 Days|30 Days|Earnings Full width – Solved issue- UAP Affiliate Dashboard

Additional CSS

CSS
.uapcol-md-4 {
  width: 100%;
  max-width: 767px;
}

@media screen and (max-width: 767px) {
  .uapcol-md-4 {
    width: 100%;
    max-width: 767px;
  }
}

.uap-detail {
	font-weight: 600;
	color:#000000;
}
.uap-account-no-box-inside .uap-count, .uap-user-page-content input[type=submit], .uap-user-page-content input[type=text], .uap-user-page-content select {
    font-family: default!important;
	color: #000000;
	margin: 0px;
}
CSS
Expand

This is full tutorial for customizing Ultimate Affiliate Pro Dashboard. Hope so, this works for you !

Select your currency