Description
Returns the next selector for [bw_tabs]| $inc | action | return |
|---|---|---|
| true | $tabs_id++ | next value |
| false | nop | current value |
| null | 0 | current value = 0 |
Usage
$string = bw_tabs_id( $inc );Parameters
- $inc
- ( bool|null ) optional default: 1 – increment the id?
Returns
string tab selector IDSource
File name: oik/shortcodes/oik-tabs.phpLines:
1 to 9 of 9
function bw_tabs_id( $inc=true ) { static $tabs_id = 0; if ( $inc ) { $tabs_id++; } elseif ( null === $inc ) { $tabs_id = 0; } return( "bw_tabs-$tabs_id" ); }View on GitHub View on Trac
Called by
1 to 4 of 4
- bw_tabs() – Implement the [bw_tabs] shortcode to display posts or pages styled for jQuery tabs
- Tests_shortcodes_oik_tabs::test_bw_tabs_id() – Test the improvements to bw_tabs_id() to allow reproducible tests run in any order
- Tests_shortcodes_oik_tabs::test_bw_tabs__example() – This tests the HTML. not the jQuery
- Tests_shortcodes_oik_tabs::test_bw_tabs__example_bb_BB() –
