um_add_addons_settings_tab

The Ultimate Member um add addons settings tab function.

Description

um_add_addons_settings_tab( $sections ); 

Parameters (1)

0. $sections
The sections.

Usage

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

Defined (1)

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

/core/um-filters-addons.php  
  1. function um_add_addons_settings_tab($sections) { 
  2. global $ultimatemember; 
  3.  
  4. foreach( $ultimatemember->addons as $addon_id => $addon ) { 
  5. $array[] = array( 
  6. 'id' => 'addon_' . $addon_id,  
  7. 'type' => 'switch',  
  8. 'title' => $addon[0],  
  9. 'desc' => $addon[1],  
  10. 'on' => __('Activated', 'ultimatemember'),  
  11. 'off' => __('Deactivated', 'ultimatemember'),  
  12. ); 
  13.  
  14. $array = apply_filters('um_builtin_addons_options', $array ); 
  15.  
  16. $sections[] = array( 
  17.  
  18. 'icon' => 'um-faicon-plug',  
  19. 'title' => __( 'Extensions', 'ultimatemember'),  
  20.  
  21. ); 
  22.  
  23. $sections[] = array( 
  24.  
  25. 'subsection' => true,  
  26. 'title' => __( 'Tools', 'ultimatemember'),  
  27. 'fields' => $array,  
  28.  
  29. ); 
  30.  
  31. return $sections; 
  32.