<?php function the_clocked_time_shortcode( $atts ){ $args = shortcode_atts( array( 'id' => 'clock' , 'width' => '24' , 'height' => '24' , 'local' => '0' , 'hour' => get_the_time('H') , 'minute' => get_the_time('i') , 'second' => get_the_time('s') , 'autoplay'=>'0' ,'hour_cycle' => '12' , 'hour_color' => '000000' , 'hour_alpha' => '100' , 'hour_type' => '2' , 'hour_width' => '100' , 'hour_length' => '60' , 'minute_color' => '000000' , 'minute_alpha' => '100' , 'minute_type' => '2' , 'minute_length' => '100' , 'minute_width' => '80' , 'second_color' => 'CC0000' , 'second_alpha' => '100' , 'second_type' => '2' , 'second_length' => '100' , 'second_width' => '12.5' , 'mark_a_number' => '4' , 'mark_a_color' => '000000' , 'mark_a_alpha' => '100' , 'mark_a_length' => '20' , 'mark_a_width' => '4' , 'mark_b_number' => '12' , 'mark_b_alpha' => '100' , 'mark_b_color' => '000000' , 'mark_b_length' => '10' , 'mark_b_width' => '2' , 'outline_color' => '000000' , 'outline_alpha' => '100' , 'outline_width' => '1' , 'sphere_color' => 'FFFFFF' , 'sphere_alpha' => '100' ) , $atts ); list( $width , $height ) = array( esc_attr( $args['width'] ) , esc_attr( $args['height'] ) ); unset( $args['width'] , $args['height'] ); $return = the_clocked_time( $width , $height , false , $args ); return $return; }; add_shortcode( 'analog_clock' , 'the_clocked_time_shortcode' ); ?>
[analog_clock]: Source code
By the Web Warlock, Monday, 31/May/2010 19:00
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL