ninja_forms_get_current_tab

The Ninja Forms ninja forms get current tab function.

Description

ninja_forms_get_current_tab(); 

Usage

  1. if ( !function_exists( 'ninja_forms_get_current_tab' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_get_current_tab(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/admin.php  
  1. function ninja_forms_get_current_tab() { 
  2. global $ninja_forms_tabs; 
  3. if(isset($_REQUEST['page'])) { 
  4. $current_page = esc_html( $_REQUEST['page'] ); 
  5.  
  6.  
  7. if(isset($_REQUEST['tab'])) { 
  8. $current_tab = esc_html( $_REQUEST['tab'] ); 
  9. }else{ 
  10. if(isset($ninja_forms_tabs[$current_page]) AND is_array($ninja_forms_tabs[$current_page])) { 
  11. $first_tab = array_slice($ninja_forms_tabs[$current_page], 0, 1); 
  12. foreach($first_tab as $key => $val) { 
  13. $current_tab = $key; 
  14. }else{ 
  15. $current_tab = ''; 
  16. return $current_tab; 
  17. }else{ 
  18. return false;