optionsframework_tabs

Generates the tabs that are used in the options menu.

Description

optionsframework_tabs(); 

Usage

  1. if ( !function_exists( 'optionsframework_tabs' ) ) { 
  2. require_once '/inc/options-interface.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = optionsframework_tabs(); 
  7.  

Defined (1)

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

/inc/options-interface.php  
  1. function optionsframework_tabs() { 
  2. $counter = 0; 
  3. $options =& _optionsframework_options(); 
  4. $menu = ''; 
  5.  
  6. foreach ( $options as $value ) { 
  7. // Heading for Navigation 
  8. if ( $value['type'] == "heading" ) { 
  9. $counter++; 
  10. $class = ''; 
  11. $class = ! empty( $value['id'] ) ? $value['id'] : $value['name']; 
  12. $class = preg_replace('/[^a-zA-Z0-9._\-]/', '', strtolower($class) ) . '-tab'; 
  13. $menu .= '<a id="options-group-'. $counter . '-tab" class="nav-tab ' . $class .'" title="' . esc_attr( $value['name'] ) . '" href="' . esc_attr( '#options-group-'. $counter ) . '">' . esc_html( $value['name'] ) . '</a> '; 
  14.  
  15. return $menu;