Description
Returns the next selector for [bw_accordion]| $inc | action | return |
|---|---|---|
| true | $accordion_id++ | next value |
| false | nop | current value |
| null | 0 | current value = 0 |
Usage
$string = bw_accordion_id( $inc );Parameters
- $inc
- ( bool|null ) optional default: 1 – increment the id?
Returns
string tab selector IDSource
File name: oik/shortcodes/oik-accordion.phpLines:
1 to 9 of 9
function bw_accordion_id( $inc=true ) { static $accordion_id = 0; if ( $inc ) { $accordion_id++; } elseif ( null === $inc ) { $accordion_id = 0; } return( "bw_accordion-$accordion_id" ); }View on GitHub View on Trac
Called by
1 to 4 of 4
- bw_accordion() – Display pages styled for jQuery accordion
- Tests_shortcodes_oik_accordion::test_bw_accordion_id() – Test the improvements to bw_accordion_id() to allow reproducible tests run in any order
- Tests_shortcodes_oik_accordion::test_bw_accordion__example() – This tests the HTML. not the jQuery
- Tests_shortcodes_oik_accordion::test_bw_accordion__example_bb_BB() –
