You appear to be a bot. Output may be restricted
Description
Implement the [bw_countdown] shortcode
Usage
$string = bw_countdown( $atts, $content, $tag );
Parameters
- $atts
- ( array ) optional – shortcode parameters
- $content
- ( string ) optional – not expected
- $tag
- ( string ) optional – shortcode tag – not expected
Returns
string the required jQuery and HTMLSource
File name: oik/shortcodes/oik-countdown.phpLines:
1 to 31 of 31
function bw_countdown( $atts=null, $content=null, $tag=null ) { oik_require( "includes/bw_jquery.inc" ); $until = bw_array_get( $atts, "until", null ); if ( $until ) { $atts["until"] = bw_countdown_date( $until ); } else { $since = bw_array_get( $atts, "since", null ); if ( $since ) { $atts['since'] = bw_countdown_date( $since ); } else { $atts['until'] = bw_countdown_date( "+10" ); } } $class = bw_array_get( $atts, "class", null ); $id = bw_array_get( $atts, "id", null ); if ( null === $id ) { $id = bw_countdown_id(); } $debug = bw_array_get( $atts, "debug", false ); $script = bw_array_get( $atts, "script", "countdown" ); $style = bw_array_get( $atts, "style", $script ); $atts = bw_alter_atts( $atts, "class,id,debug,script,style", "expiryText,expiryUrl" ); $parms = bw_jkv( $atts ); $parms = bw_allow_js( $parms ); oik_require( "shortcodes/oik-jquery.php" ); bw_jquery_enqueue_script( $script, $debug ); bw_jquery_enqueue_style( $style ); bw_jquery( "div#$id" , "countdown", $parms, false ); sediv( $class, $id ); return( bw_ret() ); }View on GitHub View on Trac