Description
Display pages using modern accordion methods.Uses detail and summary tags. No jQuery
Usage
bw_accordion( $atts, $content, $tag );Parameters
- $atts
- ( mixed ) optional –
- $content
- ( mixed ) optional –
- $tag
- ( mixed ) optional –
Returns
voidSource
File name: oik/shortcodes/oik-accordion.phpLines:
1 to 24 of 24
function bw_accordion( $atts=null, $content=null, $tag=null ) { oik_require( "includes/bw_posts.php" ); $posts = bw_get_posts( $atts ); if ( $posts ) { //oik_require( "shortcodes/oik-jquery.php" ); $debug = bw_array_get( $atts, "debug", false ); //bw_jquery_enqueue_script( "jquery-ui-accordion", $debug ); //bw_jquery_enqueue_style( "jquery-ui-accordion" ); $selector = bw_accordion_id(); //bw_jquery( "#$selector", "accordion" ); $class = bw_array_get( $atts, "class", "bw_accordion" ); sdiv( $class, $selector ); $cp = bw_current_post_id(); foreach ( $posts as $post ) { bw_current_post_id( $post->ID ); bw_format_accordion( $post, $atts ); } ediv( $class ); bw_current_post_id( $cp ); bw_clear_processed_posts(); } return( bw_ret() ); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 13 of 13
- bw_accordion_id() – Returns the next selector for [bw_accordion]
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_clear_processed_posts() – Clear the array of processed posts
- bw_current_post_id() – Set/return the current post ID
- bw_format_accordion() – Format an accordion block – for jQuery UI accordion 1.9.2 or higher
- bw_get_posts() – Wrapper to get_posts()
- bw_jquery() – Dynamic jQuery setting the selector, function and option parameters
- bw_jquery_enqueue_script() – Enqueue the jQuery script identifying dependencies
- bw_jquery_enqueue_style() – Enqueue style files required for this script
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- ediv() – End a div
- oik_require() – Invoke require_once on an oik include file or other file
- sdiv() – Start a div
