Ultimate Tag Cloud Widget - Version 2.6-beta1

Version Description

= 2.5 =

  • New features, see plugin page at wordpress.org for full details.

= 2.4 =

  • Issues with WPML and custom taxonomies resolved. New features, see plugin page at wordpress.org for full details.

= 2.3.1 =

  • Security fix for sensitive data exposed when using the debug option

= 2.3 =

  • New features, see plugin page at wordpress.org for full details. Watch out for the changes in class names: https://github.com/rickard2/utcw/issues/29

= 2.2.3 =

  • Fixed naming collision issue with other plugins

= 2.2.2 =

  • Fixed widget initialization issue

= 2.2.1 =

  • Fixes compatibility issue with PHP 5.2

= 2.2 =

  • New features, see the plugin page at wordpress.org for full details

= 2.1 =

  • New features, see the plugin page at wordpress.org for full details

= 2.0.1 =

  • Small bug fix in the widget options panel

= 2.0 =

  • New plugin architecture and a big rewrite of the plugin foundation. Watch out for breaking changes, please see http://exz.nu/utcwbreaking for more information.
Download this release

Release Info

Developer exz
Plugin Icon wp plugin Ultimate Tag Cloud Widget
Version 2.6-beta1
Comparing to
See all releases

Code changes from version 2.5 to 2.6-beta1

language/utcw-sv_SE.mo ADDED
Binary file
language/utcw-sv_SE.po ADDED
@@ -0,0 +1,716 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Ultimate Tag Cloud Widget\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-12-26 10:47+0100\n"
6
+ "PO-Revision-Date: 2013-12-26 10:49+0100\n"
7
+ "Last-Translator: Rickard Andersson <rickard@montania.se>\n"
8
+ "Language-Team: 0x539.se <rickard@0x539.se>\n"
9
+ "Language: sv\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-KeywordsList: __;_e;_n;_x\n"
14
+ "X-Poedit-Basepath: /www/utcw2\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "X-Generator: Poedit 1.6.3\n"
18
+ "X-Poedit-SearchPath-0: /www/utcw2/src\n"
19
+ "X-Poedit-SearchPath-1: /www/utcw2/pages\n"
20
+
21
+ #: /www/utcw2/src/Widget.php:41
22
+ msgid "Highly configurable tag cloud"
23
+ msgstr ""
24
+
25
+ #: /www/utcw2/src/Widget.php:42
26
+ msgid "Ultimate Tag Cloud"
27
+ msgstr ""
28
+
29
+ #: /www/utcw2/pages/settings.php:24
30
+ msgid "Data"
31
+ msgstr ""
32
+
33
+ #: /www/utcw2/pages/settings.php:26
34
+ msgid "Terms"
35
+ msgstr ""
36
+
37
+ #: /www/utcw2/pages/settings.php:28
38
+ msgid "Basic appearance"
39
+ msgstr ""
40
+
41
+ #: /www/utcw2/pages/settings.php:30
42
+ msgid "Advanced appearance"
43
+ msgstr ""
44
+
45
+ #: /www/utcw2/pages/settings.php:32
46
+ msgid "Links"
47
+ msgstr ""
48
+
49
+ #: /www/utcw2/pages/settings.php:34
50
+ msgid "Adv."
51
+ msgstr ""
52
+
53
+ #: /www/utcw2/pages/settings.php:39
54
+ msgid ""
55
+ "How the tag cloud should find tags to display. Popularity based selection is "
56
+ "the default strategy which shows the most popular tags. Creation time will "
57
+ "display the newest terms."
58
+ msgstr ""
59
+
60
+ #: /www/utcw2/pages/settings.php:40
61
+ msgid "Selection strategy:"
62
+ msgstr ""
63
+
64
+ #: /www/utcw2/pages/settings.php:43
65
+ msgid "Popularity"
66
+ msgstr ""
67
+
68
+ #: /www/utcw2/pages/settings.php:47 /www/utcw2/pages/settings.php:102
69
+ msgid "Random"
70
+ msgstr ""
71
+
72
+ #: /www/utcw2/pages/settings.php:51
73
+ msgid "Creation time"
74
+ msgstr ""
75
+
76
+ #: /www/utcw2/pages/settings.php:55
77
+ msgid "Only terms from the current list"
78
+ msgstr ""
79
+
80
+ #: /www/utcw2/pages/settings.php:60
81
+ msgid ""
82
+ "Only posts from the selected authors will be used when calculating the tag "
83
+ "cloud."
84
+ msgstr ""
85
+
86
+ #: /www/utcw2/pages/settings.php:61
87
+ msgid "Authors:"
88
+ msgstr ""
89
+
90
+ #: /www/utcw2/pages/settings.php:65
91
+ msgid "All authors"
92
+ msgstr ""
93
+
94
+ #: /www/utcw2/pages/settings.php:70
95
+ msgid "Selected authors only"
96
+ msgstr ""
97
+
98
+ #: /www/utcw2/pages/settings.php:80 /www/utcw2/pages/settings.php:87
99
+ #: /www/utcw2/pages/settings.php:179 /www/utcw2/pages/settings.php:186
100
+ #: /www/utcw2/pages/settings.php:228 /www/utcw2/pages/settings.php:235
101
+ #: /www/utcw2/pages/settings.php:703
102
+ msgid "Delete"
103
+ msgstr ""
104
+
105
+ #: /www/utcw2/pages/settings.php:97
106
+ msgid ""
107
+ "Which property of the tag should be used when determining the order of the "
108
+ "tags in the cloud."
109
+ msgstr ""
110
+
111
+ #: /www/utcw2/pages/settings.php:98
112
+ msgid "Order:"
113
+ msgstr ""
114
+
115
+ #: /www/utcw2/pages/settings.php:106
116
+ msgid "By name"
117
+ msgstr ""
118
+
119
+ #: /www/utcw2/pages/settings.php:110
120
+ msgid "By slug"
121
+ msgstr ""
122
+
123
+ #: /www/utcw2/pages/settings.php:114
124
+ msgid "By id"
125
+ msgstr ""
126
+
127
+ #: /www/utcw2/pages/settings.php:118
128
+ msgid "By color"
129
+ msgstr ""
130
+
131
+ #: /www/utcw2/pages/settings.php:122
132
+ msgid "Count"
133
+ msgstr ""
134
+
135
+ #: /www/utcw2/pages/settings.php:125
136
+ msgid "Reverse order"
137
+ msgstr ""
138
+
139
+ #: /www/utcw2/pages/settings.php:129
140
+ msgid "Case sensitive"
141
+ msgstr ""
142
+
143
+ #: /www/utcw2/pages/settings.php:133
144
+ msgid ""
145
+ "Which taxonomy should be used in the cloud. You should be able to choose a "
146
+ "custom taxonomy as well."
147
+ msgstr ""
148
+
149
+ #: /www/utcw2/pages/settings.php:135
150
+ msgid "Taxonomies:"
151
+ msgstr ""
152
+
153
+ #: /www/utcw2/pages/settings.php:145
154
+ msgid ""
155
+ "Which post types should be used in the cloud. Only tags from posts from "
156
+ "these post types will be used in the tag cloud."
157
+ msgstr ""
158
+
159
+ #: /www/utcw2/pages/settings.php:157
160
+ msgid ""
161
+ "Only tags which have been used with this many posts will be visible in the "
162
+ "cloud"
163
+ msgstr ""
164
+
165
+ #: /www/utcw2/pages/settings.php:159
166
+ msgid "Tags with fewer posts than this will be automatically excluded."
167
+ msgstr ""
168
+
169
+ #: /www/utcw2/pages/settings.php:159
170
+ msgid "Minimum number of posts: "
171
+ msgstr ""
172
+
173
+ #: /www/utcw2/pages/settings.php:165
174
+ msgid ""
175
+ "Only posts which are posted within this number of days will be used when "
176
+ "generating the cloud"
177
+ msgstr ""
178
+
179
+ #: /www/utcw2/pages/settings.php:167
180
+ msgid ""
181
+ "The maximum number of days back to search for posts, zero means every post."
182
+ msgstr ""
183
+
184
+ #: /www/utcw2/pages/settings.php:167
185
+ msgid "Posts max age:"
186
+ msgstr ""
187
+
188
+ #: /www/utcw2/pages/settings.php:173
189
+ msgid ""
190
+ "Only posts which have any of the selected terms will be used when generating "
191
+ "the cloud"
192
+ msgstr ""
193
+
194
+ #: /www/utcw2/pages/settings.php:174
195
+ msgid "Post term filter"
196
+ msgstr ""
197
+
198
+ #: /www/utcw2/pages/settings.php:194
199
+ msgid ""
200
+ "When used with post term filtering the resulting link in the tag cloud will "
201
+ "contain a query variable to try to filter out the posts that have the term "
202
+ "given in the term filter."
203
+ msgstr ""
204
+
205
+ #: /www/utcw2/pages/settings.php:197
206
+ msgid "Add filter to links"
207
+ msgstr ""
208
+
209
+ #: /www/utcw2/pages/settings.php:205
210
+ msgid ""
211
+ "This setting controls how the tag cloud should handle the selected terms. If "
212
+ "the selected terms below should be the only ones included, or if the "
213
+ "selected terms should be the ones being excluded from the result."
214
+ msgstr ""
215
+
216
+ #: /www/utcw2/pages/settings.php:206
217
+ msgid "Selection type"
218
+ msgstr ""
219
+
220
+ #: /www/utcw2/pages/settings.php:212
221
+ msgid "Include only selected terms"
222
+ msgstr ""
223
+
224
+ #: /www/utcw2/pages/settings.php:218
225
+ msgid "Exclude selected terms"
226
+ msgstr ""
227
+
228
+ #: /www/utcw2/pages/settings.php:222
229
+ msgid "Which tags to include or exclude"
230
+ msgstr ""
231
+
232
+ #: /www/utcw2/pages/settings.php:247
233
+ msgid "The title is the text which is shown above the tag cloud."
234
+ msgstr ""
235
+
236
+ #: /www/utcw2/pages/settings.php:249
237
+ msgid "Title:"
238
+ msgstr ""
239
+
240
+ #: /www/utcw2/pages/settings.php:252
241
+ msgid "Show title"
242
+ msgstr ""
243
+
244
+ #: /www/utcw2/pages/settings.php:259
245
+ msgid ""
246
+ "The tag with the least number of posts will be the smallest, and the tag "
247
+ "with the most number of posts will be the biggest."
248
+ msgstr ""
249
+
250
+ #: /www/utcw2/pages/settings.php:260
251
+ msgid "Tag size:"
252
+ msgstr ""
253
+
254
+ #: /www/utcw2/pages/settings.php:261 /www/utcw2/pages/settings.php:312
255
+ msgid "From"
256
+ msgstr ""
257
+
258
+ #: /www/utcw2/pages/settings.php:265 /www/utcw2/pages/settings.php:316
259
+ msgid "to"
260
+ msgstr ""
261
+
262
+ #: /www/utcw2/pages/settings.php:272
263
+ msgid ""
264
+ "If the total number of tags exceeds this number, only this many tags will be "
265
+ "shown in the cloud."
266
+ msgstr ""
267
+
268
+ #: /www/utcw2/pages/settings.php:274
269
+ msgid "Max tags:"
270
+ msgstr ""
271
+
272
+ #: /www/utcw2/pages/settings.php:281
273
+ msgid ""
274
+ "This setting controls how the tags are colored.<ul><li>Totaly random will "
275
+ "choose between all the 16 million colors available.</li><li>Random from "
276
+ "preset values will choose colors from a predefined set of colors</"
277
+ "li><li>Spanning between values will calculate the corresponding color based "
278
+ "upon how many posts each tag has, similar to how the size is calculated. The "
279
+ "tag with the least number of posts will have the first color and the tag "
280
+ "with the most number of posts will have the second color. All tags in "
281
+ "between will have a color calculated between the first and the second color."
282
+ "</li></ul>The colors for the choice 'Random from preset values' has to be "
283
+ "specified as a comma separated list."
284
+ msgstr ""
285
+
286
+ #: /www/utcw2/pages/settings.php:282
287
+ msgid "Coloring:"
288
+ msgstr ""
289
+
290
+ #: /www/utcw2/pages/settings.php:286 /www/utcw2/pages/settings.php:535
291
+ #: /www/utcw2/pages/settings.php:628
292
+ msgid "None"
293
+ msgstr ""
294
+
295
+ #: /www/utcw2/pages/settings.php:290
296
+ msgid "Totally random"
297
+ msgstr ""
298
+
299
+ #: /www/utcw2/pages/settings.php:295 /www/utcw2/pages/settings.php:300
300
+ msgid "Random from preset values"
301
+ msgstr ""
302
+
303
+ #: /www/utcw2/pages/settings.php:308
304
+ msgid "Spanning between values"
305
+ msgstr ""
306
+
307
+ #: /www/utcw2/pages/settings.php:322
308
+ msgid "Defines how the resulting tag should be aligned in the resulting cloud."
309
+ msgstr ""
310
+
311
+ #: /www/utcw2/pages/settings.php:323
312
+ msgid "Text alignment:"
313
+ msgstr ""
314
+
315
+ #: /www/utcw2/pages/settings.php:325 /www/utcw2/pages/settings.php:482
316
+ #: /www/utcw2/pages/settings.php:499 /www/utcw2/pages/settings.php:517
317
+ #: /www/utcw2/pages/settings.php:581 /www/utcw2/pages/settings.php:596
318
+ #: /www/utcw2/pages/settings.php:611
319
+ msgid "Theme default"
320
+ msgstr ""
321
+
322
+ #: /www/utcw2/pages/settings.php:327
323
+ msgid "Left"
324
+ msgstr ""
325
+
326
+ #: /www/utcw2/pages/settings.php:329
327
+ msgid "Right"
328
+ msgstr ""
329
+
330
+ #: /www/utcw2/pages/settings.php:331
331
+ msgid "Center"
332
+ msgstr ""
333
+
334
+ #: /www/utcw2/pages/settings.php:333
335
+ msgid "Justify"
336
+ msgstr ""
337
+
338
+ #: /www/utcw2/pages/settings.php:339
339
+ msgid "Changes the overall display type of the output."
340
+ msgstr ""
341
+
342
+ #: /www/utcw2/pages/settings.php:340
343
+ msgid "Display type:"
344
+ msgstr ""
345
+
346
+ #: /www/utcw2/pages/settings.php:342
347
+ msgid "Regular cloud"
348
+ msgstr ""
349
+
350
+ #: /www/utcw2/pages/settings.php:344
351
+ msgid "List"
352
+ msgstr ""
353
+
354
+ #: /www/utcw2/pages/settings.php:347
355
+ msgid ""
356
+ "This option will remove some CSS classes commonly used by themes to apply "
357
+ "their own styles to the tag cloud. If the options aren't displaying "
358
+ "correctly, try enabling this feature. This will make styles closer match the "
359
+ "appearance before version 2.3."
360
+ msgstr ""
361
+
362
+ #: /www/utcw2/pages/settings.php:350
363
+ msgid "Avoid theme styling"
364
+ msgstr ""
365
+
366
+ #: /www/utcw2/pages/settings.php:354
367
+ msgid "Term appearance"
368
+ msgstr ""
369
+
370
+ #: /www/utcw2/pages/settings.php:356
371
+ msgid ""
372
+ "Uncheck this option if you do not want your tag cloud to contain links to "
373
+ "the archive page for each tag."
374
+ msgstr ""
375
+
376
+ #: /www/utcw2/pages/settings.php:359
377
+ msgid "Show links"
378
+ msgstr ""
379
+
380
+ #: /www/utcw2/pages/settings.php:360
381
+ msgid ""
382
+ "Select this option if you would like the output to contain the number of "
383
+ "posts associated with each term. Like: Hello World (2)"
384
+ msgstr ""
385
+
386
+ #: /www/utcw2/pages/settings.php:363
387
+ msgid "Show post count"
388
+ msgstr ""
389
+
390
+ #: /www/utcw2/pages/settings.php:364
391
+ msgid ""
392
+ "This option will try to prevent terms with multiple words from breaking up "
393
+ "into two lines."
394
+ msgstr ""
395
+
396
+ #: /www/utcw2/pages/settings.php:367
397
+ msgid "Prevent line breaks in terms"
398
+ msgstr ""
399
+
400
+ #: /www/utcw2/pages/settings.php:370
401
+ msgid "Term titles (hover text)"
402
+ msgstr ""
403
+
404
+ #: /www/utcw2/pages/settings.php:372
405
+ msgid ""
406
+ "The title is the small (usually) yellow label which will appear when the "
407
+ "user hovers the tag. Try to hover the text to the left to see an example of "
408
+ "what a title text looks like."
409
+ msgstr ""
410
+
411
+ #: /www/utcw2/pages/settings.php:376
412
+ msgid "This is a title"
413
+ msgstr ""
414
+
415
+ #: /www/utcw2/pages/settings.php:376
416
+ msgid "Enable titles"
417
+ msgstr ""
418
+
419
+ #: /www/utcw2/pages/settings.php:377
420
+ msgid ""
421
+ "This is the WordPress default option, it will add the post count as title "
422
+ "like this: 2 topics"
423
+ msgstr ""
424
+
425
+ #: /www/utcw2/pages/settings.php:379
426
+ msgid "Post count"
427
+ msgstr ""
428
+
429
+ #: /www/utcw2/pages/settings.php:380
430
+ msgid "This option will use the term name as title"
431
+ msgstr ""
432
+
433
+ #: /www/utcw2/pages/settings.php:382
434
+ msgid "Term name"
435
+ msgstr ""
436
+
437
+ #: /www/utcw2/pages/settings.php:383
438
+ #, php-format
439
+ msgid ""
440
+ "This option allows you to define a C-style printf template to be used when "
441
+ "generating the title. You can use %d and %s to get the post count and term "
442
+ "name. To get a title like this: <br><code>The term Hello World has been used "
443
+ "with 14 posts</code><br><br>Use a template like this:<br><code>The term %s "
444
+ "has been used with %d posts</code>"
445
+ msgstr ""
446
+
447
+ #: /www/utcw2/pages/settings.php:385
448
+ msgid "Custom template"
449
+ msgstr ""
450
+
451
+ #: /www/utcw2/pages/settings.php:387
452
+ msgid "Custom title template"
453
+ msgstr ""
454
+
455
+ #: /www/utcw2/pages/settings.php:393
456
+ msgid ""
457
+ "The spacing is a numerical value which controls how much space there is "
458
+ "between letters, words, tags or rows. To use the default value for these "
459
+ "settings just use the corresponding default value from the CSS "
460
+ "specification: <ul><li>Letter spacing: normal</li><li>Word spacing: normal</"
461
+ "li><li>Tag spacing (CSS margin): auto</li><li>Row spacing (CSS line height): "
462
+ "inherit</li></ul>To use anything but the default values, just specify a "
463
+ "number (the unit is pixels)."
464
+ msgstr ""
465
+
466
+ #: /www/utcw2/pages/settings.php:394
467
+ msgid "Spacing:"
468
+ msgstr ""
469
+
470
+ #: /www/utcw2/pages/settings.php:396
471
+ msgid "Between letters:"
472
+ msgstr ""
473
+
474
+ #: /www/utcw2/pages/settings.php:401
475
+ msgid "Between words:"
476
+ msgstr ""
477
+
478
+ #: /www/utcw2/pages/settings.php:406
479
+ msgid "Between tags:"
480
+ msgstr ""
481
+
482
+ #: /www/utcw2/pages/settings.php:411
483
+ msgid "Between rows:"
484
+ msgstr ""
485
+
486
+ #: /www/utcw2/pages/settings.php:418
487
+ msgid ""
488
+ "The tags can be transformed in a number of different ways. lowercase, "
489
+ "UPPERCASE or Capitalized."
490
+ msgstr ""
491
+
492
+ #: /www/utcw2/pages/settings.php:419
493
+ msgid "Transform tags:"
494
+ msgstr ""
495
+
496
+ #: /www/utcw2/pages/settings.php:423
497
+ msgid "Off"
498
+ msgstr ""
499
+
500
+ #: /www/utcw2/pages/settings.php:428
501
+ msgid "To lowercase"
502
+ msgstr ""
503
+
504
+ #: /www/utcw2/pages/settings.php:433
505
+ msgid "To uppercase"
506
+ msgstr ""
507
+
508
+ #: /www/utcw2/pages/settings.php:438
509
+ msgid "Capitalize"
510
+ msgstr ""
511
+
512
+ #: /www/utcw2/pages/settings.php:442
513
+ msgid ""
514
+ "The tags can be surrounded by a prefix and/or suffix and separated with a "
515
+ "separator. The default separator is just a space but can be changed to "
516
+ "anything you'd like. Remember to add a space before and after the separator, "
517
+ "this is not automatically added by the plugin.<br><br>A short example, these "
518
+ "settings:<ul><li>Separator: &nbsp;-&nbsp; </li><li>Prefix: (</"
519
+ "li><li>Suffix: )</li></ul>… would produce a tag cloud like this: "
520
+ "<br><br>(first tag) - (second tag) - (third tag)<br><br>Prefix and suffix "
521
+ "characters will have the same size and color as the tag, but the separator "
522
+ "will not."
523
+ msgstr ""
524
+
525
+ #: /www/utcw2/pages/settings.php:443
526
+ msgid "Tag separators:"
527
+ msgstr ""
528
+
529
+ #: /www/utcw2/pages/settings.php:445
530
+ msgid "Separator"
531
+ msgstr ""
532
+
533
+ #: /www/utcw2/pages/settings.php:449
534
+ msgid "Prefix"
535
+ msgstr ""
536
+
537
+ #: /www/utcw2/pages/settings.php:453
538
+ msgid "Suffix"
539
+ msgstr ""
540
+
541
+ #: /www/utcw2/pages/settings.php:464
542
+ msgid ""
543
+ "The normal styles will apply to the tags when the user is <b>not</b> "
544
+ "hovering the link."
545
+ msgstr ""
546
+
547
+ #: /www/utcw2/pages/settings.php:466
548
+ msgid "Normal styles"
549
+ msgstr ""
550
+
551
+ #: /www/utcw2/pages/settings.php:468
552
+ msgid ""
553
+ "Yes or no will force the tag setting for the <u>underline</u> style, theme "
554
+ "default will let the blog theme decide."
555
+ msgstr ""
556
+
557
+ #: /www/utcw2/pages/settings.php:469 /www/utcw2/pages/settings.php:568
558
+ msgid "Underline"
559
+ msgstr ""
560
+
561
+ #: /www/utcw2/pages/settings.php:473 /www/utcw2/pages/settings.php:491
562
+ #: /www/utcw2/pages/settings.php:508 /www/utcw2/pages/settings.php:572
563
+ #: /www/utcw2/pages/settings.php:587 /www/utcw2/pages/settings.php:602
564
+ msgid "Yes"
565
+ msgstr ""
566
+
567
+ #: /www/utcw2/pages/settings.php:477 /www/utcw2/pages/settings.php:495
568
+ #: /www/utcw2/pages/settings.php:512 /www/utcw2/pages/settings.php:576
569
+ #: /www/utcw2/pages/settings.php:591 /www/utcw2/pages/settings.php:606
570
+ msgid "No"
571
+ msgstr ""
572
+
573
+ #: /www/utcw2/pages/settings.php:486
574
+ msgid ""
575
+ "Yes or no will force the tag setting for the <b>bold</b> style, theme "
576
+ "default will let the blog theme decide."
577
+ msgstr ""
578
+
579
+ #: /www/utcw2/pages/settings.php:487 /www/utcw2/pages/settings.php:583
580
+ msgid "Bold"
581
+ msgstr ""
582
+
583
+ #: /www/utcw2/pages/settings.php:503
584
+ msgid ""
585
+ "Yes or no will force the tag setting for the <i>italic</i> style, theme "
586
+ "default will let the blog theme decide."
587
+ msgstr ""
588
+
589
+ #: /www/utcw2/pages/settings.php:504 /www/utcw2/pages/settings.php:598
590
+ msgid "Italic"
591
+ msgstr ""
592
+
593
+ #: /www/utcw2/pages/settings.php:521
594
+ msgid ""
595
+ "This setting will change the background color of <b>the link only</b>, not "
596
+ "the whole cloud. The color has to be specified in hexadeximal format, like "
597
+ "ffffff for white, 0000ff for blue or 000000 for black."
598
+ msgstr ""
599
+
600
+ #: /www/utcw2/pages/settings.php:523 /www/utcw2/pages/settings.php:614
601
+ msgid "Background color (hex value):"
602
+ msgstr ""
603
+
604
+ #: /www/utcw2/pages/settings.php:529
605
+ msgid ""
606
+ "This setting will change the border of <b>the link only</b>, not the whole "
607
+ "cloud. <ul><li>The width of the border is a numerical value (in the unit "
608
+ "pixels).</li><li>The color has to be specified in hexadeximal format, like "
609
+ "ffffff for white, 0000ff for blue or 000000 for black.</li></ul>"
610
+ msgstr ""
611
+
612
+ #: /www/utcw2/pages/settings.php:530 /www/utcw2/pages/settings.php:623
613
+ msgid "Border"
614
+ msgstr ""
615
+
616
+ #: /www/utcw2/pages/settings.php:531 /www/utcw2/pages/settings.php:624
617
+ msgid "Style: "
618
+ msgstr ""
619
+
620
+ #: /www/utcw2/pages/settings.php:537 /www/utcw2/pages/settings.php:630
621
+ msgid "Dotted"
622
+ msgstr ""
623
+
624
+ #: /www/utcw2/pages/settings.php:539 /www/utcw2/pages/settings.php:632
625
+ msgid "Dashed"
626
+ msgstr ""
627
+
628
+ #: /www/utcw2/pages/settings.php:541 /www/utcw2/pages/settings.php:634
629
+ msgid "Solid"
630
+ msgstr ""
631
+
632
+ #: /www/utcw2/pages/settings.php:543 /www/utcw2/pages/settings.php:636
633
+ msgid "Double"
634
+ msgstr ""
635
+
636
+ #: /www/utcw2/pages/settings.php:545 /www/utcw2/pages/settings.php:638
637
+ msgid "Groove"
638
+ msgstr ""
639
+
640
+ #: /www/utcw2/pages/settings.php:547 /www/utcw2/pages/settings.php:640
641
+ msgid "Ridge"
642
+ msgstr ""
643
+
644
+ #: /www/utcw2/pages/settings.php:549 /www/utcw2/pages/settings.php:642
645
+ msgid "Inset"
646
+ msgstr ""
647
+
648
+ #: /www/utcw2/pages/settings.php:551 /www/utcw2/pages/settings.php:644
649
+ msgid "Outset"
650
+ msgstr ""
651
+
652
+ #: /www/utcw2/pages/settings.php:555 /www/utcw2/pages/settings.php:648
653
+ msgid "Width:"
654
+ msgstr ""
655
+
656
+ #: /www/utcw2/pages/settings.php:560 /www/utcw2/pages/settings.php:653
657
+ msgid "Color (hex value): "
658
+ msgstr ""
659
+
660
+ #: /www/utcw2/pages/settings.php:565
661
+ msgid ""
662
+ "The hover effects will only affect the style of the tag when the user hovers "
663
+ "the tag. For details about each settings see the section above."
664
+ msgstr ""
665
+
666
+ #: /www/utcw2/pages/settings.php:567
667
+ msgid "Hover effects"
668
+ msgstr ""
669
+
670
+ #: /www/utcw2/pages/settings.php:619
671
+ msgid "Font color (hex value):"
672
+ msgstr ""
673
+
674
+ #: /www/utcw2/pages/settings.php:660
675
+ msgid ""
676
+ "This will add a &lt;-- HTML comment --&gt; to the output with some debugging "
677
+ "information, please use this information when troubleshooting. You can find "
678
+ "the debugging information by using 'view source' in your browser when "
679
+ "viewing the page and searching for 'Ultimate Tag Cloud Debug information'"
680
+ msgstr ""
681
+
682
+ #: /www/utcw2/pages/settings.php:663
683
+ msgid "Include debug output"
684
+ msgstr ""
685
+
686
+ #: /www/utcw2/pages/settings.php:666
687
+ msgid ""
688
+ "This will save the current configuration which enables you to load this "
689
+ "configuration at a later time. Check this box, choose a name in the text "
690
+ "field below and press 'Save' to save the configuration."
691
+ msgstr ""
692
+
693
+ #: /www/utcw2/pages/settings.php:670
694
+ msgid "Save configuration"
695
+ msgstr ""
696
+
697
+ #: /www/utcw2/pages/settings.php:673
698
+ msgid ""
699
+ "This is the name which will be used for the current configuration if you "
700
+ "check the option 'Save configuration' above. If the name is omitted the "
701
+ "current date and time will be used."
702
+ msgstr ""
703
+
704
+ #: /www/utcw2/pages/settings.php:675 /www/utcw2/pages/settings.php:691
705
+ msgid "Configuration name"
706
+ msgstr ""
707
+
708
+ #: /www/utcw2/pages/settings.php:684
709
+ msgid ""
710
+ "This will load the selected configuration to the state which the widget was "
711
+ "when the configuration was saved."
712
+ msgstr ""
713
+
714
+ #: /www/utcw2/pages/settings.php:687
715
+ msgid "Load configuration"
716
+ msgstr ""
pages/settings.php CHANGED
@@ -39,19 +39,19 @@ if ( ! defined( 'ABSPATH' ) ) die();
39
  <a class="utcw-help" title="<?php _e('How the tag cloud should find tags to display. Popularity based selection is the default strategy which shows the most popular tags. Creation time will display the newest terms.', 'utcw') ?>">?</a>
40
  <strong><?php _e('Selection strategy:', 'utcw') ?></strong><br>
41
  <label>
42
- <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="popularity" <?php if ($dataConfig->strategy === 'popularity') echo 'checked="checked"' ?>>
43
  <?php _e('Popularity','utcw') ?>
44
  </label><br>
45
  <label>
46
- <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="random" <?php if ($dataConfig->strategy === 'random') echo 'checked="checked"' ?>>
47
  <?php _e('Random','utcw') ?>
48
  </label><br>
49
  <label>
50
- <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="creation" <?php if ($dataConfig->strategy === 'creation') echo 'checked="checked"' ?>>
51
  <?php _e('Creation time','utcw') ?>
52
  </label><br>
53
  <label>
54
- <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="current_list" <?php if ($dataConfig->strategy === 'current_list') echo 'checked="checked"' ?>>
55
  <?php _e('Only terms from the current list','utcw') ?>
56
  </label><br>
57
  <br>
@@ -343,6 +343,13 @@ if ( ! defined( 'ABSPATH' ) ) die();
343
  <input type="radio" name="<?php echo $this->get_field_name('display') ?>" id="<?php echo $this->get_field_id('display_list') ?>" value="list" <?php if ($renderConfig->display === 'list') echo 'checked="checked"' ?>>
344
  <label for="<?php echo $this->get_field_id('display_list') ?>"><?php _e('List', 'utcw') ?></label><br>
345
  <br>
 
 
 
 
 
 
 
346
 
347
  <strong><?php _e('Term appearance', 'utcw') ?></strong><br>
348
  <a class="utcw-help"
@@ -354,6 +361,10 @@ if ( ! defined( 'ABSPATH' ) ) die();
354
  <input type="checkbox" name="<?php echo $this->get_field_name( 'show_post_count' ) ?>"
355
  id="<?php echo $this->get_field_id( 'show_post_count' ) ?>" <?php echo $renderConfig->show_post_count === true ? 'checked="checked"' : ''?>>
356
  <label for="<?php echo $this->get_field_id( 'show_post_count' ) ?>"><?php _e( 'Show post count', 'utcw' ) ?></label><br>
 
 
 
 
357
  <br>
358
 
359
  <strong><?php _e('Term titles (hover text)', 'utcw') ?></strong><br>
@@ -429,7 +440,7 @@ if ( ! defined( 'ABSPATH' ) ) die();
429
 
430
  <a class="utcw-help"
431
  title="<?php _e( 'The tags can be surrounded by a prefix and/or suffix and separated with a separator. The default separator is just a space but can be changed to anything you\'d like. Remember to add a space before and after the separator, this is not automatically added by the plugin.<br><br>A short example, these settings:<ul><li>Separator: &nbsp;-&nbsp; </li><li>Prefix: (</li><li>Suffix: )</li></ul>… would produce a tag cloud like this: <br><br>(first tag) - (second tag) - (third tag)<br><br>Prefix and suffix characters will have the same size and color as the tag, but the separator will not.', 'utcw' ) ?>">?</a>
432
- <strong><?php _e( 'Tag separators:', 'utcw' )?></strong>
433
  <label class="two-col"
434
  for="<?php echo $this->get_field_id( 'separator' ) ?>"><?php _e( 'Separator', 'utcw' ) ?></label>
435
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'separator' ) ?>"
39
  <a class="utcw-help" title="<?php _e('How the tag cloud should find tags to display. Popularity based selection is the default strategy which shows the most popular tags. Creation time will display the newest terms.', 'utcw') ?>">?</a>
40
  <strong><?php _e('Selection strategy:', 'utcw') ?></strong><br>
41
  <label>
42
+ <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="popularity" <?php if ($dataConfig->strategy instanceof UTCW_PopularityStrategy) echo 'checked="checked"' ?>>
43
  <?php _e('Popularity','utcw') ?>
44
  </label><br>
45
  <label>
46
+ <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="random" <?php if ($dataConfig->strategy instanceof UTCW_RandomStrategy) echo 'checked="checked"' ?>>
47
  <?php _e('Random','utcw') ?>
48
  </label><br>
49
  <label>
50
+ <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="creation" <?php if ($dataConfig->strategy instanceof UTCW_CreationTimeStrategy) echo 'checked="checked"' ?>>
51
  <?php _e('Creation time','utcw') ?>
52
  </label><br>
53
  <label>
54
+ <input type="radio" name="<?php echo $this->get_field_name('strategy') ?>" value="current_list" <?php if ($dataConfig->strategy instanceof UTCW_CurrentListStrategy) echo 'checked="checked"' ?>>
55
  <?php _e('Only terms from the current list','utcw') ?>
56
  </label><br>
57
  <br>
343
  <input type="radio" name="<?php echo $this->get_field_name('display') ?>" id="<?php echo $this->get_field_id('display_list') ?>" value="list" <?php if ($renderConfig->display === 'list') echo 'checked="checked"' ?>>
344
  <label for="<?php echo $this->get_field_id('display_list') ?>"><?php _e('List', 'utcw') ?></label><br>
345
  <br>
346
+ <a class="utcw-help"
347
+ title="<?php _e( 'This option will remove some CSS classes commonly used by themes to apply their own styles to the tag cloud. If the options aren\'t displaying correctly, try enabling this feature. This will make styles closer match the appearance before version 2.3.', 'utcw' ) ?>">?</a>
348
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'avoid_theme_styling' ) ?>"
349
+ id="<?php echo $this->get_field_id( 'avoid_theme_styling' ) ?>" <?php echo $renderConfig->avoid_theme_styling === true ? 'checked="checked"' : ''?>>
350
+ <label for="<?php echo $this->get_field_id( 'avoid_theme_styling' ) ?>"><?php _e( 'Avoid theme styling', 'utcw' ) ?></label><br>
351
+ <br>
352
+
353
 
354
  <strong><?php _e('Term appearance', 'utcw') ?></strong><br>
355
  <a class="utcw-help"
361
  <input type="checkbox" name="<?php echo $this->get_field_name( 'show_post_count' ) ?>"
362
  id="<?php echo $this->get_field_id( 'show_post_count' ) ?>" <?php echo $renderConfig->show_post_count === true ? 'checked="checked"' : ''?>>
363
  <label for="<?php echo $this->get_field_id( 'show_post_count' ) ?>"><?php _e( 'Show post count', 'utcw' ) ?></label><br>
364
+ <a class="utcw-help" title="<?php _e('This option will try to prevent terms with multiple words from breaking up into two lines.', 'utcw') ?>">?</a>
365
+ <input type="checkbox" name="<?php echo $this->get_field_name( 'prevent_breaking' ) ?>"
366
+ id="<?php echo $this->get_field_id( 'prevent_breaking' ) ?>" <?php echo $renderConfig->prevent_breaking === true ? 'checked="checked"' : ''?>>
367
+ <label for="<?php echo $this->get_field_id( 'prevent_breaking' ) ?>"><?php _e( 'Prevent line breaks in terms', 'utcw' ) ?></label><br>
368
  <br>
369
 
370
  <strong><?php _e('Term titles (hover text)', 'utcw') ?></strong><br>
440
 
441
  <a class="utcw-help"
442
  title="<?php _e( 'The tags can be surrounded by a prefix and/or suffix and separated with a separator. The default separator is just a space but can be changed to anything you\'d like. Remember to add a space before and after the separator, this is not automatically added by the plugin.<br><br>A short example, these settings:<ul><li>Separator: &nbsp;-&nbsp; </li><li>Prefix: (</li><li>Suffix: )</li></ul>… would produce a tag cloud like this: <br><br>(first tag) - (second tag) - (third tag)<br><br>Prefix and suffix characters will have the same size and color as the tag, but the separator will not.', 'utcw' ) ?>">?</a>
443
+ <strong><?php _e( 'Tag separators:', 'utcw' )?></strong><br>
444
  <label class="two-col"
445
  for="<?php echo $this->get_field_id( 'separator' ) ?>"><?php _e( 'Separator', 'utcw' ) ?></label>
446
  <input type="text" size=5 name="<?php echo $this->get_field_name( 'separator' ) ?>"
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: exz
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 3.0
5
- Tested up to: 3.7-beta1
6
  Stable tag: 2.5
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
@@ -205,6 +205,8 @@ If you're not able to change your theme you can also use the shortcode `[utcw]`
205
 
206
  The plugin also uses a couple of filters for you to be able to alter the output. These are documented in the [filters documentation at GitHub](https://github.com/rickard2/utcw/blob/master/FILTERS.md).
207
 
 
 
208
  == Configuration ==
209
 
210
  All the configuration options can be found in the [configuration documentation at GitHub](https://github.com/rickard2/utcw/blob/master/CONFIG.md).
2
  Contributors: exz
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 3.0
5
+ Tested up to: 3.8-beta1
6
  Stable tag: 2.5
7
  Donate link: https://0x539.se/donations/
8
  License: GPLv2 or later
205
 
206
  The plugin also uses a couple of filters for you to be able to alter the output. These are documented in the [filters documentation at GitHub](https://github.com/rickard2/utcw/blob/master/FILTERS.md).
207
 
208
+ As of version 2.6 you can create custom selection strategies, more information can be found in the [strategy documentation at GitHub](https://github.com/rickard2/utcw/blob/master/STRATEGY.md)
209
+
210
  == Configuration ==
211
 
212
  All the configuration options can be found in the [configuration documentation at GitHub](https://github.com/rickard2/utcw/blob/master/CONFIG.md).
src/Config/DataConfig.php CHANGED
@@ -38,6 +38,39 @@
38
  */
39
  class UTCW_DataConfig extends UTCW_Config
40
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  /**
42
  * Creates a new instance of the class and adds all the options
43
  *
@@ -48,7 +81,22 @@ class UTCW_DataConfig extends UTCW_Config
48
  */
49
  public function __construct(array $input, UTCW_Plugin $plugin)
50
  {
51
- $this->addOption('strategy', 'set', array('values' => array('popularity', 'random', 'creation', 'current_list')));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  $this->addOption('order', 'set', array('values' => array('name', 'random', 'slug', 'id', 'color', 'count')));
53
  $this->addOption('tags_list_type', 'set', array('values' => array('exclude', 'include')));
54
  $this->addOption('color', 'set', array('values' => array('none', 'random', 'set', 'span')));
@@ -89,6 +137,8 @@ class UTCW_DataConfig extends UTCW_Config
89
  $this->addOption('case_sensitive', 'boolean');
90
  $this->addOption('post_term_query_var', 'boolean');
91
 
 
 
92
  parent::__construct($input, $plugin);
93
 
94
  $this->checkSizes();
38
  */
39
  class UTCW_DataConfig extends UTCW_Config
40
  {
41
+
42
+ /**
43
+ * @var UTCW_Plugin
44
+ */
45
+ protected $plugin;
46
+
47
+ /**
48
+ * Never serialize the plugin instance
49
+ *
50
+ * @return array
51
+ *
52
+ * @since 2.6
53
+ */
54
+ public function __sleep()
55
+ {
56
+ return array('data', 'options');
57
+ }
58
+
59
+ /**
60
+ * Get a new instance of the plugin
61
+ *
62
+ * @since 2.6
63
+ */
64
+ public function __wakeup()
65
+ {
66
+ $this->plugin = UTCW_Plugin::getInstance();
67
+ }
68
+
69
+ public function strategyFactory($className)
70
+ {
71
+ return new $className($this->plugin);
72
+ }
73
+
74
  /**
75
  * Creates a new instance of the class and adds all the options
76
  *
81
  */
82
  public function __construct(array $input, UTCW_Plugin $plugin)
83
  {
84
+ $this->addOption(
85
+ 'strategy',
86
+ 'class',
87
+ array(
88
+ 'classMap' => array(
89
+ 'popularity' => 'UTCW_PopularityStrategy',
90
+ 'random' => 'UTCW_RandomStrategy',
91
+ 'creation' => 'UTCW_CreationTimeStrategy',
92
+ 'current_list' => 'UTCW_CurrentListStrategy'
93
+ ),
94
+ 'baseClass' => 'UTCW_SelectionStrategy',
95
+ 'default' => 'popularity',
96
+ 'factory' => array($this, 'strategyFactory'),
97
+ )
98
+ );
99
+
100
  $this->addOption('order', 'set', array('values' => array('name', 'random', 'slug', 'id', 'color', 'count')));
101
  $this->addOption('tags_list_type', 'set', array('values' => array('exclude', 'include')));
102
  $this->addOption('color', 'set', array('values' => array('none', 'random', 'set', 'span')));
137
  $this->addOption('case_sensitive', 'boolean');
138
  $this->addOption('post_term_query_var', 'boolean');
139
 
140
+ $this->plugin = $plugin;
141
+
142
  parent::__construct($input, $plugin);
143
 
144
  $this->checkSizes();
src/Config/RenderConfig.php CHANGED
@@ -14,43 +14,45 @@
14
  * Class to represent a the configuration options for cloud rendering retrieval
15
  *
16
  * @since 2.3
17
- * @property-read string title Title text of the widget
18
- * @property-read string letter_spacing CSS letter-spacing value (in pixels)
19
- * @property-read string word_spacing CSS word-spacing value (in pixels)
20
- * @property-read string text_transform CSS text-transform value
21
- * @property-read string show_title If the title attribute should be added to links in the cloud
22
- * @property-read string show_links If the tags should be wrapped in links
23
- * @property-read string link_underline If links should be styled with underline decoration
24
- * @property-read string link_bold If links should be styled as bold
25
- * @property-read string link_italic If links should be styled as italic
26
- * @property-read string link_bg_color Background color for links
27
- * @property-read string link_border_style Border style for links
28
- * @property-read string link_border_width Border width for links
29
- * @property-read string link_border_color Border color for links
30
- * @property-read string hover_underline If links should be decorated with underline decoration in their hover state
31
- * @property-read string hover_bold If links should be styled as bold in their hover state
32
- * @property-read string hover_italic If links should be styled as italic in their hover state
33
- * @property-read string hover_bg_color Background color for links in their hover state
34
- * @property-read string hover_color Text color for links in their hover state
35
- * @property-read string hover_border_style Border style for links in their hover state
36
- * @property-read string hover_border_width Border width for links in their hover state
37
- * @property-read string hover_border_color Border color for links in their hover state
38
- * @property-read string tag_spacing CSS margin between tags
39
- * @property-read bool debug If debug output should be included
40
- * @property-read string line_height CSS line-height for the tags
41
- * @property-read string separator Separator between tags
42
- * @property-read string prefix Prefix before each tag
43
- * @property-read string suffix Suffix after each tag
44
- * @property-read bool show_title_text If the widget title should be shown
45
- * @property-read string alignment How the text in the resulting cloud should be aligned
46
- * @property-read string display How the resulting cloud should be displayed
47
- * @property-read bool show_post_count If the number of posts with that term should be displayed with the name
48
- * @property-read string title_type What type of information the title text should contain
49
- * @property-read string title_custom_template A C-style printf-template for the title text. Include %d to get the post count and %s to get the term name.
50
- * @property-read string before_widget @internal
51
- * @property-read string after_widget @internal
52
- * @property-read string before_title @internal
53
- * @property-read string after_title @internal
 
 
54
  */
55
 
56
  class UTCW_RenderConfig extends UTCW_Config
@@ -169,6 +171,8 @@ class UTCW_RenderConfig extends UTCW_Config
169
  $this->addOption('show_links', 'boolean', array('default' => true));
170
  $this->addOption('show_title_text', 'boolean', array('default' => true));
171
  $this->addOption('show_post_count', 'boolean', array('default' => false));
 
 
172
  $this->addOption('debug', 'boolean');
173
 
174
  parent::__construct($input, $plugin);
14
  * Class to represent a the configuration options for cloud rendering retrieval
15
  *
16
  * @since 2.3
17
+ * @property-read string title Title text of the widget
18
+ * @property-read string letter_spacing CSS letter-spacing value (in pixels)
19
+ * @property-read string word_spacing CSS word-spacing value (in pixels)
20
+ * @property-read string text_transform CSS text-transform value
21
+ * @property-read string show_title If the title attribute should be added to links in the cloud
22
+ * @property-read string show_links If the tags should be wrapped in links
23
+ * @property-read string link_underline If links should be styled with underline decoration
24
+ * @property-read string link_bold If links should be styled as bold
25
+ * @property-read string link_italic If links should be styled as italic
26
+ * @property-read string link_bg_color Background color for links
27
+ * @property-read string link_border_style Border style for links
28
+ * @property-read string link_border_width Border width for links
29
+ * @property-read string link_border_color Border color for links
30
+ * @property-read string hover_underline If links should be decorated with underline decoration in their hover state
31
+ * @property-read string hover_bold If links should be styled as bold in their hover state
32
+ * @property-read string hover_italic If links should be styled as italic in their hover state
33
+ * @property-read string hover_bg_color Background color for links in their hover state
34
+ * @property-read string hover_color Text color for links in their hover state
35
+ * @property-read string hover_border_style Border style for links in their hover state
36
+ * @property-read string hover_border_width Border width for links in their hover state
37
+ * @property-read string hover_border_color Border color for links in their hover state
38
+ * @property-read string tag_spacing CSS margin between tags
39
+ * @property-read bool debug If debug output should be included
40
+ * @property-read string line_height CSS line-height for the tags
41
+ * @property-read string separator Separator between tags
42
+ * @property-read string prefix Prefix before each tag
43
+ * @property-read string suffix Suffix after each tag
44
+ * @property-read bool show_title_text If the widget title should be shown
45
+ * @property-read string alignment How the text in the resulting cloud should be aligned
46
+ * @property-read string display How the resulting cloud should be displayed
47
+ * @property-read bool show_post_count If the number of posts with that term should be displayed with the name
48
+ * @property-read string title_type What type of information the title text should contain
49
+ * @property-read string title_custom_template A C-style printf-template for the title text. Include %d to get the post count and %s to get the term name.
50
+ * @property-read bool prevent_breaking If wrapping lines in the middle of words should be prevented
51
+ * @property-read bool avoid_theme_styling Try to avoid styles applied to the tag cloud from themes
52
+ * @property-read string before_widget @internal
53
+ * @property-read string after_widget @internal
54
+ * @property-read string before_title @internal
55
+ * @property-read string after_title @internal
56
  */
57
 
58
  class UTCW_RenderConfig extends UTCW_Config
171
  $this->addOption('show_links', 'boolean', array('default' => true));
172
  $this->addOption('show_title_text', 'boolean', array('default' => true));
173
  $this->addOption('show_post_count', 'boolean', array('default' => false));
174
+ $this->addOption('prevent_breaking', 'boolean', array('default' => false));
175
+ $this->addOption('avoid_theme_styling', 'boolean', array('default' => false));
176
  $this->addOption('debug', 'boolean');
177
 
178
  parent::__construct($input, $plugin);
src/Config/Type/ClassType.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Ultimate Tag Cloud Widget
4
+ *
5
+ * @author Rickard Andersson <rickard@0x539.se>
6
+ * @version 2.5
7
+ * @license GPLv2
8
+ * @package utcw
9
+ * @subpackage config-type
10
+ * @since 2.3
11
+ */
12
+
13
+ /**
14
+ * Class type configuration option
15
+ *
16
+ * @since 2.3
17
+ */
18
+ class UTCW_ClassType extends UTCW_Type
19
+ {
20
+ /**
21
+ * Validates if the value is valid for the given set
22
+ *
23
+ * @param mixed $value
24
+ *
25
+ * @return bool
26
+ * @since 2.3
27
+ */
28
+ function validate($value)
29
+ {
30
+ $classMap = isset($this->options['classMap']) ? $this->options['classMap'] : array();
31
+ $baseClass = $this->options['baseClass'];
32
+
33
+ if ($value instanceof $baseClass) {
34
+ return true;
35
+ }
36
+
37
+ if (!is_string($value)) {
38
+ return false;
39
+ }
40
+
41
+ if (class_exists($value)) {
42
+ $parents = class_parents($value);
43
+
44
+ if (in_array($baseClass, $parents)) {
45
+ return true;
46
+ }
47
+ }
48
+
49
+ if (array_key_exists($value, $classMap)) {
50
+ return true;
51
+ }
52
+
53
+ return false;
54
+ }
55
+
56
+ /**
57
+ * @param mixed $value
58
+ *
59
+ * @return object
60
+ */
61
+ function normalize($value)
62
+ {
63
+ if (is_string($value)) {
64
+
65
+ $className = isset($this->options['classMap'][$value]) ? $this->options['classMap'][$value] : $value;
66
+
67
+ return call_user_func($this->options['factory'], $className);
68
+ }
69
+
70
+ return $value;
71
+ }
72
+
73
+ /**
74
+ * Returns the first value of the set if a default value is not given
75
+ *
76
+ * @return mixed
77
+ * @since 2.3
78
+ */
79
+ function getDefaultValue()
80
+ {
81
+ if (isset($this->options['default'])) {
82
+ return $this->normalize($this->options['default']);
83
+ }
84
+
85
+ if (isset($this->options['classMap']) && is_array($this->options['classMap']) && $this->options['classMap']) {
86
+ return $this->normalize($this->options['classMap'][0]);
87
+ }
88
+
89
+ return '';
90
+ }
91
+ }
src/Config/Type/IntegerType.php CHANGED
@@ -26,7 +26,7 @@ class UTCW_IntegerType extends UTCW_Type
26
  * @return bool
27
  * @since 2.3
28
  */
29
- function validate($value)
30
  {
31
  if (!is_numeric($value)) {
32
  return false;
@@ -62,7 +62,7 @@ class UTCW_IntegerType extends UTCW_Type
62
  * @return int
63
  * @since 2.3
64
  */
65
- function getDefaultValue()
66
  {
67
  if (isset($this->options['default'])) {
68
  return $this->options['default'];
26
  * @return bool
27
  * @since 2.3
28
  */
29
+ public function validate($value)
30
  {
31
  if (!is_numeric($value)) {
32
  return false;
62
  * @return int
63
  * @since 2.3
64
  */
65
+ public function getDefaultValue()
66
  {
67
  if (isset($this->options['default'])) {
68
  return $this->options['default'];
src/Config/Type/MeasurementType.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @since 2.3
17
  */
18
- class UTCW_MeasurementType extends UTCW_Type
19
  {
20
 
21
  /**
@@ -26,7 +26,7 @@ class UTCW_MeasurementType extends UTCW_Type
26
  * @return bool
27
  * @since 2.3
28
  */
29
- function validate($value)
30
  {
31
  return !!preg_match('/^' . UTCW_DECIMAL_REGEX . '(em|px|%)?$/i', $value);
32
  }
@@ -47,19 +47,4 @@ class UTCW_MeasurementType extends UTCW_Type
47
 
48
  return $value;
49
  }
50
-
51
- /**
52
- * Returns zero if a default value is not given
53
- *
54
- * @return int|mixed
55
- * @since 2.3
56
- */
57
- function getDefaultValue()
58
- {
59
- if (isset($this->options['default'])) {
60
- return $this->options['default'];
61
- }
62
-
63
- return 0;
64
- }
65
  }
15
  *
16
  * @since 2.3
17
  */
18
+ class UTCW_MeasurementType extends UTCW_IntegerType
19
  {
20
 
21
  /**
26
  * @return bool
27
  * @since 2.3
28
  */
29
+ public function validate($value)
30
  {
31
  return !!preg_match('/^' . UTCW_DECIMAL_REGEX . '(em|px|%)?$/i', $value);
32
  }
47
 
48
  return $value;
49
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
src/Data.php CHANGED
@@ -44,14 +44,6 @@ class UTCW_Data
44
  */
45
  protected $plugin;
46
 
47
- /**
48
- * Reference to the selection strategy used
49
- *
50
- * @var UTCW_SelectionStrategy
51
- * @since 2.2
52
- */
53
- protected $strategy;
54
-
55
  /**
56
  * Reference to the translation handler used
57
  *
@@ -76,6 +68,24 @@ class UTCW_Data
76
  */
77
  protected $result;
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  /**
80
  * Creates a new instance
81
  *
@@ -84,25 +94,22 @@ class UTCW_Data
84
  * @since 2.0
85
  */
86
  public function __construct(UTCW_Plugin $plugin)
 
 
 
 
 
 
 
 
 
 
 
 
87
  {
88
  $this->config = $plugin->get('dataConfig');
89
  $this->db = $plugin->get('wpdb');
90
  $this->plugin = $plugin;
91
-
92
- switch ($this->config->strategy) {
93
- case 'popularity':
94
- $this->strategy = new UTCW_PopularityStrategy($this->plugin);
95
- break;
96
- case 'random':
97
- $this->strategy = new UTCW_RandomStrategy($this->plugin);
98
- break;
99
- case 'creation':
100
- $this->strategy = new UTCW_CreationTimeStrategy($this->plugin);
101
- break;
102
- case 'current_list':
103
- $this->strategy = new UTCW_CurrentListStrategy($this->plugin);
104
- break;
105
- }
106
  }
107
 
108
  /**
@@ -114,7 +121,7 @@ class UTCW_Data
114
  public function getTerms()
115
  {
116
  $this->terms = array();
117
- $this->result = $this->strategy->getData();
118
 
119
  // Calculate sizes
120
  $min_count = PHP_INT_MAX;
@@ -163,7 +170,7 @@ class UTCW_Data
163
  switch ($this->config->color) {
164
  case 'random':
165
  foreach ($this->terms as $term) {
166
- $term->color = sprintf(UTCW_HEX_COLOR_FORMAT, rand() % 255, rand() % 255, rand() % 255);
167
  }
168
  break;
169
  case 'set':
@@ -284,31 +291,21 @@ class UTCW_Data
284
  */
285
  protected function addTermFilterQueryVars()
286
  {
287
- $terms = array();
288
  $query = array();
289
 
290
  // First create a map of taxonomy => terms
291
  foreach ($this->config->post_term as $term_id) {
292
- $term = $this->plugin->getTerm($term_id);
293
-
294
- if (!isset($terms[$term->taxonomy])) {
295
- $terms[$term->taxonomy] = array();
296
- }
297
 
298
- $terms[$term->taxonomy][] = $term;
299
- }
300
-
301
- // Create a new map of query_var => terms for each taxonomy that has a query_var
302
- foreach ($terms as $taxonomy => $taxonomyTerms) {
303
-
304
- $taxonomy = $this->plugin->getTaxonomy($taxonomy);
305
 
306
  if ($taxonomy->query_var) {
307
- $query[$taxonomy->query_var] = array();
308
 
309
- foreach ($taxonomyTerms as $term) {
310
- $query[$taxonomy->query_var][] = $term->slug;
311
  }
 
 
312
  }
313
  }
314
 
@@ -339,6 +336,6 @@ class UTCW_Data
339
  unset($this->db);
340
  $this->plugin->remove('wpdb');
341
  $this->plugin->remove('data');
342
- $this->strategy->cleanupForDebug();
343
  }
344
  }
44
  */
45
  protected $plugin;
46
 
 
 
 
 
 
 
 
 
47
  /**
48
  * Reference to the translation handler used
49
  *
68
  */
69
  protected $result;
70
 
71
+ /**
72
+ * Never serialize any of the private members
73
+ *
74
+ * @return array
75
+ */
76
+ public function __sleep()
77
+ {
78
+ return array();
79
+ }
80
+
81
+ /**
82
+ * Reinitialize the private members when waking up
83
+ */
84
+ public function __wakeup()
85
+ {
86
+ $this->init(UTCW_Plugin::getInstance());
87
+ }
88
+
89
  /**
90
  * Creates a new instance
91
  *
94
  * @since 2.0
95
  */
96
  public function __construct(UTCW_Plugin $plugin)
97
+ {
98
+ $this->init($plugin);
99
+ }
100
+
101
+ /**
102
+ * Set up dependencies
103
+ *
104
+ * @param UTCW_Plugin $plugin
105
+ *
106
+ * @since 2.6
107
+ */
108
+ protected function init(UTCW_Plugin $plugin)
109
  {
110
  $this->config = $plugin->get('dataConfig');
111
  $this->db = $plugin->get('wpdb');
112
  $this->plugin = $plugin;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  }
114
 
115
  /**
121
  public function getTerms()
122
  {
123
  $this->terms = array();
124
+ $this->result = $this->config->strategy->getData();
125
 
126
  // Calculate sizes
127
  $min_count = PHP_INT_MAX;
170
  switch ($this->config->color) {
171
  case 'random':
172
  foreach ($this->terms as $term) {
173
+ $term->color = sprintf(UTCW_HEX_COLOR_FORMAT, rand() % 256, rand() % 256, rand() % 256);
174
  }
175
  break;
176
  case 'set':
291
  */
292
  protected function addTermFilterQueryVars()
293
  {
 
294
  $query = array();
295
 
296
  // First create a map of taxonomy => terms
297
  foreach ($this->config->post_term as $term_id) {
 
 
 
 
 
298
 
299
+ $term = $this->plugin->getTerm($term_id);
300
+ $taxonomy = $this->plugin->getTaxonomy($term->taxonomy);
 
 
 
 
 
301
 
302
  if ($taxonomy->query_var) {
 
303
 
304
+ if (!isset($query[$taxonomy->query_var])) {
305
+ $query[$taxonomy->query_var] = array();
306
  }
307
+
308
+ $query[$taxonomy->query_var][] = $term->slug;
309
  }
310
  }
311
 
336
  unset($this->db);
337
  $this->plugin->remove('wpdb');
338
  $this->plugin->remove('data');
339
+ $this->config->strategy->cleanupForDebug();
340
  }
341
  }
src/Database/QueryBuilder.php CHANGED
@@ -176,17 +176,36 @@ class UTCW_QueryBuilder
176
  /**
177
  * Add post status constraint
178
  *
179
- * @param bool $authenticated
 
180
  *
181
  * @since 2.2
182
  */
183
- public function addPostStatusConstraint($authenticated)
184
  {
 
 
 
 
 
185
  // Authenticated users are allowed to view tags for private posts
186
  if ($authenticated) {
187
- $this->query[] = "AND p.post_status IN ('publish','private')";
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  } else {
189
- $this->query[] = "AND p.post_status = 'publish'";
190
  }
191
  }
192
 
@@ -235,24 +254,21 @@ class UTCW_QueryBuilder
235
  */
236
  public function addTagsListConstraint($type, array $list, array $taxonomy)
237
  {
238
- if ($list) {
239
- $tags_list_parameters = array();
240
-
241
- foreach ($list as $tag_id) {
242
- if ($this->plugin->checkTermTaxonomy($tag_id, $taxonomy)) {
243
- $tags_list_parameters[] = '%d';
244
- $this->parameters[] = $tag_id;
245
- }
246
- }
247
 
248
- if ($tags_list_parameters) {
249
- $tags_list_operator = $type == 'include' ? 'IN' : 'NOT IN';
250
- $this->query[] = 'AND t.term_id ' . $tags_list_operator . ' (' . join(
251
- ',',
252
- $tags_list_parameters
253
- ) . ')';
254
  }
255
  }
 
 
 
 
 
 
 
256
  }
257
 
258
  /**
@@ -304,44 +320,28 @@ class UTCW_QueryBuilder
304
  */
305
  public function addSort($order, $reverse, $case_sensitive)
306
  {
 
 
 
 
 
 
307
  // If the result should be ordered in another way, try to create a sub-query to sort the result
308
  // directly in the database query
309
- $subquery_required = true;
 
310
 
311
- // No subquery is needed if the order should be by count desc (it's already sorted that way)
312
- if ($reverse && $order == 'count') {
313
- $subquery_required = false;
314
- }
315
 
316
- // No subquery is needed if the order should be by color since the sorting is done in PHP afterwards
317
- if ($order == 'color') {
318
- $subquery_required = false;
319
- }
 
 
 
320
 
321
- if ($subquery_required) {
322
- array_unshift($this->query, 'SELECT * FROM (');
323
- $this->query[] = ') AS subQuery';
324
-
325
- $way = $reverse ? 'DESC' : 'ASC';
326
- $binary = $case_sensitive ? 'BINARY ' : '';
327
-
328
- switch ($order) {
329
- case 'random':
330
- $this->query[] = 'ORDER BY RAND() ' . $way;
331
- break;
332
- case 'name':
333
- $this->query[] = 'ORDER BY ' . $binary . 'name ' . $way;
334
- break;
335
- case 'slug':
336
- $this->query[] = 'ORDER BY ' . $binary . 'slug ' . $way;
337
- break;
338
- case 'id':
339
- $this->query[] = 'ORDER BY term_id ' . $way;
340
- break;
341
- case 'count':
342
- $this->query[] = 'ORDER BY count ' . $way;
343
- break;
344
- }
345
- }
346
  }
347
  }
176
  /**
177
  * Add post status constraint
178
  *
179
+ * @param bool $authenticated
180
+ * @param array $post_types
181
  *
182
  * @since 2.2
183
  */
184
+ public function addPostStatusConstraint($authenticated, array $post_types)
185
  {
186
+ $statuses = array('publish');
187
+ $containsAttachment = in_array('attachment', $post_types);
188
+ $singlePostType = count($post_types) === 1;
189
+ $multiPostType = count($post_types) > 1;
190
+
191
  // Authenticated users are allowed to view tags for private posts
192
  if ($authenticated) {
193
+ $statuses[] = 'private';
194
+ }
195
+
196
+ // If attachment is the only post type its safe to include inherit in the IN clause
197
+ if ($containsAttachment && $singlePostType) {
198
+ $statuses[] = 'inherit';
199
+ }
200
+
201
+ $condition = "p.post_status IN ('" . join("','", $statuses) . "')";
202
+
203
+ // If attachment is one of the post types in a multi post type cloud
204
+ // check that only attachments are allowed the post status inherit
205
+ if ($containsAttachment && $multiPostType) {
206
+ $this->query[] = "AND (" . $condition . " OR (post_type = 'attachment' AND post_status = 'inherit'))";
207
  } else {
208
+ $this->query[] = "AND " . $condition;
209
  }
210
  }
211
 
254
  */
255
  public function addTagsListConstraint($type, array $list, array $taxonomy)
256
  {
257
+ $parameters = array();
 
 
 
 
 
 
 
 
258
 
259
+ foreach ($list as $tag_id) {
260
+ if ($this->plugin->checkTermTaxonomy($tag_id, $taxonomy)) {
261
+ $parameters[] = '%d';
262
+ $this->parameters[] = $tag_id;
 
 
263
  }
264
  }
265
+
266
+ if (!$parameters) {
267
+ return;
268
+ }
269
+
270
+ $operator = $type == 'include' ? 'IN' : 'NOT IN';
271
+ $this->query[] = 'AND t.term_id ' . $operator . ' (' . join(',', $parameters) . ')';
272
  }
273
 
274
  /**
320
  */
321
  public function addSort($order, $reverse, $case_sensitive)
322
  {
323
+ // No subquery is needed if the order should be by count desc (it's already sorted that way)
324
+ // No subquery is needed if the order should be by color since the sorting is done in PHP afterwards
325
+ if ($order == 'color' || $reverse && $order == 'count') {
326
+ return;
327
+ }
328
+
329
  // If the result should be ordered in another way, try to create a sub-query to sort the result
330
  // directly in the database query
331
+ array_unshift($this->query, 'SELECT * FROM (');
332
+ $this->query[] = ') AS subQuery';
333
 
334
+ $way = $reverse ? 'DESC' : 'ASC';
335
+ $binary = $case_sensitive ? 'BINARY ' : '';
 
 
336
 
337
+ $orderStatementMap = array(
338
+ 'random' => 'ORDER BY RAND() ' . $way,
339
+ 'name' => 'ORDER BY ' . $binary . 'name ' . $way,
340
+ 'slug' => 'ORDER BY ' . $binary . 'slug ' . $way,
341
+ 'id' => 'ORDER BY term_id ' . $way,
342
+ 'count' => 'ORDER BY count ' . $way,
343
+ );
344
 
345
+ $this->query[] = $orderStatementMap[$order];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
346
  }
347
  }
src/Plugin.php CHANGED
@@ -78,6 +78,16 @@ class UTCW_Plugin
78
  add_action('wp_ajax_utcw_get_authors', array($this, 'outputAuthorsJson'));
79
  // add_action('init', array($this, 'setCacheHandler')); Disabled for now
80
  add_action('init', array($this, 'setTranslationHandler'));
 
 
 
 
 
 
 
 
 
 
81
  }
82
 
83
  /**
78
  add_action('wp_ajax_utcw_get_authors', array($this, 'outputAuthorsJson'));
79
  // add_action('init', array($this, 'setCacheHandler')); Disabled for now
80
  add_action('init', array($this, 'setTranslationHandler'));
81
+ add_action('init', array($this, 'initLocalisation'));
82
+ }
83
+
84
+ /**
85
+ * Initializes localisation
86
+ *
87
+ * @since 2.6
88
+ */
89
+ public function initLocalisation() {
90
+ load_plugin_textdomain('utcw', false, '/ultimate-tag-cloud-widget/language/');
91
  }
92
 
93
  /**
src/Render.php CHANGED
@@ -101,7 +101,7 @@ class UTCW_Render
101
  $markup[] = $this->plugin->applyFilters('utcw_render_css', $this->css);
102
  }
103
 
104
- if ($this->config->before_widget) {
105
  $markup[] = str_replace('widget_utcw', 'widget_utcw widget_tag_cloud', $this->config->before_widget);
106
  }
107
 
@@ -117,7 +117,13 @@ class UTCW_Render
117
  }
118
  }
119
 
120
- $markup[] = '<div class="tagcloud utcw-' . $this->id . '">';
 
 
 
 
 
 
121
 
122
  $termObjects = $this->plugin->applyFilters('utcw_render_terms', $this->data->getTerms());
123
 
@@ -187,149 +193,35 @@ class UTCW_Render
187
  */
188
  private function buildCSS()
189
  {
190
- $main_styles = array('word-wrap:break-word');
191
-
192
- if (!$this->hasDefaultValue('text_transform')) {
193
- $main_styles[] = sprintf('text-transform:%s', $this->config->text_transform);
194
- }
195
-
196
- if (!$this->hasDefaultValue('letter_spacing')) {
197
- $main_styles[] = sprintf('letter-spacing:%s', $this->config->letter_spacing);
198
- }
199
-
200
- if (!$this->hasDefaultValue('word_spacing')) {
201
- $main_styles[] = sprintf('word-spacing:%s', $this->config->word_spacing);
202
- }
203
-
204
- if (!$this->hasDefaultValue('alignment')) {
205
- $main_styles[] = sprintf('text-align:%s', $this->config->alignment);
206
- }
207
-
208
- $link_styles = array();
209
-
210
- if (!$this->hasDefaultValue('link_underline')) {
211
- $link_styles[] = sprintf(
212
- 'text-decoration:%s',
213
- $this->config->link_underline === 'yes' ? 'underline' : 'none'
214
- );
215
- }
216
-
217
- if (!$this->hasDefaultValue('link_bold')) {
218
- $link_styles[] = sprintf('font-weight:%s', $this->config->link_bold === 'yes' ? 'bold' : 'normal');
219
- }
220
-
221
- if (!$this->hasDefaultValue('link_italic')) {
222
- $link_styles[] = sprintf('font-style:%s', $this->config->link_italic === 'yes' ? 'italic' : 'normal');
223
- }
224
-
225
- if (!$this->hasDefaultValue('link_bg_color')) {
226
- $link_styles[] = sprintf('background-color:%s', $this->config->link_bg_color);
227
- }
228
-
229
- if (
230
- !$this->hasDefaultValue('link_border_style') &&
231
- !$this->hasDefaultValue('link_border_color') &&
232
- !$this->hasDefaultValue('link_border_width')
233
- ) {
234
- $link_styles[] = sprintf(
235
- 'border:%s %s %s',
236
- $this->config->link_border_style,
237
- $this->config->link_border_width,
238
- $this->config->link_border_color
239
- );
240
- } else {
241
- if (!$this->hasDefaultValue('link_border_style')) {
242
- $link_styles[] = sprintf('border-style:%s', $this->config->link_border_style);
243
- }
244
 
245
- if (!$this->hasDefaultValue('link_border_color')) {
246
- $link_styles[] = sprintf('border-color:%s', $this->config->link_border_color);
247
- }
248
-
249
- if (!$this->hasDefaultValue('link_border_width')) {
250
- $link_styles[] = sprintf('border-width:%s', $this->config->link_border_width);
251
- }
252
- }
253
 
254
- if (!$this->hasDefaultValue('tag_spacing')) {
255
- $link_styles[] = sprintf('margin-right:%s', $this->config->tag_spacing);
256
- }
257
 
258
- if (!$this->hasDefaultValue('line_height')) {
259
- $link_styles[] = sprintf('line-height:%s', $this->config->line_height);
260
- }
261
 
262
- $hover_styles = array();
263
 
264
- if (!$this->hasDefaultValue('hover_underline')) {
265
- $hover_styles[] = sprintf(
266
- 'text-decoration:%s',
267
- $this->config->hover_underline === 'yes' ? 'underline' : 'none'
268
- );
269
- }
270
-
271
-