Admin Columns - Version 2.3.2

Version Description

  • [Updated] All translations from Transifex - ttps://www.transifex.com/projects/p/admin-columns
  • [Updated] 100% Spanish translation thanks to Carlos
  • [Updated] Custom Fields will now display an icon for file attachments in the correct specified dimensions
  • [Added] Public methods to CPAC_Column; get_type(), is_type(), is_field_type(), get_field_type()
  • [Added] Custom Field type "Terms"
  • [Added] Added posts column "Last Modified Author"
  • [Improced] Improved loading on columns settings screen when using many custom field columns
  • [Fixed] Only display filtering icon on supported Custom Field types
  • [Fixed] Remove deregister of qtip2 scripts.
  • [Fixed] PHP export now works as intended
  • [Fixed] Compatibility issue with Ninja Forms where submission would not be displayed
Download this release

Release Info

Developer tschutter
Plugin Icon 128x128 Admin Columns
Version 2.3.2
Comparing to
See all releases

Code changes from version 2.3.1 to 2.3.2

api.php CHANGED
@@ -9,9 +9,8 @@
9
* @param array $columns List of columns ([column_name] => [column_options])
10
*/
11
function cpac_set_storage_model_columns( $storage_model, $columns ) {
12
- global $_acp_export_columns;
13
- $_acp_export_columns = $columns;
14
- add_filter( 'cpac/storage_model/stored_columns/storage_key=' . $storage_model, 'cpac_set_exported_columns' );
15
}
16
17
/**
@@ -19,10 +18,14 @@ function cpac_set_storage_model_columns( $storage_model, $columns ) {
19
*
20
* @since 3.2
21
*/
22
- function cpac_set_exported_columns( $columns ) {
23
- global $_acp_export_columns;
24
- if ( $_acp_export_columns ) {
25
- $columns = $_acp_export_columns;
26
}
27
- return $columns;
28
}
9
* @param array $columns List of columns ([column_name] => [column_options])
10
*/
11
function cpac_set_storage_model_columns( $storage_model, $columns ) {
12
+ global $_cac_exported_columns;
13
+ $_cac_exported_columns[ $storage_model ] = $columns;
14
}
15
16
/**
18
*
19
* @since 3.2
20
*/
21
+ function cpac_set_exported_columns( $cpac ) {
22
+ global $_cac_exported_columns;
23
+ if ( $_cac_exported_columns ) {
24
+ foreach( $_cac_exported_columns as $model => $columns ) {
25
+ if ( $storage_model = $cpac->get_storage_model( $model ) ) {
26
+ $storage_model->set_stored_columns( $columns );
27
+ }
28
+ }
29
}
30
}
31
+ add_action( 'cac/loaded', 'cpac_set_exported_columns', 5 );
assets/css/admin-column.css CHANGED
@@ -1,1021 +1 @@
1
- #cpac a:focus,
2
- #cpac a:active {
3
- outline: none;
4
- }
5
- /**
6
- * General
7
- * ----------------------------------------------------------------------------
8
- */
9
- #icon-codepress-admin-columns {
10
- background: transparent url('../images/icon.png') no-repeat 0 0;
11
- }
12
- .cpac-settings-link {
13
- float: right;
14
- margin: 12px 14px 5px 0;
15
- background: transparent url('../images/settings.png') no-repeat 0 0;
16
- padding-left: 20px;
17
- text-decoration: none;
18
- display: inline-block;
19
- line-height: 16px;
20
- }
21
- .cpac-settings-link.current {
22
- font-weight: bold;
23
- }
24
- .rtl .cpac-settings-link {
25
- float: left;
26
- margin: 12px 0 5px 14px;
27
- padding-right: 20px;
28
- padding-left: 0;
29
- }
30
- a.help {
31
- background: transparent url('../images/help.png') no-repeat 0 0;
32
- display: inline-block;
33
- width: 16px;
34
- height: 16px;
35
- }
36
- .button.loading {
37
- padding-right: 25px;
38
- position: relative;
39
- }
40
- .rtl .button.loading {
41
- padding-left: 25px;
42
- padding-right: 0;
43
- }
44
- .button.loading span {
45
- position: absolute;
46
- top: 2px;
47
- right: 6px;
48
- background: transparent url('../images/loading.gif') no-repeat right 50%;
49
- width: 16px;
50
- height: 16px;
51
- display: inline-block;
52
- }
53
- .rtl .button.loading span {
54
- left: 6px;
55
- right: auto;
56
- }
57
- /**
58
- * Icons
59
- * ----------------------------------------------------------------------------
60
- */
61
- .icon-yes {
62
- background: transparent url(../images/yes.png) no-repeat 0 0;
63
- width: 16px;
64
- height: 16px;
65
- display: inline-block;
66
- position: relative;
67
- top: 2px;
68
- }
69
- .icon-no {
70
- background: transparent url(../images/no.png) no-repeat 0 0;
71
- width: 16px;
72
- height: 16px;
73
- display: inline-block;
74
- position: relative;
75
- top: 2px;
76
- }
77
- /**
78
- * Header
79
- * ----------------------------------------------------------------------------
80
- */
81
- h2.cpac-nav-tab-wrapper {
82
- margin-bottom: 10px;
83
- }
84
- /**
85
- * Menu
86
- * ----------------------------------------------------------------------------
87
- */
88
- .cpac-menu {
89
- clear: both;
90
- overflow: hidden;
91
- margin-bottom: 10px;
92
- }
93
- .cpac-menu .subsubsub {
94
- white-space: normal;
95
- margin-right: 14px;
96
- width: 100%;
97
- margin: 0 14px 0 0;
98
- }
99
- .cpac-menu .subsubsub li.first {
100
- font-weight: bold;
101
- min-width: 90px;
102
- }
103
- /**
104
- * Structure
105
- * ----------------------------------------------------------------------------
106
- */
107
- .columns-container {
108
- margin-right: 300px;
109
- max-width: 700px;
110
- }
111
- .columns-container .columns-left {
112
- float: left;
113
- width: 100%;
114
- }
115
- .columns-container .columns-right {
116
- float: right;
117
- margin-right: -300px;
118
- width: 280px;
119
- }
120
- .columns-container .columns-right .columns-right-inside.fixed {
121
- position: fixed;
122
- top: 40px;
123
- width: 280px;
124
- }
125
- /**
126
- * UI Sortable Plugin
127
- * ----------------------------------------------------------------------------
128
- */
129
- .ui-sortable-helper {
130
- -webkit-box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
131
- box-shadow: 1px 3px 6px 0px rgba(1, 1, 1, 0.4);
132
- }
133
- .ui-sortable-helper .column-meta {
134
- border-width: 1px;
135
- }
136
- .cpac-placeholder {
137
- visibility: visible !important;
138
- border-top: 1px solid #dfdfdf;
139
- padding: 5px 4px 7px 0;
140
- }
141
- .cpac-placeholder .inner-placeholder {
142
- border: 1px dashed #808080;
143
- background: #eee;
144
- width: 100%;
145
- height: 100%;
146
- }
147
- .cpac-placeholder :first-child {
148
- border: none;
149
- }
150
- /**
151
- * Columns
152
- * ----------------------------------------------------------------------------
153
- */
154
- .columns-left .cpac-boxes .cpac-columns form {
155
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
156
- }
157
- /**
158
- * Column
159
- * ----------------------------------------------------------------------------
160
- */
161
- .cpac-column .column-meta {
162
- border-style: solid;
163
- border-color: #dfdfdf;
164
- border-width: 1px 1px 0;
165
- background: #fcfcfc;
166
- }
167
- .cpac-column .column-meta:nth-child(2n) .column-meta {
168
- background: #f9f9f9;
169
- }
170
- .cpac-column .column-meta img {
171
- margin-right: 3px;
172
- }
173
- .cpac-column .column-meta table {
174
- border: none;
175
- background: transparent;
176
- border-radius: 0;
177
- }
178
- .cpac-column .column-meta table tr td {
179
- vertical-align: top;
180
- height: 18px;
181
- border: none;
182
- padding: 11px 8px;
183
- border-width: 1px 0 0;
184
- border-style: solid;
185
- border-color: transparent;
186
- }
187
- .cpac-column .column-meta table tr td.column_sort {
188
- width: 10px;
189
- background: transparent url('../images/drag.png') no-repeat 8px 8px;
190
- cursor: move;
191
- }
192
- .cpac-column .column-meta table tr td.column_label {
193
- width: 70%;
194
- font-weight: bold;
195
- vertical-align: middle;
196
- position: relative;
197
- }
198
- .cpac-column .column-meta table tr td.column_label .inner {
199
- position: relative;
200
- overflow: hidden;
201
- height: 18px;
202
- }
203
- .cpac-column .column-meta table tr td.column_label .inner > a {
204
- color: #5a5a5a;
205
- padding: 0 4px;
206
- }
207
- .cpac-column .column-meta table tr td.column_label .inner > a:hover {
208
- color: #333333;
209
- }
210
- .cpac-column .column-meta table tr td.column_label .inner > a.edit-button,
211
- .cpac-column .column-meta table tr td.column_label .inner > a.remove-button {
212
- display: none;
213
- color: #a00;
214
- text-decoration: none;
215
- text-shadow: none;
216
- font-weight: normal;
217
- margin-left: 5px;
218
- font-size: 12px;
219
- }
220
- .cpac-column .column-meta table tr td.column_label .inner > a.edit-button:hover,
221
- .cpac-column .column-meta table tr td.column_label .inner > a.remove-button:hover {
222
- color: #f00;
223
- }
224
- .cpac-column .column-meta table tr td.column_label .inner > a.edit-button {
225
- color: #0074a2;
226
- }
227
- .cpac-column .column-meta table tr td.column_label .inner > a.edit-button:hover {
228
- color: #2ea2cc;
229
- }
230
- .cpac-column .column-meta table tr td.column_label .inner .meta {
231
- display: inline-block;
232
- float: right;
233
- font-weight: normal;
234
- color: #b2b2b2;
235
- font-size: 12px;
236
- }
237
- .cpac-column .column-meta table tr td.column_label .inner .meta span {
238
- cursor: pointer;
239
- /*background: #ccc;
240
- border-radius: 2px;
241
- padding: 0 4px;
242
- color: #fff;
243
- display: inline-block;
244
- height: 15px;
245
- line-height: 15px;
246
-
247
- &.on {
248
- background: #1e8cbe;
249
- }*/
250
- }
251
- .cpac-column .column-meta table tr td.column_label span.vers {
252
- float: left;
253
- }
254
- .cpac-column .column-meta table tr td.column_type {
255
- width: auto;
256
- min-width: 120px;
257
- text-align: right;
258
- vertical-align: middle;
259
- color: #999999;
260
- padding-right: 0;
261
- }
262
- .cpac-column .column-meta table tr td.column_type .inner {
263
- height: 18px;
264
- overflow: hidden;
265
- }
266
- .cpac-column .column-meta table tr td.column_type .inner a {
267
- color: #999999;
268
- }
269
- .cpac-column .column-meta table tr td.column_edit {
270
- width: 38px;
271
- min-width: 38px;
272
- background: transparent url('../images/arrow.png') no-repeat 23px 18px;
273
- cursor: pointer;
274
- }
275
- .cpac-column .column-meta:hover .column_label .inner > a.remove-button {
276
- display: inline-block;
277
- }
278
- .cpac-column .column-meta:hover .column_label .inner > a.edit-button {
279
- display: inline-block;
280
- }
281
- .cpac-column .column-meta span.vers {
282
- padding-top: 2px;
283
- }
284
- .cpac-column .column-meta span.vers .comment-grey-bubble {
285
- background: transparent url("../images/comment-grey-bubble.png") no-repeat 0 0;
286
- height: 12px;
287
- width: 12px;
288
- float: right;
289
- }
290
- .cpac-column .column-form {
291
- display: none;
292
- border-width: 1px 1px 0;
293
- border-style: solid;
294
- border-color: #dfdfdf;
295
- position: relative;
296
- }
297
- .cpac-column .column-form table {
298
- border: none;
299
- background: #fcfcfc;
300
- }
301
- .cpac-column .column-form table tr td {
302
- vertical-align: top;
303
- border: none;
304
- padding: 8px;
305
- background: #ffffff;
306
- border-top: 1px solid #F5F5F5;
307
- }
308
- .cpac-column .column-form table tr td select,
309
- .cpac-column .column-form table tr td input[type=text] {
310
- width: 99.95%;
311
- }
312
- .cpac-column .column-form table tr td select optgroup:nth-child(2n) {
313
- background: #F9F9F9;
314
- }
315
- .cpac-column .column-form table tr td.label {
316
- position: relative;
317
- overflow: visible;
318
- background: #F9F9F9;
319
- background: #f5f5f5;
320
- border-right: 1px solid #E1E1E1;
321
- vertical-align: top;
322
- width: 34%;
323
- border-top: 1px solid #F0F0F0;
324
- }
325
- .cpac-column .column-form table tr td.label label {
326
- font-weight: bold;
327
- color: #333333;
328
- display: block;
329
- position: relative;
330
- }
331
- .cpac-column .column-form table tr td.label p {
332
- color: #666666;
333
- display: block;
334
- font-size: 12px;
335
- font-style: normal;
336
- line-height: 16px;
337
- margin: 0 !important;
338
- }
339
- .cpac-column .column-form table tr td.label p.description {
340
- display: none;
341
- position: absolute;
342
- z-index: 99;
343
- top: 30px;
344
- left: 0;
345
- background: #eaf2fa;
346
- border-radius: 5px;
347
- border: 1px solid #c7d7e2;
348
- padding: 5px 8px !important;
349
- font-weight: normal;
350
- }
351
- .cpac-column .column-form table tr td.label p.description em {
352
- display: block;
353
- color: #999;
354
- }
355
- .cpac-column .column-form table tr td.input label {
356
- padding-left: 10px;
357
- padding-right: 0;
358
- }
359
- .cpac-column .column-form table tr td.input div.msg {
360
- margin-top: 5px;
361
- display: none;
362
- color: #333;
363
- padding: 6px 8px;
364
- background-color: #ffebe8;
365
- border: 1px solid #fff;
366
- -moz-border-radius: 3px;
367
- -webkit-border-radius: 3px;
368
- border-radius: 3px;
369
- }
370
- .cpac-column .column-form table tr td.input .section {
371
- padding: 12px;
372
- }
373
- .cpac-column .column-form table tr.column_width div.description {
374
- font-size: 11px;
375
- width: 12%;
376
- float: left;
377
- text-align: middle;
378
- }
379
- .cpac-column .column-form table tr.column_width div.input-width-range {
380
- float: left;
381
- position: relative;
382
- width: 87%;
383
- margin-top: 4px;
384
- }
385
- .cpac-column .column-form table tr.column_width div.input-width-range .ui-slider-handle {
386
- cursor: ew-resize;
387
- }
388
- .cpac-column .column-form table tr.column_image_size {
389
- border: 10px solid red;
390
- }
391
- .cpac-column .column-form table tr.column_image_size td.input label.custom-size {
392
- display: inline-block;
393
- margin-top: 4px;
394
- margin-bottom: 4px;
395
- }
396
- .cpac-column .column-form table tr.column_image_size td.input label.custom-size input {
397
- margin-right: 3px;
398
- }
399
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size {
400
- display: inline-block;
401
- }
402
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .hidden {
403
- display: none;
404
- }
405
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w,
406
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h {
407
- margin: 0;
408
- }
409
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w.hidden,
410
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h.hidden {
411
- display: none;
412
- }
413
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w input[type="text"],
414
- .cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type="text"] {
415
- margin-right: 3px;
416
- width: 30px !important;
417
- }
418
- .cpac-column .column-form table tr.column_action td {
419
- background: #f9f9f9;
420
- }
421
- .cpac-column .column-form table tr.column_action td p {
422
- margin: 0;
423
- }
424
- .cpac-column .column-form table tr.column_action td p a.remove-button {
425
- color: #a00;
426
- text-decoration: none;
427
- text-shadow: none;
428
- font-weight: normal;
429
- margin-left: 5px;
430
- font-size: 12px;
431
- padding: 0 5px;
432
- }
433
- .cpac-column .column-form table tr.column_action td p a.remove-button:hover {
434
- color: #fff;
435
- background: #f00;
436
- }
437
- .cpac-column .column-form table tr:first-child td {
438
- border-top: none;
439
- }
440
- .cpac-column.loading .column-form > .spinner {
441
- position: absolute;
442
- left: 50%;
443
- top: 50%;
444
- z-index: 200;
445
- margin-left: -10px;
446
- margin-top: -10px;
447
- display: block;
448
- }
449
- .cpac-column.loading .column-form:before {
450
- content: '';
451
- position: absolute;
452
- width: 100%;
453
- height: 100%;
454
- background: #FFF;
455
- z-index: 100;
456
- opacity: 0.5;
457
- }
458
- .cpac-column.opened .column-meta {
459
- background-color: #c7c7c7;
460
- background-image: -ms-linear-gradient(top, #e9e9e9, #c7c7c7);
461
- background-image: -moz-linear-gradient(top, #e9e9e9, #c7c7c7);
462
- background-image: -o-linear-gradient(top, #e9e9e9, #c7c7c7);
463
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));
464
- background-image: -webkit-linear-gradient(top, #e9e9e9, #c7c7c7);
465
- background-image: linear-gradient(top, #e9e9e9, #c7c7c7);
466
- border-color: #aeaeae;
467
- }
468
- .cpac-column.opened .column-meta table {
469
- background: transparent;
470
- }
471
- .cpac-column.opened .column-meta table td {
472
- border-color: #f8f8f8;
473
- color: #333;
474
- text-shadow: 0 1px 0 #FFFFFF;
475
- }
476
- .cpac-column.opened .column-meta table td a {
477
- color: #333;
478
- text-shadow: 0 1px 0 #FFFFFF;
479
- }
480
- .cpac-column.opened .column-meta table td.column_sort {
481
- background-position: 8px -39px;
482
- }
483
- .cpac-column.opened .column-meta table td.column_label .inner .meta span {
484
- color: #808080;
485
- text-shadow: none;
486
- }
487
- .cpac-column.opened .column-meta table td.column_type {
488
- color: #5C5C5C;
489
- }
490
- /**
491
- * Column: Footer
492
- * ----------------------------------------------------------------------------
493
- */
494
- .column-footer {
495
- background: #EAF2FA;
496
- border: 1px solid #c7d7e2;
497
- min-height: 26px;
498
- padding: 8px;
499
- overflow: hidden;
500
- }
501
- .column-footer .order-message {
502
- background: transparent url('../images/order_arrow.png') no-repeat 0 0;
503
- color: #7A9BBE;
504
- float: left;
505
- font-family: Comic Sans MS, sans-serif;
506
- font-size: 11px;
507
- height: 13px;
508
- line-height: 1em;
509
- margin-left: 4px;
510
- padding: 7px 0 0 22px;
511
- text-shadow: 0 1px 0 #FFFFFF;
512
- display: inline-block;
513
- }
514
- .column-footer .button-container {
515
- float: right;
516
- display: inline-block;
517
- margin-top: -5px;
518
- }
519
- .column-footer .button-container a {
520
- display: inline-block;
521
- margin-top: 5px;
522
- }
523
- /**
524
- * Welcome Screen
525
- * ----------------------------------------------------------------------------
526
- */
527
- .cpac-content-body hr {
528
- -moz-border-bottom-colors: none;
529
- -moz-border-left-colors: none;
530
- -moz-border-right-colors: none;
531
- -moz-border-top-colors: none;
532
- background: none repeat scroll 0 0 transparent;
533
- border-color: #dfdfdf -moz-use-text-color -moz-use-text-color;
534
- border-image: none;
535
- border-right: 0 none;
536
- border-style: solid none none;
537
- border-width: 1px 0 0;
538
- clear: both;
539
- margin: 30px 0;
540
- opacity: 0.2;
541
- }
542
- #cpac-welcome.about-wrap div.error {
543
- display: block !important;
544
- }
545
- .cpac-alert {
546
- display: inline-block;
547
- background: none repeat scroll 0 0 #FCF8E3;
548
- border: 1px solid #FBEED5;
549
- border-radius: 4px 4px 4px 4px;
550
- color: #C09853;
551
- margin: 20px 0;
552
- padding: 16px 14px;
553
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
554
- }
555
- .cpac-alert p {
556
- margin: 0;
557
- }
558
- .cpac-alert.cpac-alert-success {
559
- background-color: #DFF0D8;
560
- border-color: #D6E9C6;
561
- color: #468847;
562
- }
563
- .cpac-alert.cpac-alert-error {
564
- background-color: #F2DEDE;
565
- border-color: #EED3D7;
566
- color: #B94A48;
567
- }
568
- .cpac-alert a.button-primary {
569
- height: 28px;
570
- line-height: 28px;
571
- display: inline-block;
572
- }
573
- #cpac-download-add-ons-table {
574
- max-width: 600px;
575
- }
576
- .wp-core-ui .button-large {
577
- height: 40px;
578
- line-height: 40px;
579
- font-size: 16px;
580
- padding: 0 15px;
581
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
582
- }
583
- /**
584
- * Notifications
585
- * ----------------------------------------------------------------------------
586
- */
587
- .cac-notification.updated {
588
- border-left-color: #0071aa;
589
- }
590
- .cac-notification.updated .learnmore {
591
- float: right;
592
- }
593
- .cac-notification.updated .learnmore:after {
594
- content: "\f139";
595
- font: normal 20px/1 'dashicons';
596
- float: right;
597
- }
598
- /**
599
- * Sidebar
600
- * ----------------------------------------------------------------------------
601
- */
602
- .columns-right {
603
- margin-top: 54px;
604
- }
605
- .columns-right .sidebox {
606
- background: none repeat scroll 0 0 #FFFFFF;
607
- border: 1px solid #E1E1E1;
608
- border-radius: 0 0 0 0;
609
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
610
- position: relative;
611
- margin-bottom: 14px;
612
- }
613
- .columns-right .sidebox h3 {
614
- padding: 10px;
615
- margin: 0;
616
- }
617
- .columns-right .sidebox h3.title {
618
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
619
- font-size: 15px;
620
- font-weight: normal;
621
- line-height: 1;
622
- margin: 0;
623
- padding: 7px 10px;
624
- background: #f1f1f1;
625
- background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
626
- background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
627
- background-image: -moz-linear-gradient(bottom, #ececec, #f9f9f9);
628
- background-image: -o-linear-gradient(bottom, #ececec, #f9f9f9);
629
- background-image: linear-gradient(to top, #ececec, #f9f9f9);
630
- border-bottom-color: #dfdfdf;
631
- text-shadow: #fff 0 1px 0;
632
- -webkit-box-shadow: 0 1px 0 #fff;
633
- box-shadow: 0 1px 0 #fff;
634
- border-bottom-style: solid;
635
- border-bottom-width: 1px;
636
- }
637
- .columns-right .sidebox .inside {
638
- padding: 10px;
639
- }
640
- .columns-right .sidebox .inside p {
641
- margin-top: 0;
642
- }
643
- .columns-right .sidebox#form-actions .form-reset {
644
- border-bottom: 1px solid #F5F5F5;
645
- padding: 8px;
646
- }
647
- .columns-right .sidebox#form-actions .reset-column-type {
648
- text-decoration: none;
649
- color: #BC0B0B;
650
- line-height: 25px;
651
- display: inline-block;
652
- }
653
- .columns-right .sidebox#form-actions .form-update {
654
- padding: 8px;
655
- overflow: hidden;
656
- }
657
- .columns-right .sidebox#form-actions .submit-update {
658
- display: block;
659
- width: 100%;
660
- height: 28px;
661
- line-height: 28px;
662
- text-align: center;
663
- }
664
- .columns-right .sidebox#pro-version .cta {
665
- background: transparent url(../images/get_the_addon.png) no-repeat 0 0;
666
- background-size: cover;
667
- }
668
- .columns-right .sidebox#pro-version .padding-box {
669
- padding: 8px 15px 0;
670
- }
671
- .columns-right .sidebox#pro-version h3 a {
672
- color: #fff;
673
- font-size: 19px;
674
- text-decoration: none;
675
- font-weight: normal;
676
- margin-top: 6px;
677
- }
678
- .columns-right .sidebox#pro-version .inside ul {
679
- margin: 0 0 10px 0;
680
- }
681
- .columns-right .sidebox#pro-version .inside ul li {
682
- margin: 0;
683
- padding: 0;
684
- }
685
- .columns-right .sidebox#pro-version .inside ul li a {
686
- display: inline-block;
687
- height: 24px;
688
- font-size: 19px;
689
- line-height: 24px;
690
- margin-bottom: 1px;
691
- padding: 0 5px;
692
- background: #000;
693
- color: #fff;
694
- text-decoration: none;
695
- }
696
- .columns-right .sidebox#pro-version .inside p {
697
- color: #fff;
698
- font-size: 12px;
699
- }
700
- .columns-right .sidebox#pro-version .inside p a {
701
- color: #fff;
702
- display: inline-block;
703
- background: #a4c518;
704
- padding: 0 2px;
705
- font-size: 15px;
706
- text-decoration: none;
707
- }
708
- .columns-right .sidebox#direct-feedback #feedback-support,
709
- .columns-right .sidebox#direct-feedback #feedback-rate {
710
- display: none;
711
- }
712
- .columns-right .sidebox#direct-feedback .inside > a {
713
- border-radius: 4px;
714
- border: 1px solid #CCC;
715
- width: 48%;
716
- height: 64px;
717
- text-align: center;
718
- line-height: 64px;
719
- font-weight: bold;
720
- color: #222;
721
- display: inline-block;
722
- text-decoration: none;
723
- }
724
- .columns-right .sidebox#direct-feedback .inside > a:hover {
725
- background: #FAFAFA;
726
- }
727
- .columns-right .sidebox#direct-feedback .inside form textarea {
728
- width: 100%;
729
- height: 120px;
730
- }
731
- .columns-right .sidebox#direct-feedback .inside form input[type="submit"] {
732
- float: right;
733
- border-radius: 4px;
734
- border: 1px solid #CCC;
735
- height: 32px;
736
- text-align: center;
737
- line-height: 32px;
738
- font-weight: bold;
739
- font-size: 12px;
740
- padding: 0 32px;
741
- color: #CCC;
742
- display: inline-block;
743
- background: none;
744
- text-decoration: none;
745
- cursor: pointer;
746
- }
747
- .columns-right .sidebox#direct-feedback .inside form input[type="submit"]:hover {
748
- background: #FAFAFA;
749
- }
750
- .columns-right .sidebox#direct-feedback .inside form p.description {
751
- float: left;
752
- font-size: 10px;
753
- }
754
- .columns-right .sidebox#direct-feedback .inside ul {
755
- margin: 0;
756
- }
757
- .columns-right .sidebox#direct-feedback .inside ul.share li {
758
- margin: 0;
759
- display: block;
760
- float: left;
761
- margin-left: 9px;
762
- width: 30%;
763
- }
764
- .columns-right .sidebox#direct-feedback .inside ul.share li a {
765
- text-decoration: none;
766
- vertical-align: middle;
767
- line-height: 20px;
768
- padding: 16px 0;
769
- width: 100%;
770
- text-align: center;
771
- border: 1px solid #CCC;
772
- border-radius: 4px;
773
- display: block;
774
- }
775
- .columns-right .sidebox#direct-feedback .inside ul.share li a:hover {
776
- background: #FAFAFA;
777
- }
778
- .columns-right .sidebox#direct-feedback .inside ul.share li:first-child {
779
- margin-left: 0;
780
- }
781
- .columns-right .sidebox#direct-feedback #feedback-support .inside ul.share li {
782
- width: 48%;
783
- }
784
- /**
785
- * Setting Tab
786
- * ----------------------------------------------------------------------------
787
- */
788
- table.cpac-form-table {
789
- max-width: 1100px;
790
- margin-top: 20px;
791
- }
792
- table.cpac-form-table > tbody > tr > td,
793
- table.cpac-form-table > tbody > tr > th {
794
- vertical-align: top;
795
- }
796
- table.cpac-form-table td.padding-22 {
797
- padding-top: 22px;
798
- }
799
- table.cpac-form-table td .cpac_export .ms-container {
800
- background: transparent url('../images/switch_bw.png') no-repeat 50% 50%;
801
- }
802
- table.cpac-form-table td .cpac_export .ms-container .ms-selectable {
803
- width: 48%;
804
- margin-right: 0;
805
- }
806
- table.cpac-form-table td .cpac_export .ms-container .ms-selection {
807
- float: right;
808
- width: 48%;
809
- }
810
- table.cpac-form-table td .cpac_export .ms-container ul.ms-list {
811
- width: 100%;
812
- }
813
- table.cpac-form-table td .cpac_export .ms-container ul.ms-list li {
814
- margin: 0;
815
- padding-top: 5px;
816
- padding-bottom: 5px;
817
- }
818
- table.cpac-form-table.settings tr td {
819
- padding-top: 74px;
820
- }
821
- table.cpac-form-table.settings tr:first-child th {
822
- padding-top: 0;
823
- }
824
- table.cpac-form-table.settings tr:first-child td {
825
- padding-top: 54px;
826
- }
827
- /**
828
- * WP Pointer
829
- * ----------------------------------------------------------------------------
830
- */
831
- .wp-pointer-content {
832
- overflow: hidden;
833
- }
834
- .wp-pointer-content ol {
835
- margin-left: 1.5em;
836
- padding: 0 15px;
837
- }
838
- .wp-pointer-right {
839
- margin-right: 15px;
840
- }
841
- /* =RTL language
842
- -------------------------------------------------------------- */
843
- body.rtl .wp-pointer-right {
844
- margin-left: 15px;
845
- margin-right: 0;
846
- }
847
- body.rtl .wp-pointer-right ol {
848
- margin-right: 1.5em;
849
- margin-left: 0;
850
- }
851
- body.rtl .cpac-menu .subsubsub {
852
- margin-left: 14px;
853
- margin-right: 0;
854
- }
855
- body.rtl .columns-container {
856
- margin-left: 300px;
857
- margin-right: 0;
858
- }
859
- body.rtl .columns-left {
860
- float: right;
861
- }
862
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta img {
863
- margin-left: 3px;
864
- margin-right: 0;
865
- }
866
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner > a.remove-button {
867
- margin-right: 12px;
868
- margin-left: 0;
869
- }
870
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner .meta {
871
- float: left;
872
- }
873
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label span.vers {
874
- float: right;
875
- }
876
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_type {
877
- text-align: left;
878
- padding-left: 0;
879
- padding-right: auto;
880
- }
881
- body.rtl .columns-left .cpac-columns .cpac-column .column-meta span.vers .comment-grey-bubble {
882
- float: left;
883
- }
884
- body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr.column_image_size td.input label input {
885
- margin-left: 3px;
886
- margin-right: 0;
887
- }
888
- body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label p.description {
889
- right: 0;
890
- left: auto;
891
- }
892
- body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label a.more-info {
893
- float: left;
894
- }
895
- body.rtl .columns-left .cpac-columns .cpac-column .column-form div.description {
896
- float: right;
897
- }
898
- body.rtl .columns-left .cpac-columns .cpac-column .column-form div.input-width-range {
899
- float: right;
900
- }
901
- body.rtl .columns-left .cpac-columns .cpac-column .column-form tr td.input label {
902
- padding-left: 10px;
903
- padding-right: 0;
904
- }
905
- body.rtl .columns-left .cpac-columns .cpac-column .column-form a.help {
906
- float: left;
907
- }
908
- body.rtl .columns-left .column-footer .order-message {
909
- float: right;
910
- padding-right: 22px;
911
- padding-left: 0;
912
- background: transparent url('../images/order_arrow-rtl.png') no-repeat right top;
913
- }
914
- body.rtl .columns-left .column-footer .button-container {
915
- float: left;
916
- }
917
- body.rtl .columns-right {
918
- float: left;
919
- margin-left: -300px;
920
- margin-right: 0;
921
- }
922
- body.rtl .cpac-placeholder {
923
- padding: 5px 0 7px 4px;
924
- }
925
- body.rtl .cpac_export .ms-container .ms-selection {
926
- float: left;
927
- }
928
- /* =Responsive
929
- -------------------------------------------------------------- */
930
- @media only screen and (max-width: 900px) {
931
- .columns-container {
932
- margin-right: 0;
933
- }
934
- .columns-container .columns-left {
935
- float: none;
936
- }
937
- .columns-container .columns-right {
938
- float: none;
939
- margin-top: 0;
940
- margin-right: 0;
941
- width: 100%;
942
- }
943
- .columns-container .columns-right .columns-right-inside.fixed {
944
- position: relative;
945
- top: 0;
946
- width: 100%;
947
- }
948
- }
949
- /* =Addons
950
- -------------------------------------------------------------- */
951
- .cpac-addons li {
952
- width: 200px;
953
- background: #FFF;
954
- float: left;
955
- margin-right: 16px;
956
- margin-bottom: 16px;
957
- border: 1px solid #DDD;
958
- -webkit-box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.15);
959
- -moz-box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.15);
960
- box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.15);
961
- }
962
- .cpac-addons li:hover {
963
- -webkit-box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.25);
964
- -moz-box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.25);
965
- box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.25);
966
- }
967
- .cpac-addons li a {
968
- color: #444;
969
- }
970
- .cpac-addons li .cpac-addon-content {
971
- display: table;
972
- width: 100%;
973
- height: 125px;
974
- text-align: center;
975
- vertical-align: middle;
976
- border-top: 1px solid #DDD;
977
- background: #0069a4;
978
- background: -moz-radial-gradient(center, ellipse cover, #0069a4 0%, #085079 100%);
979
- background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, #0069a4), color-stop(100%, #085079));
980
- background: -webkit-radial-gradient(center, ellipse cover, #0069a4 0%, #085079 100%);
981
- background: -o-radial-gradient(center, ellipse cover, #0069a4 0%, #085079 100%);
982
- background: -ms-radial-gradient(center, ellipse cover, #0069a4 0%, #085079 100%);
983
- background: radial-gradient(ellipse at center, #0069a4 0%, #085079 100%);
984
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0069a4', endColorstr='#085079', GradientType=1);
985
- }
986
- .cpac-addons li .cpac-addon-content > * {
987
- display: table-cell;
988
- vertical-align: middle;
989
- }
990
- .cpac-addons li .cpac-addon-content h3 {
991
- padding: 0 16px;
992
- color: #FFF;
993
- line-height: 150%;
994
- }
995
- .cpac-addons li .cpac-addon-content img {
996
- width: 100%;
997
- }
998
- .cpac-addons li .cpac-addon-header {
999
- width: 100%;
1000
- padding: 25px 15px;
1001
- -moz-box-sizing: border-box;
1002
- box-sizing: border-box;
1003
- }
1004
- .cpac-addons li .cpac-addon-header > *:first-child {
1005
- margin-top: 0;
1006
- }
1007
- .cpac-addons li .cpac-addon-header > *:last-child {
1008
- margin-bottom: 0;
1009
- }
1010
- .cpac-addons li .cpac-addon-actions {
1011
- background: #EEE;
1012
- border-top: 1px solid #DDD;
1013
- padding: 8px;
1014
- }
1015
- .cpac-addons li .cpac-addon-actions .cpac-installed:before {
1016
- content: "\f147";
1017
- font-family: 'dashicons';
1018
- vertical-align: middle;
1019
- margin-left: -5px;
1020
- margin-right: 3px;
1021
- }
1
+ #cpac a:focus,#cpac a:active{outline:none}#icon-codepress-admin-columns{background:transparent url('../images/icon.png') no-repeat 0 0}.cpac-settings-link{float:right;margin:12px 14px 5px 0;background:transparent url('../images/settings.png') no-repeat 0 0;padding-left:20px;text-decoration:none;display:inline-block;line-height:16px}.cpac-settings-link.current{font-weight:bold}.rtl .cpac-settings-link{float:left;margin:12px 0 5px 14px;padding-right:20px;padding-left:0}a.help{background:transparent url('../images/help.png') no-repeat 0 0;display:inline-block;width:16px;height:16px}.button.loading{padding-right:25px;position:relative}.rtl .button.loading{padding-left:25px;padding-right:0}.button.loading span{position:absolute;top:2px;right:6px;background:transparent url('../images/loading.gif') no-repeat right 50%;width:16px;height:16px;display:inline-block}.rtl .button.loading span{left:6px;right:auto}.icon-yes{background:transparent url(../images/yes.png) no-repeat 0 0;width:16px;height:16px;display:inline-block;position:relative;top:2px}.icon-no{background:transparent url(../images/no.png) no-repeat 0 0;width:16px;height:16px;display:inline-block;position:relative;top:2px}h2.cpac-nav-tab-wrapper{margin-bottom:10px}.cpac-menu{clear:both;overflow:hidden;margin-bottom:10px}.cpac-menu .subsubsub{white-space:normal;margin-right:14px;width:100%;margin:0 14px 0 0}.cpac-menu .subsubsub li.first{font-weight:bold;min-width:90px}.columns-container{margin-right:300px;max-width:700px}.columns-container .columns-left{float:left;width:100%}.columns-container .columns-right{float:right;margin-right:-300px;width:280px}.columns-container .columns-right .columns-right-inside.fixed{position:fixed;top:40px;width:280px}.ui-sortable-helper{-webkit-box-shadow:1px 3px 6px 0 rgba(1,1,1,0.4);box-shadow:1px 3px 6px 0 rgba(1,1,1,0.4)}.ui-sortable-helper .column-meta{border-width:1px}.cpac-placeholder{visibility:visible !important;border-top:1px solid #dfdfdf;padding:5px 4px 7px 0}.cpac-placeholder .inner-placeholder{border:1px dashed #808080;background:#eee;width:100%;height:100%}.cpac-placeholder :first-child{border:none}.columns-left .cpac-boxes .cpac-columns form{box-shadow:0 1px 3px rgba(0,0,0,0.1)}.cpac-column .column-meta{border-style:solid;border-color:#dfdfdf;border-width:1px 1px 0;background:#fcfcfc}.cpac-column .column-meta:nth-child(2n) .column-meta{background:#f9f9f9}.cpac-column .column-meta img{margin-right:3px}.cpac-column .column-meta table{border:none;background:transparent;border-radius:0}.cpac-column .column-meta table tr td{vertical-align:top;height:18px;border:none;padding:11px 8px;border-width:1px 0 0;border-style:solid;border-color:transparent}.cpac-column .column-meta table tr td.column_sort{width:10px;background:transparent url('../images/drag.png') no-repeat 8px 8px;cursor:move}.cpac-column .column-meta table tr td.column_label{width:70%;font-weight:bold;vertical-align:middle;position:relative}.cpac-column .column-meta table tr td.column_label .inner{position:relative;overflow:hidden;height:18px}.cpac-column .column-meta table tr td.column_label .inner>a{color:#5a5a5a;padding:0 4px}.cpac-column .column-meta table tr td.column_label .inner>a:hover{color:#333}.cpac-column .column-meta table tr td.column_label .inner>a.edit-button,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button{display:none;color:#a00;text-decoration:none;text-shadow:none;font-weight:normal;margin-left:5px;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover,.cpac-column .column-meta table tr td.column_label .inner>a.remove-button:hover{color:#f00}.cpac-column .column-meta table tr td.column_label .inner>a.edit-button{color:#0074a2}.cpac-column .column-meta table tr td.column_label .inner>a.edit-button:hover{color:#2ea2cc}.cpac-column .column-meta table tr td.column_label .inner .meta{display:inline-block;float:right;font-weight:normal;color:#b2b2b2;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner .meta span{cursor:pointer}.cpac-column .column-meta table tr td.column_label span.vers{float:left}.cpac-column .column-meta table tr td.column_type{width:auto;min-width:120px;text-align:right;vertical-align:middle;color:#999;padding-right:0}.cpac-column .column-meta table tr td.column_type .inner{height:18px;overflow:hidden}.cpac-column .column-meta table tr td.column_type .inner a{color:#999}.cpac-column .column-meta table tr td.column_edit{width:38px;min-width:38px;background:transparent url('../images/arrow.png') no-repeat 23px 18px;cursor:pointer}.cpac-column .column-meta:hover .column_label .inner>a.remove-button{display:inline-block}.cpac-column .column-meta:hover .column_label .inner>a.edit-button{display:inline-block}.cpac-column .column-meta span.vers{padding-top:2px}.cpac-column .column-meta span.vers .comment-grey-bubble{background:transparent url("../images/comment-grey-bubble.png") no-repeat 0 0;height:12px;width:12px;float:right}.cpac-column .column-form{display:none;border-width:1px 1px 0;border-style:solid;border-color:#dfdfdf;position:relative}.cpac-column .column-form table{border:none;background:#fcfcfc}.cpac-column .column-form table tr td{vertical-align:top;border:none;padding:8px;background:#fff;border-top:1px solid #f5f5f5}.cpac-column .column-form table tr td select,.cpac-column .column-form table tr td input[type=text]{width:99.95%}.cpac-column .column-form table tr td select optgroup:nth-child(2n){background:#f9f9f9}.cpac-column .column-form table tr td.label{position:relative;overflow:visible;background:#f9f9f9;background:#f5f5f5;border-right:1px solid #e1e1e1;vertical-align:top;width:34%;border-top:1px solid #f0f0f0}.cpac-column .column-form table tr td.label label{font-weight:bold;color:#333;display:block;position:relative}.cpac-column .column-form table tr td.label p{color:#666;display:block;font-size:12px;font-style:normal;line-height:16px;margin:0 !important}.cpac-column .column-form table tr td.label p.description{display:none;position:absolute;z-index:99;top:30px;left:0;background:#eaf2fa;border-radius:5px;border:1px solid #c7d7e2;padding:5px 8px !important;font-weight:normal}.cpac-column .column-form table tr td.label p.description em{display:block;color:#999}.cpac-column .column-form table tr td.input label{padding-left:10px;padding-right:0}.cpac-column .column-form table tr td.input div.msg{margin-top:5px;display:none;color:#333;padding:6px 8px;background-color:#ffebe8;border:1px solid #fff;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}.cpac-column .column-form table tr td.input .section{padding:12px}.cpac-column .column-form table tr.column_width div.description{font-size:11px;width:12%;float:left;text-align:middle}.cpac-column .column-form table tr.column_width div.input-width-range{float:left;position:relative;width:87%;margin-top:4px}.cpac-column .column-form table tr.column_width div.input-width-range .ui-slider-handle{cursor:ew-resize}.cpac-column .column-form table tr.column_image_size{border:10px solid #f00}.cpac-column .column-form table tr.column_image_size td.input label.custom-size{display:inline-block;margin-top:4px;margin-bottom:4px}.cpac-column .column-form table tr.column_image_size td.input label.custom-size input{margin-right:3px}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size{display:inline-block}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h{margin:0}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w.hidden,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h.hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w input[type="text"],.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type="text"]{margin-right:3px;width:40px !important}.cpac-column .column-form table tr.column_action td{background:#f9f9f9}.cpac-column .column-form table tr.column_action td p{margin:0}.cpac-column .column-form table tr.column_action td p a.remove-button{color:#a00;text-decoration:none;text-shadow:none;font-weight:normal;margin-left:5px;font-size:12px;padding:0 5px}.cpac-column .column-form table tr.column_action td p a.remove-button:hover{color:#fff;background:#f00}.cpac-column .column-form table tr:first-child td{border-top:none}.cpac-column.loading .column-form>.spinner{position:absolute;left:50%;top:50%;z-index:200;margin-left:-10px;margin-top:-10px;display:block}.cpac-column.loading .column-form:before{content:'';position:absolute;width:100%;height:100%;background:#fff;z-index:100;opacity:.5}.cpac-column.opened .column-meta{background-color:#c7c7c7;background-image:-ms-linear-gradient(top, #e9e9e9, #c7c7c7);background-image:-moz-linear-gradient(top, #e9e9e9, #c7c7c7);background-image:-o-linear-gradient(top, #e9e9e9, #c7c7c7);background-image:-webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#c7c7c7));background-image:-webkit-linear-gradient(top, #e9e9e9, #c7c7c7);background-image:linear-gradient(top, #e9e9e9, #c7c7c7);border-color:#aeaeae}.cpac-column.opened .column-meta table{background:transparent}.cpac-column.opened .column-meta table td{border-color:#f8f8f8;color:#333;text-shadow:0 1px 0 #fff}.cpac-column.opened .column-meta table td a{color:#333;text-shadow:0 1px 0 #fff}.cpac-column.opened .column-meta table td.column_sort{background-position:8px -39px}.cpac-column.opened .column-meta table td.column_label .inner .meta span{color:#808080;text-shadow:none}.cpac-column.opened .column-meta table td.column_type{color:#5c5c5c}.column-footer{background:#eaf2fa;border:1px solid #c7d7e2;min-height:26px;padding:8px;overflow:hidden}.column-footer .order-message{background:transparent url('../images/order_arrow.png') no-repeat 0 0;color:#7a9bbe;float:left;font-family:Comic Sans MS,sans-serif;font-size:11px;height:13px;line-height:1em;margin-left:4px;padding:7px 0 0 22px;text-shadow:0 1px 0 #fff;display:inline-block}.column-footer .button-container{float:right;display:inline-block;margin-top:-5px}.column-footer .button-container a{display:inline-block;margin-top:5px}.cpac-content-body hr{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none repeat scroll 0 0 transparent;border-color:#dfdfdf -moz-use-text-color -moz-use-text-color;border-image:none;border-right:0 none;border-style:solid none none;border-width:1px 0 0;clear:both;margin:30px 0;opacity:.2}#cpac-welcome.about-wrap div.error{display:block !important}.cpac-alert{display:inline-block;background:none repeat scroll 0 0 #fcf8e3;border:1px solid #fbeed5;border-radius:4px 4px 4px 4px;color:#c09853;margin:20px 0;padding:16px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.cpac-alert p{margin:0}.cpac-alert.cpac-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.cpac-alert.cpac-alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.cpac-alert a.button-primary{height:28px;line-height:28px;display:inline-block}#cpac-download-add-ons-table{max-width:600px}.wp-core-ui .button-large{height:40px;line-height:40px;font-size:16px;padding:0 15px;text-shadow:0 1px 0 rgba(0,0,0,0.5)}.cac-notification.updated{border-left-color:#0071aa}.cac-notification.updated .learnmore{float:right}.cac-notification.updated .learnmore:after{content:"\f139";font:normal 20px/1 'dashicons';float:right}.columns-right{margin-top:54px}.columns-right .sidebox{background:none repeat scroll 0 0 #fff;border:1px solid #e1e1e1;border-radius:0 0 0 0;box-shadow:0 1px 3px rgba(0,0,0,0.1);position:relative;margin-bottom:14px}.columns-right .sidebox h3{padding:10px;margin:0}.columns-right .sidebox h3.title{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:15px;font-weight:normal;line-height:1;margin:0;padding:7px 10px;background:#f1f1f1;background-image:-webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));background-image:-webkit-linear-gradient(bottom, #ececec, #f9f9f9);background-image:-moz-linear-gradient(bottom, #ececec, #f9f9f9);background-image:-o-linear-gradient(bottom, #ececec, #f9f9f9);background-image:linear-gradient(to top, #ececec, #f9f9f9);border-bottom-color:#dfdfdf;text-shadow:#fff 0 1px 0;-webkit-box-shadow:0 1px 0 #fff;box-shadow:0 1px 0 #fff;border-bottom-style:solid;border-bottom-width:1px}.columns-right .sidebox .inside{padding:10px}.columns-right .sidebox .inside p{margin-top:0}.columns-right .sidebox#form-actions .form-reset{border-bottom:1px solid #f5f5f5;padding:8px}.columns-right .sidebox#form-actions .reset-column-type{text-decoration:none;color:#bc0b0b;line-height:25px;display:inline-block}.columns-right .sidebox#form-actions .form-update{padding:8px;overflow:hidden}.columns-right .sidebox#form-actions .submit-update{display:block;width:100%;height:28px;line-height:28px;text-align:center}.columns-right .sidebox#pro-version .cta{background:transparent url(../images/get_the_addon.png) no-repeat 0 0;background-size:cover}.columns-right .sidebox#pro-version .padding-box{padding:8px 15px 0}.columns-right .sidebox#pro-version h3 a{color:#fff;font-size:19px;text-decoration:none;font-weight:normal;margin-top:6px}.columns-right .sidebox#pro-version .inside ul{margin:0 0 10px 0}.columns-right .sidebox#pro-version .inside ul li{margin:0;padding:0}.columns-right .sidebox#pro-version .inside ul li a{display:inline-block;min-height:24px;font-size:19px;line-height:24px;margin-bottom:1px;padding:0 5px;background:#000;color:#fff;text-decoration:none}.columns-right .sidebox#pro-version .inside p{color:#fff;font-size:12px}.columns-right .sidebox#pro-version .inside p a{color:#fff;display:inline-block;background:#a4c518;padding:0 2px;font-size:15px;text-decoration:none}.columns-right .sidebox#direct-feedback #feedback-support,.columns-right .sidebox#direct-feedback #feedback-rate{display:none}.columns-right .sidebox#direct-feedback .inside>a{border-radius:4px;border:1px solid #ccc;width:48%;height:64px;text-align:center;line-height:64px;font-weight:bold;color:#222;display:inline-block;text-decoration:none}.columns-right .sidebox#direct-feedback .inside>a:hover{background:#fafafa}.columns-right .sidebox#direct-feedback .inside form textarea{width:100%;height:120px}.columns-right .sidebox#direct-feedback .inside form input[type="submit"]{float:right;border-radius:4px;border:1px solid #ccc;height:32px;text-align:center;line-height:32px;font-weight:bold;font-size:12px;padding:0 32px;color:#ccc;display:inline-block;background:none;text-decoration:none;cursor:pointer}.columns-right .sidebox#direct-feedback .inside form input[type="submit"]:hover{background:#fafafa}.columns-right .sidebox#direct-feedback .inside form p.description{float:left;font-size:10px}.columns-right .sidebox#direct-feedback .inside ul{margin:0}.columns-right .sidebox#direct-feedback .inside ul.share li{margin:0;display:block;float:left;margin-left:9px;width:30%}.columns-right .sidebox#direct-feedback .inside ul.share li a{text-decoration:none;vertical-align:middle;line-height:20px;padding:16px 0;width:100%;text-align:center;border:1px solid #ccc;border-radius:4px;display:block}.columns-right .sidebox#direct-feedback .inside ul.share li a:hover{background:#fafafa}.columns-right .sidebox#direct-feedback .inside ul.share li:first-child{margin-left:0}.columns-right .sidebox#direct-feedback #feedback-support .inside ul.share li{width:48%}table.cpac-form-table{max-width:1100px;margin-top:20px}table.cpac-form-table>tbody>tr>td,table.cpac-form-table>tbody>tr>th{vertical-align:top}table.cpac-form-table td.padding-22{padding-top:22px}table.cpac-form-table td .cpac_export .ms-container{background:transparent url('../images/switch_bw.png') no-repeat 50% 50%}table.cpac-form-table td .cpac_export .ms-container .ms-selectable{width:48%;margin-right:0}table.cpac-form-table td .cpac_export .ms-container .ms-selection{float:right;width:48%}table.cpac-form-table td .cpac_export .ms-container ul.ms-list{width:100%}table.cpac-form-table td .cpac_export .ms-container ul.ms-list li{margin:0;padding-top:5px;padding-bottom:5px}table.cpac-form-table.settings tr td{padding-top:74px}table.cpac-form-table.settings tr:first-child th{padding-top:0}table.cpac-form-table.settings tr:first-child td{padding-top:54px}.wp-pointer-content{overflow:hidden}.wp-pointer-content ol{margin-left:1.5em;padding:0 15px}.wp-pointer-right{margin-right:15px}body.rtl .wp-pointer-right{margin-left:15px;margin-right:0}body.rtl .wp-pointer-right ol{margin-right:1.5em;margin-left:0}body.rtl .cpac-menu .subsubsub{margin-left:14px;margin-right:0}body.rtl .columns-container{margin-left:300px;margin-right:0}body.rtl .columns-left{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-meta img{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner>a.remove-button{margin-right:12px;margin-left:0}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label .inner .meta{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_label span.vers{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-meta .column_type{text-align:left;padding-left:0;padding-right:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-meta span.vers .comment-grey-bubble{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr.column_image_size td.input label input{margin-left:3px;margin-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label p.description{right:0;left:auto}body.rtl .columns-left .cpac-columns .cpac-column .column-form table tr td.label a.more-info{float:left}body.rtl .columns-left .cpac-columns .cpac-column .column-form div.description{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form div.input-width-range{float:right}body.rtl .columns-left .cpac-columns .cpac-column .column-form tr td.input label{padding-left:10px;padding-right:0}body.rtl .columns-left .cpac-columns .cpac-column .column-form a.help{float:left}body.rtl .columns-left .column-footer .order-message{float:right;padding-right:22px;padding-left:0;background:transparent url('../images/order_arrow-rtl.png') no-repeat right top}body.rtl .columns-left .column-footer .button-container{float:left}body.rtl .columns-right{float:left;margin-left:-300px;margin-right:0}body.rtl .cpac-placeholder{padding:5px 0 7px 4px}body.rtl .cpac_export .ms-container .ms-selection{float:left}@media only screen and (max-width:900px){.columns-container{margin-right:0}.columns-container .columns-left{float:none}.columns-container .columns-right{float:none;margin-top:0;margin-right:0;width:100%}.columns-container .columns-right .columns-right-inside.fixed{position:relative;top:0;width:100%}}.cpac-addons li{width:200px;background:#fff;float:left;margin-right:16px;margin-bottom:16px;border:1px solid #ddd;-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,0.15);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,0.15);box-shadow:0 3px 10px 0 rgba(0,0,0,0.15)}.cpac-addons li:hover{-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,0.25);box-shadow:0 3px 10px 0 rgba(0,0,0,0.25)}.cpac-addons li a{color:#444}.cpac-addons li .cpac-addon-content{display:table;width:100%;height:125px;text-align:center;vertical-align:middle;border-top:1px solid #ddd;background:#0069a4;background:-moz-radial-gradient(center, ellipse cover, #0069a4 0, #085079 100%);background:-webkit-gradient(radial, center center, 0, center center, 100%, color-stop(0, #0069a4), color-stop(100%, #085079));background:-webkit-radial-gradient(center, ellipse cover, #0069a4 0, #085079 100%);background:-o-radial-gradient(center, ellipse cover, #0069a4 0, #085079 100%);background:-ms-radial-gradient(center, ellipse cover, #0069a4 0, #085079 100%);background:radial-gradient(ellipse at center, #0069a4 0, #085079 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0069a4', endColorstr='#085079', GradientType=1)}.cpac-addons li .cpac-addon-content>*{display:table-cell;vertical-align:middle}.cpac-addons li .cpac-addon-content h3{padding:0 16px;color:#fff;line-height:150%}.cpac-addons li .cpac-addon-content img{width:100%}.cpac-addons li .cpac-addon-header{width:100%;padding:25px 15px;-moz-box-sizing:border-box;box-sizing:border-box}.cpac-addons li .cpac-addon-header>*:first-child{margin-top:0}.cpac-addons li .cpac-addon-header>*:last-child{margin-bottom:0}.cpac-addons li .cpac-addon-actions{background:#eee;border-top:1px solid #ddd;padding:8px}.cpac-addons li .cpac-addon-actions .cpac-installed:before{content:"\f147";font-family:'dashicons';vertical-align:middle;margin-left:-5px;margin-right:3px}
assets/css/column.css CHANGED
@@ -1,98 +1 @@
1
- /* =General
2
- -------------------------------------------------------------- */
3
- .cpac-divider {
4
- display: inline-block;
5
- width: 14px;
6
- height: 12px;
7
- background: transparent url(../images/square.png) no-repeat 50% 7px;
8
- }
9
- span.status-closed {
10
- color: red;
11
- }
12
- .tablenav.top .cpac-edit {
13
- top: 0;
14
- display: inline-block;
15
- vertical-align: bottom;
16
- }
17
- /* =Images Column
18
- -------------------------------------------------------------- */
19
- .cpac-column-value-image {
20
- display: inline-block;
21
- background: transparent;
22
- margin-right: 2px;
23
- overflow: hidden;
24
- }
25
- .rtl .cpac-column-value-image {
26
- margin-left: 2px;
27
- margin-right: 0;
28
- }
29
- .cpac-column-value-image img {
30
- display: block;
31
- margin: 0 auto;
32
- }
33
- .column-column-attachment img {
34
- padding-right: 5px;
35
- padding-bottom: 4px;
36
- }
37
- .rtl .column-column-attachment img {
38
- padding-left: 5px;
39
- padding-right: 0;
40
- }
41
- /* =Color Column
42
- -------------------------------------------------------------- */
43
- div.cpac-color {
44
- line-height: 26px;
45
- }
46
- div.cpac-color span {
47
- display: block;
48
- -webkit-border-radius: 3px;
49
- border-radius: 3px;
50
- color: #ffffff;
51
- float: left;
52
- height: 16px;
53
- line-height: 16px;
54
- margin-right: 12px;
55
- min-width: 30px;
56
- overflow: hidden;
57
- padding: 4px 5px;
58
- font-size: 10px;
59
- font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
60
- min-width: 47px;
61
- text-align: center;
62
- }
63
- .rtl div.cpac-color span {
64
- float: right;
65
- margin-left: 12px;
66
- margin-right: 0;
67
- }
68
- /* =Available Sizes column
69
- -------------------------------------------------------------- */
70
- div.sizes span.not-available {
71
- color: #999;
72
- }
73
- /* =Actions column
74
- -------------------------------------------------------------- */
75
- .button.cpac-button-action {
76
- position: relative;
77
- text-indent: 9999px;
78
- margin-right: 4px;
79
- padding: 0 13px;
80
- }
81
- .button.cpac-button-action:before {
82
- position: absolute;
83
- top: 0;
84
- left: 0;
85
- width: 100%;
86
- height: 100%;
87
- text-indent: 0;
88
- }
89
- /* =qTip2
90
- -------------------------------------------------------------- */
91
- .cpac-tip {
92
- display: inline-block;
93
- }
94
- .qtip.qtip-tipsy {
95
- background: rgba(0, 0, 0, 0.75);
96
- font-weight: normal;
97
- min-width: 25px;
98
- }
1
+ .cpac-divider{display:inline-block;width:14px;height:12px;background:transparent url(../images/square.png) no-repeat 50% 7px}span.status-closed{color:#f00}.tablenav.top .cpac-edit{top:0;display:inline-block;vertical-align:bottom}.cpac-rounded{display:inline-block;border-radius:10px;min-width:8px;padding:0 6px;height:20px;background-color:#e0e0e0;text-align:center;margin-left:8px;font-size:12px}.cpac-column-value-image{display:inline-block;background:transparent;margin-right:2px;overflow:hidden}.rtl .cpac-column-value-image{margin-left:2px;margin-right:0}.cpac-column-value-image img{display:block;margin:0 auto}.column-column-attachment img{padding-right:5px;padding-bottom:4px}.rtl .column-column-attachment img{padding-left:5px;padding-right:0}div.cpac-color{line-height:26px}div.cpac-color span{display:block;-webkit-border-radius:3px;border-radius:3px;color:#fff;float:left;height:16px;line-height:16px;margin-right:12px;min-width:30px;overflow:hidden;padding:4px 5px;font-size:10px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;min-width:47px;text-align:center}.rtl div.cpac-color span{float:right;margin-left:12px;margin-right:0}div.sizes span.not-available{color:#999}.button.cpac-button-action{position:relative;text-indent:9999px;margin-right:4px;padding:0 13px}.button.cpac-button-action:before{position:absolute;top:0;left:0;width:100%;height:100%;text-indent:0}.cpac-tip{display:inline-block}.qtip.qtip-tipsy{background:rgba(0,0,0,0.75);font-weight:normal;min-width:25px}
assets/js/admin-settings.js CHANGED
@@ -19,7 +19,6 @@ jQuery(document).ready(function() {
19
cpac_menu();
20
cpac_help();
21
cpac_add_column();
22
- cpac_addons();
23
cpac_importexport();
24
cpac_sidebar_feedback();
25
//cpac_sidebar_scroll();
@@ -38,16 +37,6 @@ function cpac_importexport() {
38
} ).select().focus();
39
}
40
41
- /**
42
- * Handle addons settings screen
43
- *
44
- * @since 2.2
45
- */
46
- function cpac_addons() {
47
-
48
-
49
- }
50
-
51
/*
52
* Submit Form
53
*
19
cpac_menu();
20
cpac_help();
21
cpac_add_column();
22
cpac_importexport();
23
cpac_sidebar_feedback();
24
//cpac_sidebar_scroll();
37
} ).select().focus();
38
}
39
40
/*
41
* Submit Form
42
*
assets/less/admin-column.less CHANGED
@@ -503,7 +503,7 @@ h2.cpac-nav-tab-wrapper {
503
504
input[type="text"] {
505
margin-right: 3px;
506
- width: 30px !important;
507
}
508
}
509
}
@@ -823,7 +823,7 @@ h2.cpac-nav-tab-wrapper {
823
824
a {
825
display: inline-block;
826
- height: 24px;
827
font-size: 19px;
828
line-height: 24px;
829
margin-bottom: 1px;
503
504
input[type="text"] {
505
margin-right: 3px;
506
+ width: 40px !important;
507
}
508
}
509
}
823
824
a {
825
display: inline-block;
826
+ min-height: 24px;
827
font-size: 19px;
828
line-height: 24px;
829
margin-bottom: 1px;
assets/less/column.less CHANGED
@@ -16,6 +16,19 @@ span.status-closed {
16
vertical-align: bottom;
17
}
18
19
/* =Images Column
20
-------------------------------------------------------------- */
21
.cpac-column-value-image {
@@ -77,8 +90,6 @@ div.sizes span.not-available {
77
78
/* =Actions column
79
-------------------------------------------------------------- */
80
-
81
-
82
.button.cpac-button-action {
83
position: relative;
84
text-indent: 9999px;
16
vertical-align: bottom;
17
}
18
19
+ /* =General Column
20
+ -------------------------------------------------------------- */
21
+ .cpac-rounded {
22
+ display: inline-block;
23
+ border-radius: 10px;
24
+ min-width: 8px;
25
+ padding: 0 6px;
26
+ height: 20px;
27
+ background-color: #e0e0e0;
28
+ text-align: center;
29
+ margin-left: 8px;
30
+ font-size: 12px;
31
+ }
32
/* =Images Column
33
-------------------------------------------------------------- */
34
.cpac-column-value-image {
90
91
/* =Actions column
92
-------------------------------------------------------------- */
93
.button.cpac-button-action {
94
position: relative;
95
text-indent: 9999px;
classes/column.php CHANGED
@@ -248,6 +248,45 @@ class CPAC_Column {
248
return $this;
249
}
250
251
/**
252
* @param string $field_key
253
* @return void
@@ -325,7 +364,7 @@ class CPAC_Column {
325
/**
326
* @since 2.0
327
*/
328
- function get_label() {
329
330
/**
331
* Filter the column instance label
@@ -440,7 +479,7 @@ class CPAC_Column {
440
* @param string $url
441
* @return bool
442
*/
443
- protected function is_image( $url ) {
444
445
if ( ! is_string( $url ) ) {
446
return false;
@@ -473,20 +512,12 @@ class CPAC_Column {
473
return $image_sizes;
474
}
475
476
- /**
477
- * Get post type
478
- *
479
- * @since 2.1.1
480
- */
481
- function get_post_type() {
482
- return isset( $this->storage_model->post_type ) ? $this->storage_model->post_type : false;
483
- }
484
-
485
/**
486
* @since 2.2.6
487
*/
488
public function get_terms_for_display( $term_ids, $taxonomy ) {
489
$values = array();
490
if ( $term_ids && ! is_wp_error( $term_ids ) ) {
491
$post_type = $this->get_post_type();
492
foreach ( $term_ids as $term_id ) {
@@ -567,7 +598,7 @@ class CPAC_Column {
567
* @since: 2.2.6
568
*
569
*/
570
- function get_color_for_display( $color_hex ) {
571
if ( ! $color_hex ) {
572
return false;
573
}
@@ -580,7 +611,7 @@ class CPAC_Column {
580
*
581
* @since 1.0
582
*/
583
- function get_text_color( $bg_color ) {
584
585
$rgb = $this->hex2rgb( $bg_color );
586
@@ -592,7 +623,7 @@ class CPAC_Column {
592
*
593
* @since 1.0
594
*/
595
- function hex2rgb( $hex ) {
596
$hex = str_replace( "#", "", $hex );
597
598
if(strlen($hex) == 3) {
@@ -616,10 +647,9 @@ class CPAC_Column {
616
* @return array HTML img elements
617
*/
618
public function get_thumbnails( $images, $args = array() ) {
619
- $thumbnails = array();
620
621
if ( empty( $images ) || 'false' == $images ) {
622
- return $thumbnails;
623
}
624
625
// turn string to array
@@ -642,8 +672,10 @@ class CPAC_Column {
642
643
extract( $args );
644
645
foreach( $images as $value ) {
646
- if ( $this->is_image( $value ) ) {
647
648
// get dimensions from image_size
649
if ( $sizes = $this->get_image_size_by_name( $image_size ) ) {
@@ -670,6 +702,10 @@ class CPAC_Column {
670
// Media Attachment
671
elseif ( is_numeric( $value ) && wp_get_attachment_url( $value ) ) {
672
673
if ( ! $image_size || 'cpac-custom' == $image_size ) {
674
$width = $image_size_w;
675
$height = $image_size_h;
@@ -678,22 +714,33 @@ class CPAC_Column {
678
$image_size = array( $width, $height );
679
}
680
681
- // image attributes
682
- $attributes = wp_get_attachment_image_src( $value, $image_size );
683
- $src = $attributes[0];
684
- $width = $attributes[1];
685
- $height = $attributes[2];
686
687
- // image size by name
688
- if ( $sizes = $this->get_image_size_by_name( $image_size ) ) {
689
- $width = $sizes['width'];
690
- $height = $sizes['height'];
691
}
692
693
// maximum dimensions
694
$max = max( array( $width, $height ) );
695
696
- $thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px;'><img style='max-width:{$max}px;max-height:{$max}px;' src='{$attributes[0]}' alt=''/></span>";
697
}
698
}
699
@@ -792,23 +839,41 @@ class CPAC_Column {
792
}
793
794
/**
795
- * Get before value
796
*
797
- * @since 1.0
798
*/
799
- public function get_before() {
800
801
- return stripslashes( $this->options->before );
802
- }
803
804
- /**
805
- * Get after value
806
- *
807
- * @since 1.0
808
- */
809
- public function get_after() {
810
811
- return stripslashes( $this->options->after );
812
}
813
814
/**
@@ -816,7 +881,7 @@ class CPAC_Column {
816
* @param string $field_key
817
* @return string Attribute Name
818
*/
819
- function label_view( $label, $description = '', $pointer = '' ) {
820
?>
821
<td class="label">
822
<label for="<?php $this->attr_id( $pointer ); ?>">
@@ -831,7 +896,7 @@ class CPAC_Column {
831
/**
832
* @since 2.0
833
*/
834
- function display_field_date_format() {
835
836
$field_key = 'date_format';
837
$label = __( 'Date Format', 'cpac' );
@@ -855,7 +920,7 @@ class CPAC_Column {
855
/**
856
* @since 2.0
857
*/
858
- function display_field_excerpt_length() {
859
860
$field_key = 'excerpt_length';
861
$label = __( 'Excerpt length', 'cpac' );
@@ -874,7 +939,7 @@ class CPAC_Column {
874
/**
875
* @since 2.0
876
*/
877
- function display_field_preview_size() {
878
879
$field_key = 'image_size';
880
$label = __( 'Preview size', 'cpac' );
@@ -911,7 +976,7 @@ class CPAC_Column {
911
/**
912
* @since 2.1.1
913
*/
914
- function display_field_before_after() {
915
?>
916
<tr class="column_before">
917
<?php $this->label_view( __( "Before", 'cpac' ), __( 'This text will appear before the custom field value.', 'cpac' ), 'before' ); ?>
@@ -928,6 +993,36 @@ class CPAC_Column {
928
<?php
929
}
930
931
/**
932
* @since 2.0
933
* @param array Column Objects
248
return $this;
249
}
250
251
+ /**
252
+ * @since 1.0
253
+ */
254
+ public function get_before() {
255
+ return stripslashes( $this->options->before );
256
+ }
257
+
258
+ /**
259
+ * @since 1.0
260
+ */
261
+ public function get_after() {
262
+ return stripslashes( $this->options->after );
263
+ }
264
+
265
+ /**
266
+ * @since 3.2.1
267
+ */
268
+ public function get_type() {
269
+ return $this->properties->type;
270
+ }
271
+
272
+ /**
273
+ * Checks column type
274
+ *
275
+ * @since 3.2.1
276
+ * @param string $type Column type. Also work without the 'column-' prefix. Example 'column-meta' or 'meta'.
277
+ * @return bool Matches column type
278
+ */
279
+ public function is_type( $type ) {
280
+ return ( $type === $this->get_type() ) || ( 'column-' . $type === $this->get_type() );
281
+ }
282
+
283
+ /**
284
+ * @since 2.1.1
285
+ */
286
+ public function get_post_type() {
287
+ return $this->storage_model->get_post_type();
288
+ }
289
+
290
/**
291
* @param string $field_key
292
* @return void
364
/**
365
* @since 2.0
366
*/
367
+ public function get_label() {
368
369
/**
370
* Filter the column instance label
479
* @param string $url
480
* @return bool
481
*/
482
+ protected function is_image_url( $url ) {
483
484
if ( ! is_string( $url ) ) {
485
return false;
512
return $image_sizes;
513
}
514
515
/**
516
* @since 2.2.6
517
*/
518
public function get_terms_for_display( $term_ids, $taxonomy ) {
519
$values = array();
520
+ $term_ids = (array) $term_ids;
521
if ( $term_ids && ! is_wp_error( $term_ids ) ) {
522
$post_type = $this->get_post_type();
523
foreach ( $term_ids as $term_id ) {
598
* @since: 2.2.6
599
*
600
*/
601
+ public function get_color_for_display( $color_hex ) {
602
if ( ! $color_hex ) {
603
return false;
604
}
611
*
612
* @since 1.0
613
*/
614
+ public function get_text_color( $bg_color ) {
615
616
$rgb = $this->hex2rgb( $bg_color );
617
623
*
624
* @since 1.0
625
*/
626
+ public function hex2rgb( $hex ) {
627
$hex = str_replace( "#", "", $hex );
628
629
if(strlen($hex) == 3) {
647
* @return array HTML img elements
648
*/
649
public function get_thumbnails( $images, $args = array() ) {
650
651
if ( empty( $images ) || 'false' == $images ) {
652
+ return array();
653
}
654
655
// turn string to array
672
673
extract( $args );
674
675
+ $thumbnails = array();
676
foreach( $images as $value ) {
677
+
678
+ if ( $this->is_image_url( $value ) ) {
679
680
// get dimensions from image_size
681
if ( $sizes = $this->get_image_size_by_name( $image_size ) ) {
702
// Media Attachment
703
elseif ( is_numeric( $value ) && wp_get_attachment_url( $value ) ) {
704
705
+ $src = '';
706
+ $width = '';
707
+ $height = '';
708
+
709
if ( ! $image_size || 'cpac-custom' == $image_size ) {
710
$width = $image_size_w;
711
$height = $image_size_h;
714
$image_size = array( $width, $height );
715
}
716
717
+ // Is Image
718
+ if ( $attributes = wp_get_attachment_image_src( $value, $image_size ) ) {
719
+ $src = $attributes[0];
720
+ $width = $attributes[1];
721
+ $height = $attributes[2];
722
723
+ // image size by name
724
+ if ( $sizes = $this->get_image_size_by_name( $image_size ) ) {
725
+ $width = $sizes['width'];
726
+ $height = $sizes['height'];
727
+ }
728
+ }
729
+
730
+ // Is File, use icon
731
+ elseif ( $attributes = wp_get_attachment_image_src( $value, $image_size, true ) ) {
732
+ $src = $attributes[0];
733
+
734
+ if ( $sizes = $this->get_image_size_by_name( $image_size ) ) {
735
+ $width = $sizes['width'];
736
+ $height = $sizes['height'];
737
+ }
738
}
739
740
// maximum dimensions
741
$max = max( array( $width, $height ) );
742
743
+ $thumbnails[] = "<span class='cpac-column-value-image' style='width:{$width}px;height:{$height}px;'><img style='max-width:{$max}px;max-height:{$max}px;' src='{$src}' alt=''/></span>";
744
}
745
}
746
839
}
840
841
/**
842
+ * Get display name.
843
*
844
+ * Can also be used by addons.
845
+ *
846
+ * @since 2.0
847
*/
848
+ public function get_display_name( $user_id ) {
849
850
+ if ( ! $userdata = get_userdata( $user_id ) ) {
851
+ return false;
852
+ }
853
854
+ $name = '';
855
856
+ if ( ! empty( $this->options->display_author_as ) ) {
857
+
858
+ $display_as = $this->options->display_author_as;
859
+
860
+ if ( 'first_last_name' == $display_as ) {
861
+ $first = ! empty( $userdata->first_name ) ? $userdata->first_name : '';
862
+ $last = ! empty( $userdata->last_name ) ? " {$userdata->last_name}" : '';
863
+ $name = $first.$last;
864
+ }
865
+
866
+ elseif ( ! empty( $userdata->{$display_as} ) ) {
867
+ $name = $userdata->{$display_as};
868
+ }
869
+ }
870
+
871
+ // default to display_name
872
+ if ( ! $name ) {
873
+ $name = $userdata->display_name;
874
+ }
875
+
876
+ return $name;
877
}
878
879
/**
881
* @param string $field_key
882
* @return string Attribute Name
883
*/
884
+ public function label_view( $label, $description = '', $pointer = '' ) {
885
?>
886
<td class="label">
887
<label for="<?php $this->attr_id( $pointer ); ?>">
896
/**
897
* @since 2.0
898
*/
899
+ public function display_field_date_format() {
900
901
$field_key = 'date_format';
902
$label = __( 'Date Format', 'cpac' );
920
/**
921
* @since 2.0
922
*/
923
+ public function display_field_excerpt_length() {
924
925
$field_key = 'excerpt_length';
926
$label = __( 'Excerpt length', 'cpac' );
939
/**
940
* @since 2.0
941
*/
942
+ public function display_field_preview_size() {
943
944
$field_key = 'image_size';
945
$label = __( 'Preview size', 'cpac' );
976
/**
977
* @since 2.1.1
978
*/
979
+ public function display_field_before_after() {
980
?>
981
<tr class="column_before">
982
<?php $this->label_view( __( "Before", 'cpac' ), __( 'This text will appear before the custom field value.', 'cpac' ), 'before' ); ?>
993
<?php
994
}
995
996
+ /**
997
+ * @since 2.3.2
998
+ */
999
+ public function display_field_user_format() {
1000
+
1001
+ $nametypes = array(
1002
+ 'display_name' => __( 'Display Name', 'cpac' ),
1003
+ 'first_name' => __( 'First Name', 'cpac' ),
1004
+ 'last_name' => __( 'Last Name', 'cpac' ),
1005
+ 'nickname' => __( 'Nickname', 'cpac' ),
1006
+ 'user_login' => __( 'User Login', 'cpac' ),
1007
+ 'user_email' => __( 'User Email', 'cpac' ),
1008
+ 'ID' => __( 'User ID', 'cpac' ),
1009
+ 'first_last_name' => __( 'First and Last Name', 'cpac' ),
1010
+ );
1011
+
1012
+ ?>
1013
+ <tr class="column-author-name">
1014
+ <?php $this->label_view( __( 'Display format', 'cpac' ), __( 'This is the format of the author name.', 'cpac' ), 'display_author_as' ); ?>
1015
+ <td class="input">
1016
+ <select name="<?php $this->attr_name( 'display_author_as' ); ?>" id="<?php $this->attr_id( 'display_author_as' ); ?>">
1017
+ <?php foreach ( $nametypes as $key => $label ) : ?>
1018
+ <option value="<?php echo $key; ?>"<?php selected( $key, $this->options->display_author_as ) ?>><?php echo $label; ?></option>
1019
+ <?php endforeach; ?>
1020
+ </select>
1021
+ </td>
1022
+ </tr>
1023
+ <?php
1024
+ }
1025
+
1026
/**
1027
* @since 2.0
1028
* @param array Column Objects
classes/column/actions.php CHANGED
@@ -58,7 +58,7 @@ abstract class CPAC_Column_Actions extends CPAC_Column {
58
*
59
* @since 2.2.9
60
*
61
- * @param array List of actions ([action name] => [action link]).
62
* @param CPAC_Column_Actions $column_instance Column object.
63
*/
64
return apply_filters( 'cac/column/actions/action_links', $this->get_actions( $post_id ), $this );
58
*
59
* @since 2.2.9
60
*
61
+ * @param array $actions List of actions ([action name] => [action link]).
62
* @param CPAC_Column_Actions $column_instance Column object.
63
*/
64
return apply_filters( 'cac/column/actions/action_links', $this->get_actions( $post_id ), $this );
classes/column/custom-field.php CHANGED
@@ -40,6 +40,34 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
40
$this->options['date_save_format'] = '';
41
}
42
43
/**
44
* @see CPAC_Column::sanitize_options()
45
* @since 1.0
@@ -75,6 +103,7 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
75
'numeric' => __( 'Numeric', 'cpac' ),
76
'title_by_id' => __( 'Post Title (Post ID\'s)', 'cpac' ),
77
'user_by_id' => __( 'Username (User ID\'s)', 'cpac' ),
78
);
79
80
// deprecated. do not use, will be removed.
@@ -175,6 +204,21 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
175
return implode( '<span class="cpac-divider"></span>', $names );
176
}
177
178
/**
179
* Get meta value
180
*
@@ -213,6 +257,10 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
213
$meta = $this->get_users_by_id( $meta );
214
break;
215
216
case "checkmark" :
217
$checkmark = $this->get_asset_image( 'checkmark.png' );
218
@@ -230,8 +278,9 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
230
break;
231
232
case "count" :
233
- if ( $count = $this->get_raw_value( $id, false ) )
234
$meta = count( $count );
235
break;
236
237
endswitch;
@@ -269,8 +318,9 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
269
$meta = $this->recursive_implode( ', ', $meta );
270
}
271
272
- if ( ! is_string( $meta ) )
273
return false;
274
275
return $meta;
276
}
40
$this->options['date_save_format'] = '';
41
}
42
43
+ /**
44
+ * @since 3.2.1
45
+ */
46
+ public function is_field_type( $type ) {
47
+ return $type === $this->get_field_type();
48
+ }
49
+
50
+ /**
51
+ * @since 3.2.1
52
+ */
53
+ public function is_field( $field ) {
54
+ return $type === $this->get_field();
55
+ }
56
+
57
+ /**
58
+ * @since 3.2.1
59
+ */
60
+ public function get_field_type() {
61
+ return $this->options->field_type;
62
+ }
63
+
64
+ /**
65
+ * @since 3.2.1
66
+ */
67
+ public function get_field() {
68
+ return $this->options->field;
69
+ }
70
+
71
/**
72
* @see CPAC_Column::sanitize_options()
73
* @since 1.0
103
'numeric' => __( 'Numeric', 'cpac' ),
104
'title_by_id' => __( 'Post Title (Post ID\'s)', 'cpac' ),
105
'user_by_id' => __( 'Username (User ID\'s)', 'cpac' ),
106
+ 'term_by_id' => __( 'Term Name (Term ID\'s)', 'cpac' ),
107
);
108
109
// deprecated. do not use, will be removed.
204
return implode( '<span class="cpac-divider"></span>', $names );
205
}
206
207
+ /**
208
+ * Get Terms by ID - Value method
209
+ *
210
+ * @since 2.3.2
211
+ *
212
+ * @param array $meta_value Term ID's
213
+ * @return string Terms
214
+ */
215
+ public function get_terms_by_id( $meta_value ) {
216
+ if ( ! is_array( $meta_value) || ! isset( $meta_value['term_id'] ) || ! isset( $meta_value['taxonomy'] ) ) {
217
+ return false;
218
+ }
219
+ return $this->get_terms_for_display( $meta_value['term_id'], $meta_value['taxonomy'] );
220
+ }
221
+
222
/**
223
* Get meta value
224
*
257
$meta = $this->get_users_by_id( $meta );
258
break;
259
260
+ case "term_by_id" :
261
+ $meta = $this->get_terms_by_id( $this->get_raw_value( $id ) );
262
+ break;
263
+
264
case "checkmark" :
265
$checkmark = $this->get_asset_image( 'checkmark.png' );
266
278
break;
279
280
case "count" :
281
+ if ( $count = $this->get_raw_value( $id, false ) ) {
282
$meta = count( $count );
283
+ }
284
break;
285
286
endswitch;
318
$meta = $this->recursive_implode( ', ', $meta );
319
}
320
321
+ if ( ! is_string( $meta ) ) {
322
return false;
323
+ }
324
325
return $meta;
326
}
classes/column/post/author-name.php CHANGED
@@ -25,78 +25,16 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
25
$this->options['display_author_as'] = '';
26
}
27
28
- /**
29
- * Get author field by nametype
30
- *
31
- * Used by posts and sortable
32
- *
33
- * @since 2.0
34
- *
35
- * @return array Authortypes
36
- */
37
- private function get_nametypes() {
38
-
39
- $nametypes = array(
40
- 'display_name' => __( 'Display Name', 'cpac' ),
41
- 'first_name' => __( 'First Name', 'cpac' ),
42
- 'last_name' => __( 'Last Name', 'cpac' ),
43
- 'nickname' => __( 'Nickname', 'cpac' ),
44
- 'user_login' => __( 'User Login', 'cpac' ),
45
- 'user_email' => __( 'User Email', 'cpac' ),
46
- 'ID' => __( 'User ID', 'cpac' ),
47
- 'first_last_name' => __( 'First and Last Name', 'cpac' ),
48
- );
49
-
50
- return $nametypes;
51
- }
52
-
53
- /**
54
- * Get display name.
55
- *
56
- * Can also be used by addons.
57
- *
58
- * @since 2.0
59
- */
60
- public function get_display_name( $user_id ) {
61
-
62
- if ( ! $userdata = get_userdata( $user_id ) )
63
- return false;
64
-
65
- $name = '';
66
-
67
- $display_as = $this->options->display_author_as;
68
-
69
- if ( 'first_last_name' == $display_as ) {
70
- $first = ! empty( $userdata->first_name ) ? $userdata->first_name : '';
71
- $last = ! empty( $userdata->last_name ) ? " {$userdata->last_name}" : '';
72
- $name = $first.$last;
73
- }
74
-
75
- elseif ( ! empty( $userdata->{$display_as} ) ) {
76
- $name = $userdata->{$display_as};
77
- }
78
-
79
- // default to display_name
80
- if ( ! $name ) {
81
- $name = $userdata->display_name;
82
- }
83
-
84
- return $name;
85
- }
86
-
87
/**
88
* @see CPAC_Column::get_value()
89
* @since 2.0
90
*/
91
- function get_value( $post_id ) {
92
93
$value = '';
94
95
- $nametypes = $this->get_nametypes();
96
- if ( isset( $nametypes[ $this->options->display_author_as ] ) ) {
97
- if( $author = $this->get_raw_value( $post_id ) ) {
98
- $value = $this->get_display_name( $author );
99
- }
100
}
101
102
return $value;
@@ -106,7 +44,7 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
106
* @see CPAC_Column::get_raw_value()
107
* @since 2.0.3
108
*/
109
- function get_raw_value( $post_id ) {
110
111
return get_post_field( 'post_author', $post_id );
112
}
@@ -117,19 +55,8 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
117
* @see CPAC_Column::display_settings()
118
* @since 2.0
119
*/
120
- function display_settings() {
121
- ?>
122
123
- <tr class="column-author-name">
124
- <?php $this->label_view( $this->properties->label, __( 'This is the format of the author name.', 'cpac' ), 'display_author_as' ); ?>
125
- <td class="input">
126
- <select name="<?php $this->attr_name( 'display_author_as' ); ?>" id="<?php $this->attr_id( 'display_author_as' ); ?>">
127
- <?php foreach ( $this->get_nametypes() as $key => $label ) : ?>
128
- <option value="<?php echo $key; ?>"<?php selected( $key, $this->options->display_author_as ) ?>><?php echo $label; ?></option>
129
- <?php endforeach; ?>
130
- </select>
131
- </td>
132
- </tr>
133
- <?php
134
}
135
}
25
$this->options['display_author_as'] = '';
26
}
27
28
/**
29
* @see CPAC_Column::get_value()
30
* @since 2.0
31
*/
32
+ public function get_value( $post_id ) {
33
34
$value = '';
35
36
+ if ( $user_id = $this->get_raw_value( $post_id ) ) {
37
+ $value = $this->get_display_name( $user_id );
38
}
39
40
return $value;
44
* @see CPAC_Column::get_raw_value()
45
* @since 2.0.3
46
*/
47
+ public function get_raw_value( $post_id ) {
48
49
return get_post_field( 'post_author', $post_id );
50
}
55
* @see CPAC_Column::display_settings()
56
* @since 2.0
57
*/
58
+ public function display_settings() {
59
60
+ $this->display_field_user_format();
61
}
62
}
classes/column/post/last-modified-author.php ADDED
@@ -0,0 +1,60 @@
1
+ <?php
2
+ /**
3
+ * Column displaying information about the author of a post, such as the
4
+ * author's display name, user ID and email address.
5
+ *
6
+ * @since 2.0
7
+ */
8
+ class CPAC_Column_Post_Last_Modified_Author extends CPAC_Column {
9
+
10
+ /**
11
+ * @see CPAC_Column::init()
12
+ * @since 2.2.1
13
+ */
14
+ public function init() {
15
+
16
+ parent::init();
17
+
18
+ // Properties
19
+ $this->properties['type'] = 'column-last_modified_author';
20
+ $this->properties['label'] = __( 'Last Modified Author', 'cpac' );
21
+ $this->properties['is_cloneable'] = true;
22
+
23
+ // Options
24
+ $this->options['display_author_as'] = '';
25
+ }
26
+
27
+ /**
28
+ * @see CPAC_Column::get_value()
29
+ * @since 2.0
30
+ */
31
+ public function get_value( $post_id ) {
32
+
33
+ $value = '';
34
+
35
+ if ( $user_id = $this->get_raw_value( $post_id ) ) {
36
+ $value = $this->get_display_name( $user_id );
37
+ }
38
+
39
+ return $value;
40
+ }
41
+
42
+ /**
43
+ * @see CPAC_Column::get_raw_value()
44
+ * @since 2.0.3
45
+ */
46
+ public function get_raw_value( $post_id ) {
47
+ return get_post_meta( $post_id, '_edit_last', true );
48
+ }
49
+
50
+ /**
51
+ * Display Settings
52
+ *
53
+ * @see CPAC_Column::display_settings()
54
+ * @since 2.0
55
+ */
56
+ public function display_settings() {
57
+
58
+ $this->display_field_user_format();
59
+ }
60
+ }
classes/settings.php CHANGED
@@ -477,7 +477,7 @@ class CPAC_Settings {
477
/**
478
* @since 2.2
479
*/
480
- function display_menu_by_type( $menu_type = '', $label = '', $active_item = '' ) {
481
482
$storage_models_by_type = array();
483
@@ -643,7 +643,7 @@ class CPAC_Settings {
643
644
<?php if ( $storage_model->stored_columns !== NULL ) : ?>
645
<div class="error below-h2">
646
- <p><?php printf( __( 'The columns for <strong>%s</strong> are set up via PHP and can therefore not be edited in the admin panel.', 'cpac' ), $storage_model->label ); ?></p>
647
</div>
648
<?php endif; ?>
649
</div>
477
/**
478
* @since 2.2
479
*/
480
+ public function display_menu_by_type( $menu_type = '', $label = '', $active_item = '' ) {
481
482
$storage_models_by_type = array();
483
643
644
<?php if ( $storage_model->stored_columns !== NULL ) : ?>
645
<div class="error below-h2">
646
+ <p><?php printf( __( 'The columns for %s are set up via PHP and can therefore not be edited in the admin panel.', 'cpac' ), '<strong>' . $storage_model->label . '</strong>' ); ?></p>
647
</div>
648
<?php endif; ?>
649
</div>
classes/storage_model.php CHANGED
@@ -206,7 +206,7 @@ abstract class CPAC_Storage_Model {
206
/**
207
* @since 2.0
208
*/
209
- function restore() {
210
211
delete_option( "cpac_options_{$this->key}" );
212
@@ -219,7 +219,7 @@ abstract class CPAC_Storage_Model {
219
/**
220
* @since 2.0
221
*/
222
- function store( $columns = '' ) {
223
224
if ( ! empty( $_POST[ $this->key ] ) ) {
225
$columns = array_filter( $_POST[ $this->key ] );
@@ -406,7 +406,7 @@ abstract class CPAC_Storage_Model {
406
* @since 2.0
407
* @return array Column Type | Column Instance
408
*/
409
- function get_custom_registered_columns() {
410
411
$columns = array();
412
@@ -477,6 +477,13 @@ abstract class CPAC_Storage_Model {
477
$this->stored_columns = $columns;
478
}
479
480
/**
481
* Only set columns on current screens
482
*
@@ -555,7 +562,7 @@ abstract class CPAC_Storage_Model {
555
/**
556
* @since 2.0.2
557
*/
558
- function get_registered_columns() {
559
560
$types = array();
561
@@ -656,7 +663,7 @@ abstract class CPAC_Storage_Model {
656
/**
657
* @since 2.0
658
*/
659
- function get_column_by_name( $name ) {
660
661
if ( ! isset( $this->columns[ $name ] ) ) {
662
return false;
@@ -741,7 +748,7 @@ abstract class CPAC_Storage_Model {
741
/**
742
* @since 2.0
743
*/
744
- function screen_link() {
745
746
echo '<a href="' . $this->get_screen_link() . '" class="add-new-h2">' . __('View', 'cpac') . '</a>';
747
}
@@ -749,7 +756,7 @@ abstract class CPAC_Storage_Model {
749
/**
750
* @since 2.0
751
*/
752
- function get_edit_link() {
753
754
return add_query_arg( array( 'page' => 'codepress-admin-columns', 'cpac_key' => $this->key ), admin_url( 'options-general.php' ) );
755
}
@@ -761,7 +768,7 @@ abstract class CPAC_Storage_Model {
761
* @since 2.0.5
762
* @return boolean
763
*/
764
- function is_doing_ajax() {
765
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
766