um_account_page_default_tabs_hook

The Ultimate Member um account page default tabs hook function.

Description

um_account_page_default_tabs_hook( $tabs ); 

Parameters (1)

0. $tabs
The tabs.

Usage

  1. if ( !function_exists( 'um_account_page_default_tabs_hook' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ultimate-member/core/um-filters-account.php'; 
  3.  
  4. // The tabs. 
  5. $tabs = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = um_account_page_default_tabs_hook($tabs); 
  9.  

Defined (1)

The function is defined in the following location(s).

/core/um-filters-account.php  
  1. function um_account_page_default_tabs_hook( $tabs ) { 
  2. global $ultimatemember; 
  3.  
  4. foreach ($tabs as $k => $arr ) { 
  5. foreach( $arr as $id => $info ) { 
  6.  
  7. $output = $ultimatemember->account->get_tab_output( $id ); 
  8. if ( !$output ) { 
  9. unset( $tabs[$k][$id] ); 
  10.  
  11. if ( $id == 'delete' ) { 
  12. if ( !um_user('can_delete_profile') && !um_user('can_delete_everyone') ) { 
  13. unset( $tabs[$k][$id] ); 
  14.  
  15.  
  16. return $tabs; 
  17.