Changeset 490582
- Timestamp:
- 01/16/2012 12:26:14 PM (13 years ago)
- Location:
- tdd-progress-bar
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
tdd-progress-bar/trunk/css/default.css
r466654 r490582 17 17 } 18 18 19 . red {19 .red { 20 20 background-position: 0px 0; 21 21 } 22 22 23 . race .red {23 .red { 24 24 background-position: 0px -12px; 25 25 } 26 26 27 . orange {27 .orange { 28 28 background-position: 0px -50px; 29 29 } 30 30 31 . race .orange {31 .orange { 32 32 background-position: 0px -62px; 33 33 } 34 34 35 . yellow {35 .yellow { 36 36 background-position: 0px -100px; 37 37 } 38 38 39 . race .yellow {39 .yellow { 40 40 background-position: 0px -112px; 41 41 } 42 42 43 . green {43 .green { 44 44 background-position: 0px -150px; 45 45 } 46 46 47 . race .green {47 .green { 48 48 background-position: 0px -162px; 49 49 } 50 50 51 .t eal {51 .teal { 52 52 background-position: 0px -200px; 53 53 } 54 54 55 . race .teal {55 .teal { 56 56 background-position: 0px -212px; 57 57 } 58 58 59 . lightblue {59 .lightblue { 60 60 background-position: 0px -250px; 61 61 } 62 62 63 . race .lightblue {63 .lightblue { 64 64 background-position: 0px -262px; 65 65 } 66 66 67 . blue {67 .blue { 68 68 background-position: 0px -300px; 69 69 } 70 70 71 . race .blue {71 .blue { 72 72 background-position: 0px -312px; 73 73 } 74 74 75 . purple {75 .purple { 76 76 background-position: 0px -350px; 77 77 } 78 78 79 . race .purple {79 .purple { 80 80 background-position: 0px -362px; 81 81 } 82 82 83 . fuchsia {83 .fuchsia { 84 84 background-position: 0px -400px; 85 85 } 86 86 87 . race .fuchsia {87 .fuchsia { 88 88 background-position: 0px -415px; 89 89 } 90 90 91 . strawberry {91 .strawberry { 92 92 background-position: 0px -450px; 93 93 } 94 94 95 . race .strawberry {95 .strawberry { 96 96 background-position: 0px -465px; 97 97 } 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 98 115 99 116 .tdd_pb_bar { … … 108 125 } 109 126 110 . race .tdd_pb_bar_container {127 .race .tdd_pb_bar_container { 111 128 height:25px; 112 129 } 113 130 114 . race .tdd_pb_bar_container .numbers {131 .numbers { 115 132 font-size:15px; 116 133 margin-top:4px; 117 134 } 118 135 119 . numbers {136 .numbers { 120 137 text-shadow:-1px -1px 1px #000; 121 138 font-size:30px; -
tdd-progress-bar/trunk/inc/admin.php
r466661 r490582 14 14 'yellow' => __( 'Yellow', 'tdd_pb' ), 15 15 'orange' => __( 'Orange', 'tdd_pb' ), 16 'red' => __( 'Red', 'tdd_pb' ) 16 'red' => __( 'Red', 'tdd_pb' ), 17 'black' => __( 'Black', 'tdd_pb' ), 18 'silver' => __( 'Silver', 'tdd_pb' ), 17 19 ); 18 20 … … 53 55 <?php echo tdd_pb_get_bars( array( 54 56 'ids' => array( get_the_ID() ), 55 'class' => ' race',57 'class' => 'race', 56 58 ) ); 57 59 ?> … … 101 103 echo tdd_pb_get_bars( array( 102 104 'ids' => array( $post->ID ), 103 'class' => ' race',105 'class' => 'race', 104 106 ) ); 105 107 -
tdd-progress-bar/trunk/readme.txt
r468265 r490582 4 4 Tags: progress, shortcode 5 5 Requires at least: 3.2.1 6 Tested up to: 3.3 7 Stable tag: 0. 2.16 Tested up to: 3.3 7 Stable tag: 0. 8 8 9 9 Configure and display any number of percent-complete progress bars. … … 46 46 Note that "id" and "ids" are interchangeable 47 47 48 49 48 50 == Changelog == 51 52 53 54 55 49 56 50 57 = 0.2.1 = -
tdd-progress-bar/trunk/tdd-progress-bar.php
r468262 r490582 145 145 */ 146 146 include plugin_dir_path( __FILE__ ). 'inc/admin.php'; 147 147 148 /* 149 * Widget Class 150 */ 151 include plugin_dir_path( __FILE__ ). 'inc/widget.php'; 152 148 153 /* 149 154 * Shortcode … … 158 163 * Also any of the above formats using shortcode [tdd_pb] 159 164 */ 160 161 162 165 function tdd_pb_shortcode( $args ){ 163 166 … … 203 206 'width' => 'auto', 204 207 'class' => '', 205 'default_color' => ' red',208 'default_color' => 'red', 206 209 ); 207 210 … … 217 220 218 221 //count if this is a race (more than one progress bar being displayed. The race format can also be forced by passing "race" in the $class argument) 219 $race = ( count( $idsarr ) > 1 ) ? ' race' : '';222 $race = ( count( $idsarr ) > 1 ) ? 'race' : ''; 220 223 221 224 //Set up our global container … … 247 250 $color = strip_tags( get_post_meta( get_the_ID(), '_tdd_pb_color', true ) ); 248 251 //if no color, define a default 249 $color = (!$color) ? $args['default_color'] : $color;252 $color = (!$color) ? $args['default_color'] : $color; 250 253 $return .= '<div title="'.get_the_title() .'" class="tdd_pb_bar_container" style="background-color: #'. $tdd_pb_options["bar_background_color"] .'">'; 251 254 if ($tdd_pb_options['display_percentage']){ 252 $return .= '<div class=" numbers" style="color: #'.$tdd_pb_options["percentage_color"].'">'. $percentage .'%</div>';255 $return .= '<div class="numbers" style="color: #'.$tdd_pb_options["percentage_color"].'">'. $percentage .'%</div>'; 253 256 } 254 257 $return .= '<div class="tdd_pb_bar '. $color .'" style="width:'. $percentage .'%"></div></div>';
Note: See TracChangeset
for help on using the changeset viewer.