shortcode_tabs

The Evolved shortcode tabs function.

Description

shortcode_tabs( $atts, (null) $content = null ); 

Parameters (2)

0. $atts
The atts.
1. $content — Optional. (null) => null
The content.

Usage

  1. if ( !function_exists( 'shortcode_tabs' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = shortcode_tabs($atts, $content); 
  12.  

Defined (1)

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

/functions.php  
  1. function shortcode_tabs( $atts, $content = null ) { 
  2. extract(shortcode_atts(array( 
  3. ), $atts)); 
  4.  
  5. $out = ''; 
  6. $out .= '[raw]<div class="tabs-wrapper">[/raw]'; 
  7.  
  8. $out .= '<ul class="tabs tabs-nav">'; 
  9. foreach ($atts as $tab) { 
  10. $out .= '<li><a href="#">' .$tab. '</a></li>'; 
  11. $out .= '</ul>'; 
  12.  
  13. $out .= do_shortcode($content) .'[raw]</div>[/raw]'; 
  14.  
  15. return $out;