Admin Columns - Version 1.4

Version Description

  • added support for comment columns
  • added support for link columns
  • added links to taxonomies
  • added sorting user custom fields
  • added sorting to links columns
  • added user columns so you can see how many articles an author has published of a certain post type
  • added Textual help
  • added the option to specify column width
  • added role column to all posts screens
  • added posts status column to all posts screens
  • added image path to media library
  • added added apply_filters('cpac-get-post-types', $post_types) to filter out certain post types
  • added option to enter license key for activating sorting on ALL columns
  • fixed a php5 warning
  • fixed a conflict with the Co-Authors plugin
Download this release

Release Info

Developer codepress
Plugin Icon 128x128 Admin Columns
Version 1.4
Comparing to
See all releases

Code changes from version 1.0 to 1.4

Files changed (40) hide show
  1. assets/css/admin-column.css +332 -18
  2. assets/css/column.css +7 -0
  3. assets/images/addon_sortable_1.png +0 -0
  4. assets/images/arrows.png +0 -0
  5. assets/images/cross.png +0 -0
  6. assets/images/information.png +0 -0
  7. assets/images/loading.gif +0 -0
  8. assets/images/no.png +0 -0
  9. assets/images/reorder_arrow.png +0 -0
  10. assets/images/settings.png +0 -0
  11. assets/images/sort.png +0 -0
  12. assets/images/square.png +0 -0
  13. assets/js/admin-column.js +230 -6
  14. assets/js/jquery.qtip.js +19 -0
  15. assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  16. assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  17. assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  18. assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  19. assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  20. assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  21. assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  22. assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  23. assets/ui-theme/images/ui-icons_222222_256x240.png +0 -0
  24. assets/ui-theme/images/ui-icons_2e83ff_256x240.png +0 -0
  25. assets/ui-theme/images/ui-icons_454545_256x240.png +0 -0
  26. assets/ui-theme/images/ui-icons_888888_256x240.png +0 -0
  27. assets/ui-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  28. assets/ui-theme/jquery-ui-1.8.18.custom.css +120 -0
  29. classes/sortable.php +890 -0
  30. codepress-admin-columns.php +2503 -644
  31. languages/codepress-admin-columns-nl_NL.mo +0 -0
  32. languages/codepress-admin-columns-nl_NL.po +262 -212
  33. readme.txt +147 -25
  34. screenshot-1.png +0 -0
  35. screenshot-2.png +0 -0
  36. screenshot-3.png +0 -0
  37. screenshot-4.png +0 -0
  38. screenshot-5.png +0 -0
  39. screenshot-6.png +0 -0
  40. screenshot-7.png +0 -0
assets/css/admin-column.css CHANGED
@@ -1,15 +1,58 @@
1
- #general-cpac-settings {}
2
#cpac .postbox {
3
margin: 0 10px 10px 0;
4
}
5
#cpac .cpac-menu {
6
clear: both;
7
- float: left;
8
- width: 100%;
9
}
10
#icon-codepress-admin-columns {
11
background: transparent url('../images/icon.png') no-repeat 0 0;
12
}
13
#general-cpac-settings > .inside {
14
padding: 0;
15
margin: 0;
@@ -34,18 +77,30 @@
34
#general-cpac-settings table.form-table tr.bottom td {
35
border-bottom: none;
36
}
37
#general-cpac-settings .cpac-box {
38
position: relative;
39
}
40
#general-cpac-settings .cpac-option-list {
41
overflow: hidden;
42
- width: 360px;
43
}
44
#general-cpac-settings .cpac-reorder-msg {
45
- background: transparent url('../images/reorder.png') no-repeat scroll 0 0;
46
margin-left: 5px;
47
height: 23px;
48
- width: 171px;
49
clear: both;
50
}
51
#general-cpac-settings .cpac-option-list li {
@@ -63,19 +118,9 @@
63
background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
64
background-image: linear-gradient(top, #f9f9f9, #ececec);
65
border-radius: 3px 3px 3px 3px;
66
- border: 1px solid #DFDFDF;
67
margin-top: 1px;
68
}
69
- #general-cpac-settings .cpac-option-list li.active {
70
- background-color: #d8d8d8;
71
- background-image: -ms-linear-gradient(top, #f0f0f0, #d8d8d8);
72
- background-image: -moz-linear-gradient(top, #f0f0f0, #d8d8d8);
73
- background-image: -o-linear-gradient(top, #f0f0f0, #d8d8d8);
74
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#d8d8d8));
75
- background-image: -webkit-linear-gradient(top, #f0f0f0, #d8d8d8);
76
- background-image: linear-gradient(top, #f0f0f0, #d8d8d8);
77
- border-color: #c5c5c5;
78
- }
79
#general-cpac-settings .cpac-option-list li .cpac-sort-handle {
80
background: transparent url('../images/sort.png') no-repeat 5px 5px;
81
width: 20px;
@@ -109,7 +154,8 @@
109
display: block;
110
margin-right: 30px;
111
overflow: hidden;
112
- height: 15px;
113
}
114
#general-cpac-settings .cpac-option-list li .cpac-type-options input {
115
margin-top: 6px;
@@ -130,6 +176,11 @@
130
text-indent: -999em;
131
overflow: hidden;
132
}
133
#general-cpac-settings .cpac-option-list li div.cpac-meta-title span {
134
display: inline-block;
135
margin: 5px 5px 0 0;
@@ -165,6 +216,31 @@
165
#general-cpac-settings .cpac-option-list li .cpac-type-inside select {
166
min-width: 184px;
167
}
168
#general-cpac-settings .cpac-add-column a {
169
display: block;
170
}
@@ -187,6 +263,123 @@
187
color: #832525;
188
text-shadow: none;
189
}
190
#restore-cpac-settings .inside {
191
padding: 10px;
192
}
@@ -206,4 +399,125 @@
206
}
207
#restore-cpac-settings .inside .description {
208
color: #832525;
209
}
1
+ #cpac {
2
+ /* overflow: hidden; */
3
+ }
4
#cpac .postbox {
5
margin: 0 10px 10px 0;
6
}
7
#cpac .cpac-menu {
8
clear: both;
9
+ overflow: hidden;
10
+ margin-right: 276px;
11
+ }
12
+ #cpac .cpac-menu .subsubsub {
13
+ white-space: normal;
14
+ margin-right: 14px;
15
+ }
16
+ #cpac .cpac-settings-link {
17
+ float: right;
18
+ float: right;
19
+ margin: 12px 14px 5px 0;
20
+ background: transparent url('../images/settings.png') no-repeat 0 0;
21
+ padding-left: 20px;
22
+ text-decoration: none;
23
+ display: inline-block;
24
+ line-height: 16px;
25
+ }
26
+ #cpac .cpac-settings-link.current {
27
+ font-weight: bold;
28
+ }
29
+ #cpac .cpac-col-left {
30
+ /* width: 70%; */
31
+ clear: left;
32
+ float: left;
33
+ margin-right: -2000px;
34
+ width: 100%;
35
+ }
36
+ #cpac .cpac-col-left .metabox-holder {
37
+ margin-right: 276px;
38
+ }
39
+ #cpac .cpac-col-right {
40
+ /* width: 20%; */
41
+ margin-right: auto;
42
+ width: 266px;
43
+ float: right;
44
+ position: relative;
45
+ clear: right;
46
+ }
47
+ #cpac .cpac-col-right .inside {
48
+ padding: 0 10px;
49
}
50
#icon-codepress-admin-columns {
51
background: transparent url('../images/icon.png') no-repeat 0 0;
52
}
53
+
54
+ /* =General settings
55
+ -------------------------------------------------------------- */
56
#general-cpac-settings > .inside {
57
padding: 0;
58
margin: 0;
77
#general-cpac-settings table.form-table tr.bottom td {
78
border-bottom: none;
79
}
80
+ #general-cpac-settings a.go-to-screen {
81
+ display: block;
82
+ padding: 5px 0;
83
+ font-weight: normal;
84
+ text-decoration: none;
85
+ }
86
#general-cpac-settings .cpac-box {
87
position: relative;
88
}
89
#general-cpac-settings .cpac-option-list {
90
overflow: hidden;
91
+ width: 360px;
92
+ margin-bottom: 5px;
93
}
94
#general-cpac-settings .cpac-reorder-msg {
95
+ background: transparent url('../images/reorder_arrow.png') no-repeat scroll 0 0;
96
margin-left: 5px;
97
height: 23px;
98
+ line-height: 25px;
99
+ padding-left: 25px;
100
+ color: #727272;
101
+ font-size: 12px;
102
+ font-family: 'Trebuchet MS', Arial, Verdana;
103
+ font-style: italic;
104
clear: both;
105
}
106
#general-cpac-settings .cpac-option-list li {
118
background-image: -webkit-linear-gradient(top, #f9f9f9, #ececec);
119
background-image: linear-gradient(top, #f9f9f9, #ececec);
120
border-radius: 3px 3px 3px 3px;
121
+ border: 1px solid #cbcbcb;
122
margin-top: 1px;
123
}
124
#general-cpac-settings .cpac-option-list li .cpac-sort-handle {
125
background: transparent url('../images/sort.png') no-repeat 5px 5px;
126
width: 20px;
154
display: block;
155
margin-right: 30px;
156
overflow: hidden;
157
+ height: 17px;
158
+ line-height: 17px;
159
}
160
#general-cpac-settings .cpac-option-list li .cpac-type-options input {
161
margin-top: 6px;
176
text-indent: -999em;
177
overflow: hidden;
178
}
179
+ #general-cpac-settings .cpac-option-list li.opened a.cpac-action {}
180
+ #general-cpac-settings .cpac-option-list li.active a.cpac-action {
181
+ background-position: 50% -66px;
182
+ }
183
+ #general-cpac-settings .cpac-option-list li.active.opened a.cpac-action {}
184
#general-cpac-settings .cpac-option-list li div.cpac-meta-title span {
185
display: inline-block;
186
margin: 5px 5px 0 0;
216
#general-cpac-settings .cpac-option-list li .cpac-type-inside select {
217
min-width: 184px;
218
}
219
+ #general-cpac-settings .cpac-option-list li .cpac-type-inside input.input-width {
220
+ min-width: 25px;
221
+ width: 25px;
222
+ border: none;
223
+ background: transparent;
224
+ padding: 0;
225
+ margin-left: 0px;
226
+ text-align: right;
227
+ }
228
+ #general-cpac-settings .cpac-option-list li .cpac-type-inside div.input-width-range {
229
+ display: inline-block;
230
+ min-width: 136px;
231
+ width: 136px;
232
+ margin: 8px 0 0;
233
+ position: relative;
234
+ }
235
+ #general-cpac-settings .cpac-option-list li .cpac-type-inside div.input-width-range .ui-slider-handle {
236
+ cursor:e-resize;
237
+ }
238
+ #general-cpac-settings .cpac-option-list li .cpac-type-inside div.description {
239
+ display: inline-block;
240
+ font-size: 11px;
241
+ padding: 0 4px 0 0;
242
+ width: 36px;
243
+ }
244
#general-cpac-settings .cpac-add-column a {
245
display: block;
246
}
263
color: #832525;
264
text-shadow: none;
265
}
266
+ #general-cpac-settings .cpac-option-list li.active {
267
+ background-color: #c7c7c7;
268
+ background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
269
+ background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
270
+ background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
271
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
272
+ background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
273
+ background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
274
+ border-color: #aeaeae;
275
+ }
276
+ #general-cpac-settings .cpac-option-list li.active .cpac-sort-handle {
277
+ background-position: 5px -19px;
278
+ }
279
+ #general-cpac-settings .cpac-option-list li.active div.cpac-meta-title {
280
+ color: #151515;
281
+ }
282
+ #general-cpac-settings .cpac-option-list li.active div.cpac-meta-title span {
283
+ color: #5c5c5c
284
+ }
285
+
286
+ /* =Plugin settings (Options)
287
+ -------------------------------------------------------------- */
288
+ #cpac-box-plugin_settings {}
289
+ #cpac-box-plugin_settings > td {
290
+ border: none;
291
+ padding: 0;
292
+ margin: 0;
293
+ }
294
+ #cpac-box-plugin_settings table.nopadding {
295
+ border-collapse: separate;
296
+ border-spacing: 0;
297
+ border: none;
298
+ width: 100%;
299
+ }
300
+ #cpac-box-plugin_settings table.nopadding tr.last > td {
301
+ border-bottom: none;
302
+ border-top: none;
303
+ }
304
+ #cpac-box-plugin_settings table.addons {
305
+ /* max-width: 620px; */
306
+ }
307
+ #cpac-box-plugin_settings table.addons th.activation_type {
308
+ width: 110px;
309
+ }
310
+ #cpac-box-plugin_settings table.addons th.activation_status {
311
+ width: 90px;
312
+ }
313
+ #cpac-box-plugin_settings table.addons th.activation_code {
314
+ /* width: auto; */
315
+ min-width: 260px;
316
+ }
317
+ #cpac-box-plugin_settings table.addons th.activation_more {
318
+ /* min-width: 120px; */
319
+ text-align: left;
320
+ width: auto;
321
+ }
322
+ #cpac-box-plugin_settings table.addons td.activation_type span {
323
+ font-size: 14px;
324
+ display: inline-block;
325
+ background: transparent url('../images/information.png') no-repeat right 50%;
326
+ padding-right: 20px;
327
+ }
328
+ #cpac-box-plugin_settings table.addons td {
329
+ background: #ffffff;
330
+ /* vertical-align: middle; */
331
+ padding: 18px 10px;
332
+ }
333
+ #cpac-box-plugin_settings table.addons td.activation_code input {
334
+ width: 176px;
335
+ color: #555555;
336
+ font-family: Arial;
337
+ font-size: 12px;
338
+ }
339
+ #cpac-box-plugin_settings table.addons td.activation_more {
340
+ text-align: left;
341
+ }
342
+ #cpac-box-plugin_settings table.addons td.activation_more a{
343
+ float: none;
344
+ display: inline-block;
345
+ margin-top: 1px;
346
+ }
347
+ #cpac-box-plugin_settings table.addons tr.last td {
348
+ border-bottom: none;
349
+ }
350
+ #cpac-box-plugin_settings table.addons .masked_key {
351
+ padding: 0;
352
+ }
353
+ #cpac-box-plugin_settings .cpac-options {}
354
+ #cpac-box-plugin_settings .cpac-options li {
355
+ overflow: hidden;
356
+ }
357
+ #cpac-box-plugin_settings .cpac-option-label {
358
+ float: left;
359
+ width: 140px;
360
+ }
361
+ #cpac-box-plugin_settings .cpac-option-inputs {
362
+ float: left;
363
+ width: 220px;
364
+ }
365
+ #cpac-box-plugin_settings table.addons .button {
366
+ position: relative;
367
+ }
368
+ #cpac-box-plugin_settings table.addons .button.loading {
369
+ padding-right: 25px;
370
+ }
371
+ #cpac-box-plugin_settings table.addons .button.loading span {
372
+ position: absolute;
373
+ top: 2px;
374
+ right: 6px;
375
+ background: transparent url('../images/loading.gif') no-repeat right 50%;
376
+ width: 16px;
377
+ height: 16px;
378
+ display: inline-block;
379
+ }
380
+
381
+ /* =Restore settings
382
+ -------------------------------------------------------------- */
383
#restore-cpac-settings .inside {
384
padding: 10px;
385
}
399
}
400
#restore-cpac-settings .inside .description {
401
color: #832525;
402
+ }
403
+
404
+ /* =Addons settings
405
+ -------------------------------------------------------------- */
406
+ #addons-cpac-settings {
407
+ overflow: hidden;
408
+ }
409
+ #addons-cpac-settings h2 {
410
+ font-size: 14px;
411
+ line-height: 14px;
412
+ margin-bottom: 0;
413
+ padding-bottom: 0;
414
+ }
415
+ #addons-cpac-settings a {
416
+ padding: 0 10px 10px;
417
+ text-decoration: none;
418
+ color: green;
419
+ text-decoration: underline;
420
+ }
421
+ #addons-cpac-settings a:hover {
422
+ color: darkgreen;
423
+ }
424
+
425
+
426
+ /* =Like this plugin settings
427
+ -------------------------------------------------------------- */
428
+ #likethisplugin-cpac-settings {
429
+ padding: 0;
430
+ }
431
+ #likethisplugin-cpac-settings ul {
432
+ margin-left: 20px;
433
+ }
434
+ #likethisplugin-cpac-settings li {
435
+ list-style: square;
436
+ line-height: 16px;
437
+ }
438
+ #likethisplugin-cpac-settings li a {
439
+ text-decoration: none;
440
+ }
441
+ #likethisplugin-cpac-settings li.donate_link a {
442
+ /* color: green;
443
+ text-decoration: underline; */
444
+ }
445
+ #likethisplugin-cpac-settings li.donate_link a:hover {
446
+ color: darkgreen;
447
+ }
448
+
449
+ /* =Activation
450
+ -------------------------------------------------------------- */
451
+ #cpac-box-plugin_settings .addons .activation_code .activate,
452
+ #cpac-box-plugin_settings .addons .activation_code .deactivate {
453
+ min-height: 25px;
454
+ }
455
+ #cpac-box-plugin_settings .activation_status .activate {
456
+ color: #CC0000;
457
+ }
458
+ #cpac-box-plugin_settings .activation_status .deactivate {
459
+ color: darkgreen;
460
+ }
461
+ #cpac-box-plugin_settings .activation-error-msg {
462
+ color: #CC0000;
463
+ line-height: 20px;
464
+ padding: 0 6px;
465
+ }
466
+
467
+ /* =Tooltip
468
+ -------------------------------------------------------------- */
469
+ .qtip .qtip-tip {
470
+ left: 74px !important;
471
+ top: 1px !important;
472
+ }
473
+ .qtip .qtip-wrapper {
474
+ background: #fff;
475
+ border-style: solid;
476
+ border-width: 1px;
477
+ border-color: #dfdfdf;
478
+ border-color: rgba(0,0,0,.125);
479
+ border-top: none;
480
+ -webkit-border-radius: 3px;
481
+ border-radius: 3px;
482
+ border-radius: 5px;
483
+ -webkit-box-shadow: 0 2px 4px rgba(0,0,0,.19);
484
+ -moz-box-shadow: 0 2px 4px rgba(0,0,0,.19);
485
+ box-shadow: 0 2px 4px rgba(0,0,0,.19);
486
+
487
+ }
488
+ .qtip .qtip-wrapper .qtip_title {
489
+ padding: 15px 18px 14px 15px;
490
+ clear: both;
491
+ line-height: 1.4em;
492
+ font-size: 14px;
493
+ color: #fff;
494
+ border-radius: 3px 3px 0 0;
495
+ text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
496
+ background-color: #8cc1e9;
497
+ background-image: -webkit-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
498
+ background-image: -moz-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
499
+ background-image: -ms-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
500
+ background-image: -o-linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
501
+ background-image: linear-gradient(bottom, rgb(114,167,207) 0%, rgb(140,193,233) 100%);
502
+ }
503
+ .qtip .qtip-wrapper .qtip_content {
504
+ padding: 0 14px 14px;
505
+ margin: 0;
506
+ overflow: hidden;
507
+ clear: both;
508
+ min-height: 40px;
509
+ font-size: 13px;
510
+ background: #fff;
511
+ }
512
+ .qtip .qtip-wrapper .qtip_content .button-primary {
513
+ margin: 6px 0 0;
514
+ }
515
+
516
+ /* =Responsive Design
517
+ -------------------------------------------------------------- */
518
+ body.folded #cpac .cpac-col-left .metabox-holder {
519
+ margin-right: 0;
520
+ }
521
+ body.folded #cpac .cpac-col-right {
522
+ display: none;
523
}
assets/css/column.css CHANGED
@@ -1,4 +1,11 @@
1
.column-column-attachment img {
2
padding-right: 5px;
3
padding-bottom: 4px;
4
}
1
+ .cpac-column-value-image,
2
.column-column-attachment img {
3
padding-right: 5px;
4
padding-bottom: 4px;
5
+ }
6
+ .cpac-divider {
7
+ display: inline-block;
8
+ width: 14px;
9
+ height: 12px;
10
+ background: transparent url(../images/square.png) no-repeat 50% 7px;
11
}
assets/images/addon_sortable_1.png ADDED
Binary file
assets/images/arrows.png CHANGED
Binary file
assets/images/cross.png ADDED
Binary file
assets/images/information.png ADDED
Binary file
assets/images/loading.gif ADDED
Binary file
assets/images/no.png ADDED
Binary file
assets/images/reorder_arrow.png ADDED
Binary file
assets/images/settings.png ADDED
Binary file
assets/images/sort.png CHANGED
Binary file
assets/images/square.png ADDED
Binary file
assets/js/admin-column.js CHANGED
@@ -2,12 +2,20 @@
2
* fires when the dom is ready
3
*
4
*/
5
- jQuery(document).ready(function(){
6
cpac_sortable();
7
cpac_checked();
8
cpac_box_events();
9
cpac_menu();
10
cpac_add_custom_column();
11
});
12
13
/**
@@ -15,7 +23,7 @@ jQuery(document).ready(function(){
15
*
16
*/
17
function cpac_sortable()
18
- {
19
jQuery('ul.cpac-option-list').sortable({
20
handle: 'div.cpac-sort-handle',
21
placeholder: 'cpac-placeholder',
@@ -38,7 +46,7 @@ function cpac_checked()
38
// toggle on
39
if ( value != 'on') {
40
li.addClass('active');
41
- state.attr('value', 'on');
42
}
43
44
// toggle off
@@ -59,7 +67,10 @@ function cpac_box_events()
59
// fold in/out
60
jQuery('#cpac .cpac-option-list .cpac-action').unbind('click').click(function(e){
61
e.preventDefault();
62
- jQuery(this).closest('li').find('.cpac-type-inside').slideToggle(150);
63
});
64
65
// remove custom field box
@@ -72,8 +83,7 @@ function cpac_box_events()
72
height: 0
73
}, 350, function() {
74
el.remove();
75
- });
76
-
77
});
78
}
79
@@ -189,4 +199,218 @@ function cpac_add_custom_column()
189
// retrigger click events
190
cpac_box_events();
191
});
192
}
2
* fires when the dom is ready
3
*
4
*/
5
+ jQuery(document).ready(function()
6
+ {
7
+ if (jQuery('#cpac').length == 0)
8
+ return false;
9
+
10
cpac_sortable();
11
cpac_checked();
12
cpac_box_events();
13
cpac_menu();
14
cpac_add_custom_column();
15
+ cpac_clear_input_defaults();
16
+ cpac_tooltips();
17
+ cpac_addon_activation();
18
+ cpac_width_range();
19
});
20
21
/**
23
*
24
*/
25
function cpac_sortable()
26
+ {
27
jQuery('ul.cpac-option-list').sortable({
28
handle: 'div.cpac-sort-handle',
29
placeholder: 'cpac-placeholder',
46
// toggle on
47
if ( value != 'on') {
48
li.addClass('active');
49
+ state.attr('value', 'on');
50
}
51
52
// toggle off
67
// fold in/out
68
jQuery('#cpac .cpac-option-list .cpac-action').unbind('click').click(function(e){
69
e.preventDefault();
70
+ var li = jQuery(this).closest('li');
71
+ li.find('.cpac-type-inside').slideToggle(150, function() {
72
+ li.toggleClass('opened');
73
+ });
74
});
75
76
// remove custom field box
83
height: 0
84
}, 350, function() {
85
el.remove();
86
+ });
87
});
88
}
89
199
// retrigger click events
200
cpac_box_events();
201
});
202
+ }
203
+
204
+ /**
205
+ * Clear Input Defaults
206
+ *
207
+ */
208
+ function cpac_clear_input_defaults()
209
+ {
210
+ jQuery.fn.cleardefault = function() {
211
+ return this.focus(function() {
212
+ if( this.value == this.defaultValue ) {
213
+ this.value = "";
214
+ }
215
+ }).blur(function() {
216
+ if( !this.value.length ) {
217
+ this.value = this.defaultValue;
218
+ }
219
+ });
220
+ };
221
+ jQuery("#cpac-box-plugin_settings .addons input").cleardefault();
222
+ }
223
+
224
+
225
+ /**
226
+ * Tooltip
227
+ *
228
+ */
229
+ function cpac_tooltips()
230
+ {
231
+ jQuery('#cpac .activation_type span').each(function() {
232
+ var info = jQuery(this).next('.cpac-tooltip').html();
233
+
234
+ if ( ! info )
235
+ return;
236
+
237
+ jQuery('#cpac .activation_type span').qtip({
238
+ content: info,
239
+ title: 'title',
240
+ style: {
241
+ width: 400,
242
+ padding: 0,
243
+ background: 'transparent',
244
+ color: 'black',
245
+ textAlign: 'left',
246
+ border: {
247
+ width: 0,
248
+ radius: 0
249
+ },
250
+ tip: {
251
+ corner: 'topMiddle',
252
+ color: '#8cc1e9',
253
+ size: {
254
+ x: 32,
255
+ y : 15
256
+ }
257
+ }
258
+ },
259
+ position: {
260
+ corner: {
261
+ target: 'bottomRight'
262
+ },
263
+ adjust: {
264
+ x: -80,
265
+ y: 0
266
+ }
267
+ },
268
+ hide: {
269
+ when: 'mouseout',
270
+ fixed: true ,
271
+ delay: 100
272
+ }
273
+ });
274
+ });
275
+ }
276
+
277
+ /**
278
+ * Width range
279
+ *
280
+ */
281
+ function cpac_width_range()
282
+ {
283
+ if ( jQuery('.input-width-range').length == false )
284
+ return;
285
+
286
+ jQuery('.input-width-range').each( function(){
287
+
288
+ var input = jQuery(this).closest('.cpac-type-inside').find('.input-width');
289
+ var descr = jQuery(this).closest('.cpac-type-inside').find('.width-decription');
290
+ var input_default = jQuery(input)[0].defaultValue;
291
+ var translation_default = descr.attr('title');
292
+
293
+ jQuery(this).slider({
294
+ range: 'min',
295
+ value: 1,
296
+ min: 0,
297
+ max: 100,
298
+ value: input_default,
299
+ slide: function( event, ui ) {
300
+
301
+ // set default
302
+ var descr_value = ui.value > 0 ? ui.value + '%' : translation_default;
303
+
304
+ jQuery(input).val( ui.value );
305
+ jQuery(descr).text( descr_value );
306
+ }
307
+ });
308
+ });
309
+ }
310
+
311
+ /**
312
+ * Addon actviate/deactivate
313
+ *
314
+ */
315
+ function cpac_addon_activation()
316
+ {
317
+ jQuery('#cpac-box-plugin_settings .addons .activation_code a.button').click(function(e) {
318
+ e.preventDefault();
319
+
320
+ // get input values
321
+ var row = jQuery(this).closest('tr');
322
+ var type = jQuery(row).attr('id').replace('cpac-activation-','');
323
+ var parent_class = jQuery(this).parent('div');
324
+ var msg = jQuery(row).find('.activation-error-msg');
325
+
326
+ // get translated string
327
+ var translations = jQuery('#cpac-box-plugin_settings .addon-translation-string');
328
+ var msg_fillin = jQuery('.tstring-fill-in',translations).text();
329
+ var msg_unrecognised = jQuery('.tstring-unrecognised',translations).text();
330
+
331
+ // reset
332
+ jQuery(msg).empty();
333
+
334
+ // Activate
335
+ if ( parent_class.hasClass('activate') ) {
336
+
337
+ // input values
338
+ var input = jQuery('.activate input', row);
339
+ var button = jQuery('.activate .button', row);
340
+ var key = input.val();
341
+ var default_val = jQuery(input)[0].defaultValue;
342
+
343
+ // make sure the input value has changed
344
+ if ( key == default_val ) {
345
+ jQuery(msg).text(msg_fillin).hide().fadeIn();
346
+ return false;
347
+ }
348
+
349
+ // set loading icon
350
+ button.addClass('loading');
351
+
352
+ // update key
353
+ jQuery.ajax({
354
+ url : ajaxurl,
355
+ type : 'POST',
356
+ dataType : 'json',
357
+ data : {
358
+ action : 'cpac_addon_activation',
359
+ type : 'sortable',
360
+ key : key
361
+ },
362
+ success: function(data) {
363
+ if ( data != null ) {
364
+ jQuery('div.activate', row).hide();
365
+ jQuery('div.deactivate', row).show();
366
+ jQuery('div.deactivate span.masked_key', row).text(data);
367
+ } else {
368
+ jQuery(msg).text(msg_unrecognised).hide().fadeIn();
369
+ }
370
+ },
371
+ error: function(xhr, ajaxOptions, thrownError) {
372
+ jQuery(msg).text(msg_unrecognised).hide().fadeIn();
373
+ },
374
+ complete: function() {
375
+ button.removeClass('loading');
376
+ }
377
+ });
378
+ }
379
+
380
+ // Deactivate
381
+ if ( parent_class.hasClass('deactivate') ) {
382
+
383
+ var button = jQuery('.deactivate .button', row);
384
+ var input = jQuery('.activate input', row);
385
+
386
+ // set loading icon
387
+ button.addClass('loading');
388
+
389
+ // update key
390
+ jQuery.ajax({
391
+ url : ajaxurl,
392
+ type : 'POST',
393
+ dataType : 'json',
394
+ data : {
395
+ action : 'cpac_addon_activation',
396
+ type : 'sortable',
397
+ key : 'remove'
398
+ },
399
+ success: function(data) {
400
+ jQuery('div.activate', row).show();
401
+ jQuery('div.deactivate', row).hide();
402
+ jQuery('div.deactivate span.masked_key', row).empty();
403
+ input.val('');
404
+ },
405
+ error: function(xhr, ajaxOptions, thrownError) {
406
+ //console.log(xhr);
407
+ //console.log(ajaxOptions);
408
+ //console.log(thrownError);
409
+ },
410
+ complete: function() {
411
+ button.removeClass('loading');
412
+ }
413
+ });
414
+ }
415
+ });
416
}
assets/js/jquery.qtip.js ADDED
@@ -0,0 +1,19 @@
1
+ /*
2
+ * jquery.qtip. The jQuery tooltip plugin
3
+ *
4
+ * Copyright (c) 2009 Craig Thompson
5
+ * http://craigsworks.com
6
+ *
7
+ * Licensed under MIT
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Launch : February 2009
11
+ * Version : 1.0.0-rc3
12
+ * Released: Tuesday 12th May, 2009 - 00:00
13
+ * Debug: jquery.qtip.debug.js
14
+ */
15
+ (function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(B=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!B){B={}}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content}}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title}}if(typeof B.position!=="object"){B.position={corner:B.position}}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner}}if(typeof B.show!=="object"){B.show={when:B.show}}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when}}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect}}if(typeof B.hide!=="object"){B.hide={when:B.hide}}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when}}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect}}if(typeof B.style!=="object"){B.style={name:B.style}}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B)}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy()}}else{if(u!==true){A=[f(this).qtip("api")]}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy()}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show()}else{if(w=="hide"){A[y].hide()}else{if(w=="focus"){A[y].focus()}else{if(w=="disable"){A[y].disable(true)}else{if(w=="enable"){A[y].disable(false)}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body)}if(v.position.target===false){v.position.target=f(this)}if(v.show.when.target===false){v.show.when.target=f(this)}if(v.hide.when.target===false){v.hide.when.target=f(this)}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(x)}else{f(this).data("qtip",{current:0,interfaces:[x]})}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event)})}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x)}}})};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(s.elements.tooltip.css("display")!=="none"){return s}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s}function w(){if(s.options.position.type!=="static"){s.focus()}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter")}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true)}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break}s.elements.tooltip.addClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(s.elements.tooltip.css("display")==="none"){return s}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s}function w(){s.onHide.call(s,y)}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C])}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C]}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C])}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C]}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C])}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}G.dimensions.width-=2;G.dimensions.height-=2}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position}else{G.position=s.options.position.target.offset()}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()}}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2)}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2)}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1}}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2)}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2)}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I}else{if(L.corner.search(/bottom/)!==-1){y.top+=I}}if(L.corner.search(/left/)!==-1){y.left-=I}else{if(L.corner.search(/right/)!==-1){y.left+=I}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel")}else{K=s.options.position.corner.tooltip}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return s},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth")}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"})}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max}if(w<s.options.style.width.min){w=s.options.style.width.min}}}}if(w%2!==0){w-=1}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2))})}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height)}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true))}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color)}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z}else{if(z===false){return}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"})}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show()}else{s.elements.content.html(A)}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B()}})})}else{B()}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}y=s.beforeContentLoad.call(s);if(y===false){return s}if(A=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B)}return s},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s}if(s.elements.button){s.elements.button=s.elements.button.clone(true)}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button)}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove()}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create")}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1)}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removeData("qtip")}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x}})}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';"> <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;"> <div class="qtip-contentWrapper" style="overflow:hidden;"> <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y)}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}u[z]+="</div>"}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x)})}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4})}n.call(t,v)}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill()}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1}else{positionAdjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust})}else{t.elements.tip.css({bottom:positionAdjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust})}else{t.elements.tip.css({right:positionAdjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text)}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t)}})}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}clearTimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z)}})}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width}else{s.left=z.cache.mouse.x}y.x="Left"}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width}else{s.left=z.cache.mouse.x-A.dimensions.width}y.x="Right"}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height}else{s.top=z.cache.mouse.y}y.y="top"}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height}else{s.top=z.cache.mouse.y-A.dimensions.height}y.y="bottom"}}if(s.left<0){s.left=u.left;y.x=false}if(s.top<0){s.top=u.top;y.y=false}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x)}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y)}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s]}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s]}}}return v}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip}}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size}}if(typeof s.border!=="object"){s.border={width:s.border}}if(typeof s.width!=="object"){s.width={value:s.width}}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y}return s}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t])}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]))}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v]}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]}}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("resize scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll"||u.options.position.adjust.resize&&t.type==="resize")){u.updatePosition(t,true)}}},100)});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);
16
+
17
+
18
+
19
+
assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png ADDED
Binary file
assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png ADDED
Binary file
assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png ADDED
Binary file
assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png ADDED
Binary file
assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png ADDED
Binary file
assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png ADDED
Binary file
assets/ui-theme/images/ui-icons_222222_256x240.png ADDED
Binary file
assets/ui-theme/images/ui-icons_2e83ff_256x240.png ADDED
Binary file
assets/ui-theme/images/ui-icons_454545_256x240.png ADDED
Binary file
assets/ui-theme/images/ui-icons_888888_256x240.png ADDED
Binary file
assets/ui-theme/images/ui-icons_cd0a0a_256x240.png ADDED
Binary file
assets/ui-theme/jquery-ui-1.8.18.custom.css ADDED
@@ -0,0 +1,120 @@
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.18
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
17
+ .ui-helper-clearfix:after { clear: both; }
18
+ .ui-helper-clearfix { zoom: 1; }
19
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
20
+
21
+
22
+ /* Interaction Cues
23
+ ----------------------------------*/
24
+ .ui-state-disabled { cursor: default !important; }
25
+
26
+
27
+ /* Icons
28
+ ----------------------------------*/
29
+
30
+ /* states and images */
31
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
32
+
33
+
34
+ /* Misc visuals
35
+ ----------------------------------*/
36
+
37
+ /* Overlays */
38
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
39
+
40
+
41
+ /*
42
+ * jQuery UI CSS Framework 1.8.18
43
+ *
44
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
45
+ * Dual licensed under the MIT or GPL Version 2 licenses.
46
+ * http://jquery.org/license
47
+ *
48
+ * http://docs.jquery.com/UI/Theming/API
49
+ *
50
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
51
+ */
52
+
53
+
54
+ /* Component containers
55
+ ----------------------------------*/
56
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
57
+ .ui-widget .ui-widget { font-size: 1em; }
58
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
59
+ .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
60
+ .ui-widget-content a { color: #222222; }
61
+ .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
62
+ .ui-widget-header a { color: #222222; }
63
+
64
+ /* Interaction states
65
+ ----------------------------------*/
66
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
67
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
68
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
69
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
70
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
71
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
72
+ .ui-widget :active { outline: none; }
73
+
74
+ /* Interaction Cues
75
+ ----------------------------------*/
76
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
77
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
78
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
79
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
80
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
81
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
82
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
83
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
84
+
85
+
86
+ /* Misc visuals
87
+ ----------------------------------*/
88
+
89
+ /* Corner radius */
90
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
91
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
92
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
93
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
94
+
95
+ /* Overlays */
96
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
97
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
98
+ * jQuery UI Slider 1.8.18
99
+ *
100
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
101
+ * Dual licensed under the MIT or GPL Version 2 licenses.
102
+ * http://jquery.org/license
103
+ *
104
+ * http://docs.jquery.com/UI/Slider#theming
105
+ */
106
+ .ui-slider { position: relative; text-align: left; }
107
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 12px; height: 12px; cursor: default; }
108
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
109
+
110
+ .ui-slider-horizontal { height: 8px; }
111
+ .ui-slider-horizontal .ui-slider-handle { top: -3px; margin-left: -4px; }
112
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
113
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
114
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
115
+
116
+ .ui-slider-vertical { width: .8em; height: 100px; }
117
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
118
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
119
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
120
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }
classes/sortable.php ADDED
@@ -0,0 +1,890 @@
1
+ <?php
2
+
3
+ /**
4
+ * Coderess Sortable Columns Class
5
+ *
6
+ * @since 1.3
7
+ *
8
+ */
9
+ class Codepress_Sortable_Columns extends Codepress_Admin_Columns
10
+ {
11
+ private $post_types,
12
+ $unlocked,
13
+ $show_all_results;
14
+
15
+ /**
16
+ * Constructor
17
+ *
18
+ * @since 1.0
19
+ */
20
+ function __construct()
21
+ {
22
+ add_action( 'wp_loaded', array( $this, 'init') );
23
+ }
24
+
25
+ /**
26
+ * Initialize
27
+ *
28
+ * @since 1.0
29
+ */
30
+ public function init()
31
+ {
32
+ // vars
33
+ $this->unlocked = $this->is_unlocked('sortable');
34
+ $this->post_types = $this->get_post_types();
35
+ $this->show_all_results = false;
36
+
37
+ add_action( 'admin_init', array( $this, 'register_sortable_columns' ) );
38
+
39
+ // handle requests for sorting columns
40
+ add_filter( 'request', array( $this, 'handle_requests_orderby_column'), 1 );
41
+ add_action( 'pre_user_query', array( $this, 'handle_requests_orderby_users_column'), 1 );
42
+ add_action( 'admin_init', array( $this, 'handle_requests_orderby_links_column'), 1 );
43
+ add_action( 'admin_init', array( $this, 'handle_requests_orderby_comments_column'), 1 );
44
+ }
45
+
46
+ /**
47
+ * Register sortable columns
48
+ *
49
+ * Hooks into apply_filters( "manage_{$screen->id}_sortable_columns" ) which is found in class-wp-list-table.php
50
+ *
51
+ * @since 1.0
52
+ */
53
+ function register_sortable_columns()
54
+ {
55
+ if ( ! $this->unlocked )
56
+ return false;
57
+
58
+ /** Posts */
59
+ foreach ( $this->post_types as $post_type )
60
+ add_filter( "manage_edit-{$post_type}_sortable_columns", array($this, 'callback_add_sortable_posts_column'));
61
+
62
+ /** Users */
63
+ add_filter( "manage_users_sortable_columns", array($this, 'callback_add_sortable_users_column'));
64
+
65
+ /** Media */
66
+ add_filter( "manage_upload_sortable_columns", array($this, 'callback_add_sortable_media_column'));
67
+
68
+ /** Links */
69
+ add_filter( "manage_link-manager_sortable_columns", array($this, 'callback_add_sortable_links_column'));
70
+
71
+ /** Comments */
72
+ add_filter( "manage_edit-comments_sortable_columns", array($this, 'callback_add_sortable_comments_column'));
73
+ }
74
+
75
+ /**
76
+ * Callback add Posts sortable column
77
+ *
78
+ * @since 1.0
79
+ */
80
+ public function callback_add_sortable_posts_column($columns)
81
+ {
82
+ global $post_type;
83
+
84
+ return $this->add_managed_sortable_columns($post_type, $columns);
85
+ }
86
+
87
+ /**
88
+ * Callback add Users sortable column
89
+ *
90
+ * @since 1.1
91
+ */
92
+ public function callback_add_sortable_users_column($columns)
93
+ {
94
+ return $this->add_managed_sortable_columns('wp-users', $columns);
95
+ }
96
+
97
+ /**
98
+ * Callback add Media sortable column
99
+ *
100
+ * @since 1.3
101
+ */
102
+ public function callback_add_sortable_media_column($columns)
103
+ {
104
+ return $this->add_managed_sortable_columns('wp-media', $columns);
105
+ }
106
+
107
+ /**
108
+ * Callback add Links sortable column
109
+ *
110
+ * @since 1.3.1
111
+ */
112
+ public function callback_add_sortable_links_column($columns)
113
+ {
114
+ return $this->add_managed_sortable_columns('wp-links', $columns);
115
+ }
116
+
117
+ /**
118
+ * Callback add Comments sortable column
119
+ *
120
+ * @since 1.3.1
121
+ */
122
+ public function callback_add_sortable_comments_column($columns)
123
+ {
124
+ return $this->add_managed_sortable_columns('wp-comments', $columns);
125
+ }
126
+
127
+ /**
128
+ * Add managed sortable columns by Type
129
+ *
130
+ * @since 1.1
131
+ */
132
+ private function add_managed_sortable_columns( $type = 'post', $columns )
133
+ {
134
+ $display_columns = $this->get_merged_columns($type);
135
+
136
+ if ( ! $display_columns )
137
+ return $columns;
138
+
139
+ foreach ( $display_columns as $id => $vars ) {
140
+ if ( isset($vars['options']['sortorder']) && $vars['options']['sortorder'] == 'on' ){
141
+
142
+ // register format
143
+ $columns[$id] = $this->sanitize_string($vars['label']);
144
+ }
145
+ }
146
+
147
+ return $columns;
148
+ }
149
+
150
+ /**
151
+ * Admin requests for orderby column
152
+ *
153
+ * Only works for WP_Query objects ( such as posts and media )
154
+ *
155
+ * @since 1.0
156
+ */
157
+ public function handle_requests_orderby_column( $vars )
158
+ {
159
+ if ( ! isset( $vars['orderby'] ) )
160
+ return $vars;
161
+
162
+ /** Users */
163
+ // You would expect to see get_orderby_users_vars(), but sorting for
164
+ // users is handled through a different filter. Not 'request', but 'pre_user_query'.
165
+ // See handle_requests_orderby_users_column().
166
+
167
+ /** Media */
168
+ elseif ( $this->request_uri_is('upload') )
169
+ $vars = $this->get_orderby_media_vars($vars);
170
+
171
+ /** Posts */
172
+ elseif ( !empty($vars['post_type']) )
173
+ $vars = $this->get_orderby_posts_vars($vars);
174
+
175
+ return $vars;
176
+ }
177
+
178
+ /**
179
+ * Orderby Users column
180
+ *
181
+ * @since 1.3
182
+ */
183
+ public function handle_requests_orderby_users_column($user_query)
184
+ {
185
+ // query vars
186
+ $vars = $user_query->query_vars;
187
+
188
+ // Column
189
+ $column = $this->get_orderby_type( $vars['orderby'], 'wp-users' );
190
+
191
+ if ( empty($column) )
192
+ return $vars;
193
+
194
+ // id
195
+ $id = key($column);
196
+
197
+ // type
198
+ $type = $id;
199
+
200
+ // Check for user custom fields: column-meta-[customfieldname]
201
+ if ( $this->is_column_meta($type) )
202
+ $type = 'column-user-meta';
203
+
204
+ // Check for post count: column-user_postcount-[posttype]
205
+ if ( $this->get_posttype_by_postcount_column($type) )
206
+ $type = 'column-user_postcount';
207
+
208
+ // var
209
+ $cusers = array();
210
+ switch( $type ) :
211
+
212
+ case 'column-user_id':
213
+ $user_query->query_vars['orderby'] = 'ID';
214
+ break;
215
+
216
+ case 'column-user_registered':
217
+ $user_query->query_vars['orderby'] = 'registered';
218
+ break;
219
+
220
+ case 'column-nickname':
221
+ $user_query->query_vars['orderby'] = 'nickname';
222
+ break;
223
+
224
+ case 'column-first_name':
225
+ foreach ( $this->get_users_data() as $u )
226
+ if ($u->first_name || $this->show_all_results )
227
+ $cusers[$u->ID] = $this->prepare_sort_string_value($u->first_name);
228
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
229
+ break;
230
+
231
+ case 'column-last_name':
232
+ foreach ( $this->get_users_data() as $u )
233
+ if ($u->last_name || $this->show_all_results )
234
+ $cusers[$u->ID] = $this->prepare_sort_string_value($u->last_name);
235
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
236
+ break;
237
+
238
+ case 'column-user_url':
239
+ foreach ( $this->get_users_data() as $u )
240
+ if ($u->user_url || $this->show_all_results )
241
+ $cusers[$u->ID] = $this->prepare_sort_string_value($u->user_url);
242
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
243
+ break;
244
+
245
+ case 'column-user_description':
246
+ foreach ( $this->get_users_data() as $u )
247
+ if ($u->user_description || $this->show_all_results )
248
+ $cusers[$u->ID] = $this->prepare_sort_string_value($u->user_description);
249
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
250
+ break;
251
+
252
+ case 'column-user_postcount' :
253
+ $post_type = $this->get_posttype_by_postcount_column($id);
254
+ if ( $post_type ) {
255
+ foreach ( $this->get_users_data() as $u ) {
256
+ $count = $this->get_post_count( $post_type, $u->ID );
257
+ $cusers[$u->ID] = $this->prepare_sort_string_value($count);
258
+ }
259
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
260
+ }
261
+ break;
262
+
263
+ case 'role' :
264
+ foreach ( $this->get_users_data() as $u ) {
265
+ $role = !empty($u->roles[0]) ? $u->roles[0] : '';
266
+ if ($role || $this->show_all_results ) {
267
+ $cusers[$u->ID] = $this->prepare_sort_string_value($role);
268
+ }
269
+ }
270
+ $this->set_users_query_vars( &$user_query, $cusers, SORT_REGULAR );
271
+ break;
272
+
273
+ case 'column-user-meta' :
274
+ $field = $column[$id]['field'];
275
+ if ( $field ) {
276
+
277
+ // order numeric or string
278
+ $order = SORT_REGULAR;
279
+ if ( $column[$id]['field_type'] == 'numeric' || $column[$id]['field_type'] == 'library_id' )
280
+ $order = SORT_NUMERIC;
281
+
282
+ // sort by metavalue
283
+ foreach ( $this->get_users_data() as $u ) {
284
+ $value = get_metadata('user', $u->ID, $field, true);
285
+ $cusers[$u->ID] = $this->prepare_sort_string_value($value);
286
+ }
287
+ $this->set_users_query_vars( &$user_query, $cusers, $order );
288
+ }
289
+ break;
290
+
291
+ endswitch;
292
+
293
+ return $user_query;
294
+ }
295
+
296
+ /**
297
+ * Orderby Links column
298
+ *
299
+ * Makes use of filter 'get_bookmarks' from bookmark.php to change the result set of the links
300
+ *
301
+ * @since 1.3.1
302
+ */
303
+ public function handle_requests_orderby_links_column()
304
+ {
305
+ // fire only when we are in the admins link-manager
306
+ if ( $this->request_uri_is('link-manager') )
307
+ add_filter( 'get_bookmarks', array( $this, 'callback_requests_orderby_links_column'), 10, 2);
308
+ }
309
+
310
+ /**
311
+ * Orderby Links column
312
+ *
313
+ * @since 1.3.1
314
+ */
315
+ public function callback_requests_orderby_links_column($results, $vars)
316
+ {
317
+ global $wpdb;
318
+
319
+ // Column
320
+ $column = $this->get_orderby_type( $vars['orderby'], 'wp-links' );
321
+
322
+ if ( empty($column) )
323
+ return $results;
324
+
325
+ // id
326
+ $type = $id = key($column);
327
+
328
+ // var
329
+ $length = '';
330
+ switch( $type ) :
331
+
332
+ case 'column-link_id':
333
+ if ( version_compare( get_bloginfo('version'), '3.2', '>' ) )
334
+ $vars['orderby'] = 'link_id';
335
+ else
336
+ $vars['orderby'] = 'id';
337
+ break;
338
+
339
+ case 'column-owner':
340
+ $vars['orderby'] = 'link_owner';
341
+ break;
342
+
343
+ case 'column-length':
344
+ $vars['orderby'] = 'length';
345
+ $length = ", CHAR_LENGTH(link_name) AS length";
346
+ break;
347
+
348
+ case 'column-target':
349
+ $vars['orderby'] = 'link_target';
350
+ break;
351
+
352
+ case 'column-description':
353
+ $vars['orderby'] = 'link_description';
354
+ break;
355
+
356
+ case 'column-notes':
357
+ $vars['orderby'] = 'link_notes';
358
+ break;
359
+
360
+ case 'column-rss':
361
+ $vars['orderby'] = 'link_rss';
362
+ break;
363
+
364
+ /** native WP columns */
365
+
366
+ // Relationship
367
+ case 'rel':
368
+ $vars['orderby'] = 'link_rel';
369
+ break;
370
+
371
+ default:
372
+ $vars['orderby'] = '';
373
+
374
+ endswitch;
375
+
376
+ // get bookmarks by orderby vars
377
+ if ( $vars['orderby'] ) {
378
+ $vars['order'] = mysql_escape_string($vars['order']);
379
+ $sql = "SELECT * {$length} FROM {$wpdb->links} WHERE 1=1 ORDER BY {$vars['orderby']} {$vars['order']}";
380
+ $results = $wpdb->get_results($sql);
381
+
382
+ // check for errors
383
+ if( is_wp_error($results) )
384
+ return false;
385
+ }
386
+
387
+ return $results;
388
+ }
389
+
390
+ /**
391
+ * Orderby Comments column
392
+ *
393
+ * @since 1.3.1
394
+ */
395
+ public function callback_requests_orderby_comments_column($pieces, $ref_comment)
396
+ {
397
+ // get query vars
398
+ $vars = $ref_comment->query_vars;
399
+
400
+ // Column
401
+ $column = $this->get_orderby_type( $vars['orderby'], 'wp-comments' );
402
+
403
+ if ( empty($column) )
404
+ return $pieces;
405
+
406
+ // id
407
+ $type = $id = key($column);
408
+
409
+ // var
410
+ switch( $type ) :
411
+
412
+ case 'column-comment_id':
413
+ $pieces['orderby'] = 'comment_ID';
414
+ break;
415
+
416
+ case 'column-author_author':
417
+ $pieces['orderby'] = 'comment_author';
418
+ break;
419
+
420
+ case 'column-author_ip':
421
+ $pieces['orderby'] = 'comment_author_IP';
422
+ break;
423
+
424
+ case 'column-author_url':
425
+ $pieces['orderby'] = 'comment_author_url';
426
+ break;
427
+
428
+ case 'column-author_email':
429
+ $pieces['orderby'] = 'comment_author_email';
430
+ break;
431
+
432
+ case 'column-reply_to':
433
+ break;
434
+
435
+ case 'column-approved':
436
+ $pieces['orderby'] = 'comment_approved';
437
+ break;
438
+
439
+ case 'column-date':
440
+ $pieces['orderby'] = 'comment_date';
441
+ break;
442
+
443
+ case 'column-agent':
444
+ $pieces['orderby'] = 'comment_agent';
445
+ break;
446
+
447
+ case 'column-excerpt':
448
+ $pieces['orderby'] = 'comment_content';
449
+ break;
450
+
451
+ case 'column-date_gmt':
452
+ // is default
453
+ break;
454
+
455
+ /** native WP columns */
456
+
457
+ // Relationship
458
+ case 'comment':
459
+ $pieces['orderby'] = 'comment_content';
460
+ break;
461
+
462
+ default:
463
+ $vars['orderby'] = '';
464
+
465
+ endswitch;
466
+
467
+ return $pieces;
468
+ }
469
+
470
+ /**
471
+ * Orderby Comments column
472
+ *
473
+ * @since 1.3.1
474
+ */
475
+ public function handle_requests_orderby_comments_column()
476
+ {
477
+ // fire only when we are in the admins edit-comments
478
+ if ( $this->request_uri_is('edit-comments') )
479
+ add_filter('comments_clauses', array( $this, 'callback_requests_orderby_comments_column'), 10, 2);
480
+ }
481
+
482
+ /**
483
+ * Set sorting vars in User Query Object
484
+ *
485
+ * @since 1.3
486
+ */
487
+ private function set_users_query_vars(&$user_query, $sortusers, $sort_flags = SORT_REGULAR )
488
+ {
489
+ global $wpdb;
490
+
491
+ // vars
492
+ $vars = $user_query->query_vars;
493
+
494
+ // sorting
495
+ if ( $vars['order'] == 'ASC' )
496
+ asort($sortusers, $sort_flags);
497
+ else
498
+ arsort($sortusers, $sort_flags);
499
+
500
+ // alter orderby SQL
501
+ if ( ! empty ( $sortusers ) ) {
502
+ $ids = implode(',', array_keys($sortusers));
503
+ $user_query->query_where .= " AND {$wpdb->prefix}users.ID IN ({$ids})";
504
+ $user_query->query_orderby = "ORDER BY FIELD ({$wpdb->prefix}users.ID,{$ids})";
505
+ }
506
+
507
+ // cleanup the vars we dont need
508
+ $vars['order'] = '';
509
+ $vars['orderby'] = '';
510
+
511
+ $user_query->query_vars = $vars;
512
+ }
513
+
514
+ /**
515
+ * Orderby Media column
516
+ *
517
+ * @since 1.3
518
+ */
519
+ private function get_orderby_media_vars($vars)
520
+ {
521
+ // Column
522
+ $column = $this->get_orderby_type( $vars['orderby'], 'wp-media' );
523
+
524
+ if ( empty($column) )
525
+ return $vars;
526
+
527
+ // var
528
+ $cposts = array();
529
+ switch( key($column) ) :
530
+
531
+ case 'column-mediaid' :
532
+ $vars['orderby'] = 'ID';
533
+ break;
534
+
535
+ case 'column-width' :
536
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p ) {
537
+ $meta = wp_get_attachment_metadata($p->ID);
538
+ $width = !empty($meta['width']) ? $meta['width'] : 0;
539
+ if ( $width || $this->show_all_results )
540
+ $cposts[$p->ID] = $width;
541
+ }
542
+ $this->set_vars_post__in( &$vars, $cposts, SORT_NUMERIC );
543
+ break;
544
+
545
+ case 'column-height' :
546
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p ) {
547
+ $meta = wp_get_attachment_metadata($p->ID);
548
+ $height = !empty($meta['height']) ? $meta['height'] : 0;
549
+ if ( $height || $this->show_all_results )
550
+ $cposts[$p->ID] = $height;
551
+ }
552
+ $this->set_vars_post__in( &$vars, $cposts, SORT_NUMERIC );
553
+ break;
554
+
555
+ case 'column-dimensions' :
556
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p ) {
557
+ $meta = wp_get_attachment_metadata($p->ID);
558
+ $height = !empty($meta['height']) ? $meta['height'] : 0;
559
+ $width = !empty($meta['width']) ? $meta['width'] : 0;
560
+ $surface = $height*$width;
561
+
562
+ if ( $surface || $this->show_all_results )
563
+ $cposts[$p->ID] = $surface;
564
+ }
565
+ $this->set_vars_post__in( &$vars, $cposts, SORT_NUMERIC );
566
+ break;
567
+
568
+ case 'column-caption' :
569
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p )
570
+ if ( $p->post_excerpt || $this->show_all_results )
571
+ $cposts[$p->ID] = $this->prepare_sort_string_value($p->post_excerpt);
572
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING);
573
+ break;
574
+
575
+ case 'column-description' :
576
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p )
577
+ if ( $p->post_content || $this->show_all_results )
578
+ $cposts[$p->ID] = $this->prepare_sort_string_value( $p->post_content );
579
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING);
580
+ break;
581
+
582
+ case 'column-mime_type' :
583
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p )
584
+ if ( $p->post_mime_type || $this->show_all_results )
585
+ $cposts[$p->ID] = $this->prepare_sort_string_value( $p->post_mime_type );
586
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING);
587
+ break;
588
+
589
+ case 'column-file_name' :
590
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p ) {
591
+ $meta = get_post_meta($p->ID, '_wp_attached_file', true);
592
+ $file = !empty($meta) ? basename($meta) : '';
593
+ if ( $file || $this->show_all_results )
594
+ $cposts[$p->ID] = $file;
595
+ }
596
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING);
597
+ break;
598
+
599
+ case 'column-alternate_text' :
600
+ foreach ( (array) $this->get_any_posts_by_posttype('attachment') as $p ) {
601
+ $alt = get_post_meta($p->ID, '_wp_attachment_image_alt', true);
602
+ if ( $alt || $this->show_all_results ) {
603
+ $cposts[$p->ID] = $this->prepare_sort_string_value( $alt );
604
+ }
605
+ }
606
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING);
607
+ break;
608
+
609
+ endswitch;
610
+
611
+ return $vars;
612
+ }
613
+
614
+ /**
615
+ * Orderby Posts column
616
+ *
617
+ * @since 1.3
618
+ */
619
+ private function get_orderby_posts_vars($vars)
620
+ {
621
+ $post_type = $vars['post_type'];
622
+
623
+ // Column
624
+ $column = $this->get_orderby_type( $vars['orderby'], $post_type );
625
+
626
+ if ( empty($column) )
627
+ return $vars;
628
+
629
+ // id
630
+ $id = key($column);
631
+
632
+ // type
633
+ $type = $id;
634
+
635
+ // custom fields
636
+ if ( $this->is_column_meta($type) )
637
+ $type = 'column-post-meta';
638
+
639
+ // attachments
640
+ if ( $type == 'column-attachment-count' )
641
+ $type = 'column-attachment';
642
+
643
+ // var
644
+ $cposts = array();
645
+ switch( $type ) :
646
+
647
+ case 'column-postid' :
648
+ $vars['orderby'] = 'ID';
649
+ break;
650
+
651
+ case 'column-order' :
652
+ $vars['orderby'] = 'menu_order';
653
+ break;
654
+
655
+ case 'column-post-meta' :
656
+ $field = $column[$id]['field'];
657
+
658
+ // orderby type
659
+ $field_type = 'meta_value';
660
+ if ( $column[$id]['field_type'] == 'numeric' || $column[$id]['field_type'] == 'library_id' )
661
+ $field_type = 'meta_value_num';
662
+
663
+ $vars = array_merge($vars, array(
664
+ 'meta_key' => $field,
665
+ 'orderby' => $field_type
666
+ ));
667
+ break;
668
+
669
+ case 'column-excerpt' :
670
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
671
+
672
+ // add excerpt to the post ids
673
+ $cposts[$p->ID] = $this->prepare_sort_string_value($p->post_content);
674
+ }
675
+ // we will add the sorted post ids to vars['post__in'] and remove unused vars
676
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING );
677
+ break;
678
+
679
+ case 'column-word-count' :
680
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p )
681
+ $cposts[$p->ID] = str_word_count( $this->strip_trim( $p->post_content ) );
682
+ $this->set_vars_post__in( &$vars, $cposts, SORT_NUMERIC );
683
+ break;
684
+
685
+ case 'column-page-template' :
686
+ $templates = get_page_templates();
687
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
688
+ $page_template = get_post_meta($p->ID, '_wp_page_template', true);
689
+ $cposts[$p->ID] = array_search($page_template, $templates);
690
+ }
691
+ $this->set_vars_post__in( &$vars, $cposts );
692
+ break;
693
+
694
+ case 'column-post_formats' :
695
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
696
+ $cposts[$p->ID] = get_post_format($p->ID);
697
+ }
698
+ $this->set_vars_post__in( &$vars, $cposts );
699
+ break;
700
+
701
+ case 'column-attachment' :
702
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p )
703
+ $cposts[$p->ID] = count( $this->get_attachment_ids($p->ID) );
704
+ $this->set_vars_post__in( &$vars, $cposts, SORT_NUMERIC );
705
+ break;
706
+
707
+
708
+ case 'column-page-slug' :
709
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p )
710
+ $cposts[$p->ID] = $p->post_name;
711
+ $this->set_vars_post__in( &$vars, $cposts );
712
+ break;
713
+
714
+ case 'column-sticky' :
715
+ $stickies = get_option('sticky_posts');
716
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
717
+ $cposts[$p->ID] = $p->ID;
718
+ if ( !empty($stickies) && in_array($p->ID, $stickies ) ) {
719
+ $cposts[$p->ID] = 0;
720
+ }
721
+ }
722
+ $this->set_vars_post__in( &$vars, $cposts );
723
+ break;
724
+
725
+ case 'column-featured_image' :
726
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
727
+ $cposts[$p->ID] = $p->ID;
728
+ $thumb = get_the_post_thumbnail($p->ID);
729
+ if ( !empty($thumb) ) {
730
+ $cposts[$p->ID] = 0;
731
+ }
732
+ }
733
+ $this->set_vars_post__in( &$vars, $cposts );
734
+ break;
735
+
736
+ case 'column-roles' :
737
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
738
+ $cposts[$p->ID] = 0;
739
+ $userdata = get_userdata($p->post_author);
740
+ if ( !empty($userdata->roles[0]) ) {
741
+ $cposts[$p->ID] = $userdata->roles[0];
742
+ }
743
+ }
744
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING );
745
+ break;
746
+
747
+ case 'column-status' :
748
+ foreach ( (array) $this->get_any_posts_by_posttype($post_type) as $p ) {
749
+ $cposts[$p->ID] = $p->post_status.strtotime($p->post_date);
750
+ }
751
+ $this->set_vars_post__in( &$vars, $cposts, SORT_STRING );
752
+ break;
753
+
754
+ endswitch;
755
+
756
+ return $vars;
757
+ }
758
+
759
+ /**
760
+ * Set post__in for use in WP_Query
761
+ *
762
+ * This will order the ID's asc or desc and set the appropriate filters.
763
+ *
764
+ * @since 1.2.1
765
+ */
766
+ private function set_vars_post__in( &$vars, $sortposts, $sort_flags = SORT_REGULAR )
767
+ {
768
+ // sort post ids by value
769
+ if ( $vars['order'] == 'asc' )
770
+ asort($sortposts, $sort_flags);
771
+ else
772
+ arsort($sortposts, $sort_flags);
773
+
774
+ // this will make sure WP_Query will use the order of the ids that we have just set in 'post__in'
775
+ add_filter('posts_orderby', array( $this, 'filter_orderby_post__in'), 10, 2 );
776
+
777
+ // cleanup the vars we dont need
778
+ $vars['order'] = '';
779
+ $vars['orderby'] = '';
780
+
781
+ // add the sorted post ids to the query with the use of post__in
782
+ $vars['post__in'] = array_keys($sortposts);
783
+ }
784
+
785
+ /**
786
+ * Get orderby type
787
+ *
788
+ * @since 1.1
789
+ */
790
+ private function get_orderby_type($orderby, $type)
791
+ {
792
+ $db_columns = $this->get_stored_columns($type);
793
+
794
+ if ( $db_columns ) {
795
+ foreach ( $db_columns as $id => $vars ) {
796
+
797
+ // check which custom column was clicked
798
+ if ( isset( $vars['label'] ) && $orderby == $this->sanitize_string( $vars['label'] ) ) {
799
+ $column[$id] = $vars;
800
+ return $column;
801
+ }
802
+ }
803
+ }
804
+ return false;
805
+ }
806
+
807
+ /**
808
+ * Maintain order of ids that are set in the post__in var.
809
+ *
810
+ * This will force the returned posts to use the order of the ID's that
811
+ * have been set in post__in. Without this the ID's will be set in numeric order.
812
+ * See the WP_Query object for more info about the use of post__in.
813
+ *
814
+ * @since 1.2.1
815
+ */
816
+ public function filter_orderby_post__in($orderby, $wp)
817
+ {
818
+ global $wpdb;
819
+
820
+ // we need the query vars
821
+ $vars = $wp->query_vars;
822
+ if ( ! empty ( $vars['post__in'] ) ) {
823
+ // now we can get the ids
824
+ $ids = implode(',', $vars['post__in']);
825
+
826
+ // by adding FIELD to the SQL query we are forcing the order of the ID's
827
+ return "FIELD ({$wpdb->prefix}posts.ID,{$ids})";
828
+ }
829
+ }
830
+
831
+ /**
832
+ * Get any posts by post_type
833
+ *
834
+ * @since 1.2.1
835
+ */
836
+ private function get_any_posts_by_posttype( $post_type )
837
+ {
838
+ $allposts = get_posts(array(
839
+ 'numberposts' => -1,
840
+ 'post_status' => 'any',
841
+ 'post_type' => $post_type
842
+ ));
843
+ return $allposts;
844
+ }
845
+
846
+ /**
847
+ * Request URI is
848
+ *
849
+ * @since 1.3.1
850
+ */
851
+ private function request_uri_is( $screen_id = '' )
852
+ {
853
+ if (strpos( $_SERVER['REQUEST_URI'], "/{$screen_id}.php" ) !== false )
854
+ return true;
855
+
856
+ return false;
857
+ }
858
+
859
+ /**
860
+ * Prepare the value for being by sorting
861
+ *
862
+ * @since 1.3
863
+ */
864
+ private function prepare_sort_string_value($string)
865
+ {
866
+ // remove tags and only get the first 20 chars and force lowercase.
867
+ $string = strtolower( substr( $this->strip_trim($string),0 ,20 ) );
868
+
869
+ return $string;
870
+ }
871
+
872
+ /**
873
+ * Get users data
874
+ *
875
+ * @since 1.3
876
+ */
877
+ function get_users_data()
878
+ {
879
+ $userdatas = array();
880
+ $wp_users = get_users( array(
881
+ 'blog_id' => $GLOBALS['blog_id'],
882
+ ));
883
+ foreach ( $wp_users as $u ) {
884
+ $userdatas[$u->ID] = get_userdata($u->ID);
885
+ }
886
+ return $userdatas;
887
+ }
888
+ }
889
+
890
+ ?>
codepress-admin-columns.php CHANGED
@@ -1,9 +1,9 @@
1
<?php
2
/*
3
Plugin Name: Codepress Admin Columns
4
- Version: 1.0.1
5
- Description: This plugin makes it easy to customize Admin Columns for your Posts, Pages and Custom Post Type Screens.
6
- Author: Tobias Schutter
7
Author URI: http://www.codepress.nl
8
Plugin URI: http://www.codepress.nl/plugins/codepress-admin-columns/
9
Text Domain: codepress-admin-columns
@@ -26,17 +26,21 @@ along with this program; if not, write to the Free Software
26
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
*/
28
29
- define( 'CPAC_VERSION', '1.0.1' );
30
31
/**
32
- * Init Class
33
*
34
- * @since 1.0
35
*/
36
- $cpac = new Codepress_Admin_Columns;
37
38
/**
39
- * Advanced Admin Columns Class
40
*
41
* @since