Changeset 655348
- Timestamp:
- 01/19/2013 05:43:28 PM (13 years ago)
- Location:
- countdown-timer/trunk
- Files:
-
- 5 edited
-
.gitignore (modified) (1 diff)
-
fergcorp_countdownTimer.php (modified) (8 diffs)
-
lang/fergcorp_countdownTimer-bs_BA.po (modified) (15 diffs)
-
readme.txt (modified) (7 diffs)
-
tests/CountDownTimerTest.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
countdown-timer/trunk/.gitignore
r651785 r655348 10 10 assets/banner-772x250.jpg 11 11 report 12 fergcorp_debugCountdownTimer.php -
countdown-timer/trunk/fergcorp_countdownTimer.php
r651785 r655348 4 4 Plugin URI: http://www.andrewferguson.net/wordpress-plugins/countdown-timer/ 5 5 Description: Use shortcodes and a widget to count down or up to the years, months, weeks, days, hours, minutes, and/or seconds to a particular event. 6 Version: 3.0. 46 Version: 3.0.5 7 7 Author: Andrew Ferguson 8 8 Author URI: http://www.andrewferguson.net … … 111 111 $this->loadSettings(); 112 112 113 if(version_compare($this->version, "3.0. 4", "<")){113 if(version_compare($this->version, "3.0.5", "<")){ 114 114 add_action('admin_init', array( &$this, 'install' ) ); 115 115 add_action('admin_init', array( &$this, 'loadSettings' ) ); … … 693 693 694 694 if(!$this->eventsPresent){ 695 $toReturn = __('No dates present', 'fergcorp_countdownTimer');695 $toReturn = "<li>".__('No dates present', 'fergcorp_countdownTimer')."</li>"; 696 696 } 697 697 … … 1087 1087 * @author Andrew Ferguson 1088 1088 */ 1089 public function install(){1089 public static function install(){ 1090 1090 $plugin_data = get_plugin_data(__FILE__); 1091 1091 1092 //Don't test for now1093 // @codeCoverageIgnoreStart1094 1092 //Move widget details from old option to new option only if the new option does not exist 1095 1093 if( ( $oldWidget = get_option( "widget_fergcorp_countdown" ) ) && (!get_option( "widget_fergcorp_countdown_timer_widget" ) ) ) { … … 1128 1126 delete_option("widget_fergcorp_countdown"); 1129 1127 } 1130 // @codeCoverageIgnoreEnd 1131 1132 // @codeCoverageIgnoreStart 1128 1133 1129 //Move timeFormat data from old option to new option only if the new option does not exist 1134 1130 if( ( $timeOffset = get_option( "fergcorp_countdownTimer_timeOffset" ) ) && (!get_option( "fergcorp_countdownTimer_timeFormat" ) ) ) { … … 1140 1136 delete_option("fergcorp_countdownTimer_timeOffset"); 1141 1137 } 1142 // @codeCoverageIgnoreEnd 1143 1144 // @codeCoverageIgnoreStart 1138 1145 1139 $oneTimeEvent = get_option("fergcorp_countdownTimer_oneTimeEvent"); 1146 1140 if( ( $oneTimeEvent ) && ( gettype($oneTimeEvent[0]) == "array") ) { … … 1151 1145 update_option("fergcorp_countdownTimer_oneTimeEvent", $event_object_array); 1152 1146 } 1153 // @codeCoverageIgnoreEnd1154 1147 1155 1148 //Install the defaults 1156 $this->install_option('fergcorp_countdownTimer_', 'deleteOneTimeEvents', '0');1157 $this->install_option('fergcorp_countdownTimer_', 'timeFormat', 'F jS, Y, g:i a');1158 $this->install_option('fergcorp_countdownTimer_', 'showYear', '1');1159 $this->install_option('fergcorp_countdownTimer_', 'showMonth', '1');1160 $this->install_option('fergcorp_countdownTimer_', 'showWeek', '0');1161 $this->install_option('fergcorp_countdownTimer_', 'showDay', '1');1162 $this->install_option('fergcorp_countdownTimer_', 'showHour', '1');1163 $this->install_option('fergcorp_countdownTimer_', 'showMinute', '1');1164 $this->install_option('fergcorp_countdownTimer_', 'showSecond', '0');1165 $this->install_option('fergcorp_countdownTimer_', 'stripZero', '1');1166 $this->install_option('fergcorp_countdownTimer_', 'enableJS', '1');1167 $this->install_option('fergcorp_countdownTimer_', 'timeSinceTime', '0');1168 $this->install_option('fergcorp_countdownTimer_', 'titleSuffix', ':<br />');1169 $this->install_option('fergcorp_countdownTimer_', 'enableShortcodeExcerpt', '0');1170 $this->install_option('fergcorp_countdownTimer_', 'oneTimeEvent', '0');1149 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'deleteOneTimeEvents', '0'); 1150 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'timeFormat', 'F jS, Y, g:i a'); 1151 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showYear', '1'); 1152 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showMonth', '1'); 1153 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showWeek', '0'); 1154 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showDay', '1'); 1155 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showHour', '1'); 1156 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showMinute', '1'); 1157 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'showSecond', '0'); 1158 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'stripZero', '1'); 1159 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'enableJS', '1'); 1160 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'timeSinceTime', '0'); 1161 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'titleSuffix', ':<br />'); 1162 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'enableShortcodeExcerpt', '0'); 1163 Fergcorp_Countdown_Timer::install_option('fergcorp_countdownTimer_', 'oneTimeEvent', '0'); 1171 1164 1172 1165 //Update version number...last thing … … 1265 1258 } 1266 1259 1267 /*public function getTimestamp() {1260 public function getTimestamp() { 1268 1261 return method_exists('DateTime', 'getTimestamp') ? parent::getTimestamp() : $this->time; 1269 } */1262 } 1270 1263 1271 1264 public function setTitle ( $title ) { -
countdown-timer/trunk/lang/fergcorp_countdownTimer-bs_BA.po
r558835 r655348 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Countdown Timer v3.0 Beta 2\n"3 "Project-Id-Version: Countdown Timer v3.0.5\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2012-06-14 21:03-0800\n" 6 "PO-Revision-Date: 201 2-06-15 05:20:38+0000\n"6 "PO-Revision-Date: 2013-01-19 17:41:23+0000\n" 7 7 "Last-Translator: Andrew Ferguson <andrew@fergcorp.com>\n" 8 8 "Language-Team: \n" … … 20 20 "X-Textdomain-Support: yes" 21 21 22 #: fergcorp_countdownTimer.php: 17422 #: fergcorp_countdownTimer.php:205 23 23 #@ fergcorp_countdownTimer 24 24 msgid "Countdown Timer Settings" 25 25 msgstr "" 26 26 27 #: fergcorp_countdownTimer.php: 17428 #: fergcorp_countdownTimer.php:1 28427 #: fergcorp_countdownTimer.php:205 28 #: fergcorp_countdownTimer.php:1329 29 29 #@ fergcorp_countdownTimer 30 30 msgid "Countdown Timer" 31 31 msgstr "" 32 32 33 #: fergcorp_countdownTimer.php:2 0033 #: fergcorp_countdownTimer.php:231 34 34 #@ fergcorp_countdownTimer 35 35 msgid "Are you sure you wish to delete" 36 36 msgstr "Sigurno želite obrisati" 37 37 38 #: fergcorp_countdownTimer.php: 24738 #: fergcorp_countdownTimer.php:318 39 39 #@ fergcorp_countdownTimer 40 40 msgid "Plugin Homepage" 41 41 msgstr "Stranica dodatka" 42 42 43 #: fergcorp_countdownTimer.php: 24843 #: fergcorp_countdownTimer.php:319 44 44 #@ fergcorp_countdownTimer 45 45 msgid "Support Forum" 46 46 msgstr "Forum za podršku" 47 47 48 #: fergcorp_countdownTimer.php: 24948 #: fergcorp_countdownTimer.php:320 49 49 #@ fergcorp_countdownTimer 50 50 msgid "Amazon Wishlist" 51 51 msgstr "Lista želja" 52 52 53 #: fergcorp_countdownTimer.php: 25353 #: fergcorp_countdownTimer.php:324 54 54 #@ fergcorp_countdownTimer 55 55 msgid "I've coded and supported this plugin for several years now, however I am a full-time engineer with a real, full-time job and really only do this programming thing on the side for the love of it. If you would like to continue to see updates, please consider donating above." 56 56 msgstr "" 57 57 58 #: fergcorp_countdownTimer.php:2 5658 #: fergcorp_countdownTimer.php:266 59 59 #@ fergcorp_countdownTimer 60 60 msgid "Resources" 61 61 msgstr "Resursi" 62 62 63 #: fergcorp_countdownTimer.php:2 7063 #: fergcorp_countdownTimer.php:280 64 64 #, fuzzy 65 65 #@ fergcorp_countdownTimer … … 67 67 msgstr "Instalacione napomene" 68 68 69 #: fergcorp_countdownTimer.php:2 7169 #: fergcorp_countdownTimer.php:281 70 70 #@ fergcorp_countdownTimer 71 71 msgid "One Time Events" 72 72 msgstr "Pojedinačni događaji" 73 73 74 #: fergcorp_countdownTimer.php:2 7274 #: fergcorp_countdownTimer.php:282 75 75 #@ fergcorp_countdownTimer 76 76 msgid "Management" 77 77 msgstr "Kontola" 78 78 79 #: fergcorp_countdownTimer.php:2 7379 #: fergcorp_countdownTimer.php:283 80 80 #@ fergcorp_countdownTimer 81 81 msgid "Countdown Time Display" 82 82 msgstr "Odbrojavanje - šta prikazati" 83 83 84 #: fergcorp_countdownTimer.php:2 7485 #: fergcorp_countdownTimer.php:5 5784 #: fergcorp_countdownTimer.php:284 85 #: fergcorp_countdownTimer.php:582 86 86 #@ fergcorp_countdownTimer 87 87 msgid "onHover Time Format" 88 88 msgstr "Izgled vremena na prelaz miša" 89 89 90 #: fergcorp_countdownTimer.php:2 7590 #: fergcorp_countdownTimer.php:285 91 91 #@ fergcorp_countdownTimer 92 92 msgid "Display Format Options" 93 93 msgstr "Opcije prikaza" 94 94 95 #: fergcorp_countdownTimer.php:2 7695 #: fergcorp_countdownTimer.php:286 96 96 #@ fergcorp_countdownTimer 97 97 msgid "Example Display" 98 98 msgstr "Izgled stavke" 99 99 100 #: fergcorp_countdownTimer.php:2 83100 #: fergcorp_countdownTimer.php:293 101 101 #@ fergcorp_countdownTimer 102 102 msgid "Save Changes" 103 103 msgstr "" 104 104 105 #: fergcorp_countdownTimer.php:3 05105 #: fergcorp_countdownTimer.php:339 106 106 #@ fergcorp_countdownTimer 107 107 msgid "This setting controls what units of time are displayed." 108 108 msgstr "Ovdje podešavate koje će se vremenske jedinice prikazivati." 109 109 110 #: fergcorp_countdownTimer.php:3 07110 #: fergcorp_countdownTimer.php:341 111 111 #@ fergcorp_countdownTimer 112 112 msgid "Years:" 113 113 msgstr "Godine:" 114 114 115 #: fergcorp_countdownTimer.php:3 08115 #: fergcorp_countdownTimer.php:342 116 116 #@ fergcorp_countdownTimer 117 117 msgid "Months:" 118 118 msgstr "Mjeseci:" 119 119 120 #: fergcorp_countdownTimer.php:3 10120 #: fergcorp_countdownTimer.php:344 121 121 #@ fergcorp_countdownTimer 122 122 msgid "Days:" 123 123 msgstr "Dani:" 124 124 125 #: fergcorp_countdownTimer.php:3 11125 #: fergcorp_countdownTimer.php:345 126 126 #@ fergcorp_countdownTimer 127 127 msgid "Hours:" 128 128 msgstr "Sati:" 129 129 130 #: fergcorp_countdownTimer.php:3 12130 #: fergcorp_countdownTimer.php:346 131 131 #@ fergcorp_countdownTimer 132 132 msgid "Minutes:" 133 133 msgstr "Minute:" 134 134 135 #: fergcorp_countdownTimer.php:3 13136 #: fergcorp_countdownTimer.php:5 11135 #: fergcorp_countdownTimer.php:347 136 #: fergcorp_countdownTimer.php:536 137 137 #@ fergcorp_countdownTimer 138 138 msgid "Seconds:" 139 139 msgstr "Sekunde:" 140 140 141 #: fergcorp_countdownTimer.php:3 14141 #: fergcorp_countdownTimer.php:348 142 142 #@ fergcorp_countdownTimer 143 143 msgid "Strip non-significant zeros:" 144 144 msgstr "Ukloni bespotrebne nule:" 145 145 146 #: fergcorp_countdownTimer.php:3 33146 #: fergcorp_countdownTimer.php:367 147 147 #@ fergcorp_countdownTimer 148 148 msgid "Delete" 149 149 msgstr "Obriši" 150 150 151 #: fergcorp_countdownTimer.php:3 34151 #: fergcorp_countdownTimer.php:368 152 152 #@ fergcorp_countdownTimer 153 153 msgid "Event Date" 154 154 msgstr "Datum stavke" 155 155 156 #: fergcorp_countdownTimer.php:3 35156 #: fergcorp_countdownTimer.php:369 157 157 #@ fergcorp_countdownTimer 158 158 msgid "Event Title" 159 159 msgstr "Naslov stavke" 160 160 161 #: fergcorp_countdownTimer.php:3 36161 #: fergcorp_countdownTimer.php:370 162 162 #@ fergcorp_countdownTimer 163 163 msgid "Link" 164 164 msgstr "Link" 165 165 166 #: fergcorp_countdownTimer.php:3 37166 #: fergcorp_countdownTimer.php:371 167 167 #@ fergcorp_countdownTimer 168 168 msgid "Display \"Time since\"" 169 169 msgstr "Prikaći \"Prošlo od tada\"" 170 170 171 #: fergcorp_countdownTimer.php:4 35171 #: fergcorp_countdownTimer.php:460 172 172 #@ fergcorp_countdownTimer 173 173 msgid "Automatically delete 'One Time Events' after they have occured?" 174 174 msgstr "Automatski briši 'Pojedinačne događaje' nakon što se dese?" 175 175 176 #: fergcorp_countdownTimer.php:4 44177 #: fergcorp_countdownTimer.php:1 163176 #: fergcorp_countdownTimer.php:469 177 #: fergcorp_countdownTimer.php:1228 178 178 #@ fergcorp_countdownTimer 179 179 msgid "Yes" 180 180 msgstr "Da" 181 181 182 #: fergcorp_countdownTimer.php:4 54183 #: fergcorp_countdownTimer.php:1 173182 #: fergcorp_countdownTimer.php:479 183 #: fergcorp_countdownTimer.php:1238 184 184 #@ fergcorp_countdownTimer 185 185 msgid "No" 186 186 msgstr "Ne" 187 187 188 #: fergcorp_countdownTimer.php:4 69188 #: fergcorp_countdownTimer.php:494 189 189 #, php-format 190 190 #@ fergcorp_countdownTimer … … 192 192 msgstr "Odbrojavanje koristi <a %s>PHP's <b>strtotime</b> funkcije</a> i regularno će prepoznati bilo koji tekstualni opis datuma na <b>Engleskom</b>." 193 193 194 #: fergcorp_countdownTimer.php:4 70194 #: fergcorp_countdownTimer.php:495 195 195 #@ fergcorp_countdownTimer 196 196 msgid "Examples of some (but not all) valid dates" 197 197 msgstr "Primjeri nekih (ali ne i svih) validnih vremenskih izraza (<b>Morate koristiti engleske izraze!</b> - op.p)" 198 198 199 #: fergcorp_countdownTimer.php: 479200 #, fuzzy, php-format, php-format 199 #: fergcorp_countdownTimer.php:504 200 #, fuzzy, php-format, php-format, php-format 201 201 #@ fergcorp_countdownTimer 202 202 msgid "To insert the Countdown Timer into your sidebar, you can use the <a %s>Countdown Timer Widget</a>." 203 203 msgstr "Dospjeli ste dovdje, još malo do kraja. Da ubacite Odborojavanje vremena u vaš sidebar <a %s>koristite widžet Odbrojavanje</a>, pod uvjetom da su vam widžeti omogućeni (ili imate ovlasti da ih omogućite)." 204 204 205 #: fergcorp_countdownTimer.php: 481205 #: fergcorp_countdownTimer.php:506 206 206 #, php-format 207 207 #@ fergcorp_countdownTimer … … 209 209 msgstr "Za prikaz <b>Odbrojavanje vremena</b> unutar stranice ili post-a, koristite <abbr %s %s>shortcodes</abbr>, za prikaz svih ili dio brojača, odnosno:" 210 210 211 #: fergcorp_countdownTimer.php: 481211 #: fergcorp_countdownTimer.php:506 212 212 #@ fergcorp_countdownTimer 213 213 msgid "A shortcode is a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line. Shortcode = shortcut." 214 214 msgstr "\"Shortcode\" je WordPress-ov kôd koji omogućava pravljenje ekstra stvari uz malo truda. Njegovim korištenjem možete uvesti datoteke ili kreirati objekte. Posao za koji bi morali pisati mnogo komplikovanog i ružnog kôda. \"Shortcode\" = <u>shortcut</u>, tj. kratica (u programiranju)" 215 215 216 #: fergcorp_countdownTimer.php: 488216 #: fergcorp_countdownTimer.php:513 217 217 #@ fergcorp_countdownTimer 218 218 msgid "Where <em>##</em> is maximum number of results to be displayed - ordered by date." 219 219 msgstr "Gdje su <em>##</em> maksimalan broj rezultata koje treba prikazati - redoslijed po datumu." 220 220 221 #: fergcorp_countdownTimer.php: 489221 #: fergcorp_countdownTimer.php:514 222 222 #@ fergcorp_countdownTimer 223 223 msgid "If you want to insert individual countdown timers, such as in posts or on pages, you can use the following shortcode:" 224 224 msgstr "Ako želite imati pojedinačnu kontrolu nad Odbrojavanjem (npr. u postovima ili stranicama) koristite sljedeći kôd:" 225 225 226 #: fergcorp_countdownTimer.php: 491226 #: fergcorp_countdownTimer.php:516 227 227 #@ fergcorp_countdownTimer 228 228 msgid "Time until my birthday:" 229 229 msgstr "Vrijeme do mog rođendana:" 230 230 231 #: fergcorp_countdownTimer.php: 495232 #, fuzzy, php-format, php-format 231 #: fergcorp_countdownTimer.php:520 232 #, fuzzy, php-format, php-format, php-format 233 233 #@ fergcorp_countdownTimer 234 234 msgid "Where <em>ENTER_DATE_HERE</em> uses <a %s>PHP's strtotime function</a> and will parse about any English textual datetime description." 235 235 msgstr "Odbrojavanje koristi <a %s>PHP's <b>strtotime</b> funkcije</a> i regularno će prepoznati bilo koji tekstualni opis datuma na <b>Engleskom</b>." 236 236 237 #: fergcorp_countdownTimer.php:5 10237 #: fergcorp_countdownTimer.php:535 238 238 #@ fergcorp_countdownTimer 239 239 msgid "How long the timer remain visable if \"Display 'Time Since'\" is ticked:" 240 240 msgstr "Koliko dugo će brojač biti vidljiv ukoliko je označeno \"Prošlo od tada\":" 241 241 242 #: fergcorp_countdownTimer.php:5 20242 #: fergcorp_countdownTimer.php:545 243 243 #@ fergcorp_countdownTimer 244 244 msgid "(0 = infinite; 86400 seconds = 1 day; 604800 seconds = 1 week)" 245 245 msgstr "(0 = beskonačno; 86400 sekundi = 1 dan; 604800 = 1 sedmica)" 246 246 247 #: fergcorp_countdownTimer.php:5 22247 #: fergcorp_countdownTimer.php:547 248 248 #@ fergcorp_countdownTimer 249 249 msgid "Enable JavaScript countdown:" 250 250 msgstr "Ukljući JavaScript odbrojavanje:" 251 251 252 #: fergcorp_countdownTimer.php:5 29252 #: fergcorp_countdownTimer.php:554 253 253 #@ fergcorp_countdownTimer 254 254 msgid "By default, WordPress does not parse shortcodes that are in excerpts. If you want to enable this functionality, you can do so here. Note that this will enable the parsing of <em>all</em> shortcodes in the excerpt, not just the ones associated with Countdown Timer." 255 255 msgstr "" 256 256 257 #: fergcorp_countdownTimer.php:5 30257 #: fergcorp_countdownTimer.php:555 258 258 #@ fergcorp_countdownTimer 259 259 msgid "Enable shortcodes in the_excerpt:" 260 260 msgstr "" 261 261 262 #: fergcorp_countdownTimer.php:5 51262 #: fergcorp_countdownTimer.php:576 263 263 #, php-format 264 264 #@ fergcorp_countdownTimer … … 266 266 msgstr "Ukoliko ste podesili 'Izgled vremena na prelaz miša', prelaskom miša preko preostalog vremena će prikazati datum na koji se nešto treba desiti. Izgled vremena na prelaz miša koristi <a %s>PHP's Date() function</a>." 267 267 268 #: fergcorp_countdownTimer.php:5 52268 #: fergcorp_countdownTimer.php:577 269 269 #@ fergcorp_countdownTimer 270 270 msgid "Examples" 271 271 msgstr "Primjeri" 272 272 273 #: fergcorp_countdownTimer.php:5 54274 #: fergcorp_countdownTimer.php:5 55273 #: fergcorp_countdownTimer.php:579 274 #: fergcorp_countdownTimer.php:580 275 275 #@ fergcorp_countdownTimer 276 276 msgid "goes to" 277 277 msgstr "ide" 278 278 279 #: fergcorp_countdownTimer.php: 582279 #: fergcorp_countdownTimer.php:607 280 280 #@ fergcorp_countdownTimer 281 281 msgid "This setting allows you to customize how each event is styled and wrapped." 282 282 msgstr "Ove postavke vam omogućuju da podesite kako će svaka stavka izgledati." 283 283 284 #: fergcorp_countdownTimer.php: 583284 #: fergcorp_countdownTimer.php:608 285 285 #@ fergcorp_countdownTimer 286 286 msgid "<strong>Title Suffix</strong> sets the content that appears immediately after title and before the timer." 287 287 msgstr "<b>Sufix</b> postavlja sadržaj koji će biti prikazan odmah nakon naslova a prije brojača." 288 288 289 #: fergcorp_countdownTimer.php: 584289 #: fergcorp_countdownTimer.php:609 290 290 #@ fergcorp_countdownTimer 291 291 msgid "Examples/Defaults" 292 292 msgstr "Primjeri/Orginalne postavke" 293 293 294 #: fergcorp_countdownTimer.php: 586295 #: fergcorp_countdownTimer.php: 588294 #: fergcorp_countdownTimer.php:611 295 #: fergcorp_countdownTimer.php:613 296 296 #@ fergcorp_countdownTimer 297 297 msgid "Title Suffix" 298 298 msgstr "Sufix naslova" 299 299 300 #: fergcorp_countdownTimer.php:6 68300 #: fergcorp_countdownTimer.php:695 301 301 #@ fergcorp_countdownTimer 302 302 msgid "No dates present" 303 303 msgstr "Nijedan datum nije postavljen" 304 304 305 #: fergcorp_countdownTimer.php:7 13306 #: fergcorp_countdownTimer.php:10 44305 #: fergcorp_countdownTimer.php:748 306 #: fergcorp_countdownTimer.php:1074 307 307 #, php-format 308 308 #@ fergcorp_countdownTimer … … 310 310 msgstr "prije %s" 311 311 312 #: fergcorp_countdownTimer.php:7 21313 #: fergcorp_countdownTimer.php:10 45312 #: fergcorp_countdownTimer.php:756 313 #: fergcorp_countdownTimer.php:1075 314 314 #, php-format 315 315 #@ fergcorp_countdownTimer … … 317 317 msgstr "za %s" 318 318 319 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 320 #: fergcorp_countdownTimer.php:781 321 #: fergcorp_countdownTimer.php:1022 322 #: fergcorp_countdownTimer.php:1023 323 #: fergcorp_countdownTimer.php:893 319 #: fergcorp_countdownTimer.php:816 320 #: fergcorp_countdownTimer.php:930 321 #: fergcorp_countdownTimer.php:1052 322 #: fergcorp_countdownTimer.php:1053 324 323 #, php-format 325 324 #@ fergcorp_countdownTimer … … 329 328 msgstr[1] "%d godine," 330 329 331 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 332 #: fergcorp_countdownTimer.php:793 333 #: fergcorp_countdownTimer.php:1025 334 #: fergcorp_countdownTimer.php:1026 335 #: fergcorp_countdownTimer.php:890 330 #: fergcorp_countdownTimer.php:828 331 #: fergcorp_countdownTimer.php:926 332 #: fergcorp_countdownTimer.php:1055 333 #: fergcorp_countdownTimer.php:1056 336 334 #, php-format 337 335 #@ fergcorp_countdownTimer … … 341 339 msgstr[1] "%d mjeseca," 342 340 343 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 344 #: fergcorp_countdownTimer.php:820 345 #: fergcorp_countdownTimer.php:1028 346 #: fergcorp_countdownTimer.php:1029 347 #: fergcorp_countdownTimer.php:887 341 #: fergcorp_countdownTimer.php:855 342 #: fergcorp_countdownTimer.php:923 343 #: fergcorp_countdownTimer.php:1058 344 #: fergcorp_countdownTimer.php:1059 348 345 #, php-format 349 346 #@ fergcorp_countdownTimer … … 353 350 msgstr[1] "%d sedmice," 354 351 355 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 356 #: fergcorp_countdownTimer.php:831 357 #: fergcorp_countdownTimer.php:1031 358 #: fergcorp_countdownTimer.php:1032 359 #: fergcorp_countdownTimer.php:884 352 #: fergcorp_countdownTimer.php:866 353 #: fergcorp_countdownTimer.php:920 354 #: fergcorp_countdownTimer.php:1061 355 #: fergcorp_countdownTimer.php:1062 360 356 #, php-format 361 357 #@ fergcorp_countdownTimer … … 365 361 msgstr[1] "%d dana," 366 362 367 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 368 #: fergcorp_countdownTimer.php:844 369 #: fergcorp_countdownTimer.php:1034 370 #: fergcorp_countdownTimer.php:1035 371 #: fergcorp_countdownTimer.php:881 363 #: fergcorp_countdownTimer.php:879 364 #: fergcorp_countdownTimer.php:917 365 #: fergcorp_countdownTimer.php:1064 366 #: fergcorp_countdownTimer.php:1065 372 367 #, php-format 373 368 #@ fergcorp_countdownTimer … … 377 372 msgstr[1] "%d sahata," 378 373 379 #. gettext fix: duplicate plural forms found, that may be ambiguous! Please check the code! 380 #: fergcorp_countdownTimer.php:857 381 #: fergcorp_countdownTimer.php:1037 382 #: fergcorp_countdownTimer.php:1038 383 #: fergcorp_countdownTimer.php:878 374 #: fergcorp_countdownTimer.php:892 375 #: fergcorp_countdownTimer.php:914 376 #: fergcorp_countdownTimer.php:1067 377 #: fergcorp_countdownTimer.php:1068 384 378 #, php-format 385 379 #@ fergcorp_countdownTimer … … 389 383 msgstr[1] "%d minute," 390 384 391 #: fergcorp_countdownTimer.php: 869392 #: fergcorp_countdownTimer.php: 875393 #: fergcorp_countdownTimer.php:10 40394 #: fergcorp_countdownTimer.php:10 41385 #: fergcorp_countdownTimer.php:904 386 #: fergcorp_countdownTimer.php:911 387 #: fergcorp_countdownTimer.php:1070 388 #: fergcorp_countdownTimer.php:1071 395 389 #, php-format 396 390 #@ fergcorp_countdownTimer … … 400 394 msgstr[1] "%d sekunde," 401 395 402 #: fergcorp_countdownTimer.php:1 273396 #: fergcorp_countdownTimer.php:1318 403 397 #@ fergcorp_countdownTimer 404 398 msgid "Adds the Countdown Timer" 405 399 msgstr "Odbrojavanje - šta prikazati" 406 400 407 #: fergcorp_countdownTimer.php:1 289401 #: fergcorp_countdownTimer.php:1334 408 402 #@ fergcorp_countdownTimer 409 403 msgid "Title:" 410 404 msgstr "Naslov:" 411 405 412 #: fergcorp_countdownTimer.php:1 291406 #: fergcorp_countdownTimer.php:1336 413 407 #@ fergcorp_countdownTimer 414 408 msgid "Maximum # of events to show:" 415 409 msgstr "Najviše prikazanih stavki:" 416 410 417 #: fergcorp_countdownTimer.php:1 293411 #: fergcorp_countdownTimer.php:1338 418 412 #@ fergcorp_countdownTimer 419 413 msgid "Notes:" 420 414 msgstr "Napomene:" 421 415 422 #: fergcorp_countdownTimer.php:1 293416 #: fergcorp_countdownTimer.php:1338 423 417 #@ fergcorp_countdownTimer 424 418 msgid "Set 'Maximum # of events' to '-1' if you want no limit." 425 419 msgstr "Podesite 'Najviše prikazanih stavki:' na '-1' za neograničen broj." 426 420 427 #: fergcorp_countdownTimer.php:3 09421 #: fergcorp_countdownTimer.php:343 428 422 #@ fergcorp_countdownTimer 429 423 msgid "Weeks:" -
countdown-timer/trunk/readme.txt
r652174 r655348 5 5 Requires at least: 3.5 6 6 Tested up to: 3.5 7 Stable tag: 3.0. 37 Stable tag: 3.0.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 95 95 Where "ENTER_DATE_HERE" uses PHP's strtotime function and will parse about any English textual date/time description (such as "08 December 2012"). A complete list of valid formats can be found on PHP's [Supported Date and Time Format](http://www.php.net/manual/en/datetime.formats.php) page. 96 96 97 = PHP = 97 = PHP = 98 98 99 99 Countdown Timer also provides a PHP function designed to be accessed publicly so you can include it in elements of your site that may not be in The Loop. 100 100 101 101 `fergcorp_countdownTimer(##)` 102 102 … … 176 176 177 177 == Upgrade Notice == 178 = 3.0. 4=179 A couple of major bug fixes 178 = 3.0.5 = 179 A couple of major bug fixes that deal resolve issues with using PHP < 5.3 and scope of object during activation 180 180 181 181 == Changelog == 182 182 183 = 3.0.5 = 184 Relase date: 1/19/2013 185 186 * Bug fix: Eliminates Fatal error: Using $this when not in object context in...that prevented plugin from activating in certain circumstances 187 * Bug fix: Added getTimestamp function needed for PHP < 5.3 188 * Bug fix: Properly enclose "No dates present" in <li> tags 183 189 184 190 = 3.0.4 = … … 209 215 * Bug fix: Will now check to see if the plugin has been updated and update settings as required to avoid problems such as "Call to a member function date() on a non-object...". Thanks to [pixwell] and [bonzo01] for pointing this out; special thanks to fiancée for letting me spend some time to fix it. 210 216 * Bug fix: Widget settings now properly moved from 2.4.3 to new format 211 * Cosmetic: Spaces after input labels 217 * Cosmetic: Spaces after input labels 212 218 213 219 = 3.0 = … … 226 232 * Updated readme instructions for installation and usage 227 233 * Added banner graphic for WordPress directory 228 234 229 235 230 236 = 2.4.3 = … … 260 266 * Rewrote parts of fergcorp_countdownTimer_format to make it less repetitive. Also removed last three variables: displayFormatPrefix, displayFormatSuffix, and displayStyle 261 267 * Completely moved namespace from afdn to fergcorp 262 * Changed the way dates are removed. Made it based on the lack of a date, instead of the lack of a title. 268 * Changed the way dates are removed. Made it based on the lack of a date, instead of the lack of a title. 263 269 * Reduced the user access level to Options Manager instead of Administrator 264 270 * Moved the options page from tools to settings in the admin menu … … 462 468 463 469 = 1.2 = 464 Release date: 03/13/2006: 470 Release date: 03/13/2006: 465 471 466 472 Development has been slow. Not really a lot to do. But version 1.2 offers some great things, including a bug fix! Deleting two or more events doesn't make the plugin freak out anymore (the bug fix). You can also customize how the onHover time is displayed, including not displaying it at all (just leave it blank). Because you can leave it blank, there is no default; but you can use and PHP 'date()' format. I recommend 'j M Y, G:i:s'. I also added a six month delay before the date on recurring events is reset'although as I'm writing this, I realize there's a slight bug there, nothing critical though. I welcome any new ideas, just leave a comment down below! -
countdown-timer/trunk/tests/CountDownTimerTest.php
r651785 r655348 1 1 <?php 2 2 require_once('fergcorp_countdownTimer.php'); 3 echo 'Current PHP version: ' . phpversion() . "\n"; 3 4 4 5 Class Test_Init_Fergcorp_Countdown_Timer extends WP_UnitTestCase{ … … 85 86 $GLOBALS['fergcorp_countdownTimer_init'] = new Fergcorp_Countdown_Timer(); 86 87 $this->plugin = $GLOBALS['fergcorp_countdownTimer_init']; 87 $this->plugin->install();88 89 $this->plugin->__construct();88 //$this->plugin->install(); 89 90 //$this->plugin->__construct(); 90 91 } 91 92 … … 126 127 } 127 128 } 129 130 /** 131 * @group install 132 * @covers Fergcorp_Countdown_Timer::install 133 */ 134 public function test_install_v2_4_3(){ 135 $oneTimeEvent = array( 136 array( 137 "date" => 1356998400, 138 "text" => "First of the year", 139 "timeSince" => "1", 140 "link" => "http://google.com", 141 ), 142 array( 143 "date" => 1451001600, 144 "text" => "Christmas 2015", 145 "timeSince" => NULL, 146 "link" => "", 147 ), 148 ); 149 150 $sidebars_widgets = array( 151 "wp_inactive_widgets" => array(), 152 "sidebar-1" => array( "fergcorp_countdowntimer", 153 "search-2", 154 "recent-posts-2", 155 "recent-comments-2", 156 "archives-2", 157 "categories-2", 158 "meta-2", 159 ), 160 "sidebar-2" => array(), 161 "sidebar-3" => array(), 162 "array_version" => 3 163 ); 164 wp_set_sidebars_widgets($sidebars_widgets); 165 wp_get_sidebars_widgets(); 166 167 $installValues = array( 168 'widget_fergcorp_countdown' => 'a:2:{s:5:"title";s:18:"My Countdown Timer";s:5:"count";i:5;}', 169 'fergcorp_countdownTimer_deleteOneTimeEvents' => '0', 170 'fergcorp_countdownTimer_timeOffset' => 'j M Y, G:i:s', 171 'fergcorp_countdownTimer_showYear' => '0', 172 'fergcorp_countdownTimer_showMonth' => '1', 173 'fergcorp_countdownTimer_showWeek' => '0', 174 'fergcorp_countdownTimer_showDay' => '1', 175 'fergcorp_countdownTimer_showHour' => '0', 176 'fergcorp_countdownTimer_showMinute' => '0', 177 'fergcorp_countdownTimer_showSecond' => '0', 178 'fergcorp_countdownTimer_stripZero' => '1', 179 'fergcorp_countdownTimer_enableJS' => '1', 180 'fergcorp_countdownTimer_timeSinceTime' => '0', 181 'fergcorp_countdownTimer_titleSuffix' => '::', 182 'fergcorp_countdownTimer_enableShortcodeExcerpt' => '0', 183 'fergcorp_countdownTimer_version' => '2.4.3', 184 'fergcorp_countdownTimer_oneTimeEvent' => $oneTimeEvent, 185 ); 186 187 foreach($installValues as $key => $value){ 188 update_option($key, $value); 189 } 190 191 $updatedValues = array( 192 'deleteOneTimeEvents' => '0', 193 'timeFormat' => 'j M Y, G:i:s', 194 'showYear' => '0', 195 'showMonth' => '1', 196 'showWeek' => '0', 197 'showDay' => '1', 198 'showHour' => '0', 199 'showMinute' => '0', 200 'showSecond' => '0', 201 'stripZero' => '1', 202 'enableJS' => '1', 203 'timeSinceTime' => '0', 204 'titleSuffix' => '::', 205 'enableShortcodeExcerpt' => '0', 206 207 'version' => $this->pluginData["Version"] 208 ); 209 210 $this->plugin->install(); 211 212 foreach($updatedValues as $key => $value){ 213 $this->assertEquals($value, get_option("fergcorp_countdownTimer_".$key)); 214 } 215 216 $updatedOneTimeEvent = get_option("fergcorp_countdownTimer_oneTimeEvent"); 217 218 for($i=0; $i < count($oneTimeEvent); $i++){ 219 $this->assertEquals($oneTimeEvent[$i]["date"], $updatedOneTimeEvent[$i]->getTimestamp()); 220 $this->assertEquals($oneTimeEvent[$i]["text"], $updatedOneTimeEvent[$i]->getTitle()); 221 $this->assertEquals($oneTimeEvent[$i]["timeSince"], $updatedOneTimeEvent[$i]->getTimeSince()); 222 $this->assertEquals($oneTimeEvent[$i]["link"], $updatedOneTimeEvent[$i]->getURL()); 223 } 224 } 225 226 /** 227 * @group install 228 * @covers Fergcorp_Countdown_Timer::install 229 */ 230 public function test_install_partial_v2_v_3(){ 231 $oneTimeEvent = array( 232 array( 233 "date" => 1356998400, 234 "text" => "First of the year", 235 "timeSince" => "1", 236 "link" => "http://google.com", 237 ), 238 array( 239 "date" => 1451001600, 240 "text" => "Christmas 2015", 241 "timeSince" => NULL, 242 "link" => "", 243 ), 244 ); 245 246 $sidebars_widgets = array( 247 "wp_inactive_widgets" => array(), 248 "sidebar-1" => array( "fergcorp_countdowntimer", 249 "search-2", 250 "recent-posts-2", 251 "recent-comments-2", 252 "archives-2", 253 "categories-2", 254 "meta-2", 255 ), 256 "sidebar-2" => array(), 257 "sidebar-3" => array(), 258 "array_version" => 3 259 ); 260 wp_set_sidebars_widgets($sidebars_widgets); 261 wp_get_sidebars_widgets(); 262 263 $installValues = array( 264 'widget_fergcorp_countdown_timer_widget' => 'blahblah', //dummy values 265 'widget_fergcorp_countdown' => 'a:2:{s:5:"title";s:18:"My Countdown Timer";s:5:"count";i:5;}', 266 'fergcorp_countdownTimer_deleteOneTimeEvents' => '0', 267 'fergcorp_countdownTimer_timeOffset' => 'j M Y, G:i:s', 268 'fergcorp_countdownTimer_timeFormat' => 'F jS, Y, g:i a', 269 'fergcorp_countdownTimer_showYear' => '0', 270 'fergcorp_countdownTimer_showMonth' => '1', 271 'fergcorp_countdownTimer_showWeek' => '0', 272 'fergcorp_countdownTimer_showDay' => '1', 273 'fergcorp_countdownTimer_showHour' => '0', 274 'fergcorp_countdownTimer_showMinute' => '0', 275 'fergcorp_countdownTimer_showSecond' => '0', 276 'fergcorp_countdownTimer_stripZero' => '1', 277 'fergcorp_countdownTimer_enableJS' => '1', 278 'fergcorp_countdownTimer_timeSinceTime' => '0', 279 'fergcorp_countdownTimer_titleSuffix' => '::', 280 'fergcorp_countdownTimer_enableShortcodeExcerpt' => '0', 281 'fergcorp_countdownTimer_version' => '2.4.3', 282 'fergcorp_countdownTimer_oneTimeEvent' => $oneTimeEvent, 283 ); 284 285 foreach($installValues as $key => $value){ 286 update_option($key, $value); 287 } 288 289 $updatedValues = array( 290 'deleteOneTimeEvents' => '0', 291 'showYear' => '0', 292 'showMonth' => '1', 293 'showWeek' => '0', 294 'showDay' => '1', 295 'showHour' => '0', 296 'showMinute' => '0', 297 'showSecond' => '0', 298 'stripZero' => '1', 299 'enableJS' => '1', 300 'timeSinceTime' => '0', 301 'titleSuffix' => '::', 302 'enableShortcodeExcerpt' => '0', 303 304 'version' => $this->pluginData["Version"] 305 ); 306 307 $this->plugin->install(); 308 309 foreach($updatedValues as $key => $value){ 310 $this->assertEquals($value, get_option("fergcorp_countdownTimer_".$key)); 311 } 312 313 $this->assertEquals(get_option("fergcorp_countdownTimer_timeFormat"), "F jS, Y, g:i a"); 314 315 $updatedOneTimeEvent = get_option("fergcorp_countdownTimer_oneTimeEvent"); 316 317 for($i=0; $i < count($oneTimeEvent); $i++){ 318 $this->assertEquals($oneTimeEvent[$i]["date"], $updatedOneTimeEvent[$i]->getTimestamp()); 319 $this->assertEquals($oneTimeEvent[$i]["text"], $updatedOneTimeEvent[$i]->getTitle()); 320 $this->assertEquals($oneTimeEvent[$i]["timeSince"], $updatedOneTimeEvent[$i]->getTimeSince()); 321 $this->assertEquals($oneTimeEvent[$i]["link"], $updatedOneTimeEvent[$i]->getURL()); 322 } 323 324 } 128 325 129 326 /** … … 243 440 //var_dump($r); 244 441 245 $this->assertTrue($r->isValid() );442 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 246 443 sleep(1); 247 444 … … 268 465 //var_dump($r); 269 466 270 $this->assertTrue($r->isValid() );467 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 271 468 sleep(1); 272 469 } … … 291 488 //var_dump($r); 292 489 293 $this->assertTrue($r->isValid() );490 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 294 491 sleep(1); 295 492 } … … 314 511 //var_dump($r); 315 512 316 $this->assertTrue($r->isValid() );513 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 317 514 sleep(1); 318 515 } … … 337 534 //var_dump($r); 338 535 339 $this->assertTrue($r->isValid() );536 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 340 537 sleep(1); 341 538 } … … 360 557 //var_dump($r); 361 558 362 $this->assertTrue($r->isValid() );559 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 363 560 sleep(1); 364 561 } … … 383 580 //var_dump($r); 384 581 385 $this->assertTrue($r->isValid() );582 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 386 583 sleep(1); 387 584 } … … 395 592 public function test_example_display_meta_box(){ 396 593 ob_start(); 397 echo "<ul>";398 594 $this->plugin->example_display_meta_box(); 399 echo "</ul>";400 595 $buffer = ob_get_clean(); 401 596 … … 408 603 //var_dump($r); 409 604 410 $this->assertTrue($r->isValid() );605 $this->assertTrue($r->isValid(), $this->htmlStart.$buffer.$this->htmlEnd); 411 606 sleep(1); 412 607 } … … 503 698 * @group settings_page 504 699 * @covers Fergcorp_Countdown_Timer::sanitize 700 * @covers Fergcorp_Countdown_Timer::compare 505 701 */ 506 702 public function test_sanitize(){ … … 910 1106 public function test_showTimer_noEvents(){ 911 1107 912 $this->assertRegExp("/^ No dates present$/is", $this->plugin->showTimer(-1, FALSE));1108 $this->assertRegExp("/^<li>No dates present<\/li>$/is", $this->plugin->showTimer(-1, FALSE)); 913 1109 } 914 1110 … … 1246 1442 $this->assertRegExp("/^var fergcorp_countdown_timer_js_lang = {\"year\":\"%d year,\",\"years\":\"%d years,\",\"month\":\"%d month,\",\"months\":\"%d months,\",\"week\":\"%d week,\",\"weeks\":\"%d weeks,\",\"day\":\"%d day,\",\"days\":\"%d days,\",\"hour\":\"%d hour,\",\"hours\":\"%d hours,\",\"minute\":\"%d minute,\",\"minutes\":\"%d minutes,\",\"second\":\"%d second,\",\"seconds\":\"%d seconds,\",\"agotime\":\"%s ago\",\"intime\":\"in %s\"};\nvar fergcorp_countdown_timer_jsEvents = {\"x[0-9a-z]{32}\":\"[0-9]{10}\",\"x[0-9a-z]{32}\":\"[0-9]{10}\",\"x[0-9a-z]{32}\":\"[0-9]{10}\",\"x[0-9a-z]{32}\":\"[0-9]{10}\"};\nvar fergcorp_countdown_timer_options = {\"showYear\":\"1\",\"showMonth\":\"1\",\"showWeek\":\"0\",\"showDay\":\"1\",\"showHour\":\"1\",\"showMinute\":\"1\",\"showSecond\":\"0\",\"stripZero\":\"1\"};$/is", $GLOBALS["wp_scripts"]->print_scripts_l10n("fergcorp_countdowntimer", FALSE)); 1247 1443 } 1248 1249 1444 } 1250 1445 … … 1490 1685 $this->expectOutputRegex("/^<aside(.*?)><ul>(.*?)<\/ul><\/aside>$/is"); 1491 1686 print $this->plugin->widget($args, $instance ); 1492 //<aside id="fergcorp_countdown_timer_widget-2" class="widget widget_fergcorp_countdown_timer_widget"><ul> No dates present</ul></aside>1687 //<aside id="fergcorp_countdown_timer_widget-2" class="widget widget_fergcorp_countdown_timer_widget"><ul><li>No dates present</li></ul></aside> 1493 1688 1494 1689 } … … 1512 1707 $this->expectOutputRegex("/^<aside(.*?)><h3(.*?)>New Title<\/h3><ul>(.*?)<\/ul><\/aside>$/is"); 1513 1708 print $this->plugin->widget($args, $instance ); 1514 //<aside id="fergcorp_countdown_timer_widget-2" class="widget widget_fergcorp_countdown_timer_widget"><h3 class="widget-title">New Title</h3><ul> No dates present</ul></aside>1709 //<aside id="fergcorp_countdown_timer_widget-2" class="widget widget_fergcorp_countdown_timer_widget"><h3 class="widget-title">New Title</h3><ul><li>No dates present</li></ul></aside> 1515 1710 1516 1711 }
Note: See TracChangeset
for help on using the changeset viewer.