Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Plugin updates

* Achievements
* Breadcrumb NavXT
* CMS Tree Page View
* Restrict Categories
  • Loading branch information...
commit c7160d45e69d47f6f447f41c3958f184e90ea279 1 parent 491498a
Craig Cook craigcook authored

Showing 109 changed files with 7,058 additions and 3,609 deletions. Show diff stats Hide diff stats

  1. +6 6 plugins/achievements/achievements.php
  2. +160 116 plugins/achievements/dpa.pot
  3. +71 0 plugins/achievements/includes/achievements/functions.php
  4. +24 1 plugins/achievements/includes/achievements/template.php
  5. +5 3 plugins/achievements/includes/admin/admin.php
  6. +1 1  plugins/achievements/includes/admin/class-dpa-users-list-table.php
  7. +3 0  plugins/achievements/includes/admin/css/achievements-rtl.css
  8. +1 1  plugins/achievements/includes/admin/css/achievements.css
  9. +2 1  plugins/achievements/includes/admin/css/dev/achievements.less
  10. +1 0  plugins/achievements/includes/admin/css/supportedplugins-rtl.css
  11. +1 0  plugins/achievements/includes/admin/css/users-rtl.css
  12. +18 4 plugins/achievements/includes/admin/functions.php
  13. +9 5 plugins/achievements/includes/admin/supported-plugins.php
  14. +1 1  plugins/achievements/includes/admin/users.php
  15. +40 4 plugins/achievements/includes/class-dpa-shortcodes.php
  16. +49 1 plugins/achievements/includes/common/functions.php
  17. +24 2 plugins/achievements/includes/common/template.php
  18. +99 0 plugins/achievements/includes/common/widgets.php
  19. +9 0 plugins/achievements/includes/core/actions.php
  20. +15 0 plugins/achievements/includes/core/dependency.php
  21. +5 1 plugins/achievements/includes/core/template-loader.php
  22. +2 2 plugins/achievements/includes/extensions/wordpress.php
  23. +96 17 plugins/achievements/includes/progress/template.php
  24. +12 2 plugins/achievements/includes/users/notifications.php
  25. +7 0 plugins/achievements/readme.md
  26. +94 0 plugins/achievements/readme.txt
  27. +204 0 plugins/achievements/templates/achievements/achievements-functions.php
  28. +36 0 plugins/achievements/templates/achievements/achievements/content-archive-achievement.php
  29. +34 0 plugins/achievements/templates/achievements/achievements/content-author-achievement.php
  30. +36 0 plugins/achievements/templates/achievements/achievements/content-single-achievement.php
  31. +86 0 plugins/achievements/templates/achievements/achievements/feedback-achievement-unlocked.php
  32. +25 0 plugins/achievements/templates/achievements/achievements/feedback-no-achievements.php
  33. +24 0 plugins/achievements/templates/achievements/achievements/form-redeem-code.php
  34. +54 0 plugins/achievements/templates/achievements/achievements/loop-achievements.php
  35. +31 0 plugins/achievements/templates/achievements/achievements/loop-progresses.php
  36. +47 0 plugins/achievements/templates/achievements/achievements/loop-single-achievement.php
  37. +42 0 plugins/achievements/templates/achievements/achievements/loop-single-progress.php
  38. +29 0 plugins/achievements/templates/achievements/achievements/pagination-achievements.php
  39. +23 0 plugins/achievements/templates/achievements/achievements/pagination-author-achievements.php
  40. +3 0  plugins/achievements/templates/achievements/css/achievements-rtl.css
  41. +2 0  plugins/achievements/templates/achievements/css/achievements.css
  42. +189 0 plugins/achievements/templates/achievements/css/dev/achievements.less
  43. +81 0 plugins/achievements/templates/achievements/css/dev/notifications.less
  44. +31 0 plugins/achievements/templates/achievements/css/dev/variables.less
  45. +3 0  plugins/achievements/templates/achievements/css/notifications-rtl.css
  46. +2 0  plugins/achievements/templates/achievements/css/notifications.css
  47. +4 0 plugins/achievements/templates/achievements/index.php
  48. +5 0 plugins/achievements/templates/achievements/js/achievements.js
  49. +5 0 plugins/achievements/templates/achievements/js/dev/achievements.js
  50. +15 0 plugins/achievements/templates/achievements/js/dev/notifications.js
  51. +1 0  plugins/achievements/templates/achievements/js/notifications.js
  52. +4 0 plugins/achievements/templates/index.php
  53. +56 54 plugins/breadcrumb-navxt/breadcrumb_navxt_admin.php
  54. +68 21 plugins/breadcrumb-navxt/breadcrumb_navxt_class.php
  55. +1 1  plugins/breadcrumb-navxt/breadcrumb_navxt_widget.php
  56. +1 1  plugins/breadcrumb-navxt/includes/block_direct_access.php
  57. +34 4 plugins/breadcrumb-navxt/includes/mtekk_adminkit.php
  58. +3 2 plugins/breadcrumb-navxt/includes/mtekk_adminkit_tabs.css
  59. +1 1  plugins/breadcrumb-navxt/includes/multibyte_supplicant.php
  60. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-ar.mo
  61. +177 0 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-ar.po
  62. +756 756 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-az.po
  63. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-cs_CZ.mo
  64. +753 0 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-cs_CZ.po
  65. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-da_DK.mo
  66. +187 191 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-da_DK.po
  67. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-de_DE.mo
  68. +5 585 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-de_DE.po
  69. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-es_ES.mo
  70. +396 165 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-es_ES.po
  71. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-et.mo
  72. +187 191 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-et.po
  73. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-fr_FR.mo
  74. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-it_IT.mo
  75. +753 0 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-it_IT.po
  76. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-nb_NO.mo
  77. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-pt_PT.mo
  78. +187 191 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-pt_PT.po
  79. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-ru_RU.mo
  80. +187 191 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-ru_RU.po
  81. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt-sv_SE.mo
  82. +398 167 plugins/breadcrumb-navxt/languages/breadcrumb-navxt-sv_SE.po
  83. BIN  plugins/breadcrumb-navxt/languages/breadcrumb-navxt.mo
  84. +211 220 plugins/breadcrumb-navxt/languages/breadcrumb-navxt.po
  85. +189 194 plugins/breadcrumb-navxt/languages/breadcrumb-navxt.pot
  86. +30 9 plugins/breadcrumb-navxt/readme.txt
  87. +59 17 plugins/cms-tree-page-view/functions.php
  88. +2 2 plugins/cms-tree-page-view/index.php
  89. +13 0 plugins/cms-tree-page-view/languages/cms-tree-page-view-fi_FI.mo
  90. +362 0 plugins/cms-tree-page-view/languages/cms-tree-page-view-fi_FI.po
  91. +14 3 plugins/cms-tree-page-view/readme.txt
  92. BIN  plugins/cms-tree-page-view/screenshot-1.png
  93. BIN  plugins/cms-tree-page-view/screenshot-2.png
  94. BIN  plugins/cms-tree-page-view/screenshot-3.png
  95. BIN  plugins/cms-tree-page-view/screenshot-4.png
  96. BIN  plugins/cms-tree-page-view/screenshot-5.png
  97. BIN  plugins/cms-tree-page-view/screenshot-6.png
  98. BIN  plugins/cms-tree-page-view/screenshot-7.png
  99. +1 0  plugins/cms-tree-page-view/scripts/cms_tree_page_view.js
  100. BIN  plugins/cms-tree-page-view/styles/images/switch-view-icons.psd
  101. +1 1  plugins/cms-tree-page-view/styles/styles.css
  102. +15 0 plugins/restrict-categories/js/restrict-categories.js
  103. +13 2 plugins/restrict-categories/readme.txt
  104. +217 176 plugins/restrict-categories/restrict-categories.php
  105. BIN  plugins/restrict-categories/screenshot-1.png
  106. BIN  plugins/restrict-categories/screenshot-2.png
  107. BIN  plugins/restrict-categories/screenshot-3.png
  108. +7 0 plugins/restrict-categories/uninstall.php
  109. +3 296 themes/QMO5/style.css
12 plugins/achievements/achievements.php
@@ -13,8 +13,8 @@
13 13 Plugin Name: Achievements
14 14 Plugin URI: http://achievementsapp.com/
15 15 Description: Achievements gamifies your WordPress site with challenges, badges, and points.
16   -Version: 3
17   -Requires at least: 3.5
  16 +Version: 3.1
  17 +Requires at least: 3.5.1
18 18 Tested up to: 3.5.1
19 19 License: GPLv3
20 20 Author: Paul Gibbs
@@ -304,7 +304,7 @@ private function includes() {
304 304 */
305 305 require( $this->includes_dir . 'common/functions.php' );
306 306 require( $this->includes_dir . 'common/template.php' );
307   - //require( $this->includes_dir . 'common/widgets.php' );
  307 + require( $this->includes_dir . 'common/widgets.php' );
308 308
309 309 require( $this->includes_dir . 'achievements/functions.php' );
310 310 require( $this->includes_dir . 'achievements/template.php' );
@@ -439,7 +439,7 @@ public function register_post_types() {
439 439 'ep_mask' => 0, // EP_ROOT - removes comment-page rewrite rules
440 440 'feed' => false, // Remove feed rewrite rules
441 441 'feeds' => false, // Remove feed rewrite rules (this is what the parameter ought to be)
442   - 'pages' => false,
  442 + 'pages' => true,
443 443 'slug' => dpa_get_root_slug(),
444 444 'with_front' => false,
445 445 );
@@ -594,8 +594,8 @@ public function register_theme_packages() {
594 594 'id' => 'default',
595 595 'name' => __( 'Achievements Default', 'dpa' ),
596 596 'version' => dpa_get_version(),
597   - 'dir' => trailingslashit( $this->themes_dir . '/achievements' ),
598   - 'url' => trailingslashit( $this->themes_url . '/achievements' )
  597 + 'dir' => trailingslashit( $this->themes_dir . 'achievements' ),
  598 + 'url' => trailingslashit( $this->themes_url . 'achievements' )
599 599 ) );
600 600 }
601 601
276 plugins/achievements/dpa.pot
@@ -2,9 +2,9 @@
2 2 # This file is distributed under the same license as the Achievements package.
3 3 msgid ""
4 4 msgstr ""
5   -"Project-Id-Version: Achievements 3\n"
  5 +"Project-Id-Version: Achievements 3.1\n"
6 6 "Report-Msgid-Bugs-To: http://wordpress.org/tag/achievements\n"
7   -"POT-Creation-Date: 2013-01-20 20:21:53+00:00\n"
  7 +"POT-Creation-Date: 2013-02-17 22:20:59+00:00\n"
8 8 "MIME-Version: 1.0\n"
9 9 "Content-Type: text/plain; charset=UTF-8\n"
10 10 "Content-Transfer-Encoding: 8bit\n"
@@ -16,185 +16,189 @@ msgstr ""
16 16 msgid "Cheatin’ huh?"
17 17 msgstr ""
18 18
19   -#: achievements.php:422
  19 +#: achievements.php:421
20 20 msgctxt "achievement"
21 21 msgid "Add New"
22 22 msgstr ""
23 23
24   -#: achievements.php:423
  24 +#: achievements.php:422
25 25 msgid "Add New Achievement"
26 26 msgstr ""
27 27
28   -#: achievements.php:424
  28 +#: achievements.php:423
29 29 msgid "All Achievements"
30 30 msgstr ""
31 31
32   -#: achievements.php:425
  32 +#: achievements.php:424
33 33 msgctxt "achievement"
34 34 msgid "Edit"
35 35 msgstr ""
36 36
37   -#: achievements.php:426
  37 +#: achievements.php:425
38 38 msgid "Edit Achievement"
39 39 msgstr ""
40 40
41   -#. #-#-#-#-# achievements.pot (Achievements 3) #-#-#-#-#
  41 +#. #-#-#-#-# achievements.pot (Achievements 3.1) #-#-#-#-#
42 42 #. Plugin Name of the plugin/theme
43   -#: achievements.php:427 achievements.php:428
44   -#: includes/admin/class-dpa-users-list-table.php:149
  43 +#: achievements.php:426 achievements.php:427
  44 +#: includes/admin/class-dpa-users-list-table.php:150
45 45 #: includes/admin/functions.php:24
46 46 msgid "Achievements"
47 47 msgstr ""
48 48
49   -#: achievements.php:429
  49 +#: achievements.php:428
50 50 msgid "New Achievement"
51 51 msgstr ""
52 52
53   -#: achievements.php:430
  53 +#: achievements.php:429
54 54 msgid "No achievements found."
55 55 msgstr ""
56 56
57   -#: achievements.php:431
  57 +#: achievements.php:430
58 58 msgid "No achievements found in Trash."
59 59 msgstr ""
60 60
61   -#: achievements.php:432
  61 +#: achievements.php:431
62 62 msgid "Search Achievements"
63 63 msgstr ""
64 64
65   -#: achievements.php:433
  65 +#: achievements.php:432
66 66 msgid "Achievement"
67 67 msgstr ""
68 68
69   -#: achievements.php:434 achievements.php:435
  69 +#: achievements.php:433 achievements.php:434
70 70 msgid "View Achievement"
71 71 msgstr ""
72 72
73   -#: achievements.php:464
  73 +#: achievements.php:463
74 74 msgctxt "Achievement post type description"
75 75 msgid "Achievements types (e.g. new post, new site, new user)"
76 76 msgstr ""
77 77
78   -#: achievements.php:485
  78 +#: achievements.php:484
79 79 msgctxt "Achievement Progress post type description"
80 80 msgid ""
81 81 "Achievement Progress (e.g. unlocked achievements for a user, progress on an "
82 82 "achievement for a user)"
83 83 msgstr ""
84 84
85   -#: achievements.php:517
  85 +#: achievements.php:516
86 86 msgctxt "achievement"
87 87 msgid "Locked"
88 88 msgstr ""
89 89
90   -#: achievements.php:518
  90 +#: achievements.php:517
91 91 msgctxt "dpa"
92 92 msgid "Locked <span class=\"count\">(%s)</span>"
93 93 msgid_plural "Locked <span class=\"count\">(%s)</span>"
94 94 msgstr[0] ""
95 95 msgstr[1] ""
96 96
97   -#: achievements.php:530
  97 +#: achievements.php:529
98 98 msgctxt "achievement"
99 99 msgid "Unlocked"
100 100 msgstr ""
101 101
102   -#: achievements.php:531
  102 +#: achievements.php:530
103 103 msgctxt "dpa"
104 104 msgid "Unlocked <span class=\"count\">(%s)</span>"
105 105 msgid_plural "Unlocked <span class=\"count\">(%s)</span>"
106 106 msgstr[0] ""
107 107 msgstr[1] ""
108 108
109   -#: achievements.php:550
  109 +#: achievements.php:549
110 110 msgid "Add New Event"
111 111 msgstr ""
112 112
113   -#: achievements.php:551
  113 +#: achievements.php:550
114 114 msgid "All"
115 115 msgstr ""
116 116
117   -#: achievements.php:552
  117 +#: achievements.php:551
118 118 msgid "Edit Event"
119 119 msgstr ""
120 120
121   -#: achievements.php:553
  121 +#: achievements.php:552
122 122 msgctxt "event taxonomy general name"
123 123 msgid "Events"
124 124 msgstr ""
125 125
126   -#: achievements.php:554
  126 +#: achievements.php:553
127 127 msgid "New Event Name"
128 128 msgstr ""
129 129
130   -#: achievements.php:555
  130 +#: achievements.php:554
131 131 msgid "Popular Events"
132 132 msgstr ""
133 133
134   -#: achievements.php:556
  134 +#: achievements.php:555
135 135 msgid "Search Events"
136 136 msgstr ""
137 137
138   -#: achievements.php:557
  138 +#: achievements.php:556
139 139 msgctxt "event taxonomy singular name"
140 140 msgid "Event"
141 141 msgstr ""
142 142
143   -#: achievements.php:558
  143 +#: achievements.php:557
144 144 msgid "Update Event"
145 145 msgstr ""
146 146
147   -#: achievements.php:559
  147 +#: achievements.php:558
148 148 msgid "View Event"
149 149 msgstr ""
150 150
151   -#: achievements.php:596 templates/achievements/achievements-functions.php:48
  151 +#: achievements.php:595 templates/achievements/achievements-functions.php:48
152 152 msgid "Achievements Default"
153 153 msgstr ""
154 154
155   -#: achievements.php:628
  155 +#: achievements.php:627
156 156 msgctxt "Menu item in the toolbar"
157 157 msgid "My Achievements"
158 158 msgstr ""
159 159
  160 +#: includes/achievements/functions.php:238
  161 +msgid "That code was invalid. Try again!"
  162 +msgstr ""
  163 +
160 164 #. translators: first param is post permalink, second param is the "more" text.
161   -#: includes/achievements/template.php:478
  165 +#: includes/achievements/template.php:501
162 166 msgid "&hellip; (<a href=\"%1$s\">%2$s</a>)"
163 167 msgstr ""
164 168
165   -#: includes/achievements/template.php:480
  169 +#: includes/achievements/template.php:503
166 170 msgctxt "Excerpt - click here to see more of the post"
167 171 msgid "more"
168 172 msgstr ""
169 173
170   -#: includes/achievements/template.php:523 includes/progress/template.php:194
  174 +#: includes/achievements/template.php:546 includes/progress/template.php:252
171 175 msgctxt "[date] at [time]"
172 176 msgid "%1$s at %2$s"
173 177 msgstr ""
174 178
175   -#: includes/achievements/template.php:562
  179 +#: includes/achievements/template.php:585
176 180 msgid "%s achievement"
177 181 msgid_plural "%s achievements"
178 182 msgstr[0] ""
179 183 msgstr[1] ""
180 184
181   -#: includes/achievements/template.php:580
  185 +#: includes/achievements/template.php:603
182 186 msgid ""
183 187 "This site has %1$s, and the last unlocked was <a href=\"%2$s\">%3$s</a> by "
184 188 "%4$s."
185 189 msgstr ""
186 190
187   -#: includes/achievements/template.php:595
  191 +#: includes/achievements/template.php:618
188 192 msgid "This site has %1$s."
189 193 msgstr ""
190 194
191   -#: includes/achievements/template.php:694
  195 +#: includes/achievements/template.php:717
192 196 msgid "Viewing %1$s achievement"
193 197 msgid_plural "Viewing %1$s achievements"
194 198 msgstr[0] ""
195 199 msgstr[1] ""
196 200
197   -#: includes/achievements/template.php:698
  201 +#: includes/achievements/template.php:721
198 202 msgid "Viewing achievement %2$s (of %4$s total)"
199 203 msgid_plural "Viewing %1$s achievements - %2$s through %3$s (of %4$s total)"
200 204 msgstr[0] ""
@@ -217,24 +221,24 @@ msgstr ""
217 221 msgid "Supported Plugins"
218 222 msgstr ""
219 223
220   -#: includes/admin/admin.php:276
  224 +#: includes/admin/admin.php:278
221 225 msgid "Achievements Settings"
222 226 msgstr ""
223 227
224   -#: includes/admin/admin.php:279
  228 +#: includes/admin/admin.php:281
225 229 msgctxt "User&rsquo;s total points from unlocked Achievements"
226 230 msgid "Total Points"
227 231 msgstr ""
228 232
229   -#: includes/admin/admin.php:286
  233 +#: includes/admin/admin.php:288
230 234 msgid "Unlocked Achievements"
231 235 msgstr ""
232 236
233   -#: includes/admin/admin.php:289
  237 +#: includes/admin/admin.php:291
234 238 msgid "Assign or remove achievements from this user"
235 239 msgstr ""
236 240
237   -#: includes/admin/class-dpa-users-list-table.php:81
  241 +#: includes/admin/class-dpa-users-list-table.php:82
238 242 msgctxt "admin screen, types of users"
239 243 msgid "All <span class=\"count\">(%s)</span>"
240 244 msgid_plural "All <span class=\"count\">(%s)</span>"
@@ -242,93 +246,103 @@ msgstr[0] ""
242 246 msgstr[1] ""
243 247
244 248 #. translators: User role name with count
245   -#: includes/admin/class-dpa-users-list-table.php:99
  249 +#: includes/admin/class-dpa-users-list-table.php:100
246 250 msgid "%1$s <span class=\"count\">(%2$s)</span>"
247 251 msgstr ""
248 252
249   -#: includes/admin/class-dpa-users-list-table.php:146
  253 +#: includes/admin/class-dpa-users-list-table.php:147
250 254 msgid "Username"
251 255 msgstr ""
252 256
253   -#: includes/admin/class-dpa-users-list-table.php:147
  257 +#: includes/admin/class-dpa-users-list-table.php:148
254 258 msgid "Last Achievement"
255 259 msgstr ""
256 260
257   -#: includes/admin/class-dpa-users-list-table.php:148
  261 +#: includes/admin/class-dpa-users-list-table.php:149
258 262 msgid "Actions"
259 263 msgstr ""
260 264
261   -#: includes/admin/class-dpa-users-list-table.php:262
  265 +#: includes/admin/class-dpa-users-list-table.php:263
262 266 msgid "Edit"
263 267 msgstr ""
264 268
265   -#: includes/admin/functions.php:63
  269 +#: includes/admin/functions.php:65
266 270 msgid "Karma points:"
267 271 msgstr ""
268 272
269   -#: includes/admin/functions.php:68
  273 +#: includes/admin/functions.php:70
270 274 msgctxt "type of achievement"
271 275 msgid "Type:"
272 276 msgstr ""
273 277
274   -#: includes/admin/functions.php:69
  278 +#: includes/admin/functions.php:71
275 279 msgctxt "type of achievement"
276 280 msgid "&nbsp;Award"
277 281 msgstr ""
278 282
279   -#: includes/admin/functions.php:70
  283 +#: includes/admin/functions.php:72
280 284 msgctxt "type of achievement"
281 285 msgid "&nbsp;Event"
282 286 msgstr ""
283 287
284   -#: includes/admin/functions.php:72
  288 +#: includes/admin/functions.php:74
285 289 msgid ""
286 290 "An <em>award</em> is given by a site admin, whereas an <em>event</em> is "
287 291 "unlocked automatically when its criteria have been met."
288 292 msgstr ""
289 293
290   -#: includes/admin/functions.php:74
  294 +#: includes/admin/functions.php:76
291 295 msgid "Press here to pick events"
292 296 msgstr ""
293 297
294   -#: includes/admin/functions.php:91
  298 +#: includes/admin/functions.php:93
295 299 msgctxt ""
296 300 "Number of times an achievement&#8217;s events need to repeat before the "
297 301 "achievement is awarded"
298 302 msgid "Events repeat:"
299 303 msgstr ""
300 304
301   -#: includes/admin/functions.php:94
  305 +#: includes/admin/functions.php:96
302 306 msgid ""
303 307 "Number of times the events need to repeat before the achievement is awarded."
304 308 msgstr ""
305 309
306   -#: includes/admin/functions.php:176
  310 +#: includes/admin/functions.php:100
  311 +msgid "Redemption code:"
  312 +msgstr ""
  313 +
  314 +#: includes/admin/functions.php:103
  315 +msgid ""
  316 +"Users can enter this code into the Redemption widget to unlock the "
  317 +"achievement."
  318 +msgstr ""
  319 +
  320 +#: includes/admin/functions.php:189
307 321 msgid "Title"
308 322 msgstr ""
309 323
310   -#: includes/admin/functions.php:177
  324 +#: includes/admin/functions.php:190
311 325 msgctxt "Type of the achievement; award or badge"
312 326 msgid "Type"
313 327 msgstr ""
314 328
315   -#: includes/admin/functions.php:178
  329 +#: includes/admin/functions.php:191
316 330 msgid "Karma Points"
317 331 msgstr ""
318 332
319   -#: includes/admin/functions.php:179
  333 +#: includes/admin/functions.php:192
320 334 msgid "Date"
321 335 msgstr ""
322 336
323   -#: includes/admin/functions.php:198
  337 +#: includes/admin/functions.php:211
324 338 msgid "Award"
325 339 msgstr ""
326 340
327   -#: includes/admin/functions.php:198
  341 +#: includes/admin/functions.php:211
328 342 msgid "Event"
329 343 msgstr ""
330 344
331   -#: includes/admin/functions.php:228
  345 +#: includes/admin/functions.php:241
332 346 msgid ""
333 347 "The title field and the big achievement Editing Area are fixed in place, but "
334 348 "you can reposition all the other boxes using drag and drop, and can minimize "
@@ -337,17 +351,17 @@ msgid ""
337 351 "choose a 1- or 2-column layout for this screen."
338 352 msgstr ""
339 353
340   -#: includes/admin/functions.php:232
  354 +#: includes/admin/functions.php:245
341 355 msgid "Customizing This Display"
342 356 msgstr ""
343 357
344   -#: includes/admin/functions.php:236
  358 +#: includes/admin/functions.php:249
345 359 msgid ""
346 360 "<strong>Title</strong> - Enter a title for your achievement. After you enter "
347 361 "a title, you&#8217;ll see the permalink below, which you can edit."
348 362 msgstr ""
349 363
350   -#: includes/admin/functions.php:237
  364 +#: includes/admin/functions.php:250
351 365 msgid ""
352 366 "<strong>Achievement editor</strong> - Enter the text for your achievement. "
353 367 "There are two modes of editing: Visual and Text. Choose the mode by clicking "
@@ -363,11 +377,11 @@ msgid ""
363 377 "regular achievement editor."
364 378 msgstr ""
365 379
366   -#: includes/admin/functions.php:241
  380 +#: includes/admin/functions.php:254
367 381 msgid "Title and Achievement Editor"
368 382 msgstr ""
369 383
370   -#: includes/admin/functions.php:245
  384 +#: includes/admin/functions.php:258
371 385 msgid ""
372 386 "You can upload and insert media (images, audio, documents, etc.) by clicking "
373 387 "the Add Media button. You can select from the images and files already "
@@ -376,7 +390,7 @@ msgid ""
376 390 "the “Create a new gallery” button."
377 391 msgstr ""
378 392
379   -#: includes/admin/functions.php:247
  393 +#: includes/admin/functions.php:260
380 394 msgid ""
381 395 "You can also embed media from many popular websites including Twitter, "
382 396 "YouTube, Flickr and others by pasting the media URL on its own line into the "
@@ -384,17 +398,17 @@ msgid ""
384 398 "\"%s\">learn more about embeds</a>."
385 399 msgstr ""
386 400
387   -#: includes/admin/functions.php:251
  401 +#: includes/admin/functions.php:264
388 402 msgid "Inserting Media"
389 403 msgstr ""
390 404
391   -#: includes/admin/functions.php:255
  405 +#: includes/admin/functions.php:268
392 406 msgid ""
393 407 "Several boxes on this screen contain settings for how your achievement will "
394 408 "be published, including:"
395 409 msgstr ""
396 410
397   -#: includes/admin/functions.php:256
  411 +#: includes/admin/functions.php:269
398 412 msgid ""
399 413 "<strong>Publish</strong> - You can set the terms of publishing your "
400 414 "achievement in the Publish box. For Status, Visibility, and Publish "
@@ -405,139 +419,145 @@ msgid ""
405 419 "schedule an achievement to be published in the future."
406 420 msgstr ""
407 421
408   -#: includes/admin/functions.php:258
  422 +#: includes/admin/functions.php:271
409 423 msgid ""
410 424 "<strong>Featured Image</strong> - This allows you to associate an image with "
411 425 "your achievement without inserting it into the big achievement Editing Area."
412 426 msgstr ""
413 427
414   -#: includes/admin/functions.php:262
  428 +#: includes/admin/functions.php:275
415 429 msgid "Publish Settings"
416 430 msgstr ""
417 431
418   -#: includes/admin/functions.php:266
  432 +#: includes/admin/functions.php:279
419 433 msgid ""
420 434 "<strong>Karma points</strong> - set the number of points (called karma) "
421 435 "given to a user when they unlock an achievement."
422 436 msgstr ""
423 437
424   -#: includes/admin/functions.php:267
  438 +#: includes/admin/functions.php:280
425 439 msgid ""
426 440 "<strong>Type</strong> - there are two types of achievement, Award and Event. "
427 441 "An Award is given by a site admin, whereas an Event is unlocked "
428 442 "automatically when its criteria have been met."
429 443 msgstr ""
430 444
431   -#: includes/admin/functions.php:268
  445 +#: includes/admin/functions.php:281
432 446 msgid ""
433   -"<strong>Event Achievements</strong> - this field appears when you create an "
  447 +"<strong>Event achievements</strong> - this field appears when you create an "
434 448 "Event achievement. Use the dropdown box to choose the events that you want "
435 449 "to trigger this achievement."
436 450 msgstr ""
437 451
438   -#: includes/admin/functions.php:269
  452 +#: includes/admin/functions.php:282
439 453 msgid ""
440 454 "<strong>Events repeat</strong> - for Event achievements, set the number of "
441 455 "times the events need to occur before the achievement is awarded."
442 456 msgstr ""
443 457
444   -#: includes/admin/functions.php:273
  458 +#: includes/admin/functions.php:283
  459 +msgid ""
  460 +"<strong>Redemption code</strong> - users can enter this code into the "
  461 +"Redemption widget to unlock the achievement."
  462 +msgstr ""
  463 +
  464 +#: includes/admin/functions.php:287
445 465 msgid "Achievements Box"
446 466 msgstr ""
447 467
448   -#: includes/admin/functions.php:278 includes/admin/functions.php:329
  468 +#: includes/admin/functions.php:292 includes/admin/functions.php:343
449 469 #: includes/admin/supported-plugins.php:42 includes/admin/users.php:50
450 470 msgid "For more information:"
451 471 msgstr ""
452 472
453   -#: includes/admin/functions.php:279 includes/admin/functions.php:330
  473 +#: includes/admin/functions.php:293 includes/admin/functions.php:344
454 474 #: includes/admin/supported-plugins.php:43 includes/admin/users.php:51
455 475 msgid "Achievements Website"
456 476 msgstr ""
457 477
458   -#: includes/admin/functions.php:280 includes/admin/functions.php:331
  478 +#: includes/admin/functions.php:294 includes/admin/functions.php:345
459 479 #: includes/admin/supported-plugins.php:44 includes/admin/users.php:52
460 480 msgid "Support Forums"
461 481 msgstr ""
462 482
463   -#: includes/admin/functions.php:297 includes/admin/supported-plugins.php:26
  483 +#: includes/admin/functions.php:311 includes/admin/supported-plugins.php:26
464 484 #: includes/admin/users.php:30
465 485 msgid "Overview"
466 486 msgstr ""
467 487
468   -#: includes/admin/functions.php:299
  488 +#: includes/admin/functions.php:313
469 489 msgid ""
470 490 "This screen provides access to all of your achievements. You can customize "
471 491 "the display of this screen to suit your workflow."
472 492 msgstr ""
473 493
474   -#: includes/admin/functions.php:304 includes/admin/users.php:39
  494 +#: includes/admin/functions.php:318 includes/admin/users.php:39
475 495 msgid "Screen Content"
476 496 msgstr ""
477 497
478   -#: includes/admin/functions.php:306 includes/admin/users.php:41
  498 +#: includes/admin/functions.php:320 includes/admin/users.php:41
479 499 msgid ""
480 500 "You can customize the display of this screen&#8217;s contents in a number of "
481 501 "ways:"
482 502 msgstr ""
483 503
484   -#: includes/admin/functions.php:308
  504 +#: includes/admin/functions.php:322
485 505 msgid ""
486 506 "You can hide/display columns based on your needs and decide how many "
487 507 "achievements to list per screen using the Screen Options tab."
488 508 msgstr ""
489 509
490   -#: includes/admin/functions.php:309
  510 +#: includes/admin/functions.php:323
491 511 msgid ""
492 512 "You can filter the list of achievements by achievement status using the text "
493 513 "links in the upper left to show All, Published, Draft, or Trashed "
494 514 "achievements. The default view is to show all achievements."
495 515 msgstr ""
496 516
497   -#: includes/admin/functions.php:310
  517 +#: includes/admin/functions.php:324
498 518 msgid ""
499 519 "You can view achievements in a simple title list or with an excerpt. Choose "
500 520 "the view you prefer by clicking on the icons at the top of the list on the "
501 521 "right."
502 522 msgstr ""
503 523
504   -#: includes/admin/functions.php:311
  524 +#: includes/admin/functions.php:325
505 525 msgid ""
506 526 "You can refine the list to show only achievements from a specific month by "
507 527 "using the dropdown menus above the posts list. Click the Filter button after "
508 528 "making your selection."
509 529 msgstr ""
510 530
511   -#: includes/admin/functions.php:317
  531 +#: includes/admin/functions.php:331
512 532 msgid "Available Actions"
513 533 msgstr ""
514 534
515   -#: includes/admin/functions.php:319
  535 +#: includes/admin/functions.php:333
516 536 msgid ""
517 537 "Hovering over a row in the achievements list will display action links that "
518 538 "allow you to manage your achievement. You can perform the following actions:"
519 539 msgstr ""
520 540
521   -#: includes/admin/functions.php:321
  541 +#: includes/admin/functions.php:335
522 542 msgid ""
523 543 "<strong>Edit</strong> takes you to the editing screen for that achievement. "
524 544 "You can also reach that screen by clicking on the achievement title."
525 545 msgstr ""
526 546
527   -#: includes/admin/functions.php:322
  547 +#: includes/admin/functions.php:336
528 548 msgid ""
529 549 "<strong>Quick Edit</strong> provides inline access to the metadata of your "
530 550 "achievement, allowing you to update achievement details without leaving this "
531 551 "screen."
532 552 msgstr ""
533 553
534   -#: includes/admin/functions.php:323
  554 +#: includes/admin/functions.php:337
535 555 msgid ""
536 556 "<strong>Trash</strong> removes your achievement from this list and places it "
537 557 "in the trash, from which you can permanently delete it."
538 558 msgstr ""
539 559
540   -#: includes/admin/functions.php:324
  560 +#: includes/admin/functions.php:338
541 561 msgid ""
542 562 "<strong>Preview</strong> will show you what your draft achievement will look "
543 563 "like if you publish it. View will take you to your live site to view the "
@@ -676,22 +696,22 @@ msgctxt "A plugin is not installed"
676 696 msgid "Not installed"
677 697 msgstr ""
678 698
679   -#: includes/admin/supported-plugins.php:567
  699 +#: includes/admin/supported-plugins.php:571
680 700 msgctxt "A plugin is installed"
681 701 msgid "Status: Ready"
682 702 msgstr ""
683 703
684   -#: includes/admin/supported-plugins.php:575
  704 +#: includes/admin/supported-plugins.php:579
685 705 msgctxt "A plugin is not installed"
686 706 msgid "Install Plugin"
687 707 msgstr ""
688 708
689   -#: includes/admin/supported-plugins.php:591
  709 +#: includes/admin/supported-plugins.php:595
690 710 msgctxt "A plugin is not installed"
691 711 msgid "Status: Not installed"
692 712 msgstr ""
693 713
694   -#: includes/admin/supported-plugins.php:597
  714 +#: includes/admin/supported-plugins.php:601
695 715 msgid "More Info"
696 716 msgstr ""
697 717
@@ -814,17 +834,17 @@ msgctxt "Separator in time since"
814 834 msgid ","
815 835 msgstr ""
816 836
817   -#: includes/common/template.php:362
  837 +#: includes/common/template.php:366
818 838 msgctxt "Home screen of the website"
819 839 msgid "Home"
820 840 msgstr ""
821 841
822   -#: includes/common/template.php:426
  842 +#: includes/common/template.php:430
823 843 msgctxt "HTML entity for left single angle quotes"
824 844 msgid "&lsaquo;"
825 845 msgstr ""
826 846
827   -#: includes/common/template.php:426
  847 +#: includes/common/template.php:430
828 848 msgctxt "HTML entity for right single angle quotes"
829 849 msgid "&rsaquo;"
830 850 msgstr ""
@@ -833,6 +853,22 @@ msgstr ""
833 853 msgid "Achievement: %s"
834 854 msgstr ""
835 855
  856 +#: includes/common/widgets.php:32
  857 +msgid "Allow users to redeem achievements by typing in a code."
  858 +msgstr ""
  859 +
  860 +#: includes/common/widgets.php:35
  861 +msgid "(Achievements) Redemption"
  862 +msgstr ""
  863 +
  864 +#: includes/common/widgets.php:55 includes/common/widgets.php:88
  865 +msgid "Redeem achievement"
  866 +msgstr ""
  867 +
  868 +#: includes/common/widgets.php:92
  869 +msgid "Title:"
  870 +msgstr ""
  871 +
836 872 #: includes/core/theme-compatibility.php:440
837 873 msgctxt "possesive noun"
838 874 msgid "%s's achievements"
@@ -1157,39 +1193,39 @@ msgstr ""
1157 1193 msgid "WP e-Commerce"
1158 1194 msgstr ""
1159 1195
1160   -#: includes/progress/template.php:347
  1196 +#: includes/progress/template.php:426
1161 1197 msgid "Viewing achievement progress %2$s (of %4$s total)"
1162 1198 msgid_plural ""
1163 1199 "Viewing %1$s achievements&rsquo; progress - %2$s through %3$s (of %4$s total)"
1164 1200 msgstr[0] ""
1165 1201 msgstr[1] ""
1166 1202
1167   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:43
  1203 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:48
1168 1204 msgctxt "Twitter message: achievement name, site name"
1169 1205 msgid "I've unlocked the \"%1$s\" achievement on %2$s!"
1170 1206 msgstr ""
1171 1207
1172   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:49
  1208 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:54
1173 1209 msgid "Achievement Unlocked"
1174 1210 msgstr ""
1175 1211
1176   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:59
  1212 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:64
1177 1213 msgid "Hey, you've unlocked the &#8220;%s&#8221; achievement. Congratulations!"
1178 1214 msgstr ""
1179 1215
1180   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:63
  1216 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:68
1181 1217 msgid "Celebrate and share with your friends on %1$s and %2$s."
1182 1218 msgstr ""
1183 1219
1184   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:64
  1220 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:69
1185 1221 msgid "Facebook"
1186 1222 msgstr ""
1187 1223
1188   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:65
  1224 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:70
1189 1225 msgid "Twitter"
1190 1226 msgstr ""
1191 1227
1192   -#: templates/achievements/achievements/feedback-achievement-unlocked.php:69
  1228 +#: templates/achievements/achievements/feedback-achievement-unlocked.php:74
1193 1229 msgid "See your other achievements"
1194 1230 msgstr ""
1195 1231
@@ -1202,6 +1238,14 @@ msgid ""
1202 1238 "This is somewhat embarrassing, isn&rsquo;t it? No achievements were found."
1203 1239 msgstr ""
1204 1240
  1241 +#: templates/achievements/achievements/form-redeem-code.php:18
  1242 +msgid "Enter code:"
  1243 +msgstr ""
  1244 +
  1245 +#: templates/achievements/achievements/form-redeem-code.php:20
  1246 +msgid "Unlock"
  1247 +msgstr ""
  1248 +
1205 1249 #: templates/achievements/achievements/loop-achievements.php:16
1206 1250 msgid ""
1207 1251 "All of the available achievements with the name, avatar, and karma points "
71 plugins/achievements/includes/achievements/functions.php
@@ -202,3 +202,74 @@ function dpa_before_achievement_deleted( $post_id = 0 ) {
202 202 foreach ( $progress->posts as $post )
203 203 wp_delete_post( $post->ID, true );
204 204 }
  205 +
  206 +/**
  207 + * Handles the redeem achievement form submission.
  208 + *
  209 + * Finds any achievements with the specific redemption code, and if the user hasn't already unlocked
  210 + * that achievement, it's awarded to the user.
  211 + *
  212 + * @param string $action Optional. If 'dpa-redeem-achievement', handle the form submission.
  213 + * @since Achievements (3.1)
  214 + */
  215 +function dpa_form_redeem_achievement( $action = '' ) {
  216 + if ( 'dpa-redeem-achievement' !== $action || ! dpa_is_user_active() )
  217 + return;
  218 +
  219 + // Check required form values are present
  220 + $redemption_code = isset( $_POST['dpa_code'] ) ? strip_tags( stripslashes( $_POST['dpa_code'] ) ) : '';
  221 + $redemption_code = apply_filters( 'dpa_form_redeem_achievement_code', $redemption_code );
  222 +
  223 + if ( empty( $redemption_code ) || ! dpa_verify_nonce_request( 'dpa-redeem-achievement' ) )
  224 + return;
  225 +
  226 + // If multisite and running network-wide, switch_to_blog to the data store site
  227 + if ( is_multisite() && dpa_is_running_networkwide() )
  228 + switch_to_blog( DPA_DATA_STORE );
  229 +
  230 + // Find achievements that match the same redemption code
  231 + $achievements = dpa_get_achievements( array(
  232 + 'meta_key' => '_dpa_redemption_code',
  233 + 'meta_value' => $redemption_code,
  234 + ) );
  235 +
  236 + // Bail out early if no achievements found
  237 + if ( empty( $achievements ) ) {
  238 + dpa_add_error( 'dpa_redeem_achievement_nonce', __( 'That code was invalid. Try again!', 'dpa' ) );
  239 +
  240 + // If multisite and running network-wide, undo the switch_to_blog
  241 + if ( is_multisite() && dpa_is_running_networkwide() )
  242 + restore_current_blog();
  243 +
  244 + return;
  245 + }
  246 +
  247 + $existing_progress = dpa_get_progress( array(
  248 + 'author' => get_current_user_id(),
  249 + ) );
  250 +
  251 + foreach ( $achievements as $achievement_obj ) {
  252 + $progress_obj = array();
  253 +
  254 + // If we have existing progress, pass that to dpa_maybe_unlock_achievement().
  255 + foreach ( $existing_progress as $progress ) {
  256 + if ( $achievement_obj->ID === $progress->post_parent ) {
  257 +
  258 + // If the user has already unlocked this achievement, don't give it to them again.
  259 + if ( dpa_get_unlocked_status_id() == $progress->post_status )
  260 + $progress_obj = false;
  261 + else
  262 + $progress_obj = $progress;
  263 +
  264 + break;
  265 + }
  266 + }
  267 +
  268 + if ( false !== $progress_obj )
  269 + dpa_maybe_unlock_achievement( get_current_user_id(), 'skip_validation', $progress_obj, $achievement_obj );
  270 + }
  271 +
  272 + // If multisite and running network-wide, undo the switch_to_blog
  273 + if ( is_multisite() && dpa_is_running_networkwide() )
  274 + restore_current_blog();
  275 +}
25 plugins/achievements/includes/achievements/template.php
@@ -403,7 +403,7 @@ function dpa_achievement_points( $achievement_id = 0 ) {
403 403 *
404 404 * @param int $achievement_id Optional. Achievement ID
405 405 * @return int
406   - * @since Achievements (3.0)
  406 + * @since Achievements (2.0)
407 407 */
408 408 function dpa_get_achievement_points( $achievement_id = 0 ) {
409 409 $achievement_id = dpa_get_achievement_id( $achievement_id );
@@ -438,6 +438,29 @@ function dpa_get_achievement_target( $achievement_id = 0 ) {
438 438 }
439 439
440 440 /**
  441 + * Output the redemption code for this achievement.
  442 + *
  443 + * @param int $achievement_id Optional. Achievement ID
  444 + * @since Achievements (3.1)
  445 + */
  446 +function dpa_achievement_redemption_code( $achievement_id = 0 ) {
  447 + echo number_format_i18n( dpa_get_achievement_redemption_code( $achievement_id ) );
  448 +}
  449 + /**
  450 + * Return the redemption code for this achievement.
  451 + *
  452 + * @param int $achievement_id Optional. Achievement ID
  453 + * @return string
  454 + * @since Achievements (3.1)
  455 + */
  456 + function dpa_get_achievement_redemption_code( $achievement_id = 0 ) {
  457 + $achievement_id = dpa_get_achievement_id( $achievement_id );
  458 + $target = get_post_meta( $achievement_id, '_dpa_redemption_code', true );
  459 +
  460 + return apply_filters( 'dpa_get_achievement_redemption_code', $target, $achievement_id );
  461 + }
  462 +
  463 +/**
441 464 * Output the excerpt of the achievement
442 465 *
443 466 * @param int $achievement_id Optional. Achievement ID
8 plugins/achievements/includes/admin/admin.php
@@ -218,13 +218,15 @@ public function enqueue_styles() {
218 218 if ( ! DPA_Admin::is_admin_screen() )
219 219 return;
220 220
  221 + $rtl = is_rtl() ? '-rtl' : '';
  222 +
221 223 // "Supported Plugins" screen
222 224 if ( 'achievements-plugins' == $_GET['page'] )
223   - wp_enqueue_style( 'dpa_admin_css', trailingslashit( $this->css_url ) . 'supportedplugins.css', array(), '20120722' );
  225 + wp_enqueue_style( 'dpa_admin_css', trailingslashit( $this->css_url ) . "supportedplugins{$rtl}.css", array(), '20120722' );
224 226
225 227 // Achievements "users" screen
226 228 elseif ( 'achievements-users' == $_GET['page'] )
227   - wp_enqueue_style( 'dpa_admin_users_css', trailingslashit( $this->css_url ) . 'users.css', array(), '20130113' );
  229 + wp_enqueue_style( 'dpa_admin_users_css', trailingslashit( $this->css_url ) . "users{$rtl}.css", array(), '20130113' );
228 230 }
229 231
230 232 /**
@@ -369,7 +371,7 @@ public function save_profile_fields( $user_id ) {
369 371 foreach ( $new_achievements as $achievement_obj ) {
370 372 $progress_obj = array();
371 373
372   - // If we have current progress, pass that to dpa_maybe_unlock_achievement().
  374 + // If we have existing progress, pass that to dpa_maybe_unlock_achievement().
373 375 foreach ( $existing_progress as $progress ) {
374 376 if ( $achievement_obj->ID === $progress->post_parent ) {
375 377 $progress_obj = $progress;
2  plugins/achievements/includes/admin/class-dpa-users-list-table.php
@@ -35,7 +35,7 @@ function __construct( $args = array() ) {
35 35 * Get an array of all the columns on the page
36 36 *
37 37 * @return array
38   - * @since BuddyPress (1.6)
  38 + * @since Achievements (3.0)
39 39 */
40 40 function get_column_info() {
41 41 $this->_column_headers = array(
3  plugins/achievements/includes/admin/css/achievements-rtl.css
... ... @@ -0,0 +1,3 @@
  1 +/* This file was automatically generated on Feb 17 2013 22:11:51 */
  2 +/*! http://wordpress.org/extend/plugins/achievements/
  3 +*/body #dpa-mb .inside{margin:0;padding:0}#dpa-mb label{display:inline-block;min-width:45%}#dpa-mb .hint{color:#777;margin-bottom:0}#dpa-points,#dpa-target,#dpa-code{display:inline-block;width:50%}#dpa-type-event{margin-right:10px}#dpa_event_chzn{margin-top:10px;width:100%!important}#dpa_event_chzn .default{color:#333;height:100%;width:100%!important}#dpa_event_chzn .chzn-choices{background-color:transparent;background-image:none;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn.chzn-container-active .chzn-drop{margin-top:1px;position:static}#dpa_event_chzn.chzn-container-active .chzn-choices{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn .search-choice{background:#f3f3f3;background-image:-webkit-gradient(linear,right top,right bottom,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:-moz-linear-gradient(top,#fff,#eee);background-image:-o-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);border-color:#ccc;-webkit-box-shadow:inset 0 2px 1px 0 rgba(255,255,255,0.9);-moz-box-shadow:inset 0 2px 1px 0 rgba(255,255,255,0.9);box-shadow:inset 0 2px 1px 0 rgba(255,255,255,0.9);color:#464646;font-size:12px;min-height:15px;line-height:17px;margin:5px 5px;padding:.25em .8em .35em 1.5em;text-shadow:1px 1px 0 #fff}#dpa_event_chzn .chzn-results .group-result{color:#333}#dpa_event_chzn .chzn-results .highlighted{background-color:#21759b;background-image:-webkit-gradient(linear,right top,right bottom,from(#2a95c5),to(#21759b));background-image:-webkit-linear-gradient(top,#2a95c5,#21759b);background-image:-moz-linear-gradient(top,#2a95c5,#21759b);background-image:-o-linear-gradient(top,#2a95c5,#21759b);background-image:linear-gradient(to bottom,#2a95c5,#21759b);border-color:#21759b;border-bottom-color:#1e6a8d;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);-moz-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);color:#fff;text-decoration:none;text-shadow:-1px -1px 0 rgba(0,0,0,0.1)}#dpa-event,.chzn-drop{width:100%!important}
2  plugins/achievements/includes/admin/css/achievements.css
... ... @@ -1,2 +1,2 @@
1 1 /*! http://wordpress.org/extend/plugins/achievements/
2   -*/body #dpa-mb .inside{margin:0;padding:0}#dpa-mb label{display:inline-block;min-width:45%}#dpa-mb .hint{color:#777;margin-bottom:0}#dpa-points,#dpa-target{display:inline-block;width:50%}#dpa-type-event{margin-left:10px}#dpa_event_chzn{margin-top:10px;width:100%!important}#dpa_event_chzn .default{color:#333;height:100%;width:100%!important}#dpa_event_chzn .chzn-choices{background-color:transparent;background-image:none;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn.chzn-container-active .chzn-drop{margin-top:1px;position:static}#dpa_event_chzn.chzn-container-active .chzn-choices{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn .search-choice{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:-moz-linear-gradient(top,#fff,#eee);background-image:-o-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);border-color:#ccc;-webkit-box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);-moz-box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);color:#464646;font-size:12px;min-height:15px;line-height:17px;margin:5px 5px;padding:.25em 1.5em .35em .8em;text-shadow:1px 1px 0 #fff}#dpa_event_chzn .chzn-results .group-result{color:#333}#dpa_event_chzn .chzn-results .highlighted{background-color:#21759b;background-image:-webkit-gradient(linear,left top,left bottom,from(#2a95c5),to(#21759b));background-image:-webkit-linear-gradient(top,#2a95c5,#21759b);background-image:-moz-linear-gradient(top,#2a95c5,#21759b);background-image:-o-linear-gradient(top,#2a95c5,#21759b);background-image:linear-gradient(to bottom,#2a95c5,#21759b);border-color:#21759b;border-bottom-color:#1e6a8d;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);-moz-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);color:#fff;text-decoration:none;text-shadow:-1px -1px 0 rgba(0,0,0,0.1)}#dpa-event,.chzn-drop{width:100%!important}
  2 +*/body #dpa-mb .inside{margin:0;padding:0}#dpa-mb label{display:inline-block;min-width:45%}#dpa-mb .hint{color:#777;margin-bottom:0}#dpa-points,#dpa-target,#dpa-code{display:inline-block;width:50%}#dpa-type-event{margin-left:10px}#dpa_event_chzn{margin-top:10px;width:100%!important}#dpa_event_chzn .default{color:#333;height:100%;width:100%!important}#dpa_event_chzn .chzn-choices{background-color:transparent;background-image:none;border:1px solid #bbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn.chzn-container-active .chzn-drop{margin-top:1px;position:static}#dpa_event_chzn.chzn-container-active .chzn-choices{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#dpa_event_chzn .search-choice{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,#eee);background-image:-moz-linear-gradient(top,#fff,#eee);background-image:-o-linear-gradient(top,#fff,#eee);background-image:linear-gradient(to bottom,#fff,#eee);border-color:#ccc;-webkit-box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);-moz-box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);box-shadow:inset 0 0 1px 2px rgba(255,255,255,0.9);color:#464646;font-size:12px;min-height:15px;line-height:17px;margin:5px 5px;padding:.25em 1.5em .35em .8em;text-shadow:1px 1px 0 #fff}#dpa_event_chzn .chzn-results .group-result{color:#333}#dpa_event_chzn .chzn-results .highlighted{background-color:#21759b;background-image:-webkit-gradient(linear,left top,left bottom,from(#2a95c5),to(#21759b));background-image:-webkit-linear-gradient(top,#2a95c5,#21759b);background-image:-moz-linear-gradient(top,#2a95c5,#21759b);background-image:-o-linear-gradient(top,#2a95c5,#21759b);background-image:linear-gradient(to bottom,#2a95c5,#21759b);border-color:#21759b;border-bottom-color:#1e6a8d;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);-moz-box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);box-shadow:inset 0 1px 0 rgba(120,200,230,0.5);color:#fff;text-decoration:none;text-shadow:-1px -1px 0 rgba(0,0,0,0.1)}#dpa-event,.chzn-drop{width:100%!important}
3  plugins/achievements/includes/admin/css/dev/achievements.less
@@ -25,7 +25,8 @@ body #dpa-mb .inside {
25 25 }
26 26
27 27 #dpa-points,
28   -#dpa-target {
  28 +#dpa-target,
  29 +#dpa-code {
29 30 display: inline-block;
30 31 width: 50%;
31 32 }
1  plugins/achievements/includes/admin/css/supportedplugins-rtl.css
... ... @@ -0,0 +1 @@
  1 +/* This file was automatically generated on Feb 17 2013 22:11:58 */
1  plugins/achievements/includes/admin/css/users-rtl.css
... ... @@ -0,0 +1 @@
  1 +#dpa-admin-users-form .search-box{margin-bottom:13px}#dpa-admin-users-form .column-dpa_achievements,#dpa-admin-users-form .column-dpa_actions,#dpa-admin-users-form .column-username{width:15%}#dpa-admin-users-form .column-username img{margin-bottom:10px}
22 plugins/achievements/includes/admin/functions.php
@@ -29,8 +29,9 @@ function dpa_admin_setup_metaboxes() {
29 29 wp_enqueue_script( 'dpa_chosen_js', trailingslashit( achievements()->admin->javascript_url ) . 'chosen-jquery-min.js', array( 'jquery' ), '20121006' );
30 30
31 31 // General styles for the post type admin screen.
  32 + $rtl = is_rtl() ? '-rtl' : '';
32 33 wp_enqueue_script( 'dpa_admin_js', trailingslashit( achievements()->admin->javascript_url ) . 'achievements-min.js', array( 'jquery', 'dpa_chosen_js' ), '20121006' );
33   - wp_enqueue_style( 'dpa_admin_css', trailingslashit( achievements()->admin->css_url ) . 'achievements.css', array(), '20121006' );
  34 + wp_enqueue_style( 'dpa_admin_css', trailingslashit( achievements()->admin->css_url ) . "achievements{$rtl}.css", array(), '20121006' );
34 35 }
35 36
36 37 /**
@@ -50,6 +51,7 @@ function dpa_achievement_metabox( $post ) {
50 51 $existing_target = dpa_get_achievement_target( $post->ID );
51 52 $existing_events = wp_get_post_terms( $post->ID, dpa_get_event_tax_id(), array( 'fields' => 'ids', ) );
52 53 $existing_type = ( empty( $existing_events ) && ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] ) ? 'award' : 'event';
  54 + $existing_code = dpa_get_achievement_redemption_code( $post->ID );
53 55
54 56 // Ensure sane defaults
55 57 if ( empty( $existing_points ) )
@@ -59,12 +61,12 @@ function dpa_achievement_metabox( $post ) {
59 61 $existing_target = 1;
60 62 ?>
61 63
62   - <div class="misc-pub-section">
  64 + <div class="misc-pub-section dpa-karma">
63 65 <label for="dpa-points"><?php _e( 'Karma points:', 'dpa' ); ?></label>
64 66 <input type="number" name="dpa_points" id="dpa-points" value="<?php echo esc_attr( $existing_points ); ?>" />
65 67 </div>
66 68