Admin Columns - Version 2.4.7

Version Description

  • [Added] Comment Post column added
  • [Update] User Actions columns extends CPAC_Actions object
  • [Update] PHP export columns no longer uses global
  • [Added] Added "Link To" selection field for the author column
  • [Fixed] Date and Title column are labeled as Default column for posts
  • [Fixed] WPML columns will display the correct flag on the overview when switching language
Download this release

Release Info

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

Code changes from version 2.4.6 to 2.4.7

Files changed (153) hide show
  1. api.php +4 -4
  2. assets/css/admin-column.css +19 -1
  3. assets/css/admin-column.min.css +1 -1
  4. assets/css/column.min.css +1 -1
  5. assets/js/admin-settings.js +20 -6
  6. assets/js/admin-settings.min.js +1 -1
  7. classes/addons.php +6 -6
  8. classes/column.php +166 -53
  9. classes/column/acf-placeholder.php +5 -31
  10. classes/column/actions.php +2 -2
  11. classes/column/comment/ID.php +1 -1
  12. classes/column/comment/agent.php +1 -1
  13. classes/column/comment/approved.php +1 -1
  14. classes/column/comment/author-avatar.php +1 -1
  15. classes/column/comment/author-email.php +1 -1
  16. classes/column/comment/author-ip.php +1 -1
  17. classes/column/comment/author-name.php +1 -1
  18. classes/column/comment/author-url.php +1 -1
  19. classes/column/comment/author.php +1 -1
  20. classes/column/comment/date-gmt.php +1 -1
  21. classes/column/comment/date.php +1 -1
  22. classes/column/comment/excerpt.php +1 -1
  23. classes/column/comment/post.php +89 -0
  24. classes/column/comment/reply-to.php +1 -1
  25. classes/column/comment/type.php +1 -1
  26. classes/column/comment/user.php +1 -1
  27. classes/column/comment/word-count.php +1 -1
  28. classes/column/custom-field.php +17 -17
  29. classes/column/link/ID.php +1 -1
  30. classes/column/link/actions.php +1 -1
  31. classes/column/link/description.php +1 -1
  32. classes/column/link/image.php +1 -1
  33. classes/column/link/length.php +1 -1
  34. classes/column/link/notes.php +1 -1
  35. classes/column/link/owner.php +1 -1
  36. classes/column/link/rss.php +1 -1
  37. classes/column/link/target.php +1 -1
  38. classes/column/media/ID.php +1 -1
  39. classes/column/media/alternate-text.php +1 -1
  40. classes/column/media/attached-to.php +1 -1
  41. classes/column/media/available-sizes.php +2 -2
  42. classes/column/media/caption.php +1 -1
  43. classes/column/media/description.php +1 -1
  44. classes/column/media/dimensions.php +1 -1
  45. classes/column/media/exif-data.php +11 -11
  46. classes/column/media/file-name.php +1 -1
  47. classes/column/media/file-size.php +1 -1
  48. classes/column/media/full-path.php +6 -6
  49. classes/column/media/height.php +1 -1
  50. classes/column/media/mime-type.php +1 -1
  51. classes/column/media/width.php +1 -1
  52. classes/column/post/ID.php +1 -1
  53. classes/column/post/attachment-count.php +1 -1
  54. classes/column/post/attachment.php +1 -1
  55. classes/column/post/author-name.php +46 -2
  56. classes/column/post/before-moretag.php +1 -1
  57. classes/column/post/comment-count.php +7 -7
  58. classes/column/post/comment-status.php +1 -1
  59. classes/column/post/content.php +1 -1
  60. classes/column/post/depth.php +1 -1
  61. classes/column/post/estimated-reading-time.php +5 -5
  62. classes/column/post/excerpt.php +1 -1
  63. classes/column/post/featured-image.php +1 -1
  64. classes/column/post/formats.php +1 -1
  65. classes/column/post/last-modified-author.php +1 -1
  66. classes/column/post/modified.php +2 -2
  67. classes/column/post/order.php +1 -1
  68. classes/column/post/page-template.php +1 -1
  69. classes/column/post/parent.php +1 -1
  70. classes/column/post/path.php +1 -1
  71. classes/column/post/permalink.php +4 -4
  72. classes/column/post/ping-status.php +1 -1
  73. classes/column/post/roles.php +1 -1
  74. classes/column/post/shortcodes.php +1 -1
  75. classes/column/post/slug.php +1 -1
  76. classes/column/post/status.php +1 -1
  77. classes/column/post/sticky.php +1 -1
  78. classes/column/post/title-raw.php +1 -1
  79. classes/column/post/word-count.php +1 -1
  80. classes/column/taxonomy.php +2 -2
  81. classes/column/used-by-menu.php +2 -2
  82. classes/column/user/ID.php +1 -1
  83. classes/column/user/actions.php +6 -42
  84. classes/column/user/description.php +1 -1
  85. classes/column/user/display-name.php +1 -1
  86. classes/column/user/first-name.php +1 -1
  87. classes/column/user/last-name.php +1 -1
  88. classes/column/user/nickname.php +1 -1
  89. classes/column/user/post-count.php +2 -2
  90. classes/column/user/registered.php +1 -1
  91. classes/column/user/rich-editing.php +1 -1
  92. classes/column/user/url.php +1 -1
  93. classes/column/wc-placeholder.php +25 -0
  94. classes/review_notice.php +13 -13
  95. classes/settings.php +107 -122
  96. classes/storage_model.php +49 -76
  97. classes/storage_model/post.php +22 -6
  98. classes/storage_model/user.php +20 -0
  99. classes/third_party.php +5 -197
  100. classes/third_party/acf.php +22 -0
  101. classes/third_party/all-in-seo.php +13 -0
  102. classes/third_party/bbpress.php +21 -0
  103. classes/third_party/ninja_forms.php +19 -0
  104. classes/third_party/wpml.php +132 -0
  105. classes/third_party/yoast_seo.php +39 -0
  106. classes/upgrade.php +16 -16
  107. classes/utility.php +10 -11
  108. codepress-admin-columns.php +15 -8
  109. languages/codepress-admin-columns-ar.mo +0 -0
  110. languages/{cpac-ar.po → codepress-admin-columns-ar.po} +818 -861
  111. languages/codepress-admin-columns-da_DK.mo +0 -0
  112. languages/{cpac-da_DK.po → codepress-admin-columns-da_DK.po} +806 -850
  113. languages/codepress-admin-columns-es_ES.mo +0 -0
  114. languages/{cpac-es_ES.po → codepress-admin-columns-es_ES.po} +825 -888
  115. languages/codepress-admin-columns-fa_IR.mo +0 -0
  116. languages/{cpac-fa_IR.po → codepress-admin-columns-fa_IR.po} +826 -870
  117. languages/codepress-admin-columns-fr_FR.mo +0 -0
  118. languages/{cpac-fr_FR.po → codepress-admin-columns-fr_FR.po} +802 -865
  119. languages/codepress-admin-columns-hu_HU.mo +0 -0
  120. languages/{cpac-hu_HU.po → codepress-admin-columns-hu_HU.po} +807 -851
  121. languages/codepress-admin-columns-it_IT.mo +0 -0
  122. languages/{cpac-it_IT.po → codepress-admin-columns-it_IT.po} +840 -881
  123. languages/codepress-admin-columns-ja.mo +0 -0
  124. languages/{cpac-ja.po → codepress-admin-columns-ja.po} +811 -855
  125. languages/codepress-admin-columns-nl_NL.mo +0 -0
  126. languages/{cpac-nl_NL.po → codepress-admin-columns-nl_NL.po} +846 -888
  127. languages/codepress-admin-columns-pl_PL.mo +0 -0
  128. languages/{cpac-pl_PL.po → codepress-admin-columns-pl_PL.po} +893 -858
  129. languages/codepress-admin-columns-pt_BR.mo +0 -0
  130. languages/{cpac-pt_BR.po → codepress-admin-columns-pt_BR.po} +846 -890
  131. languages/codepress-admin-columns-ru_RU.mo +0 -0
  132. languages/{cpac-ru_RU.po → codepress-admin-columns-ru_RU.po} +829 -871
  133. languages/codepress-admin-columns-sv_SE.mo +0 -0
  134. languages/{cpac-sv_SE.po → codepress-admin-columns-sv_SE.po} +846 -890
  135. languages/codepress-admin-columns-zh_CN.mo +0 -0
  136. languages/{cpac-zh_CN.po → codepress-admin-columns-zh_CN.po} +806 -849
  137. languages/{cpac.po → codepress-admin-columns.pot} +596 -711
  138. languages/cpac-ar.mo +0 -0
  139. languages/cpac-da_DK.mo +0 -0
  140. languages/cpac-es_ES.mo +0 -0
  141. languages/cpac-fa_IR.mo +0 -0
  142. languages/cpac-fr_FR.mo +0 -0
  143. languages/cpac-hu_HU.mo +0 -0
  144. languages/cpac-it_IT.mo +0 -0
  145. languages/cpac-ja.mo +0 -0
  146. languages/cpac-nl_NL.mo +0 -0
  147. languages/cpac-pl_PL.mo +0 -0
  148. languages/cpac-pt_BR.mo +0 -0
  149. languages/cpac-ru_RU.mo +0 -0
  150. languages/cpac-sv_SE.mo +0 -0
  151. languages/cpac-zh_CN.mo +0 -0
  152. languages/cpac.mo +0 -0
  153. readme.txt +11 -3
api.php CHANGED
@@ -18,16 +18,16 @@
18
* @param array $columns List of columns ([column_name] => [column_options])
19
*/
20
function ac_register_columns( $storage_model, $columns ) {
21
- global $_cac_exported_columns;
22
23
$storage_models = (array) $storage_model;
24
25
foreach ( $storage_models as $storage_model ) {
26
- if ( isset( $_cac_exported_columns[ $storage_model ] ) ) {
27
- $_cac_exported_columns[ $storage_model ] = array_merge( $_cac_exported_columns[ $storage_model ], $columns );
28
}
29
else {
30
- $_cac_exported_columns[ $storage_model ] = $columns;
31
}
32
}
33
}
18
* @param array $columns List of columns ([column_name] => [column_options])
19
*/
20
function ac_register_columns( $storage_model, $columns ) {
21
+ global $cpac;
22
23
$storage_models = (array) $storage_model;
24
25
foreach ( $storage_models as $storage_model ) {
26
+ if ( isset( $cpac->exported_columns[ $storage_model ] ) ) {
27
+ $cpac->exported_columns[ $storage_model ] = array_merge( $cpac->exported_columns[ $storage_model ], $columns );
28
}
29
else {
30
+ $cpac->exported_columns[ $storage_model ] = $columns;
31
}
32
}
33
}
assets/css/admin-column.css CHANGED
@@ -325,6 +325,9 @@ h2.cpac-nav-tab-wrapper {
325
border: none;
326
background: #fcfcfc;
327
}
328
.cpac-column .column-form table tr td {
329
vertical-align: top;
330
border: none;
@@ -625,7 +628,7 @@ h2.cpac-nav-tab-wrapper {
625
-moz-border-right-colors: none;
626
-moz-border-top-colors: none;
627
background: none repeat scroll 0 0 transparent;
628
- border-color: #dfdfdf -moz-use-text-color -moz-use-text-color;
629
border-image: none;
630
border-right: 0 none;
631
border-style: solid none none;
@@ -788,6 +791,10 @@ h2.cpac-nav-tab-wrapper {
788
color: #fff;
789
text-decoration: none;
790
}
791
.columns-right .sidebox#pro-version .inside p {
792
color: #fff;
793
font-size: 12px;
@@ -800,6 +807,17 @@ h2.cpac-nav-tab-wrapper {
800
font-size: 15px;
801
text-decoration: none;
802
}
803
.columns-right .sidebox#direct-feedback #feedback-support,
804
.columns-right .sidebox#direct-feedback #feedback-rate {
805
display: none;
325
border: none;
326
background: #fcfcfc;
327
}
328
+ .cpac-column .column-form table tr.hide {
329
+ display: none;
330
+ }
331
.cpac-column .column-form table tr td {
332
vertical-align: top;
333
border: none;
628
-moz-border-right-colors: none;
629
-moz-border-top-colors: none;
630
background: none repeat scroll 0 0 transparent;
631
+ border-color: #DFDFDF -moz-use-text-color -moz-use-text-color;
632
border-image: none;
633
border-right: 0 none;
634
border-style: solid none none;
791
color: #fff;
792
text-decoration: none;
793
}
794
+ .columns-right .sidebox#pro-version .inside ul li.acf a {
795
+ background-color: #5ee8bf;
796
+ color: #808080;
797
+ }
798
.columns-right .sidebox#pro-version .inside p {
799
color: #fff;
800
font-size: 12px;
807
font-size: 15px;
808
text-decoration: none;
809
}
810
+ .columns-right .sidebox#add-acf {
811
+ background-color: #5ee8bf;
812
+ }
813
+ .columns-right .sidebox#add-acf h3 {
814
+ padding: 0;
815
+ }
816
+ .columns-right .sidebox#add-acf h3 a {
817
+ color: #fff;
818
+ text-decoration: none;
819
+ font-size: 15px;
820
+ }
821
.columns-right .sidebox#direct-feedback #feedback-support,
822
.columns-right .sidebox#direct-feedback #feedback-rate {
823
display: none;
assets/css/admin-column.min.css CHANGED
@@ -1 +1 @@
1
- .button.loading span,.cpac-column .comment-grey-bubble,.icon-no,.icon-yes{height:16px;width:16px}.button.loading span,.cpac-settings-link,.icon-no,.icon-yes,a.help{display:inline-block}#cpac a:active,#cpac a:focus{outline:0}#icon-codepress-admin-columns{background:url(../images/icon.png)no-repeat}.cpac-settings-link{float:right;margin:12px 14px 5px 0;background:url(../images/settings.png)no-repeat;padding-left:20px;text-decoration:none;line-height:16px}.cpac-settings-link.current{font-weight:700}.rtl .cpac-settings-link{float:left;margin:12px 0 5px 14px;padding-right:20px;padding-left:0}.cpac-menu,h2.cpac-nav-tab-wrapper{margin-bottom:10px}a.help{background:url(../images/help.png)no-repeat;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:url(../images/loading.gif)right 50% no-repeat}.rtl .button.loading span{left:6px;right:auto}.cpac_message.error.warning{border-left:4px solid #ffba00}.icon-yes{background:url(../images/yes.png)no-repeat;position:relative;top:2px}.icon-no{background:url(../images/no.png)no-repeat;position:relative;top:2px}.cpac-column .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:0;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .cpac-column .comment-grey-bubble:before{right:0;left:auto}.cpac-menu{clear:both;overflow:hidden}.cpac-menu .subsubsub{white-space:normal;width:100%;margin:0 14px 0 0}.cpac-menu .subsubsub li.first{font-weight:700;min-width:100px}.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,.4);box-shadow:1px 3px 6px 0 rgba(1,1,1,.4)}.columns-left .cpac-boxes .cpac-columns form,.columns-right .sidebox{box-shadow:0 1px 3px rgba(0,0,0,.1)}.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 grey;background:#eee;width:100%;height:100%}.cpac-placeholder :first-child{border:none}.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:0 0;border-radius:0}.cpac-column .column-meta table tr td{vertical-align:top;height:18px;border:none solid transparent;padding:11px 8px;border-width:1px 0 0}.cpac-column .column-meta table tr td.column_sort{width:10px;background:url(../images/drag.png)8px 8px no-repeat;cursor:move}.cpac-column .column-meta table tr td.column_label{width:70%;font-weight:700;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.clone-button,.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:400;margin-left:5px;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.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:red}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.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.clone-button:hover,.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:400;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 .inner .meta span.width{margin-right:5px;cursor:auto;color:#737373}.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:url(../images/arrow.png)23px 18px no-repeat;cursor:pointer}.cpac-column .column-meta:hover .column_label .inner>a.clone-button,.cpac-column .column-meta:hover .column_label .inner>a.edit-button,.cpac-column .column-meta:hover .column_label .inner>a.remove-button{display:inline-block}.cpac-column .column-meta span.vers{padding-top:2px}.cpac-column .column-meta span.vers .comment-grey-bubble{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 input[type=text],.cpac-column .column-form table tr td select{width:99.95%}.cpac-column .column-form table tr td input[type=text].small,.cpac-column .column-form table tr td select.small{width:100px}.cpac-column .column-form table tr td span.suffix{line-height:40px;color:grey}.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:#f5f5f5;border-right:1px solid #E1E1E1;vertical-align:top;width:34%;border-top:1px solid #F0F0F0}.column-footer,.wp-pointer-content{overflow:hidden}.cpac-column .column-form table tr td.label label{font-weight:700;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:400}.cpac-column .column-form table tr td.label p.description em{display:block;color:#999}.cpac-column .column-form table tr td.label .info{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cpac-column .column-form table tr td.label .info:before{position:absolute;z-index:1;right:10px;top:50%;margin-top:-7px;content:'';display:block;border-radius:32px;border:1px solid #E6E6E6;width:12px;height:12px}.cpac-column .column-form table tr td.label .info:after{position:absolute;z-index:1;right:10px;top:50%;margin-top:-6px;content:'?';display:block;width:14px;height:14px;color:#E6E6E6;font:700 10px Arial;text-align:center;vertical-align:middle;line-height:14px}.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 .input{position:relative}.cpac-column .column-form table tr.column_width .input div.description{font-size:11px;width:54px;position:absolute;left:10px;text-align:middle}.cpac-column .column-form table tr.column_width .input div.description input{background:#efefef;border:none;height:20px;line-height:20px;text-align:right;width:36px;font-size:12px}.cpac-column .column-form table tr.column_width .input div.width-slider{margin-left:60px;margin-right:100px;position:relative;margin-top:4px}.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle{cursor:ew-resize}.cpac-column .column-form table tr.column_width .input div.unit-select{position:absolute;top:8px;right:10px;width:90px;text-align:right}.cpac-column .column-form table tr.column_width .input div.unit-select label{padding-left:5px}.cpac-column .column-form table tr.column_image_size{border:10px solid red}.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 .custom-size-h.hidden,.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 .hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w{margin:0}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type=text],.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w 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:400;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:red}.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:0 0}.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:grey;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}.column-footer .order-message{background:url(../images/order_arrow.png)no-repeat;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;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:#FCF8E3;border:1px solid #FBEED5;border-radius:4px;color:#C09853;margin:20px 0;padding:16px 14px;text-shadow:0 1px 0 rgba(255,255,255,.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,.5)}.cac-notification.updated{border-left-color:#0071aa}.cac-notification.updated .learnmore{float:right}.cac-notification.updated .learnmore:after{content:"\f139";font:400 20px/1 dashicons;float:right}.columns-right{margin-top:54px}.columns-right .sidebox{background:#FFF;border:1px solid #E1E1E1;border-radius:0;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:400;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:url(../images/get_the_addon.png)no-repeat;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:400;margin-top:6px}.columns-right .sidebox#pro-version .inside ul{margin:0 0 10px}.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-rate,.columns-right .sidebox#direct-feedback #feedback-support{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:700;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:700;font-size:12px;padding:0 32px;color:#CCC;display:inline-block;background:0 0;text-decoration:none;cursor:pointer}.columns-right .sidebox#direct-feedback .inside form input[type=submit]:hover,.columns-right .sidebox#direct-feedback .inside ul.share li a: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 0 0 9px;display:block;float:left;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: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:url(../images/switch_bw.png)50% 50% no-repeat}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 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-form table tr td.label a.more-info,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-meta .column_type{text-align:left;padding-left:0;padding-right:auto}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 div.description,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:url(../images/order_arrow-rtl.png)right top no-repeat}body.rtl .columns-left .column-footer .button-container,body.rtl .cpac_export .ms-container .ms-selection{float:left}body.rtl .columns-right{float:left;margin-left:-300px;margin-right:0}body.rtl .cpac-placeholder{padding:5px 0 7px 4px}@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,.15);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);box-shadow:0 3px 10px 0 rgba(0,0,0,.15)}.cpac-addons li:hover{-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);box-shadow:0 3px 10px 0 rgba(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}
1
+ .button.loading span,.cpac-column .comment-grey-bubble,.icon-no,.icon-yes,a.help{height:16px;width:16px}#cpac a:active,#cpac a:focus{outline:0}#icon-codepress-admin-columns{background:url(../images/icon.png) no-repeat}.cpac-settings-link{float:right;margin:12px 14px 5px 0;background:url(../images/settings.png) no-repeat;padding-left:20px;text-decoration:none;display:inline-block;line-height:16px}.cpac-settings-link.current{font-weight:700}.rtl .cpac-settings-link{float:left;margin:12px 0 5px 14px;padding-right:20px;padding-left:0}.cpac-menu,h2.cpac-nav-tab-wrapper{margin-bottom:10px}a.help{background:url(../images/help.png) no-repeat;display:inline-block}.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:url(../images/loading.gif) right 50% no-repeat;display:inline-block}.icon-no,.icon-yes{display:inline-block;position:relative}.rtl .button.loading span{left:6px;right:auto}.cpac_message.error.warning{border-left:4px solid #ffba00}.icon-yes{background:url(../images/yes.png) no-repeat;top:2px}.icon-no{background:url(../images/no.png) no-repeat;top:2px}.cpac-column .comment-grey-bubble:before{content:'\f101';font:400 20px/.5 dashicons;speak:none;display:inline-block;padding:0;top:4px;left:0;position:relative;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none!important}.rtl .cpac-column .comment-grey-bubble:before{right:0;left:auto}.cpac-menu{clear:both;overflow:hidden}.cpac-menu .subsubsub{white-space:normal;width:100%;margin:0 14px 0 0}.cpac-menu .subsubsub li.first{font-weight:700;min-width:100px}.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,.4);box-shadow:1px 3px 6px 0 rgba(1,1,1,.4)}.columns-left .cpac-boxes .cpac-columns form,.columns-right .sidebox{box-shadow:0 1px 3px rgba(0,0,0,.1)}.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 grey;background:#eee;width:100%;height:100%}.cpac-placeholder :first-child{border:none}.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:0 0;border-radius:0}.cpac-column .column-meta table tr td{vertical-align:top;height:18px;border:none solid transparent;padding:11px 8px;border-width:1px 0 0}.cpac-column .column-meta table tr td.column_sort{width:10px;background:url(../images/drag.png) 8px 8px no-repeat;cursor:move}.cpac-column .column-meta table tr td.column_label{width:70%;font-weight:700;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.clone-button,.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:400;margin-left:5px;font-size:12px}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button:hover,.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:red}.cpac-column .column-meta table tr td.column_label .inner>a.clone-button,.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.clone-button:hover,.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:400;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 .inner .meta span.width{margin-right:5px;cursor:auto;color:#737373}.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:url(../images/arrow.png) 23px 18px no-repeat;cursor:pointer}.cpac-column .column-meta:hover .column_label .inner>a.clone-button,.cpac-column .column-meta:hover .column_label .inner>a.edit-button,.cpac-column .column-meta:hover .column_label .inner>a.remove-button{display:inline-block}.cpac-column .column-meta span.vers{padding-top:2px}.cpac-column .column-meta span.vers .comment-grey-bubble{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.hide{display:none}.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 input[type=text],.cpac-column .column-form table tr td select{width:99.95%}.cpac-column .column-form table tr td input[type=text].small,.cpac-column .column-form table tr td select.small{width:100px}.cpac-column .column-form table tr td span.suffix{line-height:40px;color:grey}.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:#f5f5f5;border-right:1px solid #E1E1E1;vertical-align:top;width:34%;border-top:1px solid #F0F0F0}.column-footer,.wp-pointer-content{overflow:hidden}.cpac-column .column-form table tr td.label label{font-weight:700;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:400}.cpac-column .column-form table tr td.label p.description em{display:block;color:#999}.cpac-column .column-form table tr td.label .info{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.cpac-column .column-form table tr td.label .info:before{position:absolute;z-index:1;right:10px;top:50%;margin-top:-7px;content:'';display:block;border-radius:32px;border:1px solid #E6E6E6;width:12px;height:12px}.cpac-column .column-form table tr td.label .info:after{position:absolute;z-index:1;right:10px;top:50%;margin-top:-6px;content:'?';display:block;width:14px;height:14px;color:#E6E6E6;font:700 10px Arial;text-align:center;vertical-align:middle;line-height:14px}.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 .input{position:relative}.cpac-column .column-form table tr.column_width .input div.description{font-size:11px;width:54px;position:absolute;left:10px;text-align:middle}.cpac-column .column-form table tr.column_width .input div.description input{background:#efefef;border:none;height:20px;line-height:20px;text-align:right;width:36px;font-size:12px}.cpac-column .column-form table tr.column_width .input div.width-slider{margin-left:60px;margin-right:100px;position:relative;margin-top:4px}.cpac-column .column-form table tr.column_width .input div.width-slider .ui-slider-handle{cursor:ew-resize}.cpac-column .column-form table tr.column_width .input div.unit-select{position:absolute;top:8px;right:10px;width:90px;text-align:right}.cpac-column .column-form table tr.column_width .input div.unit-select label{padding-left:5px}.cpac-column .column-form table tr.column_image_size{border:10px solid red}.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 .custom-size-h.hidden,.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 .hidden{display:none}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h,.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w{margin:0}.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-h input[type=text],.cpac-column .column-form table tr.column_image_size td.input .custom_image_size .custom-size-w 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:400;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:red}.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:0 0}.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:grey;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}.column-footer .order-message{background:url(../images/order_arrow.png) no-repeat;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;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:#FCF8E3;border:1px solid #FBEED5;border-radius:4px;color:#C09853;margin:20px 0;padding:16px 14px;text-shadow:0 1px 0 rgba(255,255,255,.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,.5)}.cac-notification.updated{border-left-color:#0071aa}.cac-notification.updated .learnmore{float:right}.cac-notification.updated .learnmore:after{content:"\f139";font:400 20px/1 dashicons;float:right}.columns-right{margin-top:54px}.columns-right .sidebox{background:#FFF;border:1px solid #E1E1E1;border-radius:0;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:400;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:url(../images/get_the_addon.png) no-repeat;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:400;margin-top:6px}.columns-right .sidebox#pro-version .inside ul{margin:0 0 10px}.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 ul li.acf a{background-color:#5ee8bf;color:grey}.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#add-acf{background-color:#5ee8bf}.columns-right .sidebox#add-acf h3{padding:0}.columns-right .sidebox#add-acf h3 a{color:#fff;text-decoration:none;font-size:15px}.columns-right .sidebox#direct-feedback #feedback-rate,.columns-right .sidebox#direct-feedback #feedback-support{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:700;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:700;font-size:12px;padding:0 32px;color:#CCC;display:inline-block;background:0 0;text-decoration:none;cursor:pointer}.columns-right .sidebox#direct-feedback .inside form input[type=submit]:hover,.columns-right .sidebox#direct-feedback .inside ul.share li a: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 0 0 9px;display:block;float:left;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: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:url(../images/switch_bw.png) 50% 50% no-repeat}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 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-form table tr td.label a.more-info,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-meta .column_type{text-align:left;padding-left:0;padding-right:auto}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 div.description,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:url(../images/order_arrow-rtl.png) right top no-repeat}body.rtl .columns-left .column-footer .button-container,body.rtl .cpac_export .ms-container .ms-selection{float:left}body.rtl .columns-right{float:left;margin-left:-300px;margin-right:0}body.rtl .cpac-placeholder{padding:5px 0 7px 4px}@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,.15);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.15);box-shadow:0 3px 10px 0 rgba(0,0,0,.15)}.cpac-addons li:hover{-webkit-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);-moz-box-shadow:0 3px 10px 0 rgba(0,0,0,.25);box-shadow:0 3px 10px 0 rgba(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.min.css CHANGED
@@ -1 +1 @@
1
- .cpac-divider{display:inline-block;width:14px;height:12px;background:url(../images/square.png)50% 7px no-repeat}span.status-closed{color:red}.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:0 0;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;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,.75);font-weight:400;min-width:25px}
1
+ .cpac-divider{display:inline-block;width:14px;height:12px;background:url(../images/square.png) 50% 7px no-repeat}span.status-closed{color:red}.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:0 0;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;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,.75);font-weight:400;min-width:25px}
assets/js/admin-settings.js CHANGED
@@ -748,7 +748,7 @@ jQuery( document ).bind('column_init column_change column_add', function( e, col
748
});
749
750
/*
751
- * Radio Click events
752
*
753
*/
754
jQuery.fn.cpac_bind_column_addon_events = function() {
@@ -756,16 +756,30 @@ jQuery.fn.cpac_bind_column_addon_events = function() {
756
var column = jQuery( this );
757
var inputs = column.find('[data-toggle-id] label');
758
759
- // Enable editing: radio button
760
- inputs.click( function(){
761
762
var id = jQuery( this ).closest('td.input').data('toggle-id');
763
- var label = column.find('[data-indicator-id="' + id + '"]' ).removeClass( 'on' );
764
- var status = jQuery( 'input', this ).val();
765
766
- if ( 'on' == status ) {
767
label.addClass( 'on' );
768
}
769
});
770
};
771
748
});
749
750
/*
751
+ * Optional Radio Click events
752
*
753
*/
754
jQuery.fn.cpac_bind_column_addon_events = function() {
756
var column = jQuery( this );
757
var inputs = column.find('[data-toggle-id] label');
758
759
+ inputs.on( 'click', function(){
760
761
var id = jQuery( this ).closest('td.input').data('toggle-id');
762
+ var state = jQuery( 'input', this ).val();
763
764
+ // Toggle indicator icon
765
+ var label = column.find('[data-indicator-id="' + id + '"]' ).removeClass( 'on' );
766
+ if ( 'on' == state ) {
767
label.addClass( 'on' );
768
}
769
+
770
+ // Toggle additional options
771
+ var additional = column.find('[data-additional-option-id="' + id + '"]' ).addClass( 'hide' );
772
+ if ( 'on' == state ) {
773
+ additional.removeClass( 'hide' );
774
+ }
775
+ });
776
+
777
+ // Hide additonal options on ready
778
+ column.find('[data-toggle-id]').each( function(){
779
+ var additional = column.find('[data-additional-option-id="' + jQuery( this ).data('toggle-id') + '"]' ).addClass( 'hide' );
780
+ if ( 'on' == jQuery( 'input:checked', this ).val() ) {
781
+ additional.removeClass( 'hide' );
782
+ }
783
});
784
};
785
assets/js/admin-settings.min.js CHANGED
@@ -1 +1 @@
1
- function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){jQuery(".form-update a.submit-update").click(function(e){e.preventDefault(),jQuery(this).closest(".columns-container").find(".cpac-columns form").submit()})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).first().clone(),t=e.attr("data-type");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.column_bind_toggle(),n.column_bind_remove(),n.column_bind_clone(),n.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),c={at:"left top",my:"right top",edge:"right",offset:"0 0"};"right"==t&&(c={at:"right middle",my:"left middle",edge:"left"}),e.pointer({content:jQuery("#"+n).html(),position:c,pointerWidth:250,close:function(){e.removeClass("open")},pointerClass:"wp-pointer wp-pointer-"+c.edge}),e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){e.hasClass("open")||jQuery(this).pointer("close")})})}function cpac_sortable(){jQuery("div.cpac-columns").each(function(){jQuery(this).sortable(jQuery(this).hasClass("ui-sortable")?"refresh":{items:".cpac-column"})})}function cpac_menu(){var e=jQuery("#cpac div.cpac-menu");e.find("a").click(function(e,n){var t=jQuery(this).attr("href");if(t){var c=t.replace("#cpac-box-","");jQuery(".cpac-menu a").removeClass("current"),jQuery(".columns-container").hide(),jQuery(this).addClass("current");var i=jQuery('.columns-container[data-type="'+c+'"]').show(),a=i.find(".cpac-columns");jQuery(document).trigger("cac_menu_change",a)}e.preventDefault()}),e.find("a.current").trigger("click")}jQuery(document).ready(function(){return 0===jQuery("#cpac").length?!1:(cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_sortable(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),cpac_sidebar_feedback(),void jQuery(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_container_addon_events()}))}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this);e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(n){n.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e)})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this);e.addClass("loading"),e.find(".column-form").prepend('<span class="spinner" />'),jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize()},function(n){var t=jQuery("<div>"+n+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.removeClass("loading").addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),c=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var i=jQuery("optgroup",this).children(":selected"),a=i.val(),o=i.text(),r=jQuery(this).next(".msg").hide(),u=n.find('.for-cloning-only .cpac-column[data-type="'+a+'"]');if(u.length)if(u.find(".is-disabled").length)r.html(u.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+c+'"]').attr("selected","selected");else{if("undefined"==typeof u.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+a+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+c+'"]').attr("selected","selected");var l=u.clone();l.addClass("opened").find(".column-form").show(),l.find(".column-meta").replaceWith(e.find(".column-meta")),l.find(".column-form").replaceWith(e.find(".column-form")),l.cpac_update_clone_id(t),e.replaceWith(l),l.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var i=e.find(".column-meta span.width");i.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();jQuery(this).text(n>0?n+t:"")});var a=e.find(".column_width .unit-select label");a.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),i.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),i.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),0>=n&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),"column-meta"==e.find(".column_type select").val()&&e.find(".column_field_type select").change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),c=t.filter(":checked").val(),i=n.val(),a=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==c&&i>100&&(i=100),n.val(i),a.slider({range:"min",min:0,max:"%"==c?100:500,value:i,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this);if("undefined"==typeof n.attr("data-clone")){var t=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(t).show()}var c=jQuery(this).clone();return c.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(c),c.column_bind_toggle(),c.column_bind_remove(),c.column_bind_clone(),c.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",c),c},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),c=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),i=jQuery(c).find('*[data-type="'+t+'"]').not(n),a=jQuery.map(i,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});a.sort();for(var o=Math.max.apply(null,a)+1,r=0;o>=r&&-1!==jQuery.inArray(r,a);r++);if(0!==r){var u=n.attr("data-clone"),l="";u&&(l="-"+u),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var d=n.find("input, select, label");jQuery(d).each(function(e,n){var c=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+l,c)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+l,c)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+l,c))})}},jQuery(document).bind("column_init column_change column_add",function(e,n){jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_container_addon_events()}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.click(function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=e.find('[data-indicator-id="'+n+'"]').removeClass("on"),c=jQuery("input",this).val();"on"==c&&t.addClass("on")})},jQuery.fn.cpac_bind_container_addon_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
1
+ function cpac_importexport(){jQuery("#php-export-results textarea").on("focus, mouseup",function(){jQuery(this).select()}).select().focus()}function cpac_submit_form(){jQuery(".form-update a.submit-update").click(function(e){e.preventDefault(),jQuery(this).closest(".columns-container").find(".cpac-columns form").submit()})}function cpac_create_column(e){var n=jQuery(".for-cloning-only .cpac-column",e).first().clone(),t=e.attr("data-type");return n.length>0&&(n.cpac_update_clone_id(t),jQuery(".cpac-columns form",e).append(n),n.column_bind_toggle(),n.column_bind_remove(),n.column_bind_clone(),n.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",n)),n}function cpac_add_column(){jQuery("#cpac .add_column").click(function(e){var n=jQuery(this).closest(".columns-container"),t=cpac_create_column(n);t.addClass("opened").find(".column-form").slideDown(150,function(){jQuery("html, body").animate({scrollTop:t.offset().top-58},300)}),e.preventDefault()})}function cpac_sidebar_feedback(){jQuery(function(e){var n=e(".sidebox#direct-feedback");n.find("#feedback-choice a.no").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-support").slideDown()}),n.find("#feedback-choice a.yes").click(function(e){e.preventDefault(),n.find("#feedback-choice").slideUp(),n.find("#feedback-rate").slideDown()})})}function cpac_clear_input_defaults(){jQuery.fn.cleardefault=function(){return this.focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)})},jQuery("#cpac-box-plugin_settings .addons input").cleardefault()}function cpac_help(){jQuery("#cpac a.help").click(function(e){e.preventDefault();var n=jQuery("#contextual-help-wrap");n.parent().show(),jQuery('a[href="#tab-panel-cpac-'+jQuery(this).attr("data-help")+'"]',n).trigger("click"),n.slideDown("fast",function(){n.focus()})})}function cpac_pointer(){jQuery(".cpac-pointer").each(function(){var e=jQuery(this),n=e.attr("rel"),t=e.attr("data-pos"),i={at:"left top",my:"right top",edge:"right",offset:"0 0"};"right"==t&&(i={at:"right middle",my:"left middle",edge:"left"}),e.pointer({content:jQuery("#"+n).html(),position:i,pointerWidth:250,close:function(){e.removeClass("open")},pointerClass:"wp-pointer wp-pointer-"+i.edge}),e.click(function(){e.hasClass("open")?e.removeClass("open"):e.addClass("open")}),e.hover(function(){jQuery(this).pointer("open")},function(){e.hasClass("open")||jQuery(this).pointer("close")})})}function cpac_sortable(){jQuery("div.cpac-columns").each(function(){jQuery(this).hasClass("ui-sortable")?jQuery(this).sortable("refresh"):jQuery(this).sortable({items:".cpac-column"})})}function cpac_menu(){var e=jQuery("#cpac div.cpac-menu");e.find("a").click(function(e,n){var t=jQuery(this).attr("href");if(t){var i=t.replace("#cpac-box-","");jQuery(".cpac-menu a").removeClass("current"),jQuery(".columns-container").hide(),jQuery(this).addClass("current");var c=jQuery('.columns-container[data-type="'+i+'"]').show(),a=c.find(".cpac-columns");jQuery(document).trigger("cac_menu_change",a)}e.preventDefault()}),e.find("a.current").trigger("click")}jQuery(document).ready(function(){return 0===jQuery("#cpac").length?!1:(cpac_pointer(),cpac_submit_form(),cpac_clear_input_defaults(),cpac_sortable(),cpac_menu(),cpac_help(),cpac_add_column(),cpac_importexport(),cpac_sidebar_feedback(),void jQuery(".cpac-column").each(function(e,n){jQuery(n).column_bind_toggle(),jQuery(n).column_bind_remove(),jQuery(n).column_bind_clone(),jQuery(n).cpac_bind_container_addon_events()}))}),jQuery.fn.column_bind_toggle=function(){var e=jQuery(this);e.find("td.column_type a, td.column_edit, td.column_label a.toggle, td.column_label .edit-button").click(function(n){n.preventDefault(),e.toggleClass("opened").find(".column-form").slideToggle(150),e.hasClass("events-binded")||e.column_bind_events(),e.addClass("events-binded"),jQuery(document).trigger("column_init",e)})},jQuery.fn.column_bind_remove=function(){jQuery(this).find(".remove-button").click(function(e){jQuery(this).closest(".cpac-column").column_remove(),e.preventDefault()})},jQuery.fn.column_bind_clone=function(){jQuery(this).find(".clone-button").click(function(e){var n,t;e.preventDefault(),n=jQuery(this).closest(".cpac-column"),t=n.column_clone(),"undefined"!=typeof t&&t.removeClass("loading").hide().slideDown()})},jQuery.fn.cpac_column_refresh=function(){var e=jQuery(this);e.addClass("loading"),e.find(".column-form").prepend('<span class="spinner" />'),jQuery.post(ajaxurl,{plugin_id:"cpac",action:"cpac_column_refresh",column:jQuery(this).find("input.column-name").val(),formdata:jQuery(this).parents("form").serialize()},function(n){var t=jQuery("<div>"+n+"</div>").children();e.replaceWith(t),e=t,e.column_bind_toggle(),e.column_bind_remove(),e.column_bind_clone(),e.column_bind_events(),e.removeClass("loading").addClass("opened").find(".column-form").show(),jQuery(document).trigger("column_change",e)})},jQuery.fn.column_bind_events=function(){var e=jQuery(this),n=e.closest(".columns-container "),t=n.attr("data-type"),i=e.find(".column_type select option:selected").val();e.find(".column_type select").change(function(){var c=jQuery("optgroup",this).children(":selected"),a=c.val(),o=c.text(),r=jQuery(this).next(".msg").hide(),u=n.find('.for-cloning-only .cpac-column[data-type="'+a+'"]');if(u.length)if(u.find(".is-disabled").length)r.html(u.find(".is-disabled").html()).show(),jQuery(this).find("option").removeAttr("selected"),jQuery(this).find('option[value="'+i+'"]').attr("selected","selected");else{if("undefined"==typeof u.attr("data-clone")&&jQuery(".cpac-columns",n).find('[data-type="'+a+'"]').length)return r.html(cpac_i18n.clone.replace("%s","<strong>"+o+"</strong>")).show(),jQuery(this).find("option").removeAttr("selected"),void jQuery(this).find('option[value="'+i+'"]').attr("selected","selected");var l=u.clone();l.addClass("opened").find(".column-form").show(),l.find(".column-meta").replaceWith(e.find(".column-meta")),l.find(".column-form").replaceWith(e.find(".column-form")),l.cpac_update_clone_id(t),e.replaceWith(l),l.cpac_column_refresh()}}),e.find(".column_label .input input").bind("keyup change",function(){var e=jQuery(this).val();jQuery(this).closest(".cpac-column").find("td.column_label .inner > a.toggle").text(e)}),e.column_width_slider();var c=e.find(".column-meta span.width");c.on("update",function(){var n=e.find("input.width").val(),t=e.find("input.unit").filter(":checked").val();n>0?jQuery(this).text(n+t):jQuery(this).text("")});var a=e.find(".column_width .unit-select label");a.on("click",function(){e.find("span.unit").text(jQuery(this).find("input").val()),e.column_width_slider(),c.trigger("update")});var o=e.find("input.width").on("keyup",function(){e.column_width_slider(),jQuery(this).trigger("validate"),c.trigger("update")}).on("validate",function(){var e=o.val(),n=jQuery.trim(e);jQuery.isNumeric(n)||(n=n.replace(/\D/g,"")),n.length>3&&(n=n.substring(0,3)),0>=n&&(n=""),n!==e&&o.val(n)});e.find(".column_image_size label.custom-size").click(function(){var e=jQuery(this).closest(".input");jQuery(this).hasClass("image-size-custom")?(jQuery(".custom-size-w",e).removeClass("hidden"),jQuery(".custom-size-h",e).removeClass("hidden")):(jQuery(".custom-size-w",e).addClass("hidden"),jQuery(".custom-size-h",e).addClass("hidden"))}),e.find(".column-form .label label, .column-form .label .info").hover(function(){jQuery(this).parents(".label").find("p.description").show()},function(){jQuery(this).parents(".label").find("p.description").hide()}),"column-meta"==e.find(".column_type select").val()&&e.find(".column_field_type select").change(function(){e.cpac_column_refresh()})},jQuery.fn.column_remove=function(){jQuery(this).addClass("deleting").animate({opacity:0,height:0},350,function(e){jQuery(this).remove()})},jQuery.fn.column_width_slider=function(){var e=jQuery(this).find(".column_width"),n=e.find("input.width"),t=e.find("input.unit"),i=t.filter(":checked").val(),c=n.val(),a=e.find(".width-slider"),o=jQuery(this).find(".column-meta span.width");"%"==i&&c>100&&(c=100),n.val(c),a.slider({range:"min",min:0,max:"%"==i?100:500,value:c,slide:function(e,t){n.val(t.value),o.trigger("update"),n.trigger("validate")}})},jQuery.fn.column_clone=function(){var e=jQuery(this).closest(".columns-container"),n=jQuery(this);if("undefined"==typeof n.attr("data-clone")){var t=cpac_i18n.clone.replace("%s","<strong>"+n.find(".column_label .toggle").text()+"</strong>");return n.addClass("opened").find(".column-form").slideDown(150),void n.find(".msg").html(t).show()}var i=jQuery(this).clone();return i.cpac_update_clone_id(e.attr("data-type")),jQuery(this).after(i),i.column_bind_toggle(),i.column_bind_remove(),i.column_bind_clone(),i.column_bind_events(),cpac_sortable(),jQuery(document).trigger("column_add",i),i},jQuery.fn.cpac_update_clone_id=function(e){var n=jQuery(this),t=n.attr("data-type"),i=jQuery('.columns-container[data-type="'+e+'"]').find(".cpac-columns"),c=jQuery(i).find('*[data-type="'+t+'"]').not(n),a=jQuery.map(c,function(e,n){return jQuery(e).attr("data-clone")?parseInt(jQuery(e).attr("data-clone"),10):0});a.sort();for(var o=Math.max.apply(null,a)+1,r=0;o>=r&&-1!==jQuery.inArray(r,a);r++);if(0!==r){var u=n.attr("data-clone"),l="";u&&(l="-"+u),n.attr("data-clone",r),n.find("input.clone").val(r),n.find("input.column-name").val(t+"-"+r);var d=n.find("input, select, label");jQuery(d).each(function(e,n){var i=t+"-"+r;jQuery(n).attr("name")&&jQuery(n).attr("name",jQuery(n).attr("name").replace(t+l,i)),jQuery(n).attr("for")&&jQuery(n).attr("for",jQuery(n).attr("for").replace(t+l,i)),jQuery(n).attr("id")&&jQuery(n).attr("id",jQuery(n).attr("id").replace(t+l,i))})}},jQuery(document).bind("column_init column_change column_add",function(e,n){jQuery(n).cpac_bind_column_addon_events(),jQuery(n).cpac_bind_container_addon_events()}),jQuery.fn.cpac_bind_column_addon_events=function(){var e=jQuery(this),n=e.find("[data-toggle-id] label");n.on("click",function(){var n=jQuery(this).closest("td.input").data("toggle-id"),t=jQuery("input",this).val(),i=e.find('[data-indicator-id="'+n+'"]').removeClass("on");"on"==t&&i.addClass("on");var c=e.find('[data-additional-option-id="'+n+'"]').addClass("hide");"on"==t&&c.removeClass("hide")}),e.find("[data-toggle-id]").each(function(){var n=e.find('[data-additional-option-id="'+jQuery(this).data("toggle-id")+'"]').addClass("hide");"on"==jQuery("input:checked",this).val()&&n.removeClass("hide")})},jQuery.fn.cpac_bind_container_addon_events=function(){var e=jQuery(this),n=e.find("[data-indicator-id]");n.unbind("click").click(function(){var n=jQuery(this).data("indicator-id"),t=e.find('[data-toggle-id="'+n+'"] input');jQuery(this).hasClass("on")?(jQuery(this).removeClass("on").addClass("off"),t.filter("[value=off]").prop("checked",!0)):(jQuery(this).removeClass("off").addClass("on"),t.filter("[value=on]").prop("checked",!0))})};
classes/addons.php CHANGED
@@ -41,7 +41,7 @@ class CPAC_Addons {
41
return;
42
}
43
44
- if ( ! class_exists('CAC_Addon_Pro') ) {
45
cpac_admin_message( 'You need Admin Columns Pro.', 'error' );
46
return;
47
}
@@ -107,7 +107,7 @@ class CPAC_Addons {
107
public function get_addon_groups() {
108
109
$addon_groups = array(
110
- 'integration' => __( 'Plugins', 'cpac' )
111
);
112
113
/**
@@ -132,14 +132,14 @@ class CPAC_Addons {
132
133
$addons = array(
134
'cac-addon-acf' => array(
135
- 'title' => __( 'Advanced Custom Fields', 'cpac' ),
136
- 'description' => __( 'Display and edit Advanced Custom Fields fields in the posts overview in seconds!', 'cpac' ),
137
'group' => 'integration',
138
'image' => CPAC_URL . 'assets/images/addons/acf.png'
139
),
140
'cac-addon-woocommerce' => array(
141
- 'title' => __( 'WooCommerce', 'cpac' ),
142
- 'description' => __( 'Enhance the products, orders and coupons overviews with new columns and inline editing.', 'cpac' ),
143
'group' => 'integration',
144
'image' => CPAC_URL . 'assets/images/addons/woocommerce.png'
145
)
41
return;
42
}
43
44
+ if ( ! class_exists( 'CAC_Addon_Pro', false ) ) {
45
cpac_admin_message( 'You need Admin Columns Pro.', 'error' );
46
return;
47
}
107
public function get_addon_groups() {
108
109
$addon_groups = array(
110
+ 'integration' => __( 'Plugins', 'codepress-admin-columns' )
111
);
112
113
/**
132
133
$addons = array(
134
'cac-addon-acf' => array(
135
+ 'title' => __( 'Advanced Custom Fields', 'codepress-admin-columns' ),
136
+ 'description' => __( 'Display and edit Advanced Custom Fields fields in the posts overview in seconds!', 'codepress-admin-columns' ),
137
'group' => 'integration',
138
'image' => CPAC_URL . 'assets/images/addons/acf.png'
139
),
140
'cac-addon-woocommerce' => array(
141
+ 'title' => __( 'WooCommerce', 'codepress-admin-columns' ),
142
+ 'description' => __( 'Enhance the products, orders and coupons overviews with new columns and inline editing.', 'codepress-admin-columns' ),
143
'group' => 'integration',
144
'image' => CPAC_URL . 'assets/images/addons/woocommerce.png'
145
)
classes/column.php CHANGED
@@ -34,6 +34,11 @@ class CPAC_Column {
34
*/
35
public $properties = array();
36
37
/**
38
* @since 2.0
39
*
@@ -158,6 +163,9 @@ class CPAC_Column {
158
'hidden' => false
159
);
160
161
foreach ( $default_properties as $property => $value ) {
162
$this->properties[ $property ] = $value;
163
}
@@ -207,7 +215,7 @@ class CPAC_Column {
207
* @param array $properties Column properties
208
* @param CPAC_Storage_Model $storage_model Storage Model class instance
209
*/
210
- $this->properties = apply_filters( 'cac/column/properties', $this->properties ); // do not pass $this because object is not ready
211
212
/**
213
* Filter the properties of a column type for a specific storage model
@@ -216,7 +224,7 @@ class CPAC_Column {
216
* @since 2.0
217
* @see Filter cac/column/properties
218
*/
219
- $this->properties = apply_filters( "cac/column/properties/storage_key={$this->storage_model->key}", $this->properties ); // do not pass $this because object is not ready
220
221
// Column label defaults to column type label
222
if ( ! isset( $this->options['label'] ) ) {
@@ -264,6 +272,22 @@ class CPAC_Column {
264
return $this;
265
}
266
267
/**
268
* @param int $id
269
* @return object
@@ -381,8 +405,11 @@ class CPAC_Column {
381
* @param string $field_key
382
* @return string Attribute Name
383
*/
384
public function attr_id( $field_name ) {
385
- echo "cpac-{$this->storage_model->key}-{$this->properties->name}-{$field_name}";
386
}
387
388
/**
@@ -594,10 +621,10 @@ class CPAC_Column {
594
*/
595
public function get_all_image_sizes() {
596
$image_sizes = array(
597
- 'thumbnail' => __( "Thumbnail", 'cpac' ),
598
- 'medium' => __( "Medium", 'cpac' ),
599
- 'large' => __( "Large", 'cpac' ),
600
- 'full' => __( "Full", 'cpac' )
601
);
602
603
foreach( get_intermediate_image_sizes() as $size ) {
@@ -1016,6 +1043,27 @@ class CPAC_Column {
1016
return $name;
1017
}
1018
1019
/**
1020
* @since 2.0
1021
* @param string $field_key
@@ -1038,17 +1086,17 @@ class CPAC_Column {
1038
public function display_field_date_format() {
1039
1040
$field_key = 'date_format';
1041
- $label = __( 'Date Format', 'cpac' );
1042
- $description = __( 'This will determine how the date will be displayed.', 'cpac' );
1043
1044
?>
1045
<tr class="column_<?php echo $field_key; ?>">
1046
<?php $this->label_view( $label, $description, $field_key ); ?>
1047
<td class="input">
1048
- <input type="text" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>" value="<?php echo $this->options->date_format; ?>" placeholder="<?php _e( 'Example:', 'cpac' ); ?> d M Y H:i"/>
1049
<p class="description">
1050
- <?php printf( __( 'Leave empty for WordPress date format, change your <a href="%s">default date format here</a>.' , 'cpac' ), admin_url( 'options-general.php' ) . '#date_format_custom_radio' ); ?>
1051
- <a target='_blank' href='http://codex.wordpress.org/Formatting_Date_and_Time'><?php _e( 'Documentation on date and time formatting.', 'cpac' ); ?></a>
1052
</p>
1053
</td>
1054
</tr>
@@ -1062,8 +1110,8 @@ class CPAC_Column {
1062
public function display_field_excerpt_length() {
1063
1064
$field_key = 'excerpt_length';
1065
- $label = __( 'Excerpt length', 'cpac' );
1066
- $description = __( 'Number of words', 'cpac' );
1067
1068
?>
1069
<tr class="column_<?php echo $field_key; ?>">
@@ -1081,7 +1129,7 @@ class CPAC_Column {
1081
public function display_field_preview_size() {
1082
1083
$field_key = 'image_size';
1084
- $label = __( 'Preview size', 'cpac' );
1085
1086
?>
1087
<tr class="column_<?php echo $field_key; ?>">
@@ -1098,13 +1146,13 @@ class CPAC_Column {
1098
1099
<div class="custom_image_size">
1100
<label for="<?php $this->attr_id( $field_key ); ?>-custom" class="custom-size image-size-custom" >
1101
- <input type="radio" value="cpac-custom" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-custom"<?php checked( $this->options->image_size, 'cpac-custom' ); ?>><?php _e( 'Custom', 'cpac' ); ?>
1102
</label>
1103
<label for="<?php $this->attr_id( $field_key ); ?>-w" class="custom-size-w<?php echo $this->options->image_size != 'cpac-custom' ? ' hidden' : ''; ?>">
1104
- <input type="text" name="<?php $this->attr_name( 'image_size_w' ); ?>" id="<?php $this->attr_id( $field_key ); ?>-w" value="<?php echo $this->options->image_size_w; ?>" /><?php _e( 'width', 'cpac' ); ?>
1105
</label>
1106
<label for="<?php $this->attr_id( $field_key ); ?>-h" class="custom-size-h<?php echo $this->options->image_size != 'cpac-custom' ? ' hidden' : ''; ?>">
1107
- <input type="text" name="<?php $this->attr_name( 'image_size_h' ); ?>" id="<?php $this->attr_id( $field_key ); ?>-h" value="<?php echo $this->options->image_size_h; ?>" /><?php _e( 'height', 'cpac' ); ?>
1108
</label>
1109
</div>
1110
</td>
@@ -1116,8 +1164,8 @@ class CPAC_Column {
1116
* @since 2.1.1
1117
*/
1118
public function display_field_before_after() {
1119
- $this->display_field_text( 'before', __( "Before", 'cpac' ), __( 'This text will appear before the custom field value.', 'cpac' ) );
1120
- $this->display_field_text( 'after', __( "After", 'cpac' ), __( 'This text will appear after the custom field value.', 'cpac' ) );
1121
}
1122
1123
/**
@@ -1126,30 +1174,31 @@ class CPAC_Column {
1126
public function display_field_user_format() {
1127
1128
$nametypes = array(
1129
- 'display_name' => __( 'Display Name', 'cpac' ),
1130
- 'first_name' => __( 'First Name', 'cpac' ),
1131
- 'last_name' => __( 'Last Name', 'cpac' ),
1132
- 'nickname' => __( 'Nickname', 'cpac' ),
1133
- 'user_login' => __( 'User Login', 'cpac' ),
1134
- 'user_email' => __( 'User Email', 'cpac' ),
1135
- 'ID' => __( 'User ID', 'cpac' ),
1136
- 'first_last_name' => __( 'First and Last Name', 'cpac' ),
1137
);
1138
1139
- $this->display_field_select( 'display_author_as', __( 'Display format', 'cpac' ), $nametypes, __( 'This is the format of the author name.', 'cpac' ) );
1140
}
1141
1142
/**
1143
* @since 2.3.4
1144
* @param string $name Name of the column option
1145
- * @return string $label Label
1146
- * @return array $options Select options
1147
- * @return strong $description (optional) Description below the label
1148
*/
1149
- public function display_field_select( $name, $label, $options = array(), $description = '' ) {
1150
$current = $this->get_option( $name );
1151
?>
1152
- <tr class="column-<?php echo $name; ?>">
1153
<?php $this->label_view( $label, $description, $name ); ?>
1154
<td class="input">
1155
<select name="<?php $this->attr_name( $name ); ?>" id="<?php $this->attr_id( $name ); ?>">
@@ -1165,9 +1214,9 @@ class CPAC_Column {
1165
/**
1166
* @since 2.3.4
1167
* @param string $name Name of the column option
1168
- * @return string $label Label
1169
- * @return array $options Select options
1170
- * @return strong $description (optional) Description below the label
1171
*/
1172
public function display_field_text( $name, $label, $description = '' ) {
1173
?>
@@ -1181,17 +1230,19 @@ class CPAC_Column {
1181
}
1182
1183
/**
1184
- * @since NEWVERSION
1185
*
1186
* @param string $name Name of the column option
1187
- * @return string $label Label
1188
- * @return array $options Select options
1189
- * @return strong $description (optional) Description below the label
1190
*/
1191
- public function display_field_radio( $name, $label, $options = array(), $description = '' ) {
1192
$current = $this->get_option( $name );
1193
?>
1194
- <tr class="column-<?php echo $name; ?>">
1195
<?php $this->label_view( $label, $description, $name ); ?>
1196
<td class="input">
1197
<?php foreach ( $options as $key => $label ) : ?>
@@ -1274,7 +1325,7 @@ class CPAC_Column {
1274
<div class="inner">
1275
<div class="meta">
1276
1277
- <span title="<?php echo esc_attr( __( 'width', 'cpac' ) ); ?>" class="width" data-indicator-id="">
1278
<?php echo ! empty( $this->options->width ) ? $this->options->width . $this->options->width_unit : ''; ?>
1279
</span>
1280
@@ -1296,11 +1347,11 @@ class CPAC_Column {
1296
1297
</div>
1298
<a class="toggle" href="javascript:;"><?php echo stripslashes( $this->get_label() ); ?></a>
1299
- <a class="edit-button" href="javascript:;"><?php _e( 'Edit', 'cpac' ); ?></a>
1300
<?php if ( $this->properties->is_cloneable ) : ?>
1301
- <a class="clone-button" href="#"><?php _e( 'Clone', 'cpac' ); ?></a>
1302
<?php endif; ?>
1303
- <a class="remove-button" href="javascript:;"><?php _e( 'Remove', 'cpac' ); ?></a>
1304
</div>
1305
</td>
1306
<td class="column_type">
@@ -1318,7 +1369,7 @@ class CPAC_Column {
1318
<table class="widefat">
1319
<tbody>
1320
<tr class="column_type">
1321
- <?php $this->label_view( __( 'Type', 'cpac' ), __( 'Choose a column type.', 'cpac' ) . '<em>' . __( 'Type', 'cpac' ) . ': ' . $this->properties->type . '</em><em>' . __( 'Name', 'cpac' ) . ': ' . $this->properties->name . '</em>', 'type' ); ?>
1322
<td class="input">
1323
<select name="<?php $this->attr_name( 'type' ); ?>" id="<?php $this->attr_id( 'type' ); ?>">
1324
<?php echo $column_list; ?>
@@ -1328,17 +1379,17 @@ class CPAC_Column {
1328
</tr><!--.column_label-->
1329
1330
<tr class="column_label<?php echo $this->properties->hide_label ? ' hidden' : ''; ?>">
1331
- <?php $this->label_view( __( 'Label', 'cpac' ), __( 'This is the name which will appear as the column header.', 'cpac' ), 'label' ); ?>
1332
<td class="input">
1333
<input class="text" type="text" name="<?php $this->attr_name( 'label' ); ?>" id="<?php $this->attr_id( 'label' ); ?>" value="<?php echo esc_attr( $this->options->label ); //echo sanitize_text_field( $this->options->label ); ?>" />
1334
</td>
1335
</tr><!--.column_label-->
1336
1337
<tr class="column_width">
1338
- <?php $this->label_view( __( 'Width', 'cpac' ), '', 'width' ); ?>
1339
<td class="input">
1340
- <div class="description" title="<?php _e( 'default', 'cpac' ); ?>">
1341
- <input class="width" type="text" placeholder="<?php _e( 'auto', 'cpac' ); ?>" name="<?php $this->attr_name( 'width' ); ?>" id="<?php $this->attr_id( 'width' ); ?>" value="<?php echo $this->options->width; ?>" />
1342
<span class="unit"><?php echo $this->options->width_unit; ?></span>
1343
</div>
1344
<div class="width-slider"></div>
@@ -1390,7 +1441,7 @@ class CPAC_Column {
1390
<td colspan="2">
1391
<p>
1392
<?php if ( $this->properties->is_cloneable ) : ?>
1393
- <a class="clone-button" href="#"><?php _e( 'Clone', 'cpac' ); ?></a>
1394
<?php endif; ?>
1395
<a href="javascript:;" class="remove-button"><?php _e( 'Remove' );?></a>
1396
</p>
@@ -1403,4 +1454,66 @@ class CPAC_Column {
1403
</div>
1404
<?php
1405
}
1406
}
34
*/
35
public $properties = array();
36
37
+ /**
38
+ * @since 2.4.7
39
+ */
40
+ protected $filtering_model;
41
+
42
/**
43
* @since 2.0
44
*
163
'hidden' => false
164
);
165
166
+ // @since 2.4.7
167
+ $default_properties = apply_filters( 'cac/column/default_properties', $default_properties );
168
+
169
foreach ( $default_properties as $property => $value ) {
170
$this->properties[ $property ] = $value;
171
}
215
* @param array $properties Column properties
216
* @param CPAC_Storage_Model $storage_model Storage Model class instance
217
*/
218
+ $this->properties = apply_filters( 'cac/column/properties', $this->properties, $this ); // do not pass $this because object is not ready
219
220
/**
221
* Filter the properties of a column type for a specific storage model
224
* @since 2.0
225
* @see Filter cac/column/properties
226
*/
227
+ $this->properties = apply_filters( "cac/column/properties/storage_key={$this->storage_model->key}", $this->properties, $this ); // do not pass $this because object is not ready
228
229
// Column label defaults to column type label
230
if ( ! isset( $this->options['label'] ) ) {
272
return $this;
273
}
274
275
+ /**
276
+ * @since 2.4.7
277
+ */
278
+ public function set_filter( $filtering_model ) {
279
+ $this->filtering_model = $filtering_model;
280
+
281
+ return $this;
282
+ }
283
+
284
+ /**
285
+ * @since 2.4.7
286
+ */
287
+ public function get_filter() {
288
+ return $this->filtering_model;
289
+ }
290
+
291
/**
292
* @param int $id
293
* @return object
405
* @param string $field_key
406
* @return string Attribute Name
407
*/
408
+ public function get_attr_id( $field_name ) {
409
+ return "cpac-{$this->storage_model->key}-{$this->properties->name}-{$field_name}";
410
+ }
411
public function attr_id( $field_name ) {
412
+ echo $this->get_attr_id( $field_name );
413
}
414
415
/**
621
*/
622
public function get_all_image_sizes() {
623
$image_sizes = array(
624
+ 'thumbnail' => __( "Thumbnail", 'codepress-admin-columns' ),
625
+ 'medium' => __( "Medium", 'codepress-admin-columns' ),
626
+ 'large' => __( "Large", 'codepress-admin-columns' ),
627
+ 'full' => __( "Full", 'codepress-admin-columns' )
628
);
629
630
foreach( get_intermediate_image_sizes() as $size ) {
1043
return $name;
1044
}
1045
1046
+ /**
1047
+ * @since 2.4.7
1048
+ */
1049
+ public function get_filter_operator_label( $name ) {
1050
+ $operators = $this->get_filter_operators();
1051
+ return isset( $operators[ $name ] ) ? $operators[ $name ] : false;
1052
+ }
1053
+
1054
+ /**
1055
+ * @since 2.4.7
1056
+ */
1057
+ public function get_filter_operators() {
1058
+ $operators = array(
1059
+ '' => __( 'Exact match', 'codepress-admin-columns' ),
1060
+ '<=' => __( 'Lesser than', 'codepress-admin-columns' ),
1061
+ '>=' => __( 'Greater than', 'codepress-admin-columns' ),
1062
+ 'between' => __( 'Between', 'codepress-admin-columns' ),
1063
+ );
1064
+ return $operators;
1065
+ }
1066
+
1067
/**
1068
* @since 2.0
1069
* @param string $field_key
1086
public function display_field_date_format() {
1087
1088
$field_key = 'date_format';
1089
+ $label = __( 'Date Format', 'codepress-admin-columns' );
1090
+ $description = __( 'This will determine how the date will be displayed.', 'codepress-admin-columns' );
1091
1092
?>
1093
<tr class="column_<?php echo $field_key; ?>">
1094
<?php $this->label_view( $label, $description, $field_key ); ?>
1095
<td class="input">
1096
+ <input type="text" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>" value="<?php echo $this->options->date_format; ?>" placeholder="<?php _e( 'Example:', 'codepress-admin-columns' ); ?> d M Y H:i"/>
1097
<p class="description">
1098
+ <?php printf( __( "Leave empty for WordPress date format, change your <a href='%s'>default date format here</a>." , 'codepress-admin-columns' ), admin_url( 'options-general.php' ) . '#date_format_custom_radio' ); ?>
1099
+ <a target='_blank' href='http://codex.wordpress.org/Formatting_Date_and_Time'><?php _e( 'Documentation on date and time formatting.', 'codepress-admin-columns' ); ?></a>
1100
</p>
1101
</td>
1102
</tr>
1110
public function display_field_excerpt_length() {
1111
1112
$field_key = 'excerpt_length';
1113
+ $label = __( 'Excerpt length', 'codepress-admin-columns' );
1114
+ $description = __( 'Number of words', 'codepress-admin-columns' );
1115
1116
?>
1117
<tr class="column_<?php echo $field_key; ?>">
1129
public function display_field_preview_size() {
1130
1131
$field_key = 'image_size';
1132
+ $label = __( 'Preview size', 'codepress-admin-columns' );
1133
1134
?>
1135
<tr class="column_<?php echo $field_key; ?>">
1146
1147
<div class="custom_image_size">
1148
<label for="<?php $this->attr_id( $field_key ); ?>-custom" class="custom-size image-size-custom" >
1149
+ <input type="radio" value="cpac-custom" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-custom"<?php checked( $this->options->image_size, 'cpac-custom' ); ?>><?php _e( 'Custom', 'codepress-admin-columns' ); ?>
1150
</label>
1151
<label for="<?php $this->attr_id( $field_key ); ?>-w" class="custom-size-w<?php echo $this->options->image_size != 'cpac-custom' ? ' hidden' : ''; ?>">
1152
+ <input type="text" name="<?php $this->attr_name( 'image_size_w' ); ?>" id="<?php $this->attr_id( $field_key ); ?>-w" value="<?php echo $this->options->image_size_w; ?>" /><?php _e( 'width', 'codepress-admin-columns' ); ?>
1153
</label>
1154
<label for="<?php $this->attr_id( $field_key ); ?>-h" class="custom-size-h<?php echo $this->options->image_size != 'cpac-custom' ? ' hidden' : ''; ?>">
1155
+ <input type="text" name="<?php $this->attr_name( 'image_size_h' ); ?>" id="<?php $this->attr_id( $field_key ); ?>-h" value="<?php echo $this->options->image_size_h; ?>" /><?php _e( 'height', 'codepress-admin-columns' ); ?>
1156
</label>
1157
</div>
1158
</td>
1164
* @since 2.1.1
1165
*/
1166
public function display_field_before_after() {
1167
+ $this->display_field_text( 'before', __( "Before", 'codepress-admin-columns' ), __( 'This text will appear before the custom field value.', 'codepress-admin-columns' ) );
1168
+ $this->display_field_text( 'after', __( "After", 'codepress-admin-columns' ), __( 'This text will appear after the custom field value.', 'codepress-admin-columns' ) );
1169
}
1170
1171
/**
1174
public function display_field_user_format() {
1175
1176
$nametypes = array(
1177
+ 'display_name' => __( 'Display Name', 'codepress-admin-columns' ),
1178
+ 'first_name' => __( 'First Name', 'codepress-admin-columns' ),
1179
+ 'last_name' => __( 'Last Name', 'codepress-admin-columns' ),
1180
+ 'nickname' => __( 'Nickname', 'codepress-admin-columns' ),
1181
+ 'user_login' => __( 'User Login', 'codepress-admin-columns' ),
1182
+ 'user_email' => __( 'User Email', 'codepress-admin-columns' ),
1183
+ 'ID' => __( 'User ID', 'codepress-admin-columns' ),
1184
+ 'first_last_name' => __( 'First and Last Name', 'codepress-admin-columns' ),
1185
);
1186
1187
+ $this->display_field_select( 'display_author_as', __( 'Display format', 'codepress-admin-columns' ), $nametypes, __( 'This is the format of the author name.', 'codepress-admin-columns' ) );
1188
}
1189
1190
/**
1191
* @since 2.3.4
1192
* @param string $name Name of the column option
1193
+ * @param string $label Label
1194
+ * @param array $options Select options
1195
+ * @param strong $description (optional) Description below the label
1196
*/
1197
+ public function display_field_select( $name, $label, $options = array(), $description = '', $optional_toggle_id = '' ) {
1198
$current = $this->get_option( $name );
1199
+ $data_optional = $optional_toggle_id ? ' data-additional-option-id="' . $this->get_attr_id( $optional_toggle_id ) . '"' : '';
1200
?>
1201
+ <tr class="column-<?php echo $name; ?>" <?php echo $data_optional; ?>>
1202
<?php $this->label_view( $label, $description, $name ); ?>
1203
<td class="input">
1204
<select name="<?php $this->attr_name( $name ); ?>" id="<?php $this->attr_id( $name ); ?>">
1214
/**
1215
* @since 2.3.4
1216
* @param string $name Name of the column option
1217
+ * @param string $label Label
1218
+ * @param array $options Select options
1219
+ * @param strong $description (optional) Description below the label
1220
*/
1221
public function display_field_text( $name, $label, $description = '' ) {
1222
?>
1230
}
1231
1232
/**
1233
+ * @since 2.4.7
1234
*
1235
* @param string $name Name of the column option
1236
+ * @param string $label Label
1237
+ * @param array $options Select options
1238
+ * @param strong $description (optional) Description below the label
1239
+ * @param string $optional_toggle_id (optional) Toggle ID will hide the row untill the toggle is triggered
1240
*/
1241
+ public function display_field_radio( $name, $label, $options = array(), $description = '', $optional_toggle_id = '' ) {
1242
$current = $this->get_option( $name );
1243
+ $data_optional = $optional_toggle_id ? ' data-additional-option-id="' . $this->get_attr_id( $optional_toggle_id ) . '"' : '';
1244
?>
1245
+ <tr class="column-<?php echo $name; ?>" <?php echo $data_optional; ?>>
1246
<?php $this->label_view( $label, $description, $name ); ?>
1247
<td class="input">
1248
<?php foreach ( $options as $key => $label ) : ?>
1325
<div class="inner">
1326
<div class="meta">
1327
1328
+ <span title="<?php echo esc_attr( __( 'width', 'codepress-admin-columns' ) ); ?>" class="width" data-indicator-id="">
1329
<?php echo ! empty( $this->options->width ) ? $this->options->width . $this->options->width_unit : ''; ?>
1330
</span>
1331
1347
1348
</div>
1349
<a class="toggle" href="javascript:;"><?php echo stripslashes( $this->get_label() ); ?></a>
1350
+ <a class="edit-button" href="javascript:;"><?php _e( 'Edit', 'codepress-admin-columns' ); ?></a>
1351
<?php if ( $this->properties->is_cloneable ) : ?>
1352
+ <a class="clone-button" href="#"><?php _e( 'Clone', 'codepress-admin-columns' ); ?></a>
1353
<?php endif; ?>
1354
+ <a class="remove-button" href="javascript:;"><?php _e( 'Remove', 'codepress-admin-columns' ); ?></a>
1355
</div>
1356
</td>
1357
<td class="column_type">
1369
<table class="widefat">
1370
<tbody>
1371
<tr class="column_type">
1372
+ <?php $this->label_view( __( 'Type', 'codepress-admin-columns' ), __( 'Choose a column type.', 'codepress-admin-columns' ) . '<em>' . __( 'Type', 'codepress-admin-columns' ) . ': ' . $this->properties->type . '</em><em>' . __( 'Name', 'codepress-admin-columns' ) . ': ' . $this->properties->name . '</em>', 'type' ); ?>
1373
<td class="input">
1374
<select name="<?php $this->attr_name( 'type' ); ?>" id="<?php $this->attr_id( 'type' ); ?>">
1375
<?php echo $column_list; ?>
1379
</tr><!--.column_label-->
1380
1381
<tr class="column_label<?php echo $this->properties->hide_label ? ' hidden' : ''; ?>">
1382
+ <?php $this->label_view( __( 'Label', 'codepress-admin-columns' ), __( 'This is the name which will appear as the column header.', 'codepress-admin-columns' ), 'label' ); ?>
1383
<td class="input">
1384
<input class="text" type="text" name="<?php $this->attr_name( 'label' ); ?>" id="<?php $this->attr_id( 'label' ); ?>" value="<?php echo esc_attr( $this->options->label ); //echo sanitize_text_field( $this->options->label ); ?>" />
1385
</td>
1386
</tr><!--.column_label-->
1387
1388
<tr class="column_width">
1389
+ <?php $this->label_view( __( 'Width', 'codepress-admin-columns' ), '', 'width' ); ?>
1390
<td class="input">
1391
+ <div class="description" title="<?php _e( 'default', 'codepress-admin-columns' ); ?>">
1392
+ <input class="width" type="text" placeholder="<?php _e( 'auto', 'codepress-admin-columns' ); ?>" name="<?php $this->attr_name( 'width' ); ?>" id="<?php $this->attr_id( 'width' ); ?>" value="<?php echo $this->options->width; ?>" />
1393
<span class="unit"><?php echo $this->options->width_unit; ?></span>
1394
</div>
1395
<div class="width-slider"></div>
1441
<td colspan="2">
1442
<p>
1443
<?php if ( $this->properties->is_cloneable ) : ?>
1444
+ <a class="clone-button" href="#"><?php _e( 'Clone', 'codepress-admin-columns' ); ?></a>
1445
<?php endif; ?>
1446
<a href="javascript:;" class="remove-button"><?php _e( 'Remove' );?></a>
1447
</p>
1454
</div>
1455
<?php
1456
}
1457
+
1458
+ /**
1459
+ * Display settings field for post property to display
1460
+ *
1461
+ * @since 2.4.7
1462
+ */
1463
+ public function display_field_post_property_display() {
1464
+ $this->display_field_select(
1465
+ 'post_property_display',
1466
+ __( 'Property To Display', 'codepress-admin-columns' ),
1467
+ array(
1468
+ 'title' => __( 'Title' ), // default
1469
+ 'id' => __( 'ID' ),
1470
+ 'author' => __( 'Author' )
1471
+ ),
1472
+ __( 'Post property to display for related post(s).', 'codepress-admin-columns' )
1473
+ );
1474
+ }
1475
+
1476
+ /**
1477
+ * Display settings field for the page the posts should link to
1478
+ *
1479
+ * @since 2.4.7
1480
+ */
1481
+ public function display_field_post_link_to() {
1482
+ $this->display_field_select(
1483
+ 'post_link_to',
1484
+ __( 'Link To', 'codepress-admin-columns' ),
1485
+ array(
1486
+ '' => __( 'None' ),
1487
+ 'edit_post' => __( 'Edit Post' ),
1488
+ 'view_post' => __( 'View Post' ),
1489
+ 'edit_author' => __( 'Edit Post Author', 'codepress-admin-columns' ),
1490
+ 'view_author' => __( 'View Public Post Author Page', 'codepress-admin-columns' )
1491
+ ),
1492
+ __( 'Page the posts should link to.', 'codepress-admin-columns' )
1493
+ );
1494
+ }
1495
+
1496
+ /**
1497
+ * @since 2.4.7
1498
+ */
1499
+ function display_settings_placeholder( $url ) { ?>
1500
+ <div class="is-disabled">
1501
+ <p>
1502
+ <strong><?php printf( __( "The %s column is only available in Admin Columns Pro - Business or Developer.", 'codepress-admin-columns' ), $this->get_label() ); ?></strong>
1503
+ </p>
1504
+ <p>
1505
+ <?php printf( __( "If you have a business or developer licence please download & install your %s add-on from the <a href='%s'>add-ons tab</a>.", 'codepress-admin-columns' ), $this->get_label(), admin_url( 'options-general.php?page=codepress-admin-columns&tab=addons' ) ); ?>
1506
+ </p>
1507
+ <p>
1508
+ <?php printf( __( "Admin Columns Pro offers full %s integration, allowing you to easily display and edit %s fields from within your overview.", 'codepress-admin-columns' ), $this->get_label(), $this->get_label() ); ?>
1509
+ </p>
1510
+ <a href="<?php echo add_query_arg( array(
1511
+ 'utm_source' => 'plugin-installation',
1512
+ 'utm_medium' => $this->get_type(),
1513
+ 'utm_campaign' => 'plugin-installation'
1514
+ ), $url ); ?>" class="button button-primary"><?php _e( 'Find out more', 'codepress-admin-columns' ); ?></a>
1515
+ </div>
1516
+ <?php
1517
+ }
1518
+
1519
}
classes/column/acf-placeholder.php CHANGED
@@ -6,44 +6,18 @@
6
*/
7
class CPAC_Column_ACF_Placeholder extends CPAC_Column {
8
9
- /**
10
- * @see CPAC_Column::init()
11
- * @since 2.2.1
12
- */
13
public function init() {
14
15
parent::init();
16
17
// Properties
18
$this->properties['type'] = 'column-acf_placeholder';
19
- $this->properties['label'] = __( 'ACF Field', 'cpac' );
20
$this->properties['is_pro_only'] = true;
21
}
22
23
- /**
24
- * @see CPAC_Column::display_settings()
25
- * @since 2.2
26
- */
27
- function display_settings() {
28
-
29
- ?>
30
- <div class="is-disabled">
31
- <p>
32
- <strong><?php _e( 'This feature is only available in Admin Columns Pro - Business or Developer.' ); ?></strong>
33
- </p>
34
- <p>
35
- <?php printf( __( "If you have a developer licence please download & install your ACF add-on from the <a href='%s'>add-ons tab</a>.", 'cpac' ), admin_url( 'options-general.php?page=codepress-admin-columns&tab=addons' ) ); ?>
36
- </p>
37
- <p>
38
- <?php _e( 'Admin Columns Pro - Developer offers full Advanced Custom Fields integeration, allowing you to easily display and edit ACF fields from within your posts overview.', 'cpac' ); ?>
39
- </p>
40
- <a href="<?php echo add_query_arg( array(
41
- 'utm_source' => 'plugin-installation',
42
- 'utm_medium' => 'acf-placeholder',
43
- 'utm_campaign' => 'plugin-installation'
44
- ), 'http://admincolumns.com/advanced-custom-fields-integration/' ); ?>" class="button button-primary"><?php _e( 'Find out more', 'cpac' ); ?></a>
45
- </div>
46
- <?php
47
}
48
-
49
- }
6
*/
7
class CPAC_Column_ACF_Placeholder extends CPAC_Column {
8
9
public function init() {
10
11
parent::init();
12
13
// Properties
14
$this->properties['type'] = 'column-acf_placeholder';
15
+ $this->properties['label'] = __( 'Advanced Custom Field', 'codepress-admin-columns' );
16
$this->properties['is_pro_only'] = true;
17
+ $this->properties['group'] = 'acf';
18
}
19
20
+ public function display_settings() {
21
+ $this->display_settings_placeholder( 'https://www.admincolumns.com/advanced-custom-fields-columns/' );
22
}
23
+ }
classes/column/actions.php CHANGED
@@ -26,7 +26,7 @@ abstract class CPAC_Column_Actions extends CPAC_Column {
26
27
// Properties
28
$this->properties['type'] = 'column-actions';
29
- $this->properties['label'] = __( 'Actions', 'cpac' );
30
31
// Options
32
$this->options['use_icons'] = false;
@@ -93,7 +93,7 @@ abstract class CPAC_Column_Actions extends CPAC_Column {
93
94
?>
95
<tr class="column_editing">
96
- <?php $this->label_view( __( 'Use icons?', 'cpac' ), __( 'Use icons instead of text for displaying the actions.', 'cpac' ), 'use_icons' ); ?>
97
<td class="input">
98
<label for="<?php $this->attr_id( 'use_icons' ); ?>-yes">
99
<input type="radio" value="1" name="<?php $this->attr_name( 'use_icons' ); ?>" id="<?php $this->attr_id( 'use_icons' ); ?>-yes"<?php checked( $this->options->use_icons, '1' ); ?> />
26
27
// Properties
28
$this->properties['type'] = 'column-actions';
29
+ $this->properties['label'] = __( 'Actions', 'codepress-admin-columns' );
30
31
// Options
32
$this->options['use_icons'] = false;
93
94
?>
95
<tr class="column_editing">
96
+ <?php $this->label_view( __( 'Use icons?', 'codepress-admin-columns' ), __( 'Use icons instead of text for displaying the actions.', 'codepress-admin-columns' ), 'use_icons' ); ?>
97
<td class="input">
98
<label for="<?php $this->attr_id( 'use_icons' ); ?>-yes">
99
<input type="radio" value="1" name="<?php $this->attr_name( 'use_icons' ); ?>" id="<?php $this->attr_id( 'use_icons' ); ?>-yes"<?php checked( $this->options->use_icons, '1' ); ?> />
classes/column/comment/ID.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_ID extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-comment_id';
19
- $this->properties['label'] = __( 'ID', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-comment_id';
19
+ $this->properties['label'] = __( 'ID', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/agent.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Agent extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-agent';
19
- $this->properties['label'] = __( 'Agent', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-agent';
19
+ $this->properties['label'] = __( 'Agent', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/approved.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Approved extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-approved';
19
- $this->properties['label'] = __( 'Approved', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-approved';
19
+ $this->properties['label'] = __( 'Approved', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/author-avatar.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Author_Avatar extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-author_avatar';
19
- $this->properties['label'] = __( 'Avatar', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-author_avatar';
19
+ $this->properties['label'] = __( 'Avatar', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/author-email.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Author_Email extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-author_email';
19
- $this->properties['label'] = __( 'Author email', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-author_email';
19
+ $this->properties['label'] = __( 'Author email', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/author-ip.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Author_Ip extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-author_ip';
19
- $this->properties['label'] = __( 'Author IP', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-author_ip';
19
+ $this->properties['label'] = __( 'Author IP', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/author-name.php CHANGED
@@ -9,7 +9,7 @@ class CPAC_Column_Comment_Author_Name extends CPAC_Column {
9
10
// Properties
11
$this->properties['type'] = 'column-author_name';
12
- $this->properties['label'] = __( 'Author name', 'cpac' );
13
}
14
15
public function get_value( $id ) {
9
10
// Properties
11
$this->properties['type'] = 'column-author_name';
12
+ $this->properties['label'] = __( 'Author name', 'codepress-admin-columns' );
13
}
14
15
public function get_value( $id ) {
classes/column/comment/author-url.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Author_Url extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-author_url';
19
- $this->properties['label'] = __( 'Author url', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-author_url';
19
+ $this->properties['label'] = __( 'Author url', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/author.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Author extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-author';
19
- $this->properties['label'] = __( 'Author', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-author';
19
+ $this->properties['label'] = __( 'Author', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/date-gmt.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Date_Gmt extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-date_gmt';
19
- $this->properties['label'] = __( 'Date GMT', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-date_gmt';
19
+ $this->properties['label'] = __( 'Date GMT', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/date.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Date extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-date';
19
- $this->properties['label'] = __( 'Date', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-date';
19
+ $this->properties['label'] = __( 'Date', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/excerpt.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Excerpt extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-excerpt';
19
- $this->properties['label'] = __( 'Content', 'cpac' );
20
21
// Options
22
$this->options['excerpt_length'] = 15;
16
17
// Properties
18
$this->properties['type'] = 'column-excerpt';
19
+ $this->properties['label'] = __( 'Content', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['excerpt_length'] = 15;
classes/column/comment/post.php ADDED
@@ -0,0 +1,89 @@
1
+ <?php
2
+ /**
3
+ * CPAC_Column_Comment_Post
4
+ *
5
+ * @since 2.4.7
6
+ */
7
+ class CPAC_Column_Comment_Post extends CPAC_Column {
8
+
9
+ /**
10
+ * @see CPAC_Column::init()
11
+ * @since 2.4.7
12
+ */
13
+ public function init() {
14
+
15
+ parent::init();
16
+
17
+ // Properties
18
+ $this->properties['type'] = 'column-post';
19
+ $this->properties['label'] = __( 'Post', 'codepress-admin-columns' );
20
+
21
+ // Options
22
+ $this->options['post_property_display'] = 'title';
23
+ $this->options['post_link_to'] = 'edit_post';
24
+ }
25
+
26
+ /**
27
+ * @see CPAC_Column::get_value()
28
+ * @since 2.4.7
29
+ */
30
+ public function get_value( $id ) {
31
+
32
+ $raw_value = $this->get_raw_value( $id );
33
+
34
+ // Get page to link to
35
+ switch ( $this->get_option( 'post_link_to' ) ) {
36
+ case 'edit_post':
37
+ $link = get_edit_post_link( $raw_value );
38
+ break;
39
+ case 'view_post':
40
+ $link = get_permalink( $raw_value );
41
+ break;
42
+ case 'edit_author':
43
+ $link = get_edit_user_link( get_post_field( 'post_author', $raw_value ) );
44
+ break;
45
+ case 'view_author':
46
+ $link = get_author_posts_url( get_post_field( 'post_author', $raw_value ) );
47
+ break;
48
+ }
49
+
50
+ // Get property of post to display
51
+ switch ( $this->get_option( 'post_property_display' ) ) {
52
+ case 'author':
53
+ $label = get_the_author_meta( 'display_name', get_post_field( 'post_author', $raw_value ) );
54
+ break;
55
+ case 'id':
56
+ $label = $raw_value;
57
+ break;
58
+ default:
59
+ $label = get_the_title( $raw_value );
60
+ break;
61
+ }
62
+
63
+ $value = $link ? "<a href='{$link}'>{$label}</a>" : $label;
64
+
65
+ return $value;
66
+ }
67
+
68
+ /**
69
+ * @see CPAC_Column::get_raw_value()
70
+ * @since 2.4.7
71
+ */
72
+ public function get_raw_value( $id ) {
73
+
74
+ $comment = get_comment( $id );
75
+
76
+ return $comment->comment_post_ID;
77
+ }
78
+
79
+ /**
80
+ * @see CPAC_Column::display_settings()
81
+ * @since 2.4.7
82
+ */
83
+ public function display_settings() {
84
+
85
+ $this->display_field_post_property_display();
86
+ $this->display_field_post_link_to();
87
+ }
88
+
89
+ }
classes/column/comment/reply-to.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Reply_To extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-reply_to';
19
- $this->properties['label'] = __( 'In Reply To', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-reply_to';
19
+ $this->properties['label'] = __( 'In Reply To', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/comment/type.php CHANGED
@@ -10,7 +10,7 @@ class CPAC_Column_Comment_Type extends CPAC_Column {
10
11
// Properties
12
$this->properties['type'] = 'column-type';
13
- $this->properties['label'] = __( 'Type', 'cpac' );
14
}
15
16
public function get_value( $id ) {
10
11
// Properties
12
$this->properties['type'] = 'column-type';
13
+ $this->properties['label'] = __( 'Type', 'codepress-admin-columns' );
14
}
15
16
public function get_value( $id ) {
classes/column/comment/user.php CHANGED
@@ -8,7 +8,7 @@ class CPAC_Column_Comment_User extends CPAC_Column {
8
parent::init();
9
10
$this->properties['type'] = 'column-user';
11
- $this->properties['label'] = __( 'User', 'cpac' );
12
}
13
14
public function get_value( $id ) {
8
parent::init();
9
10
$this->properties['type'] = 'column-user';
11
+ $this->properties['label'] = __( 'User', 'codepress-admin-columns' );
12
}
13
14
public function get_value( $id ) {
classes/column/comment/word-count.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Comment_Word_Count extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-word_count';
19
- $this->properties['label'] = __( 'Word count', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-word_count';
19
+ $this->properties['label'] = __( 'Word count', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/custom-field.php CHANGED
@@ -20,7 +20,7 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
20
21
// Properties
22
$this->properties['type'] = 'column-meta';
23
- $this->properties['label'] = __( 'Custom Field', 'cpac' );
24
$this->properties['classes'] = 'cpac-box-metafield';
25
$this->properties['is_cloneable'] = true;
26
$this->properties['group'] = 'custom-field';
@@ -92,19 +92,19 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
92
public function get_custom_field_types() {
93
94
$custom_field_types = array(
95
- '' => __( 'Default', 'cpac' ),
96
- 'checkmark' => __( 'Checkmark (true/false)', 'cpac' ),
97
- 'color' => __( 'Color', 'cpac' ),
98
- 'count' => __( 'Counter', 'cpac' ),
99
- 'date' => __( 'Date', 'cpac' ),
100
'excerpt' => __( 'Excerpt'),
101
- 'image' => __( 'Image', 'cpac' ),
102
- 'library_id' => __( 'Media Library', 'cpac' ),
103
- 'array' => __( 'Multiple Values', 'cpac' ),
104
- 'numeric' => __( 'Numeric', 'cpac' ),
105
- 'title_by_id' => __( 'Post Title (Post ID\'s)', 'cpac' ),
106
- 'user_by_id' => __( 'Username (User ID\'s)', 'cpac' ),
107
- 'term_by_id' => __( 'Term Name (Term ID\'s)', 'cpac' ),
108
);
109
110
// deprecated. do not use, will be removed.
@@ -376,7 +376,7 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
376
}
377
378
/**
379
- * @since NEWVERSION
380
*/
381
public function get_meta_keys() {
382
return $this->storage_model->get_meta_keys();
@@ -388,7 +388,7 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
388
*/
389
public function display_settings() { ?>
390
<tr class="column_field">
391
- <?php $this->label_view( __( "Custom Field", 'cpac' ), __( "Select your custom field.", 'cpac' ), 'field' ); ?>
392
<td class="input">
393
394
<?php if ( $meta_keys = $this->get_meta_keys() ) : ?>
@@ -398,14 +398,14 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
398
<?php endforeach; ?>
399
</select>
400
<?php else : ?>
401
- <?php _e( 'No custom fields available.', 'cpac' ); ?> <?php printf( __( 'Please create a %s item first.', 'cpac' ), '<em>' . $this->storage_model->singular_label . '</em>' ); ?>
402
<?php endif; ?>
403
404
</td>
405
</tr>
406
407
<tr class="column_field_type">
408
- <?php $this->label_view( __( "Field Type", 'cpac' ), __( 'This will determine how the value will be displayed.', 'cpac' ) . '<em>' . __( 'Type', 'cpac' ) . ': ' . $this->options->field_type . '</em>', 'field_type' ); ?>
409
<td class="input">
410
<select name="<?php $this->attr_name( 'field_type' ); ?>" id="<?php $this->attr_id( 'field_type' ); ?>">
411
<?php foreach ( $this->get_custom_field_types() as $fieldkey => $fieldtype ) : ?>
20
21
// Properties
22
$this->properties['type'] = 'column-meta';
23
+ $this->properties['label'] = __( 'Custom Field', 'codepress-admin-columns' );
24
$this->properties['classes'] = 'cpac-box-metafield';
25
$this->properties['is_cloneable'] = true;
26
$this->properties['group'] = 'custom-field';
92
public function get_custom_field_types() {
93
94
$custom_field_types = array(
95
+ '' => __( 'Default', 'codepress-admin-columns' ),
96
+ 'checkmark' => __( 'Checkmark (true/false)', 'codepress-admin-columns' ),
97
+ 'color' => __( 'Color', 'codepress-admin-columns' ),
98
+ 'count' => __( 'Counter', 'codepress-admin-columns' ),
99
+ 'date' => __( 'Date', 'codepress-admin-columns' ),
100
'excerpt' => __( 'Excerpt'),
101
+ 'image' => __( 'Image', 'codepress-admin-columns' ),
102
+ 'library_id' => __( 'Media Library', 'codepress-admin-columns' ),
103
+ 'array' => __( 'Multiple Values', 'codepress-admin-columns' ),
104
+ 'numeric' => __( 'Numeric', 'codepress-admin-columns' ),
105
+ 'title_by_id' => __( 'Post Title (Post ID\'s)', 'codepress-admin-columns' ),
106
+ 'user_by_id' => __( 'Username (User ID\'s)', 'codepress-admin-columns' ),
107
+ 'term_by_id' => __( 'Term Name (Term ID\'s)', 'codepress-admin-columns' ),
108
);
109
110
// deprecated. do not use, will be removed.
376
}
377
378
/**
379
+ * @since 2.4.7
380
*/
381
public function get_meta_keys() {
382
return $this->storage_model->get_meta_keys();
388
*/
389
public function display_settings() { ?>
390
<tr class="column_field">
391
+ <?php $this->label_view( __( "Custom Field", 'codepress-admin-columns' ), __( "Select your custom field.", 'codepress-admin-columns' ), 'field' ); ?>
392
<td class="input">
393
394
<?php if ( $meta_keys = $this->get_meta_keys() ) : ?>
398
<?php endforeach; ?>
399
</select>
400
<?php else : ?>
401
+ <?php _e( 'No custom fields available.', 'codepress-admin-columns' ); ?> <?php printf( __( 'Please create a %s item first.', 'codepress-admin-columns' ), '<em>' . $this->storage_model->singular_label . '</em>' ); ?>
402
<?php endif; ?>
403
404
</td>
405
</tr>
406
407
<tr class="column_field_type">
408
+ <?php $this->label_view( __( "Field Type", 'codepress-admin-columns' ), __( 'This will determine how the value will be displayed.', 'codepress-admin-columns' ) . '<em>' . __( 'Type', 'codepress-admin-columns' ) . ': ' . $this->options->field_type . '</em>', 'field_type' ); ?>
409
<td class="input">
410
<select name="<?php $this->attr_name( 'field_type' ); ?>" id="<?php $this->attr_id( 'field_type' ); ?>">
411
<?php foreach ( $this->get_custom_field_types() as $fieldkey => $fieldtype ) : ?>
classes/column/link/ID.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_ID extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-link_id';
19
- $this->properties['label'] = __( 'ID', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-link_id';
19
+ $this->properties['label'] = __( 'ID', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/actions.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Actions extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-actions';
19
- $this->properties['label'] = __( 'Actions', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-actions';
19
+ $this->properties['label'] = __( 'Actions', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/description.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Description extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-description';
19
- $this->properties['label'] = __( 'Description', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-description';
19
+ $this->properties['label'] = __( 'Description', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/image.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Image extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-image';
19
- $this->properties['label'] = __( 'Image', 'cpac' );
20
21
// Options
22
$this->options['image_size'] = '';
16
17
// Properties
18
$this->properties['type'] = 'column-image';
19
+ $this->properties['label'] = __( 'Image', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['image_size'] = '';
classes/column/link/length.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Length extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-length';
19
- $this->properties['label'] = __( 'Length', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-length';
19
+ $this->properties['label'] = __( 'Length', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/notes.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Notes extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-notes';
19
- $this->properties['label'] = __( 'Notes', 'cpac' );
20
21
// Options
22
$this->options['excerpt_length'] = 30;
16
17
// Properties
18
$this->properties['type'] = 'column-notes';
19
+ $this->properties['label'] = __( 'Notes', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['excerpt_length'] = 30;
classes/column/link/owner.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Owner extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-owner';
19
- $this->properties['label'] = __( 'Owner', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-owner';
19
+ $this->properties['label'] = __( 'Owner', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/rss.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Rss extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-rss';
19
- $this->properties['label'] = __( 'Rss', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-rss';
19
+ $this->properties['label'] = __( 'Rss', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/link/target.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Link_Target extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-target';
19
- $this->properties['label'] = __( 'Target', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-target';
19
+ $this->properties['label'] = __( 'Target', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/ID.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_ID extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-mediaid';
19
- $this->properties['label'] = __( 'ID', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-mediaid';
19
+ $this->properties['label'] = __( 'ID', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/alternate-text.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Alternate_Text extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-alternate_text';
19
- $this->properties['label'] = __( 'Alt', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-alternate_text';
19
+ $this->properties['label'] = __( 'Alt', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/attached-to.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Attached_To extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-attached_to';
19
- $this->properties['label'] = __( 'Attached to post', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-attached_to';
19
+ $this->properties['label'] = __( 'Attached to post', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/available-sizes.php CHANGED
@@ -17,7 +17,7 @@ class CPAC_Column_Media_Available_Sizes extends CPAC_Column {
17
18
// Properties
19
$this->properties['type'] = 'column-available_sizes';
20
- $this->properties['label'] = __( 'Available Sizes', 'cpac' );
21
}
22
23
/**
@@ -37,7 +37,7 @@ class CPAC_Column_Media_Available_Sizes extends CPAC_Column {
37
38
$url = wp_get_attachment_url( $id );
39
$filename = basename( $url );
40
- $paths[] = "<a title='{$filename}' href='{$url}'>" . __( 'full size', 'cpac' ) . "</a>";
41
42
foreach ( $intersect as $size ) {
43
$src = wp_get_attachment_image_src( $id, $size );
17
18
// Properties
19
$this->properties['type'] = 'column-available_sizes';
20
+ $this->properties['label'] = __( 'Available Sizes', 'codepress-admin-columns' );
21
}
22
23
/**
37
38
$url = wp_get_attachment_url( $id );
39
$filename = basename( $url );
40
+ $paths[] = "<a title='{$filename}' href='{$url}'>" . __( 'full size', 'codepress-admin-columns' ) . "</a>";
41
42
foreach ( $intersect as $size ) {
43
$src = wp_get_attachment_image_src( $id, $size );
classes/column/media/caption.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Caption extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-caption';
19
- $this->properties['label'] = __( 'Caption', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-caption';
19
+ $this->properties['label'] = __( 'Caption', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/description.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Description extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-description';
19
- $this->properties['label'] = __( 'Description', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-description';
19
+ $this->properties['label'] = __( 'Description', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/dimensions.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Dimensions extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-dimensions';
19
- $this->properties['label'] = __( 'Dimensions', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-dimensions';
19
+ $this->properties['label'] = __( 'Dimensions', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/exif-data.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Exif_Data extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-exif_data';
19
- $this->properties['label'] = __( 'EXIF data', 'cpac' );
20
$this->properties['is_cloneable'] = true;
21
22
// Options
@@ -35,16 +35,16 @@ class CPAC_Column_Media_Exif_Data extends CPAC_Column {
35
private function get_exif_types() {
36
37
$exif_types = array(
38
- 'aperture' => __( 'Aperture', 'cpac' ),
39
- 'credit' => __( 'Credit', 'cpac' ),
40
- 'camera' => __( 'Camera', 'cpac' ),
41
- 'caption' => __( 'Caption', 'cpac' ),
42
- 'created_timestamp' => __( 'Timestamp', 'cpac' ),
43
- 'copyright' => __( 'Copyright EXIF', 'cpac' ),
44
- 'focal_length' => __( 'Focal Length', 'cpac' ),
45
- 'iso' => __( 'ISO', 'cpac' ),
46
- 'shutter_speed' => __( 'Shutter Speed', 'cpac' ),
47
- 'title' => __( 'Title', 'cpac' ),
48
);
49
50
return $exif_types;
16
17
// Properties
18
$this->properties['type'] = 'column-exif_data';
19
+ $this->properties['label'] = __( 'EXIF data', 'codepress-admin-columns' );
20
$this->properties['is_cloneable'] = true;
21
22
// Options
35
private function get_exif_types() {
36
37
$exif_types = array(
38
+ 'aperture' => __( 'Aperture', 'codepress-admin-columns' ),
39
+ 'credit' => __( 'Credit', 'codepress-admin-columns' ),
40
+ 'camera' => __( 'Camera', 'codepress-admin-columns' ),
41
+ 'caption' => __( 'Caption', 'codepress-admin-columns' ),
42
+ 'created_timestamp' => __( 'Timestamp', 'codepress-admin-columns' ),
43
+ 'copyright' => __( 'Copyright EXIF', 'codepress-admin-columns' ),
44
+ 'focal_length' => __( 'Focal Length', 'codepress-admin-columns' ),
45
+ 'iso' => __( 'ISO', 'codepress-admin-columns' ),
46
+ 'shutter_speed' => __( 'Shutter Speed', 'codepress-admin-columns' ),
47
+ 'title' => __( 'Title', 'codepress-admin-columns' ),
48
);
49
50
return $exif_types;
classes/column/media/file-name.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_File_Name extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-file_name';
19
- $this->properties['label'] = __( 'File name', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-file_name';
19
+ $this->properties['label'] = __( 'File name', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/file-size.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_File_Size extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-file_size';
19
- $this->properties['label'] = __( 'File size', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-file_size';
19
+ $this->properties['label'] = __( 'File size', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/full-path.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Full_Path extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-full_path';
19
- $this->properties['label'] = __( 'Full path', 'cpac' );
20
21
// Options
22
$this->options['path_scope'] = 'full';
@@ -80,8 +80,8 @@ class CPAC_Column_Media_Full_Path extends CPAC_Column {
80
public function display_field_path_scope() {
81
82
$field_key = 'path_scope';
83
- $label = __( 'Path scope', 'cpac' );
84
- $description = __( 'Part of the file path to display', 'cpac' );
85
86
?>
87
<tr class="column_<?php echo $field_key; ?>">
@@ -89,17 +89,17 @@ class CPAC_Column_Media_Full_Path extends CPAC_Column {
89
<td class="input">
90
<label for="<?php $this->attr_id( $field_key ); ?>-full">
91
<input type="radio" value="full" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-full"<?php checked( $this->options->path_scope, 'full' ); ?> />
92
- <?php _e( 'Full path', 'cpac' ); ?>
93
</label>
94
<br/>
95
<label for="<?php $this->attr_id( $field_key ); ?>-relative-domain">
96
<input type="radio" value="relative-domain" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-relative-domain"<?php checked( $this->options->path_scope, 'relative-domain' ); ?> />
97
- <?php _e( 'Relative to domain', 'cpac' ); ?>
98
</label>
99
<br/>
100
<label for="<?php $this->attr_id( $field_key ); ?>-relative-uploads">
101
<input type="radio" value="relative-uploads" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-relative-uploads"<?php checked( $this->options->path_scope, 'relative-uploads' ); ?> />
102
- <?php _e( 'Relative to main uploads folder ', 'cpac' ); ?>
103
</label>
104
</td>
105
</tr>
16
17
// Properties
18
$this->properties['type'] = 'column-full_path';
19
+ $this->properties['label'] = __( 'Full path', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['path_scope'] = 'full';
80
public function display_field_path_scope() {
81
82
$field_key = 'path_scope';
83
+ $label = __( 'Path scope', 'codepress-admin-columns' );
84
+ $description = __( 'Part of the file path to display', 'codepress-admin-columns' );
85
86
?>
87
<tr class="column_<?php echo $field_key; ?>">
89
<td class="input">
90
<label for="<?php $this->attr_id( $field_key ); ?>-full">
91
<input type="radio" value="full" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-full"<?php checked( $this->options->path_scope, 'full' ); ?> />
92
+ <?php _e( 'Full path', 'codepress-admin-columns' ); ?>
93
</label>
94
<br/>
95
<label for="<?php $this->attr_id( $field_key ); ?>-relative-domain">
96
<input type="radio" value="relative-domain" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-relative-domain"<?php checked( $this->options->path_scope, 'relative-domain' ); ?> />
97
+ <?php _e( 'Relative to domain', 'codepress-admin-columns' ); ?>
98
</label>
99
<br/>
100
<label for="<?php $this->attr_id( $field_key ); ?>-relative-uploads">
101
<input type="radio" value="relative-uploads" name="<?php $this->attr_name( $field_key ); ?>" id="<?php $this->attr_id( $field_key ); ?>-relative-uploads"<?php checked( $this->options->path_scope, 'relative-uploads' ); ?> />
102
+ <?php _e( 'Relative to main uploads folder ', 'codepress-admin-columns' ); ?>
103
</label>
104
</td>
105
</tr>
classes/column/media/height.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Height extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-height';
19
- $this->properties['label'] = __( 'Height', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-height';
19
+ $this->properties['label'] = __( 'Height', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/mime-type.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Mime_Type extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-mime_type';
19
- $this->properties['label'] = __( 'Mime type', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-mime_type';
19
+ $this->properties['label'] = __( 'Mime type', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/media/width.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Media_Width extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-width';
19
- $this->properties['label'] = __( 'Width', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-width';
19
+ $this->properties['label'] = __( 'Width', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/post/ID.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_ID extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-postid';
19
- $this->properties['label'] = __( 'ID', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-postid';
19
+ $this->properties['label'] = __( 'ID', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/post/attachment-count.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Attachment_Count extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-attachment_count';
19
- $this->properties['label'] = __( 'No. of Attachments', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-attachment_count';
19
+ $this->properties['label'] = __( 'No. of Attachments', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/post/attachment.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Attachment extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-attachment';
19
- $this->properties['label'] = __( 'Attachments', 'cpac' );
20
21
// Options
22
$this->options['image_size'] = '';
16
17
// Properties
18
$this->properties['type'] = 'column-attachment';
19
+ $this->properties['label'] = __( 'Attachments', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['image_size'] = '';
classes/column/post/author-name.php CHANGED
@@ -17,12 +17,13 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
17
18
// Properties
19
$this->properties['type'] = 'column-author_name';
20
- $this->properties['label'] = __( 'Display Author As', 'cpac' );
21
$this->properties['is_cloneable'] = true;
22
$this->properties['object_property'] = 'post_author';
23
24
// Options
25
- $this->options['display_author_as'] = '';
26
}
27
28
/**
@@ -37,6 +38,27 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
37
$value = $this->get_display_name( $user_id );
38
}
39
40
return $value;
41
}
42
@@ -58,5 +80,27 @@ class CPAC_Column_Post_Author_Name extends CPAC_Column {
58
public function display_settings() {
59
60
$this->display_field_user_format();
61
}
62
}
17
18
// Properties
19
$this->properties['type'] = 'column-author_name';
20
+ $this->properties['label'] = __( 'Display Author As', 'codepress-admin-columns' );
21
$this->properties['is_cloneable'] = true;
22
$this->properties['object_property'] = 'post_author';
23
24
// Options
25
+ $this->options['display_author_as'] = '';
26
+ $this->options['user_link_to'] = '';
27
}
28
29
/**
38
$value = $this->get_display_name( $user_id );
39
}
40
41
+ switch ( $this->get_option( 'user_link_to' ) ) {
42
+ case 'edit_user':
43
+ $link = get_edit_user_link( $user_id );
44
+ break;
45
+ case 'view_user_posts':
46
+ $link = add_query_arg( array(
47
+ 'post_type' => get_post_field( 'post_type', $post_id ),
48
+ 'author' => get_the_author_meta( 'ID' )
49
+ ), 'edit.php' );
50
+ break;
51
+ case 'view_author':
52
+ $link = get_author_posts_url( $user_id );
53
+ break;
54
+ default:
55
+ $link = '';
56
+ }
57
+
58
+ if ( $link ) {
59
+ $value = '<a href="' . esc_url( $link ) . '">' . $value . '</a>';
60
+ }
61
+
62
return $value;
63
}
64
80
public function display_settings() {
81
82
$this->display_field_user_format();
83
+ $this->display_field_user_link_to();
84
}
85
+
86
+ /**
87
+ * Display settings field for the page the posts should link to
88
+ *
89
+ * @since 2.4.7
90
+ */
91
+ public function display_field_user_link_to() {
92
+
93
+ $this->display_field_select(
94
+ 'user_link_to',
95
+ __( 'Link To', 'codepress-admin-columns' ),
96
+ array(
97
+ '' => __( 'None' ),
98
+ 'edit_user' => __( 'Edit User Profile' ),
99
+ 'view_user_posts' => __( 'View User Posts' ),
100
+ 'view_author' => __( 'View Public Author Page', 'codepress-admin-columns' )
101
+ ),
102
+ __( 'Page the author name should link to.', 'codepress-admin-columns' )
103
+ );
104
+ }
105
+
106
}
classes/column/post/before-moretag.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Before_Moretag extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-before_moretag';
19
- $this->properties['label'] = __( 'Before More Tag', 'cpac' );
20
21
// Options
22
$this->options['excerpt_length'] = 15;
16
17
// Properties
18
$this->properties['type'] = 'column-before_moretag';
19
+ $this->properties['label'] = __( 'Before More Tag', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['excerpt_length'] = 15;
classes/column/post/comment-count.php CHANGED
@@ -17,7 +17,7 @@ class CPAC_Column_Post_Comment_Count extends CPAC_Column {
17
18
// Properties
19
$this->properties['type'] = 'column-comment_count';
20
- $this->properties['label'] = __( 'Comment count', 'cpac' );
21
$this->properties['is_cloneable'] = true;
22
23
// Options
@@ -31,11 +31,11 @@ class CPAC_Column_Post_Comment_Count extends CPAC_Column {
31
function get_comment_stati() {
32
33
return array(
34
- 'total_comments' => __( 'Total', 'cpac' ),
35
- 'approved' => __( 'Approved', 'cpac' ),
36
- 'moderated' => __( 'Pending', 'cpac' ),
37
- 'spam' => __( 'Spam', 'cpac' ),
38
- 'trash' => __( 'Trash', 'cpac' ),
39
);
40
}
41
@@ -96,7 +96,7 @@ class CPAC_Column_Post_Comment_Count extends CPAC_Column {
96
function display_settings() {
97
?>
98
<tr class="column_comment-count">
99
- <?php $this->label_view( __( 'Comment status', 'cpac' ), __( 'Select which comment status you like to display.', 'cpac' ), 'comment-status' ); ?>
100
<td class="input">
101
<select name="<?php $this->attr_name( 'comment_status' ); ?>" id="<?php $this->attr_id( 'comment-status' ); ?>">
102
<?php foreach ( $this->get_comment_stati() as $key => $label ) : ?>
17
18
// Properties
19
$this->properties['type'] = 'column-comment_count';
20
+ $this->properties['label'] = __( 'Comment count', 'codepress-admin-columns' );
21
$this->properties['is_cloneable'] = true;
22
23
// Options
31
function get_comment_stati() {
32
33
return array(
34
+ 'total_comments' => __( 'Total', 'codepress-admin-columns' ),
35
+ 'approved' => __( 'Approved', 'codepress-admin-columns' ),
36
+ 'moderated' => __( 'Pending', 'codepress-admin-columns' ),
37
+ 'spam' => __( 'Spam', 'codepress-admin-columns' ),
38
+ 'trash' => __( 'Trash', 'codepress-admin-columns' ),
39
);
40
}
41
96
function display_settings() {
97
?>
98
<tr class="column_comment-count">
99
+ <?php $this->label_view( __( 'Comment status', 'codepress-admin-columns' ), __( 'Select which comment status you like to display.', 'codepress-admin-columns' ), 'comment-status' ); ?>
100
<td class="input">
101
<select name="<?php $this->attr_name( 'comment_status' ); ?>" id="<?php $this->attr_id( 'comment-status' ); ?>">
102
<?php foreach ( $this->get_comment_stati() as $key => $label ) : ?>
classes/column/post/comment-status.php CHANGED
@@ -17,7 +17,7 @@ class CPAC_Column_Post_Comment_Status extends CPAC_Column {
17
18
// Properties
19
$this->properties['type'] = 'column-comment_status';
20
- $this->properties['label'] = __( 'Comment status', 'cpac' );
21
$this->properties['object_property'] = 'comment_status';
22
}
23
17
18
// Properties
19
$this->properties['type'] = 'column-comment_status';
20
+ $this->properties['label'] = __( 'Comment status', 'codepress-admin-columns' );
21
$this->properties['object_property'] = 'comment_status';
22
}
23
classes/column/post/content.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Content extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-content';
19
- $this->properties['label'] = __( 'Content', 'cpac' );
20
$this->properties['object_property'] = 'post_content';
21
22
// Options
16
17
// Properties
18
$this->properties['type'] = 'column-content';
19
+ $this->properties['label'] = __( 'Content', 'codepress-admin-columns' );
20
$this->properties['object_property'] = 'post_content';
21
22
// Options
classes/column/post/depth.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Depth extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-depth';
19
- $this->properties['label'] = __( 'Depth', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-depth';
19
+ $this->properties['label'] = __( 'Depth', 'codepress-admin-columns' );
20
}
21
22
/**
classes/column/post/estimated-reading-time.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Estimated_Reading_Time extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-estimated_reading_time';
19
- $this->properties['label'] = __( 'Estimated Reading Time', 'cpac' );
20
21
// Options
22
$this->options['words_per_minute'] = 200;
@@ -63,10 +63,10 @@ class CPAC_Column_Post_Estimated_Reading_Time extends CPAC_Column {
63
$time .= ':' . $seconds;
64
}
65
if ( $minutes < 1 ) {
66
- $time = $seconds . ' ' . _n( 'second', 'seconds', $seconds, 'cpac' );
67
}
68
else {
69
- $time .= ' ' . _n( 'minute', 'minutes', $minutes, 'cpac' );
70
}
71
}
72
@@ -104,8 +104,8 @@ class CPAC_Column_Post_Estimated_Reading_Time extends CPAC_Column {
104
public function display_settings() {
105
106
$field_key = 'words_per_minute';
107
- $label = __( 'Words per minute', 'cpac' );
108
- $description = __( 'Estimated reading time in words per minute', 'cpac' );
109
110
?>
111
<tr class="column_<?php echo $field_key; ?>">
16
17
// Properties
18
$this->properties['type'] = 'column-estimated_reading_time';
19
+ $this->properties['label'] = __( 'Estimated Reading Time', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['words_per_minute'] = 200;
63
$time .= ':' . $seconds;
64
}
65
if ( $minutes < 1 ) {
66
+ $time = $seconds . ' ' . _n( 'second', 'seconds', $seconds, 'codepress-admin-columns' );
67
}
68
else {
69
+ $time .= ' ' . _n( 'minute', 'minutes', $minutes, 'codepress-admin-columns' );
70
}
71
}
72
104
public function display_settings() {
105
106
$field_key = 'words_per_minute';
107
+ $label = __( 'Words per minute', 'codepress-admin-columns' );
108
+ $description = __( 'Estimated reading time in words per minute', 'codepress-admin-columns' );
109
110
?>
111
<tr class="column_<?php echo $field_key; ?>">
classes/column/post/excerpt.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Excerpt extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-excerpt';
19
- $this->properties['label'] = __( 'Excerpt', 'cpac' );
20
$this->properties['object_property'] = 'post_excerpt';
21
22
// Options
16
17
// Properties
18
$this->properties['type'] = 'column-excerpt';
19
+ $this->properties['label'] = __( 'Excerpt', 'codepress-admin-columns' );
20
$this->properties['object_property'] = 'post_excerpt';
21
22
// Options
classes/column/post/featured-image.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Featured_Image extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-featured_image';
19
- $this->properties['label'] = __( 'Featured Image', 'cpac' );
20
21
// Options
22
$this->options['image_size'] = '';
16
17
// Properties
18
$this->properties['type'] = 'column-featured_image';
19
+ $this->properties['label'] = __( 'Featured Image', 'codepress-admin-columns' );
20
21
// Options
22
$this->options['image_size'] = '';
classes/column/post/formats.php CHANGED
@@ -16,7 +16,7 @@ class CPAC_Column_Post_Formats extends CPAC_Column {
16
17
// Properties
18
$this->properties['type'] = 'column-post_formats';
19
- $this->properties['label'] = __( 'Post Format', 'cpac' );
20
}
21
22
/**
16
17
// Properties
18
$this->properties['type'] = 'column-post_formats';
19
+ $this->properties['label'] = __( 'Post Format', 'codepress-admin-columns' );
20
}
21
22
/**