Manages tabs design with shortcodes.

Use [tab][/tab] to wrap the content of a single tag and then [tabs-list] for the list of the tabs in the current post content.

These optional parameter are available: icon = string|int number if you want a incon from the media library, string for the tag src attribute class = string class attribute for the current tab div title = string the title of the tab list = boolean set to false if you want to remove the current entry from the tabs list from = the starting point of the google maps route route-type = the type or google maps route google.maps.TravelMode

author etessore
version 1.0.0
since 1.0

 Methods

Initializes the istance with default values

__construct() 

Builds the list of tabs.

build_list(string $content) 

This is called to be sure we don't leave no tab behind Thanks to Viper007Bond: @link http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/

Parameters

$content

string

the post content

This is called back by WordPress when the tab list shortcode is found

list_hook(array $atts) 

Parameters

$atts

array

User defined attributes in shortcode tag.

This is called back by wordpress when a tab shortcode is found

tab_hook(\unknown_type $atts, string $content) 

Parameters

$atts

\unknown_type

$content

string

the content wrapped into the shortcode

Register the needed shortcodes with WordPress subsystem

add_shortcode($tab, $list) 

Parameters

$tab

true if you want to enable the shortcode 'tab_hook'

$list

true if you want to enable the shortcode 'list_hook'

Deletes the shortcodes used in this feature

delete_shortcode($tab, $list) 

Parameters

$tab

true if you want to disable the shortcode 'tab_hook'

$list

true if you want to disable the shortcode 'list_hook'

Get the image for the tab.

get_image(int | string $parm) 

build the image for this tab: take it from the media library if the parameter is a number, use such parameter as src attribute for img tag if it's not a number.

Parameters

$parm

intstring

id of the image or string of the src parameter

 Properties

 

$list_shortcode : \unknown_type
 

$list_tpl : \SubstitutionTemplate
 

$tab_shortcode : string
 

$tab_tpl : \SubstitutionTemplate
 

$list_of_entries : array
 

$number_of_entries : int