$atts['radius'] ) $atts['radius'] = 10; // absolute minimum size 20x20 // clean gmtoffset if ( !empty( $atts['gmtoffset'] ) ) { $atts['gmtoffset'] = str_replace( ',', '.', $atts['gmtoffset'] ); $atts['gmtoffset'] = str_replace( array('1/2','½'), '.5', $atts['gmtoffset'] ); $atts['gmtoffset'] = str_replace( array('h',' '), '', $atts['gmtoffset'] ); $atts['gmtoffset'] = is_numeric( $atts['gmtoffset'] ) ? (float) trim( $atts['gmtoffset'] ) : ''; } if ( !empty( $atts['scale'] ) ) $atts['scale'] = wp_strip_all_tags( $atts['scale'] ); // post-treat showdigital if ( in_array( $atts['showdigital'], array('true','1') ) ) $atts['showdigital'] = true; elseif ( !in_array( $atts['showdigital'], array('false','0') ) ) $atts['showdigital'] = wp_strip_all_tags( $atts['showdigital'] ); else $atts['showdigital'] = ''; // post-treat noseconds if ( 'false' === $atts['noseconds'] ) $atts['noseconds'] = false; if ( !empty( $atts['fontcolor'] ) ) $atts['fontcolor'] = CoolClock::colorval( $atts['fontcolor'] ); if ( !empty( $atts['font'] ) ) $atts['font'] = wp_strip_all_tags( $atts['font'] ); if ( !empty( $atts['subtext'] ) ) $atts['subtext'] = wp_kses( $atts['subtext'], CoolClock::$allowed_tags ); $align = !empty( $atts['align'] ) ? wp_strip_all_tags( $atts['align'] ) : $defaults['align']; $class = in_array( $align, array('left','right','center') ) ? ' align' . $align : ''; // inline container style $styles = array( 'width' => 2 * $atts['radius'] . 'px', 'height' => 'auto' // leave height:auto at the end for old pro filter to find and replace ); $styles = apply_filters( 'coolclock_container_styles', $styles, $atts, $defaults ); // set footer script flags CoolClock::$add_script = true; // Build output // begin wrapper $output = '