Version Description
~ Fixed library metab-box
Download this release
Release Info
Developer | ThimPress |
Plugin | LearnPress – WordPress LMS Plugin |
Version | 3.2.6.9 |
Comparing to | |
See all releases |
Code changes from version 3.2.6.7 to 3.2.6.9
- assets/css/admin/admin.css +3395 -3389
- assets/js/admin/utils.js +2 -1
- assets/js/admin/utils.min.js +1 -1
- inc/admin/class-lp-admin-ajax.php +90 -46
- inc/admin/class-lp-modal-search-items.php +8 -7
- inc/admin/helpers/class-lp-plugins-helper.php +5 -1
- inc/admin/lp-admin-functions.php +0 -83
- inc/admin/views/meta-boxes/order/order-item.php +3 -3
- inc/background-process/class-lp-background-query-items.php +1 -1
- inc/class-lp-helper.php +13 -0
- inc/class-lp-nonce-helper.php +84 -84
- inc/class-lp-page-controller.php +4 -4
- inc/class-lp-schedules.php +3 -3
- inc/course/abstract-course.php +4 -1
- inc/course/class-lp-course-item.php +6 -2
- inc/course/class-lp-course-section.php +3 -2
- inc/curds/class-lp-order-curd.php +64 -8
- inc/curds/class-lp-user-curd.php +55 -49
- inc/libraries/meta-box/css/autocomplete.css +14 -14
- inc/libraries/meta-box/css/background.css +17 -17
- inc/libraries/meta-box/css/button-group.css +68 -68
- inc/libraries/meta-box/css/color.css +8 -8
- inc/libraries/meta-box/css/datepicker.css +231 -231
- inc/libraries/meta-box/css/divider.css +7 -7
- inc/libraries/meta-box/css/fieldset-text.css +4 -4
- inc/libraries/meta-box/css/file-input.css +6 -6
- inc/libraries/meta-box/css/file.css +51 -51
- inc/libraries/meta-box/css/heading.css +12 -12
- inc/libraries/meta-box/css/image-advanced.css +52 -52
- inc/libraries/meta-box/css/image-select.css +21 -21
- inc/libraries/meta-box/css/image.css +66 -66
- inc/libraries/meta-box/css/input-list.css +20 -20
- inc/libraries/meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css +4 -4
- inc/libraries/meta-box/css/jqueryui/jquery.ui.core.css +38 -38
- inc/libraries/meta-box/css/jqueryui/jquery.ui.datepicker.css +67 -67
- inc/libraries/meta-box/css/jqueryui/jquery.ui.slider.css +23 -23
- inc/libraries/meta-box/css/jqueryui/jquery.ui.theme.css +248 -248
- inc/libraries/meta-box/css/map.css +49 -49
- inc/libraries/meta-box/css/media.css +50 -50
- inc/libraries/meta-box/css/oembed.css +11 -11
- inc/libraries/meta-box/css/osm.css +49 -49
- inc/libraries/meta-box/css/range.css +9 -9
- inc/libraries/meta-box/css/select-advanced.css +19 -19
- inc/libraries/meta-box/css/select-tree.css +7 -7
- inc/libraries/meta-box/css/select.css +11 -11
- inc/libraries/meta-box/css/select2/select2.css +484 -484
- inc/libraries/meta-box/css/slider.css +13 -13
- inc/libraries/meta-box/css/style-rtl.css +11 -11
- inc/libraries/meta-box/css/style.css +143 -143
- inc/libraries/meta-box/css/switch.css +94 -94
- inc/libraries/meta-box/css/text-list.css +19 -19
- inc/libraries/meta-box/css/upload.css +28 -28
- inc/libraries/meta-box/css/video.css +25 -25
- inc/libraries/meta-box/css/wysiwyg.css +6 -6
- inc/libraries/meta-box/inc/about/about.php +230 -230
- inc/libraries/meta-box/inc/about/css/about.css +219 -219
- inc/libraries/meta-box/inc/about/css/style.css +57 -57
- inc/libraries/meta-box/inc/about/images/meta-box.svg +5 -5
- inc/libraries/meta-box/inc/about/js/about.js +26 -26
- inc/libraries/meta-box/inc/about/js/script.js +22 -22
- inc/libraries/meta-box/inc/about/sections/extensions.php +351 -351
- inc/libraries/meta-box/inc/about/sections/getting-started.php +36 -36
- inc/libraries/meta-box/inc/about/sections/newsletter.php +16 -16
- inc/libraries/meta-box/inc/about/sections/support.php +35 -35
- inc/libraries/meta-box/inc/about/sections/tabs.php +14 -14
- inc/libraries/meta-box/inc/about/sections/upgrade.php +26 -26
- inc/libraries/meta-box/inc/about/sections/welcome.php +24 -24
- inc/libraries/meta-box/inc/autoloader.php +180 -180
- inc/libraries/meta-box/inc/clone.php +123 -123
- inc/libraries/meta-box/inc/core.php +117 -117
- inc/libraries/meta-box/inc/field-registry.php +64 -64
- inc/libraries/meta-box/inc/field.php +695 -695
- inc/libraries/meta-box/inc/fields/autocomplete.php +125 -125
- inc/libraries/meta-box/inc/fields/background.php +167 -167
- inc/libraries/meta-box/inc/fields/button-group.php +82 -82
- inc/libraries/meta-box/inc/fields/button.php +60 -60
- inc/libraries/meta-box/inc/fields/checkbox-list.php +24 -24
- inc/libraries/meta-box/inc/fields/checkbox.php +55 -55
- inc/libraries/meta-box/inc/fields/choice.php +78 -78
- inc/libraries/meta-box/inc/fields/color.php +96 -96
- inc/libraries/meta-box/inc/fields/custom-html.php +27 -27
- inc/libraries/meta-box/inc/fields/date.php +32 -32
- inc/libraries/meta-box/inc/fields/datetime.php +278 -278
- inc/libraries/meta-box/inc/fields/divider.php +43 -43
- inc/libraries/meta-box/inc/fields/fieldset-text.php +125 -125
- inc/libraries/meta-box/inc/fields/file-input.php +62 -62
- inc/libraries/meta-box/inc/fields/file-upload.php +54 -54
- inc/libraries/meta-box/inc/fields/file.php +369 -369
- inc/libraries/meta-box/inc/fields/heading.php +43 -43
- inc/libraries/meta-box/inc/fields/image-advanced.php +93 -93
- inc/libraries/meta-box/inc/fields/image-select.php +72 -72
- inc/libraries/meta-box/inc/fields/image-upload.php +40 -40
- inc/libraries/meta-box/inc/fields/image.php +144 -144
- inc/libraries/meta-box/inc/fields/input-list.php +96 -96
- inc/libraries/meta-box/inc/fields/input.php +97 -97
- inc/libraries/meta-box/inc/fields/key-value.php +154 -154
- inc/libraries/meta-box/inc/fields/map.php +228 -228
- inc/libraries/meta-box/inc/fields/media.php +190 -190
- inc/libraries/meta-box/inc/fields/multiple-values.php +49 -49
- inc/libraries/meta-box/inc/fields/number.php +54 -54
- inc/libraries/meta-box/inc/fields/object-choice.php +124 -124
- inc/libraries/meta-box/inc/fields/oembed.php +145 -145
- inc/libraries/meta-box/inc/fields/osm.php +175 -175
- inc/libraries/meta-box/inc/fields/password.php +25 -25
- inc/libraries/meta-box/inc/fields/post.php +135 -135
- inc/libraries/meta-box/inc/fields/radio.php +24 -24
- inc/libraries/meta-box/inc/fields/range.php +73 -73
- inc/libraries/meta-box/inc/fields/select-advanced.php +83 -83
- inc/libraries/meta-box/inc/fields/select-tree.php +63 -63
- inc/libraries/meta-box/inc/fields/select.php +96 -96
- inc/libraries/meta-box/inc/fields/sidebar.php +68 -68
- inc/libraries/meta-box/inc/fields/single-image.php +76 -76
- inc/libraries/meta-box/inc/fields/slider.php +78 -78
- inc/libraries/meta-box/inc/fields/switch.php +97 -97
- inc/libraries/meta-box/inc/fields/taxonomy-advanced.php +132 -132
- inc/libraries/meta-box/inc/fields/taxonomy.php +212 -212
- inc/libraries/meta-box/inc/fields/text-list.php +127 -127
- inc/libraries/meta-box/inc/fields/text.php +55 -55
- inc/libraries/meta-box/inc/fields/textarea.php +88 -88
- inc/libraries/meta-box/inc/fields/thickbox-image.php +80 -80
- inc/libraries/meta-box/inc/fields/time.php +32 -32
- inc/libraries/meta-box/inc/fields/user.php +80 -80
- inc/libraries/meta-box/inc/fields/video.php +147 -147
- inc/libraries/meta-box/inc/fields/wysiwyg.php +99 -99
- inc/libraries/meta-box/inc/functions.php +29 -385
assets/css/admin/admin.css
CHANGED
@@ -1,3389 +1,3395 @@
|
|
1 |
-
/**
|
2 |
-
* Mixin
|
3 |
-
*/
|
4 |
-
@-webkit-keyframes rotating4 /* Safari and Chrome */ {
|
5 |
-
from {
|
6 |
-
-webkit-transform: rotate(0deg);
|
7 |
-
-o-transform: rotate(0deg);
|
8 |
-
transform: rotate(0deg); }
|
9 |
-
to {
|
10 |
-
-webkit-transform: rotate(360deg);
|
11 |
-
-o-transform: rotate(360deg);
|
12 |
-
transform: rotate(360deg); } }
|
13 |
-
|
14 |
-
@keyframes rotating4 {
|
15 |
-
from {
|
16 |
-
-ms-transform: rotate(0deg);
|
17 |
-
-moz-transform: rotate(0deg);
|
18 |
-
-webkit-transform: rotate(0deg);
|
19 |
-
-o-transform: rotate(0deg);
|
20 |
-
transform: rotate(0deg); }
|
21 |
-
to {
|
22 |
-
-ms-transform: rotate(360deg);
|
23 |
-
-moz-transform: rotate(360deg);
|
24 |
-
-webkit-transform: rotate(360deg);
|
25 |
-
-o-transform: rotate(360deg);
|
26 |
-
transform: rotate(360deg); } }
|
27 |
-
|
28 |
-
@-webkit-keyframes animation4 /* Safari and Chrome */ {
|
29 |
-
from {
|
30 |
-
left: -40%;
|
31 |
-
width: 40%; }
|
32 |
-
to {
|
33 |
-
left: 100%;
|
34 |
-
width: 10%; } }
|
35 |
-
|
36 |
-
@keyframes animation4 {
|
37 |
-
from {
|
38 |
-
left: -40%;
|
39 |
-
width: 40%; }
|
40 |
-
to {
|
41 |
-
left: 100%;
|
42 |
-
width: 10%; } }
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Styles for displaying list of table
|
46 |
-
*/
|
47 |
-
.lp-toolbar-buttons {
|
48 |
-
position: relative;
|
49 |
-
z-index: 10;
|
50 |
-
height: 50px; }
|
51 |
-
.lp-toolbar-buttons .lp-toolbar-btn {
|
52 |
-
width: 30px;
|
53 |
-
height: 30px;
|
54 |
-
padding: 0;
|
55 |
-
text-align: center;
|
56 |
-
position: relative;
|
57 |
-
vertical-align: middle;
|
58 |
-
cursor: pointer;
|
59 |
-
_background: #FFF;
|
60 |
-
display: inline-block;
|
61 |
-
margin: 0; }
|
62 |
-
.lp-toolbar-buttons .lp-toolbar-btn a, .lp-toolbar-buttons .lp-toolbar-btn span {
|
63 |
-
color: #999;
|
64 |
-
box-shadow: none;
|
65 |
-
outline: none; }
|
66 |
-
.lp-toolbar-buttons .lp-toolbar-btn .lp-btn-icon {
|
67 |
-
width: 30px;
|
68 |
-
height: 30px;
|
69 |
-
text-align: center;
|
70 |
-
position: absolute;
|
71 |
-
top: 50%;
|
72 |
-
margin-top: -15px;
|
73 |
-
left: 50%;
|
74 |
-
margin-left: -15px;
|
75 |
-
line-height: 30px; }
|
76 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move {
|
77 |
-
cursor: ns-resize; }
|
78 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move span {
|
79 |
-
cursor: ns-resize; }
|
80 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move:hover a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move span {
|
81 |
-
color: #0085ba; }
|
82 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove {
|
83 |
-
cursor: pointer; }
|
84 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove:hover a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove:hover span {
|
85 |
-
color: #d05d5d; }
|
86 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle .dashicons-arrow-down,
|
87 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle .dashicons-arrow-down-alt2 {
|
88 |
-
display: none; }
|
89 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-up,
|
90 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-up-alt2 {
|
91 |
-
display: none; }
|
92 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-down,
|
93 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-down-alt2 {
|
94 |
-
display: inline-block; }
|
95 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown {
|
96 |
-
color: #000; }
|
97 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul {
|
98 |
-
position: absolute;
|
99 |
-
top: 100%;
|
100 |
-
right: 0;
|
101 |
-
background: #fdfeff;
|
102 |
-
margin: 0px 0;
|
103 |
-
border: 1px solid #DDD;
|
104 |
-
display: none; }
|
105 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li {
|
106 |
-
list-style: none;
|
107 |
-
margin: 0; }
|
108 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li a {
|
109 |
-
display: block;
|
110 |
-
white-space: nowrap;
|
111 |
-
text-decoration: none;
|
112 |
-
padding: 3px 8px;
|
113 |
-
font-size: 12px;
|
114 |
-
text-align: right;
|
115 |
-
color: #0073aa;
|
116 |
-
margin: 0; }
|
117 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li a:hover {
|
118 |
-
background: #dbf5ff; }
|
119 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li.active a {
|
120 |
-
background: #dbf5ff; }
|
121 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled:hover {
|
122 |
-
_background: #F5F5F5; }
|
123 |
-
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled .lp-btn-icon, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled:hover .lp-btn-icon {
|
124 |
-
color: #DDD; }
|
125 |
-
.lp-toolbar-buttons .lp-toolbar-btn:hover {
|
126 |
-
background: #dbf5ff;
|
127 |
-
display: inline-block; }
|
128 |
-
.lp-toolbar-buttons .lp-toolbar-btn:hover .lp-btn-icon {
|
129 |
-
color: #00a0d2; }
|
130 |
-
.lp-toolbar-buttons .lp-toolbar-btn:hover ul {
|
131 |
-
display: block; }
|
132 |
-
.lp-toolbar-buttons .lp-toolbar-btn:hover ul:hover {
|
133 |
-
display: block; }
|
134 |
-
|
135 |
-
.column-content-actions.lp-toolbar-buttons {
|
136 |
-
white-space: nowrap;
|
137 |
-
width: 30px;
|
138 |
-
padding: 0; }
|
139 |
-
|
140 |
-
.learn-press-box-data {
|
141 |
-
border: 1px solid #DDD;
|
142 |
-
margin: 20px 0 0 0;
|
143 |
-
position: relative; }
|
144 |
-
.learn-press-box-data .lp-box-data-head {
|
145 |
-
padding: 10px 15px;
|
146 |
-
background: #FFF; }
|
147 |
-
.learn-press-box-data .lp-box-data-head h3 {
|
148 |
-
font-size: 18px;
|
149 |
-
padding: 15px;
|
150 |
-
margin: 0; }
|
151 |
-
.learn-press-box-data .lp-box-data-head .lp-box-data-actions {
|
152 |
-
float: right;
|
153 |
-
position: relative;
|
154 |
-
z-index: 10; }
|
155 |
-
.learn-press-box-data .lp-box-data-head .lp-box-data-actions .lp-btn {
|
156 |
-
display: inline-block;
|
157 |
-
width: 30px;
|
158 |
-
text-align: center;
|
159 |
-
height: 50px;
|
160 |
-
line-height: 46px;
|
161 |
-
vertical-align: middle; }
|
162 |
-
.learn-press-box-data .lp-box-data-head .lp-box-data-actions:after {
|
163 |
-
clear: both;
|
164 |
-
display: block;
|
165 |
-
content: ''; }
|
166 |
-
.learn-press-box-data .lp-box-data-head:after {
|
167 |
-
clear: both;
|
168 |
-
display: block;
|
169 |
-
content: ''; }
|
170 |
-
.learn-press-box-data .lp-box-data-content {
|
171 |
-
padding: 15px;
|
172 |
-
border-top: 1px solid #DDD;
|
173 |
-
background: #FFF; }
|
174 |
-
.learn-press-box-data .lp-box-data-foot {
|
175 |
-
padding: 15px; }
|
176 |
-
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-up,
|
177 |
-
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-up-alt2 {
|
178 |
-
display: none; }
|
179 |
-
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-down,
|
180 |
-
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-down-alt2 {
|
181 |
-
display: inline-block; }
|
182 |
-
.learn-press-box-data.closed .lp-box-data-content {
|
183 |
-
display: none; }
|
184 |
-
|
185 |
-
.lp-list-options {
|
186 |
-
width: 100%;
|
187 |
-
border-collapse: collapse; }
|
188 |
-
.lp-list-options th, .lp-list-options td {
|
189 |
-
padding: 10px 15px;
|
190 |
-
background: #F5F5F5;
|
191 |
-
border-top: 1px solid #DDD; }
|
192 |
-
.lp-list-options thead th {
|
193 |
-
text-align: left; }
|
194 |
-
.lp-list-options tbody tr td {
|
195 |
-
background: #f4fcff;
|
196 |
-
padding: 0 15px; }
|
197 |
-
.lp-list-options tbody tr td.lp-toolbar-buttons {
|
198 |
-
width: 30px;
|
199 |
-
white-space: nowrap;
|
200 |
-
position: relative;
|
201 |
-
height: 42px;
|
202 |
-
_overflow: hidden; }
|
203 |
-
.lp-list-options tbody tr td.lp-toolbar-buttons .lp-toolbar-btn {
|
204 |
-
height: 43px;
|
205 |
-
position: relative;
|
206 |
-
margin-bottom: -4px;
|
207 |
-
margin-top: -4px;
|
208 |
-
visibility: hidden; }
|
209 |
-
.lp-list-options tbody tr:nth-child(odd) td {
|
210 |
-
background: #FFF; }
|
211 |
-
.lp-list-options tbody tr:hover td.lp-toolbar-buttons .lp-toolbar-btn {
|
212 |
-
visibility: visible; }
|
213 |
-
.lp-list-options tbody td {
|
214 |
-
text-align: left; }
|
215 |
-
.lp-list-options tbody td input[type="text"] {
|
216 |
-
width: 100%; }
|
217 |
-
.lp-list-options tbody td input[type="text"][value=""] {
|
218 |
-
font-style: italic; }
|
219 |
-
.lp-list-options tbody td.column-content-answer_correct {
|
220 |
-
width: 125px; }
|
221 |
-
.lp-list-options tbody td.lp-remove-list-option, .lp-list-options tbody td.lp-move-list-option {
|
222 |
-
width: 20px;
|
223 |
-
padding: 0;
|
224 |
-
text-align: center; }
|
225 |
-
.lp-list-options tbody td.lp-remove-list-option a, .lp-list-options tbody td.lp-move-list-option a {
|
226 |
-
visibility: hidden;
|
227 |
-
color: #999; }
|
228 |
-
.lp-list-options tbody td.lp-remove-list-option:hover, .lp-list-options tbody td.lp-move-list-option:hover {
|
229 |
-
background: #dbf5ff; }
|
230 |
-
.lp-list-options tbody td.lp-move-list-option {
|
231 |
-
cursor: ns-resize; }
|
232 |
-
.lp-list-options tbody td.lp-move-list-option a {
|
233 |
-
cursor: ns-resize; }
|
234 |
-
.lp-list-options tbody td.lp-move-list-option:hover a {
|
235 |
-
color: #0085ba; }
|
236 |
-
.lp-list-options tbody td.lp-remove-list-option {
|
237 |
-
cursor: pointer; }
|
238 |
-
.lp-list-options tbody td.lp-remove-list-option:hover a {
|
239 |
-
color: #d05d5d; }
|
240 |
-
|
241 |
-
.lp-animation {
|
242 |
-
-webkit-animation: spin 4s linear infinite;
|
243 |
-
-moz-animation: spin 4s linear infinite;
|
244 |
-
animation: spin 4s linear infinite; }
|
245 |
-
|
246 |
-
.lp-ajax-search {
|
247 |
-
position: relative;
|
248 |
-
display: inline-block;
|
249 |
-
z-index: 999999; }
|
250 |
-
.lp-ajax-search .lp-search-term {
|
251 |
-
height: 28px;
|
252 |
-
min-width: 300px;
|
253 |
-
margin: 0;
|
254 |
-
-webkit-box-shadow: none;
|
255 |
-
-moz-box-shadow: none;
|
256 |
-
box-shadow: none;
|
257 |
-
outline: none; }
|
258 |
-
.lp-ajax-search .lp-search-term:focus {
|
259 |
-
-webkit-box-shadow: none;
|
260 |
-
-moz-box-shadow: none;
|
261 |
-
box-shadow: none; }
|
262 |
-
.lp-ajax-search .lp-search-term:focus {
|
263 |
-
-webkit-box-shadow: none;
|
264 |
-
-moz-box-shadow: none;
|
265 |
-
box-shadow: none;
|
266 |
-
outline: none; }
|
267 |
-
.lp-ajax-search .lp-search-term:focus:focus {
|
268 |
-
-webkit-box-shadow: none;
|
269 |
-
-moz-box-shadow: none;
|
270 |
-
box-shadow: none; }
|
271 |
-
.lp-ajax-search .lp-search-results {
|
272 |
-
position: absolute;
|
273 |
-
background: #FFF;
|
274 |
-
border: 1px solid #DDD;
|
275 |
-
top: 100%;
|
276 |
-
width: 100%;
|
277 |
-
margin: -1px 0 0 0;
|
278 |
-
-webkit-box-sizing: border-box;
|
279 |
-
-moz-box-sizing: border-box;
|
280 |
-
box-sizing: border-box; }
|
281 |
-
.lp-ajax-search .lp-search-results .lp-search-items {
|
282 |
-
margin: 0;
|
283 |
-
max-height: 300px;
|
284 |
-
overflow: auto; }
|
285 |
-
.lp-ajax-search .lp-search-results .lp-search-items li {
|
286 |
-
margin: 0; }
|
287 |
-
.lp-ajax-search .lp-search-results .lp-search-items li label {
|
288 |
-
display: block;
|
289 |
-
padding: 8px 10px;
|
290 |
-
border-bottom: 1px solid #f3f3f3; }
|
291 |
-
.lp-ajax-search .lp-search-results .lp-search-items li label input {
|
292 |
-
float: left;
|
293 |
-
margin-right: -100%;
|
294 |
-
margin-top: 1px; }
|
295 |
-
.lp-ajax-search .lp-search-results .lp-search-items li label span {
|
296 |
-
margin-left: 25px;
|
297 |
-
display: inline-block; }
|
298 |
-
.lp-ajax-search .lp-search-results .lp-search-items li label span a.lp-add-item {
|
299 |
-
visibility: hidden;
|
300 |
-
margin-left: 10px; }
|
301 |
-
.lp-ajax-search .lp-search-results .lp-search-items li.active {
|
302 |
-
background: #dbf5ff; }
|
303 |
-
.lp-ajax-search .lp-search-results .lp-search-items li:hover {
|
304 |
-
background: #0085ba;
|
305 |
-
color: #FFF; }
|
306 |
-
.lp-ajax-search .lp-search-results .lp-search-items li:hover a.lp-add-item {
|
307 |
-
visibility: visible; }
|
308 |
-
.lp-ajax-search .lp-search-results .lp-search-actions {
|
309 |
-
border-top: 1px solid #DDD;
|
310 |
-
padding: 10px;
|
311 |
-
margin: 0; }
|
312 |
-
|
313 |
-
#learn-press-ajax-search-overlay {
|
314 |
-
position: fixed;
|
315 |
-
top: 0;
|
316 |
-
left: 0;
|
317 |
-
width: 100%;
|
318 |
-
height: 100%;
|
319 |
-
opacity: 0;
|
320 |
-
z-index: 99999;
|
321 |
-
display: none; }
|
322 |
-
|
323 |
-
.update-overlay {
|
324 |
-
position: fixed;
|
325 |
-
top: 0;
|
326 |
-
left: 0;
|
327 |
-
width: 100%;
|
328 |
-
height: 100%;
|
329 |
-
z-index: 99999;
|
330 |
-
background: rgba(255, 255, 255, 0.5); }
|
331 |
-
|
332 |
-
#course-editor.ajax-search #learn-press-ajax-search-overlay {
|
333 |
-
display: block; }
|
334 |
-
|
335 |
-
#course-editor.ajax-search .lp-ajax-search {
|
336 |
-
z-index: 100000; }
|
337 |
-
|
338 |
-
.advanced-list {
|
339 |
-
list-style: none; }
|
340 |
-
.advanced-list li {
|
341 |
-
display: inline-block;
|
342 |
-
background: #EEE;
|
343 |
-
padding: 3px 8px;
|
344 |
-
-webkit-border-radius: 2px;
|
345 |
-
-moz-border-radius: 2px;
|
346 |
-
border-radius: 2px; }
|
347 |
-
.advanced-list li .remove-item {
|
348 |
-
display: inline-block;
|
349 |
-
text-decoration: none;
|
350 |
-
line-height: 1;
|
351 |
-
vertical-align: middle;
|
352 |
-
margin-right: 5px;
|
353 |
-
cursor: pointer; }
|
354 |
-
.advanced-list li .remove-item:hover {
|
355 |
-
color: #0085ba; }
|
356 |
-
.advanced-list li .remove-item:before {
|
357 |
-
font-family: dashicons;
|
358 |
-
content: "\f335";
|
359 |
-
text-decoration: none; }
|
360 |
-
.advanced-list li span {
|
361 |
-
display: inline-block; }
|
362 |
-
.advanced-list.locked .remove-item {
|
363 |
-
display: none; }
|
364 |
-
|
365 |
-
.lp-label-counter {
|
366 |
-
border-radius: 20px;
|
367 |
-
display: inline-block;
|
368 |
-
height: 20px;
|
369 |
-
padding: 0 10px;
|
370 |
-
background: #2196F3;
|
371 |
-
line-height: 20px;
|
372 |
-
color: #FFF;
|
373 |
-
font-weight: bold; }
|
374 |
-
.lp-label-counter.disabled {
|
375 |
-
background: #DDD; }
|
376 |
-
|
377 |
-
@-moz-keyframes spin {
|
378 |
-
100% {
|
379 |
-
-moz-transform: rotate(360deg); } }
|
380 |
-
|
381 |
-
@-webkit-keyframes spin {
|
382 |
-
100% {
|
383 |
-
-webkit-transform: rotate(360deg); } }
|
384 |
-
|
385 |
-
@keyframes spin {
|
386 |
-
100% {
|
387 |
-
-webkit-transform: rotate(360deg);
|
388 |
-
transform: rotate(360deg); } }
|
389 |
-
|
390 |
-
.rwmb-duration {
|
391 |
-
border: 1px solid #ddd; }
|
392 |
-
|
393 |
-
ul .clearfix {
|
394 |
-
clear: both;
|
395 |
-
height: 0;
|
396 |
-
opacity: 0; }
|
397 |
-
|
398 |
-
.clearfix-after:after {
|
399 |
-
clear: both;
|
400 |
-
height: 0;
|
401 |
-
opacity: 0;
|
402 |
-
display: block;
|
403 |
-
content: ''; }
|
404 |
-
|
405 |
-
@-moz-keyframes lp-spinner {
|
406 |
-
100% {
|
407 |
-
-moz-transform: rotate(360deg); } }
|
408 |
-
|
409 |
-
@-webkit-keyframes lp-spinner {
|
410 |
-
100% {
|
411 |
-
-webkit-transform: rotate(360deg); } }
|
412 |
-
|
413 |
-
@keyframes lp-spinner {
|
414 |
-
100% {
|
415 |
-
-webkit-transform: rotate(360deg);
|
416 |
-
transform: rotate(360deg); } }
|
417 |
-
|
418 |
-
.lp-modal-choose-items-open {
|
419 |
-
overflow: hidden; }
|
420 |
-
|
421 |
-
.lp-modal-search {
|
422 |
-
background-color: red;
|
423 |
-
color: #777;
|
424 |
-
padding: 20px;
|
425 |
-
height: 100%; }
|
426 |
-
.lp-modal-search li.selected {
|
427 |
-
display: none; }
|
428 |
-
|
429 |
-
/* message box */
|
430 |
-
#learn-press-message-box-block {
|
431 |
-
position: fixed;
|
432 |
-
top: 0;
|
433 |
-
left: 0;
|
434 |
-
right: 0;
|
435 |
-
bottom: 0;
|
436 |
-
background-color: #000;
|
437 |
-
z-index: 99999;
|
438 |
-
opacity: 0.8; }
|
439 |
-
|
440 |
-
#learn-press-message-box-window {
|
441 |
-
position: fixed;
|
442 |
-
top: 0;
|
443 |
-
bottom: 0;
|
444 |
-
left: 0;
|
445 |
-
right: 0;
|
446 |
-
z-index: 100000;
|
447 |
-
color: #FFF;
|
448 |
-
text-align: center; }
|
449 |
-
|
450 |
-
#message-box-wrap {
|
451 |
-
margin: 0 auto;
|
452 |
-
/* text-align: center; */
|
453 |
-
display: inline-block;
|
454 |
-
text-align: left;
|
455 |
-
max-width: 70%; }
|
456 |
-
|
457 |
-
.message-box-title {
|
458 |
-
color: #FFF;
|
459 |
-
margin: 0 0 40px 0;
|
460 |
-
font-size: 34px; }
|
461 |
-
|
462 |
-
.message-box-content {
|
463 |
-
font-size: 16px;
|
464 |
-
line-height: 1.5; }
|
465 |
-
|
466 |
-
.message-box-animation {
|
467 |
-
background-image: url("../../images/animation.gif");
|
468 |
-
width: 220px;
|
469 |
-
height: 20px;
|
470 |
-
margin: 20px 0 0; }
|
471 |
-
|
472 |
-
.message-box-buttons {
|
473 |
-
margin: 20px 0 0;
|
474 |
-
border-top: 1px solid #929292;
|
475 |
-
padding-top: 20px; }
|
476 |
-
|
477 |
-
.message-box-button {
|
478 |
-
margin-right: 10px !important; }
|
479 |
-
|
480 |
-
.tipsy {
|
481 |
-
position: absolute; }
|
482 |
-
|
483 |
-
.learnpress a, .learnpress a:active {
|
484 |
-
outline: none;
|
485 |
-
box-shadow: none; }
|
486 |
-
|
487 |
-
.learnpress .lp-install-sample-data-options {
|
488 |
-
border: 1px solid #DDD;
|
489 |
-
padding: 0 20px 10px 20px; }
|
490 |
-
.learnpress .lp-install-sample-data-options legend {
|
491 |
-
font-size: 16px; }
|
492 |
-
|
493 |
-
/* Metabox email template field */
|
494 |
-
.lp-email-templates {
|
495 |
-
overflow: hidden;
|
496 |
-
margin-top: 5px; }
|
497 |
-
|
498 |
-
.learn-press-email-variables {
|
499 |
-
list-style: none;
|
500 |
-
padding: 0;
|
501 |
-
margin: 20px 0 0; }
|
502 |
-
.learn-press-email-variables li {
|
503 |
-
display: inline-block;
|
504 |
-
cursor: pointer; }
|
505 |
-
|
506 |
-
/* Metabox dropdown pages field */
|
507 |
-
.learn-press-dropdown-pages input[type="text"] {
|
508 |
-
min-width: 300px;
|
509 |
-
height: 29px;
|
510 |
-
vertical-align: top;
|
511 |
-
margin: 0; }
|
512 |
-
|
513 |
-
.learn-press-dropdown-pages .select2-selection__rendered {
|
514 |
-
line-height: 26px !important; }
|
515 |
-
|
516 |
-
.learn-press-dropdown-pages .quick-add-page-inline {
|
517 |
-
margin-top: 0; }
|
518 |
-
|
519 |
-
/* Tooltip */
|
520 |
-
.learn-press-tooltip {
|
521 |
-
display: inline-block;
|
522 |
-
font-size: 17px;
|
523 |
-
vertical-align: middle;
|
524 |
-
margin: 0 5px;
|
525 |
-
color: #999; }
|
526 |
-
.learn-press-tooltip.icon:after {
|
527 |
-
font-family: Dashicons;
|
528 |
-
content: "\f223"; }
|
529 |
-
.learn-press-tooltip:hover {
|
530 |
-
color: #0073aa;
|
531 |
-
opacity: 1; }
|
532 |
-
|
533 |
-
/* Metabox payment order field */
|
534 |
-
.rwmb-payment-order-wrapper .rwmb-label {
|
535 |
-
margin-bottom: 20px !important; }
|
536 |
-
|
537 |
-
.rwmb-payment-order-wrapper .rwmb-input {
|
538 |
-
margin-left: 0 !important; }
|
539 |
-
|
540 |
-
.learn-press-payments,
|
541 |
-
.learn-press-emails {
|
542 |
-
border-collapse: collapse;
|
543 |
-
border: 1px solid #DDD;
|
544 |
-
width: 100%;
|
545 |
-
font-size: 14px; }
|
546 |
-
.learn-press-payments th, .learn-press-payments td,
|
547 |
-
.learn-press-emails th,
|
548 |
-
.learn-press-emails td {
|
549 |
-
padding: 10px; }
|
550 |
-
.learn-press-payments .order,
|
551 |
-
.learn-press-emails .order {
|
552 |
-
width: 30px;
|
553 |
-
text-align: center;
|
554 |
-
padding-right: 0;
|
555 |
-
cursor: not-allowed;
|
556 |
-
color: #DDD; }
|
557 |
-
.learn-press-payments .name,
|
558 |
-
.learn-press-emails .name {
|
559 |
-
font-weight: normal;
|
560 |
-
text-transform: capitalize;
|
561 |
-
min-width: 250px; }
|
562 |
-
.learn-press-payments .name a,
|
563 |
-
.learn-press-emails .name a {
|
564 |
-
text-decoration: none; }
|
565 |
-
.learn-press-payments .status,
|
566 |
-
.learn-press-emails .status {
|
567 |
-
width: 100px;
|
568 |
-
text-align: center;
|
569 |
-
cursor: pointer; }
|
570 |
-
.learn-press-payments .status .dashicons,
|
571 |
-
.learn-press-emails .status .dashicons {
|
572 |
-
background: #DDD;
|
573 |
-
border-radius: 50%;
|
574 |
-
color: #FFF; }
|
575 |
-
.learn-press-payments .status a,
|
576 |
-
.learn-press-emails .status a {
|
577 |
-
display: block;
|
578 |
-
font-size: 12px;
|
579 |
-
text-decoration: none;
|
580 |
-
margin-top: 5px; }
|
581 |
-
.learn-press-payments .status.enabled .dashicons,
|
582 |
-
.learn-press-emails .status.enabled .dashicons {
|
583 |
-
background: #0085ba; }
|
584 |
-
.learn-press-payments thead th,
|
585 |
-
.learn-press-emails thead th {
|
586 |
-
text-align: left;
|
587 |
-
border-bottom: 1px solid #DDD; }
|
588 |
-
.learn-press-payments tbody tr:nth-child(even) td,
|
589 |
-
.learn-press-emails tbody tr:nth-child(even) td {
|
590 |
-
background: #FFF; }
|
591 |
-
.learn-press-payments tbody tr:nth-child(odd) td,
|
592 |
-
.learn-press-emails tbody tr:nth-child(odd) td {
|
593 |
-
background: #F5F5F5; }
|
594 |
-
.learn-press-payments tbody td,
|
595 |
-
.learn-press-emails tbody td {
|
596 |
-
border-bottom: 1px solid #EEE; }
|
597 |
-
.learn-press-payments tbody .ui-sortable-helper,
|
598 |
-
.learn-press-emails tbody .ui-sortable-helper {
|
599 |
-
border: 1px solid #DDD;
|
600 |
-
margin-left: -1px; }
|
601 |
-
.learn-press-payments tbody .ui-sortable-placeholder,
|
602 |
-
.learn-press-emails tbody .ui-sortable-placeholder {
|
603 |
-
visibility: visible !important;
|
604 |
-
border: 1px solid #DDD; }
|
605 |
-
.learn-press-payments tbody .ui-sortable-placeholder td,
|
606 |
-
.learn-press-emails tbody .ui-sortable-placeholder td {
|
607 |
-
background: #F7F7F7;
|
608 |
-
height: 35px;
|
609 |
-
padding: 0; }
|
610 |
-
.learn-press-payments ~ .email-actions,
|
611 |
-
.learn-press-emails ~ .email-actions {
|
612 |
-
text-align: right; }
|
613 |
-
.learn-press-payments.sortable .order:hover,
|
614 |
-
.learn-press-emails.sortable .order:hover {
|
615 |
-
cursor: ns-resize;
|
616 |
-
color: #0073aa; }
|
617 |
-
|
618 |
-
/* Submenu tools/templates */
|
619 |
-
.lp-template-overrides {
|
620 |
-
margin-top: 20px; }
|
621 |
-
.lp-template-overrides thead th h4 {
|
622 |
-
margin: 0; }
|
623 |
-
.lp-template-overrides tbody th {
|
624 |
-
font-weight: bold; }
|
625 |
-
.lp-template-overrides tbody th p {
|
626 |
-
margin: 0 0 0 10px;
|
627 |
-
display: inline-block; }
|
628 |
-
.lp-template-overrides tbody th p a {
|
629 |
-
font-weight: normal;
|
630 |
-
outline: none;
|
631 |
-
border: none;
|
632 |
-
box-shadow: none;
|
633 |
-
margin: 0;
|
634 |
-
padding: 2px 8px;
|
635 |
-
border-radius: 3px; }
|
636 |
-
.lp-template-overrides tbody th p a.current {
|
637 |
-
background: #00aadc;
|
638 |
-
color: #FFF; }
|
639 |
-
.lp-template-overrides .template-row.outdated code:before, .lp-template-overrides .template-row.up-to-date code:before {
|
640 |
-
font-family: Dashicons;
|
641 |
-
vertical-align: middle;
|
642 |
-
margin-top: -2px;
|
643 |
-
display: inline-block;
|
644 |
-
margin-right: 3px; }
|
645 |
-
.lp-template-overrides .template-row.outdated .template-version {
|
646 |
-
color: #FF0000; }
|
647 |
-
.lp-template-overrides .template-row.outdated .template-file code:before {
|
648 |
-
content: "\f534";
|
649 |
-
color: #FF0000; }
|
650 |
-
.lp-template-overrides .template-row.up-to-date .template-version {
|
651 |
-
color: #1859ff; }
|
652 |
-
.lp-template-overrides .template-row.up-to-date .template-file code:before {
|
653 |
-
content: "\f147";
|
654 |
-
color: #0085ba; }
|
655 |
-
.lp-template-overrides .template-version, .lp-template-overrides .core-version {
|
656 |
-
width: 100px; }
|
657 |
-
.lp-template-overrides #learn-press-no-templates td p {
|
658 |
-
color: #0073aa; }
|
659 |
-
|
660 |
-
/* General */
|
661 |
-
.description code {
|
662 |
-
font-size: smaller; }
|
663 |
-
|
664 |
-
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result {
|
665 |
-
display: none;
|
666 |
-
background: #F5F5F5;
|
667 |
-
padding: 10px; }
|
668 |
-
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result input {
|
669 |
-
width: 80px;
|
670 |
-
margin: 0;
|
671 |
-
-webkit-box-sizing: border-box;
|
672 |
-
-moz-box-sizing: border-box;
|
673 |
-
box-sizing: border-box; }
|
674 |
-
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result p {
|
675 |
-
margin: 7px 0 0;
|
676 |
-
color: #777;
|
677 |
-
font-style: italic; }
|
678 |
-
|
679 |
-
#field-_lp_course_result input[name="_lp_course_result"]:checked ~ #passing-condition-quiz-result {
|
680 |
-
display: block; }
|
681 |
-
|
682 |
-
.widget .widget-content .rwmb-field:not(:last-of-type) {
|
683 |
-
margin: 0 0 10px; }
|
684 |
-
.widget .widget-content .rwmb-field:not(:last-of-type):first-child {
|
685 |
-
margin-top: 10px; }
|
686 |
-
|
687 |
-
.widget .widget-content .rwmb-field:last-child {
|
688 |
-
margin-bottom: 10px; }
|
689 |
-
|
690 |
-
.widget .widget-content .rwmb-field .rwmb-label, .widget .widget-content .rwmb-field .rwmb-input {
|
691 |
-
width: 100%; }
|
692 |
-
|
693 |
-
.widget .widget-content .rwmb-field .rwmb-label {
|
694 |
-
margin-bottom: 2px; }
|
695 |
-
.widget .widget-content .rwmb-field .rwmb-label label {
|
696 |
-
font-weight: 400; }
|
697 |
-
|
698 |
-
.widget .widget-content .rwmb-field .rwmb-input input[type="text"] {
|
699 |
-
width: 100%; }
|
700 |
-
|
701 |
-
.course-attributes {
|
702 |
-
margin: 20px 0; }
|
703 |
-
.course-attributes .learn-press-attribute {
|
704 |
-
border: 1px solid #DDD;
|
705 |
-
margin-top: -1px;
|
706 |
-
margin-bottom: 0; }
|
707 |
-
.course-attributes .learn-press-attribute > h4 {
|
708 |
-
padding: 10px 15px;
|
709 |
-
margin: 0;
|
710 |
-
background: #F5F5F5; }
|
711 |
-
.course-attributes .learn-press-attribute .learn-press-attribute-data {
|
712 |
-
padding: 15px;
|
713 |
-
border-top: 1px solid #DDD; }
|
714 |
-
|
715 |
-
#wpfooter {
|
716 |
-
z-index: 20; }
|
717 |
-
|
718 |
-
.learn-press-advertisement-slider {
|
719 |
-
margin: 50px 20px 0 0;
|
720 |
-
position: relative;
|
721 |
-
overflow: hidden;
|
722 |
-
box-sizing: border-box;
|
723 |
-
z-index: 10; }
|
724 |
-
.learn-press-advertisement-slider .slider-items:after {
|
725 |
-
clear: both;
|
726 |
-
display: block;
|
727 |
-
content: ''; }
|
728 |
-
.learn-press-advertisement-slider .slide-item {
|
729 |
-
position: relative;
|
730 |
-
float: left;
|
731 |
-
width: 100%;
|
732 |
-
margin-right: -100%;
|
733 |
-
padding: 20px;
|
734 |
-
opacity: 0;
|
735 |
-
background: #FFF;
|
736 |
-
-webkit-box-sizing: border-box;
|
737 |
-
-moz-box-sizing: border-box;
|
738 |
-
box-sizing: border-box;
|
739 |
-
-webkit-transition: opacity 0.5s linear;
|
740 |
-
transition: opacity 0.5s linear; }
|
741 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
742 |
-
float: left;
|
743 |
-
width: 35%; }
|
744 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail a {
|
745 |
-
display: block;
|
746 |
-
line-height: 1;
|
747 |
-
margin-bottom: 0; }
|
748 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
749 |
-
max-width: 100%; }
|
750 |
-
.learn-press-advertisement-slider .slide-item .slide-detail {
|
751 |
-
margin-left: 35%;
|
752 |
-
padding-left: 20px; }
|
753 |
-
.learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
754 |
-
margin-top: 0; }
|
755 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
756 |
-
display: none; }
|
757 |
-
.learn-press-advertisement-slider .slide-item.slide-active {
|
758 |
-
opacity: 1; }
|
759 |
-
.learn-press-advertisement-slider .slider-controls {
|
760 |
-
position: absolute;
|
761 |
-
bottom: 20px;
|
762 |
-
right: 20px; }
|
763 |
-
.learn-press-advertisement-slider .slider-controls .next-item,
|
764 |
-
.learn-press-advertisement-slider .slider-controls .prev-item {
|
765 |
-
font-family: 'dashicons';
|
766 |
-
width: 40px;
|
767 |
-
height: 40px;
|
768 |
-
border: 1px solid #DDD;
|
769 |
-
line-height: 40px;
|
770 |
-
font-size: 16px;
|
771 |
-
cursor: pointer;
|
772 |
-
float: left;
|
773 |
-
margin-left: 10px;
|
774 |
-
text-align: center;
|
775 |
-
color: #DDD; }
|
776 |
-
.learn-press-advertisement-slider .slider-controls .next-item:hover,
|
777 |
-
.learn-press-advertisement-slider .slider-controls .prev-item:hover {
|
778 |
-
border-color: #0085ba; }
|
779 |
-
.learn-press-advertisement-slider .slider-controls .next-item:hover:before,
|
780 |
-
.learn-press-advertisement-slider .slider-controls .prev-item:hover:before {
|
781 |
-
color: #0085ba; }
|
782 |
-
.learn-press-advertisement-slider .slider-controls .next-item:before {
|
783 |
-
content: "\f345"; }
|
784 |
-
.learn-press-advertisement-slider .slider-controls .prev-item:before {
|
785 |
-
content: "\f341"; }
|
786 |
-
|
787 |
-
@media only screen and (max-width: 1200px) {
|
788 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
789 |
-
width: 50%; }
|
790 |
-
.learn-press-advertisement-slider .slide-item .slide-detail {
|
791 |
-
margin-left: 50%; }
|
792 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
793 |
-
display: block; }
|
794 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
795 |
-
display: none; } }
|
796 |
-
|
797 |
-
@media only screen and (max-width: 960px) {
|
798 |
-
.learn-press-advertisement-slider {
|
799 |
-
margin-left: 56px; }
|
800 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
801 |
-
width: 100%;
|
802 |
-
float: none; }
|
803 |
-
.learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
804 |
-
width: 100%; }
|
805 |
-
.learn-press-advertisement-slider .slide-item .slide-detail {
|
806 |
-
margin-left: 0;
|
807 |
-
padding-left: 0; }
|
808 |
-
.learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
809 |
-
padding-top: 20px; }
|
810 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
811 |
-
display: block; }
|
812 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
813 |
-
display: none; }
|
814 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .slide-controls {
|
815 |
-
margin-bottom: 0; }
|
816 |
-
.learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
|
817 |
-
margin-bottom: 0; }
|
818 |
-
.wp-responsive-open .learn-press-advertisement-slider {
|
819 |
-
margin-left: 56px; }
|
820 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
821 |
-
width: 100%;
|
822 |
-
float: none; }
|
823 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
824 |
-
width: 100%; }
|
825 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail {
|
826 |
-
margin-left: 0;
|
827 |
-
padding-left: 0; }
|
828 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
829 |
-
padding-top: 20px; }
|
830 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
831 |
-
display: block; }
|
832 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
833 |
-
display: none; }
|
834 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls {
|
835 |
-
margin-bottom: 0; }
|
836 |
-
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
|
837 |
-
margin-bottom: 0; } }
|
838 |
-
|
839 |
-
/*
|
840 |
-
.learn-press-advertisement-slider > .slide-item {
|
841 |
-
display: none;
|
842 |
-
}
|
843 |
-
.learn-press-advertisement-slider > .slide-item:first-child {
|
844 |
-
display: block;
|
845 |
-
}
|
846 |
-
.learn-press-advertisement-slider .lp-wrap-items {
|
847 |
-
position: relative;
|
848 |
-
overflow: hidden;
|
849 |
-
-webkit-transition: visibility 1s, opacity 1s;
|
850 |
-
transition: visibility 1s, opacity 1s;
|
851 |
-
padding: 20px;
|
852 |
-
background-color: #fff;
|
853 |
-
border: 1px solid #ddd;
|
854 |
-
margin-bottom: 30px;
|
855 |
-
}
|
856 |
-
.learn-press-advertisement-slider .theme-thumbnail {
|
857 |
-
float: left;
|
858 |
-
width: 35%;
|
859 |
-
}
|
860 |
-
.learn-press-advertisement-slider .theme-detail {
|
861 |
-
margin-left: 35%;
|
862 |
-
padding-left: 20px;
|
863 |
-
}
|
864 |
-
.learn-press-advertisement-slider .lp-item {
|
865 |
-
position: relative;
|
866 |
-
float: left;
|
867 |
-
margin-right: -100%;
|
868 |
-
width: 100%;
|
869 |
-
box-sizing: border-box;
|
870 |
-
visibility: hidden;
|
871 |
-
opacity: 0;
|
872 |
-
-webkit-transition: visibility 0.5s linear, opacity 0.5s linear;
|
873 |
-
transition: visibility 0.5s linear, opacity 0.5s linear;
|
874 |
-
}
|
875 |
-
.learn-press-advertisement-slider img {
|
876 |
-
width: 100%;
|
877 |
-
height: auto;
|
878 |
-
float: none;
|
879 |
-
}
|
880 |
-
.learn-press-advertisement-slider .lp-active {
|
881 |
-
visibility: visible;
|
882 |
-
opacity: 1;
|
883 |
-
}
|
884 |
-
.learn-press-advertisement-slider .slider-controls {
|
885 |
-
position: absolute;
|
886 |
-
bottom: 30px;
|
887 |
-
right: 0;
|
888 |
-
height: 50px;
|
889 |
-
-ms-transform: translateY(-50%);
|
890 |
-
-webkit-transform: translateY(-50%);
|
891 |
-
transform: translateY(-50%);
|
892 |
-
}
|
893 |
-
.learn-press-advertisement-slider .slider-controls:after {
|
894 |
-
content: '';
|
895 |
-
clear: both;
|
896 |
-
display: block;
|
897 |
-
}
|
898 |
-
.learn-press-advertisement-slider .slider-controls .prev-item,
|
899 |
-
.learn-press-advertisement-slider .slider-controls .next-item {
|
900 |
-
position: absolute;
|
901 |
-
top: 0;
|
902 |
-
font-family: 'dashicons';
|
903 |
-
width: 40px;
|
904 |
-
height: 40px;
|
905 |
-
border: 1px solid #000;
|
906 |
-
line-height: 40px;
|
907 |
-
font-size: 16px;
|
908 |
-
color: #000;
|
909 |
-
cursor: pointer;
|
910 |
-
}
|
911 |
-
.learn-press-advertisement-slider .slider-controls .prev-item {
|
912 |
-
right: 95px;
|
913 |
-
}
|
914 |
-
.learn-press-advertisement-slider .slider-controls .prev-item:before {
|
915 |
-
content: "\f341";
|
916 |
-
display: block;
|
917 |
-
text-align: center;
|
918 |
-
}
|
919 |
-
.learn-press-advertisement-slider .slider-controls .next-item {
|
920 |
-
right: 45px;
|
921 |
-
}
|
922 |
-
.learn-press-advertisement-slider .slider-controls .next-item:before {
|
923 |
-
content: "\f345";
|
924 |
-
display: block;
|
925 |
-
text-align: center;
|
926 |
-
}
|
927 |
-
@media only screen and (max-width: 1200px) {
|
928 |
-
.learn-press-advertisement-slider .theme-thumbnail {
|
929 |
-
width: 50%;
|
930 |
-
}
|
931 |
-
.learn-press-advertisement-slider .theme-detail {
|
932 |
-
margin-left: 50%;
|
933 |
-
}
|
934 |
-
}
|
935 |
-
@media only screen and (max-width: 960px) {
|
936 |
-
.learn-press-advertisement-slider {
|
937 |
-
margin-left: 36px;
|
938 |
-
}
|
939 |
-
.learn-press-advertisement-slider .theme-thumbnail {
|
940 |
-
float: none;
|
941 |
-
width: 100%;
|
942 |
-
}
|
943 |
-
.learn-press-advertisement-slider .theme-detail {
|
944 |
-
margin-top: 20px;
|
945 |
-
margin-left: 0;
|
946 |
-
padding-left: 0;
|
947 |
-
}
|
948 |
-
}
|
949 |
-
@media screen and (max-width: 782px) {
|
950 |
-
.learn-press-advertisement-slider {
|
951 |
-
margin-left: 0;
|
952 |
-
}
|
953 |
-
}
|
954 |
-
*/
|
955 |
-
.lp-admin-tabs {
|
956 |
-
position: relative;
|
957 |
-
margin-top: 20px; }
|
958 |
-
.lp-admin-tabs .lp-admin-tab-navs {
|
959 |
-
margin: 0 -250px 0 0;
|
960 |
-
width: 250px;
|
961 |
-
float: left;
|
962 |
-
padding: 10px 0px;
|
963 |
-
position: relative;
|
964 |
-
z-index: 5;
|
965 |
-
display: none;
|
966 |
-
-webkit-box-sizing: border-box;
|
967 |
-
-moz-box-sizing: border-box;
|
968 |
-
box-sizing: border-box; }
|
969 |
-
.lp-admin-tabs .lp-admin-tab-navs .nav-section {
|
970 |
-
margin: 0; }
|
971 |
-
.lp-admin-tabs .lp-admin-tab-navs .nav-section > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section > span {
|
972 |
-
display: block;
|
973 |
-
padding: 8px 20px;
|
974 |
-
outline: none;
|
975 |
-
box-shadow: none;
|
976 |
-
text-decoration: none;
|
977 |
-
text-transform: capitalize; }
|
978 |
-
.lp-admin-tabs .lp-admin-tab-navs .nav-section .learn-press-tooltip {
|
979 |
-
float: right;
|
980 |
-
margin-right: 0; }
|
981 |
-
.lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover {
|
982 |
-
border-left: 2px solid #563d7c;
|
983 |
-
color: #563d7c; }
|
984 |
-
.lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active > span, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover > span {
|
985 |
-
padding-left: 18px; }
|
986 |
-
.lp-admin-tabs.has-sections .lp-admin-tab-navs {
|
987 |
-
display: block; }
|
988 |
-
.lp-admin-tabs.has-sections .lp-admin-tab-content {
|
989 |
-
padding-left: 271px !important;
|
990 |
-
float: left;
|
991 |
-
width: 100%;
|
992 |
-
z-index: 0;
|
993 |
-
position: relative;
|
994 |
-
-webkit-box-sizing: border-box;
|
995 |
-
-moz-box-sizing: border-box;
|
996 |
-
box-sizing: border-box; }
|
997 |
-
.lp-admin-tabs.has-sections:before {
|
998 |
-
position: absolute;
|
999 |
-
top: 0;
|
1000 |
-
bottom: 0;
|
1001 |
-
left: 250px;
|
1002 |
-
border-left: 1px solid #DDD;
|
1003 |
-
content: '';
|
1004 |
-
z-index: 10; }
|
1005 |
-
.lp-admin-tabs:after {
|
1006 |
-
clear: both;
|
1007 |
-
display: block;
|
1008 |
-
content: '';
|
1009 |
-
z-index: 10; }
|
1010 |
-
|
1011 |
-
.wrap.learn-press-settings .lp-admin-tab-content {
|
1012 |
-
background: #FFF;
|
1013 |
-
padding: 18px; }
|
1014 |
-
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub {
|
1015 |
-
float: none;
|
1016 |
-
margin: 0 0 20px 0;
|
1017 |
-
border-bottom: 1px solid #DDD;
|
1018 |
-
padding-bottom: 20px; }
|
1019 |
-
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub .active {
|
1020 |
-
font-weight: bold; }
|
1021 |
-
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li {
|
1022 |
-
text-transform: capitalize; }
|
1023 |
-
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li:after {
|
1024 |
-
content: '|';
|
1025 |
-
display: inline-block;
|
1026 |
-
padding: 0 10px; }
|
1027 |
-
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li:last-child:after {
|
1028 |
-
content: ''; }
|
1029 |
-
|
1030 |
-
.wrap #learn-press-uninstall-sample-data {
|
1031 |
-
float: right;
|
1032 |
-
opacity: 0.5; }
|
1033 |
-
.wrap #learn-press-uninstall-sample-data:hover {
|
1034 |
-
opacity: 1; }
|
1035 |
-
|
1036 |
-
.learnpress .rwmb-field {
|
1037 |
-
margin-bottom: 20px;
|
1038 |
-
position: relative; }
|
1039 |
-
.learnpress .rwmb-field .rwmb-label {
|
1040 |
-
display: block;
|
1041 |
-
margin-bottom: 5px;
|
1042 |
-
float: left;
|
1043 |
-
width: 190px;
|
1044 |
-
font-size: 14px;
|
1045 |
-
text-transform: capitalize; }
|
1046 |
-
.learnpress .rwmb-field .rwmb-input {
|
1047 |
-
margin-left: 190px;
|
1048 |
-
float: none;
|
1049 |
-
width: auto; }
|
1050 |
-
.learnpress .rwmb-field .description {
|
1051 |
-
margin-top: 8px;
|
1052 |
-
color: #888; }
|
1053 |
-
.learnpress .rwmb-field .rwmb-input-list {
|
1054 |
-
margin-left: 0; }
|
1055 |
-
.learnpress .rwmb-field.rwmb-heading-wrapper h4 {
|
1056 |
-
font-size: 15px;
|
1057 |
-
margin: 0 0 5px 0;
|
1058 |
-
padding: 0 0 0;
|
1059 |
-
border-bottom: 2px solid #563d7c;
|
1060 |
-
display: inline-block;
|
1061 |
-
text-transform: initial; }
|
1062 |
-
.learnpress .rwmb-field.disabled .field-overlay {
|
1063 |
-
content: '';
|
1064 |
-
position: absolute;
|
1065 |
-
width: 100%;
|
1066 |
-
height: 100%;
|
1067 |
-
left: 0;
|
1068 |
-
top: 0;
|
1069 |
-
z-index: 10;
|
1070 |
-
background: #FFF;
|
1071 |
-
opacity: 0.6; }
|
1072 |
-
.learnpress .rwmb-field.rwmb-text-wrapper .rwmb-text {
|
1073 |
-
width: 50%;
|
1074 |
-
min-width: 200px; }
|
1075 |
-
.learnpress .rwmb-field.rwmb-duration-wrapper .rwmb-input select, .learnpress .rwmb-field.rwmb-duration-wrapper .rwmb-input input {
|
1076 |
-
vertical-align: top; }
|
1077 |
-
|
1078 |
-
.learnpress .lp-course-sale_start-field.hide, .learnpress .lp-course-sale_end-field.hide {
|
1079 |
-
display: none; }
|
1080 |
-
|
1081 |
-
.learnpress.lp-submenu-settings .lp-admin-settings-buttons {
|
1082 |
-
border-top: 1px solid #DDD;
|
1083 |
-
padding-top: 20px;
|
1084 |
-
margin-bottom: 0; }
|
1085 |
-
.learnpress.lp-submenu-settings .lp-admin-settings-buttons #learn-press-reset-settings {
|
1086 |
-
float: right; }
|
1087 |
-
|
1088 |
-
.learnpress.lp-submenu-settings .rwmb-input {
|
1089 |
-
color: #000;
|
1090 |
-
margin-left: 270px;
|
1091 |
-
float: none;
|
1092 |
-
width: auto; }
|
1093 |
-
|
1094 |
-
.learnpress .rwmb-google-fonts-wrapper .rwmb-input label {
|
1095 |
-
font-weight: bold;
|
1096 |
-
display: block;
|
1097 |
-
margin-bottom: 5px; }
|
1098 |
-
|
1099 |
-
.learnpress .rwmb-google-fonts-wrapper .rwmb-input input {
|
1100 |
-
width: 90%; }
|
1101 |
-
|
1102 |
-
.learnpress #learn-press-toggle-course-results {
|
1103 |
-
display: block; }
|
1104 |
-
|
1105 |
-
.learnpress #postbox-container-2 .inside .rwmb-meta-box {
|
1106 |
-
margin: 20px 0 0; }
|
1107 |
-
|
1108 |
-
.learnpress .lp-item-assigned {
|
1109 |
-
font-size: 14px; }
|
1110 |
-
.learnpress .lp-item-assigned a {
|
1111 |
-
text-decoration: none; }
|
1112 |
-
.learnpress .lp-item-assigned ul {
|
1113 |
-
margin-bottom: 0; }
|
1114 |
-
.learnpress .lp-item-assigned ul ul strong {
|
1115 |
-
font-weight: normal; }
|
1116 |
-
.learnpress .lp-item-assigned li {
|
1117 |
-
margin: 0; }
|
1118 |
-
.learnpress .lp-item-assigned li a {
|
1119 |
-
margin-bottom: 10px;
|
1120 |
-
display: inline-block; }
|
1121 |
-
|
1122 |
-
@media screen and (max-width: 1280px) {
|
1123 |
-
.learnpress #meta-box-tab-course_settings .rwmb-field .rwmb-label {
|
1124 |
-
width: auto;
|
1125 |
-
float: none; }
|
1126 |
-
.learnpress #meta-box-tab-course_settings .rwmb-field .rwmb-input {
|
1127 |
-
margin-left: 0;
|
1128 |
-
width: 100%;
|
1129 |
-
float: left; } }
|
1130 |
-
|
1131 |
-
.learn-press-tabs.vertical .tabs-heading {
|
1132 |
-
background: #FFF;
|
1133 |
-
border: 1px solid #DDD; }
|
1134 |
-
.learn-press-tabs.vertical .tabs-heading h4 {
|
1135 |
-
padding: 15px;
|
1136 |
-
margin: 0; }
|
1137 |
-
|
1138 |
-
.learn-press-tabs.vertical .tabs-nav {
|
1139 |
-
float: left;
|
1140 |
-
width: 220px;
|
1141 |
-
margin: 10px 0;
|
1142 |
-
background: #F5F5F5;
|
1143 |
-
position: relative;
|
1144 |
-
z-index: 100; }
|
1145 |
-
.learn-press-tabs.vertical .tabs-nav li {
|
1146 |
-
margin: 0;
|
1147 |
-
position: relative; }
|
1148 |
-
.learn-press-tabs.vertical .tabs-nav li a {
|
1149 |
-
display: block;
|
1150 |
-
padding: 10px 15px;
|
1151 |
-
text-decoration: none;
|
1152 |
-
background: #F5F5F5;
|
1153 |
-
box-shadow: none;
|
1154 |
-
box-sizing: border-box;
|
1155 |
-
border-top: 1px solid transparent;
|
1156 |
-
border-bottom: 1px solid transparent;
|
1157 |
-
text-transform: capitalize; }
|
1158 |
-
.learn-press-tabs.vertical .tabs-nav li.icon a:before {
|
1159 |
-
font-family: dashicons;
|
1160 |
-
font-size: 18px;
|
1161 |
-
vertical-align: top;
|
1162 |
-
margin-right: 8px; }
|
1163 |
-
.learn-press-tabs.vertical .tabs-nav li.active a {
|
1164 |
-
background: #FFF;
|
1165 |
-
font-weight: bold;
|
1166 |
-
width: 221px;
|
1167 |
-
border-color: #DDD; }
|
1168 |
-
|
1169 |
-
.learn-press-tabs.vertical .tabs-container {
|
1170 |
-
overflow: hidden;
|
1171 |
-
background: #F5F5F5;
|
1172 |
-
border: 1px solid #DDD;
|
1173 |
-
border-top: none;
|
1174 |
-
position: relative; }
|
1175 |
-
.learn-press-tabs.vertical .tabs-container .tabs-content-container {
|
1176 |
-
margin: 0 0 0 220px; }
|
1177 |
-
.learn-press-tabs.vertical .tabs-container .tabs-content-container > li {
|
1178 |
-
padding: 20px;
|
1179 |
-
float: left;
|
1180 |
-
width: 100%;
|
1181 |
-
margin-right: -100%;
|
1182 |
-
background: #FFF;
|
1183 |
-
border-left: 1px solid #DDD;
|
1184 |
-
margin-bottom: 0;
|
1185 |
-
display: none;
|
1186 |
-
-webkit-box-sizing: border-box;
|
1187 |
-
-moz-box-sizing: border-box;
|
1188 |
-
box-sizing: border-box; }
|
1189 |
-
|
1190 |
-
.learn-press-tabs.vertical:after {
|
1191 |
-
clear: both;
|
1192 |
-
display: block;
|
1193 |
-
content: ''; }
|
1194 |
-
|
1195 |
-
@media screen and (max-width: 1280px) {
|
1196 |
-
.learnpress .rwmb-field .rwmb-label {
|
1197 |
-
float: none; }
|
1198 |
-
.learnpress .rwmb-field .rwmb-input {
|
1199 |
-
margin-left: 0; } }
|
1200 |
-
|
1201 |
-
.learn-press-addons .lp-search-addon {
|
1202 |
-
margin: 0;
|
1203 |
-
width: 280px;
|
1204 |
-
font-size: 16px;
|
1205 |
-
font-weight: 300;
|
1206 |
-
line-height: 1.5;
|
1207 |
-
padding: 3px 5px;
|
1208 |
-
height: 32px; }
|
1209 |
-
|
1210 |
-
.learn-press-addons .addons-browse {
|
1211 |
-
margin: 20px 0 0; }
|
1212 |
-
.learn-press-addons .addons-browse .lp-addon-hidden {
|
1213 |
-
display: none !important; }
|
1214 |
-
.learn-press-addons .addons-browse .lp-active:nth-of-type(2n+1) {
|
1215 |
-
clear: none;
|
1216 |
-
margin-right: 0;
|
1217 |
-
margin-left: 8px; }
|
1218 |
-
.learn-press-addons .addons-browse .lp-active:nth-of-type(2n) {
|
1219 |
-
clear: both;
|
1220 |
-
margin-right: 8px;
|
1221 |
-
margin-left: 0; }
|
1222 |
-
.learn-press-addons .addons-browse .plugin-icon img {
|
1223 |
-
max-width: 100%; }
|
1224 |
-
.learn-press-addons .addons-browse .plugin-card .column-description p:not(.authors) {
|
1225 |
-
overflow: hidden;
|
1226 |
-
text-overflow: ellipsis;
|
1227 |
-
display: -webkit-box;
|
1228 |
-
-webkit-box-orient: vertical;
|
1229 |
-
-webkit-line-clamp: 3;
|
1230 |
-
line-height: 1.6;
|
1231 |
-
max-height: 4.8;
|
1232 |
-
min-height: 4.8;
|
1233 |
-
color: #777; }
|
1234 |
-
.learn-press-addons .addons-browse .plugin-card .search-highlight {
|
1235 |
-
text-decoration: underline; }
|
1236 |
-
.learn-press-addons .addons-browse .plugin-card-top h3 {
|
1237 |
-
overflow: hidden;
|
1238 |
-
text-overflow: ellipsis;
|
1239 |
-
display: -webkit-box;
|
1240 |
-
-webkit-box-orient: vertical;
|
1241 |
-
-webkit-line-clamp: 2;
|
1242 |
-
line-height: 1.3em;
|
1243 |
-
max-height: 2.6em;
|
1244 |
-
min-height: 2.6em; }
|
1245 |
-
.learn-press-addons .addons-browse .plugin-card-top .desc {
|
1246 |
-
min-height: 90px;
|
1247 |
-
margin-right: 0; }
|
1248 |
-
.learn-press-addons .addons-browse .plugin-card-top .button.activate-plugin, .learn-press-addons .addons-browse .plugin-card-top .button.install-now, .learn-press-addons .addons-browse .plugin-card-top .button.enable-now {
|
1249 |
-
background: #0085ba;
|
1250 |
-
border-color: #0073aa #006799 #006799;
|
1251 |
-
-webkit-box-shadow: 0 1px 0 #006799;
|
1252 |
-
box-shadow: 0 1px 0 #006799;
|
1253 |
-
color: #fff;
|
1254 |
-
text-decoration: none;
|
1255 |
-
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; }
|
1256 |
-
.learn-press-addons .addons-browse .plugin-card-top .button.button-working {
|
1257 |
-
padding-right: 4px; }
|
1258 |
-
.learn-press-addons .addons-browse .plugin-card-top .button.button-working span {
|
1259 |
-
display: none; }
|
1260 |
-
.learn-press-addons .addons-browse .plugin-card-bottom .plugin-version {
|
1261 |
-
display: inline-block; }
|
1262 |
-
.learn-press-addons .addons-browse.premium .column-description p:not(.authors) {
|
1263 |
-
margin: 0;
|
1264 |
-
line-height: inherit; }
|
1265 |
-
.learn-press-addons .addons-browse:after {
|
1266 |
-
clear: both;
|
1267 |
-
display: block;
|
1268 |
-
content: ''; }
|
1269 |
-
|
1270 |
-
.related-themes .plugin-card-top {
|
1271 |
-
padding-bottom: 0; }
|
1272 |
-
|
1273 |
-
.related-themes .theme-content {
|
1274 |
-
position: relative; }
|
1275 |
-
|
1276 |
-
.related-themes .image-thumbnail img {
|
1277 |
-
width: 100%; }
|
1278 |
-
|
1279 |
-
.related-themes .theme-description {
|
1280 |
-
margin: 0 0 25px 0;
|
1281 |
-
overflow: hidden;
|
1282 |
-
text-overflow: ellipsis;
|
1283 |
-
display: -webkit-box;
|
1284 |
-
-webkit-box-orient: vertical;
|
1285 |
-
-webkit-line-clamp: 5;
|
1286 |
-
line-height: 1.6em;
|
1287 |
-
max-height: 8em;
|
1288 |
-
min-height: 8em;
|
1289 |
-
color: #777; }
|
1290 |
-
|
1291 |
-
.related-themes .theme-title {
|
1292 |
-
margin-right: 100px;
|
1293 |
-
font-size: 1.2em;
|
1294 |
-
line-height: 1.3em;
|
1295 |
-
margin-bottom: 0;
|
1296 |
-
min-height: 3.2em; }
|
1297 |
-
|
1298 |
-
.related-themes .theme-title a {
|
1299 |
-
color: #545454; }
|
1300 |
-
|
1301 |
-
.related-themes .theme-rating {
|
1302 |
-
float: right;
|
1303 |
-
display: inline-block; }
|
1304 |
-
|
1305 |
-
.related-themes .star-rating {
|
1306 |
-
display: inline-block; }
|
1307 |
-
|
1308 |
-
.related-themes .count-rating {
|
1309 |
-
font-size: 15px;
|
1310 |
-
position: relative;
|
1311 |
-
top: 2px; }
|
1312 |
-
|
1313 |
-
.related-themes .theme-detail {
|
1314 |
-
position: absolute;
|
1315 |
-
right: 3px;
|
1316 |
-
top: -3px;
|
1317 |
-
text-align: right;
|
1318 |
-
line-height: 1.6em; }
|
1319 |
-
.related-themes .theme-detail:after {
|
1320 |
-
content: '';
|
1321 |
-
display: block;
|
1322 |
-
clear: both; }
|
1323 |
-
.related-themes .theme-detail .theme-price {
|
1324 |
-
display: inline-block;
|
1325 |
-
font-size: 24px;
|
1326 |
-
color: #545454;
|
1327 |
-
font-weight: 700;
|
1328 |
-
line-height: 1.3em; }
|
1329 |
-
|
1330 |
-
.related-themes .theme-footer {
|
1331 |
-
clear: both;
|
1332 |
-
margin-left: -20px;
|
1333 |
-
margin-right: -20px;
|
1334 |
-
padding: 20px;
|
1335 |
-
background-color: #fafafa;
|
1336 |
-
border-top: 1px solid #ddd;
|
1337 |
-
overflow: hidden; }
|
1338 |
-
|
1339 |
-
@media screen and (min-width: 1600px) {
|
1340 |
-
.plugin-card:not(.hide-if-js):nth-child(even) {
|
1341 |
-
margin-right: 8px; }
|
1342 |
-
.plugin-card:not(.hide-if-js):nth-child(3n) {
|
1343 |
-
margin-right: 0; } }
|
1344 |
-
|
1345 |
-
/**
|
1346 |
-
* Order
|
1347 |
-
*/
|
1348 |
-
.post-type-lp_order .wp-list-table .column-order_status {
|
1349 |
-
width: 100px; }
|
1350 |
-
|
1351 |
-
.post-type-lp_order .wp-list-table .order_status span {
|
1352 |
-
display: inline-block; }
|
1353 |
-
.post-type-lp_order .wp-list-table .order_status span:after {
|
1354 |
-
font-family: fontawesome;
|
1355 |
-
display: inline-block;
|
1356 |
-
font-size: 20px;
|
1357 |
-
color: #FFF;
|
1358 |
-
text-align: center;
|
1359 |
-
line-height: 20px;
|
1360 |
-
width: 20px;
|
1361 |
-
height: 20px; }
|
1362 |
-
.post-type-lp_order .wp-list-table .order_status span.completed:after {
|
1363 |
-
content: "\f00c";
|
1364 |
-
color: #0085ba; }
|
1365 |
-
.post-type-lp_order .wp-list-table .order_status span.processing:after {
|
1366 |
-
content: "\f251";
|
1367 |
-
color: #563F7A; }
|
1368 |
-
.post-type-lp_order .wp-list-table .order_status span.pending:after {
|
1369 |
-
content: "\f017";
|
1370 |
-
color: #AAA; }
|
1371 |
-
.post-type-lp_order .wp-list-table .order_status span.cancelled:after {
|
1372 |
-
content: "\f057";
|
1373 |
-
color: #FF0000; }
|
1374 |
-
.post-type-lp_order .wp-list-table .order_status span.draft:after {
|
1375 |
-
content: "\f223";
|
1376 |
-
color: #69b391; }
|
1377 |
-
|
1378 |
-
.post-type-lp_order .wp-list-table .column-title,
|
1379 |
-
.post-type-lp_order .wp-list-table .column-order_total,
|
1380 |
-
.post-type-lp_order .wp-list-table .column-order_date {
|
1381 |
-
width: 150px; }
|
1382 |
-
|
1383 |
-
.post-type-lp_order .wp-list-table .column-order_items ol {
|
1384 |
-
margin: 0;
|
1385 |
-
padding: 0;
|
1386 |
-
list-style-position: inside; }
|
1387 |
-
|
1388 |
-
.post-type-lp_course .column-price .origin-price {
|
1389 |
-
font-size: 12px;
|
1390 |
-
text-decoration: line-through;
|
1391 |
-
margin-right: 10px;
|
1392 |
-
color: #FF0000; }
|
1393 |
-
|
1394 |
-
.wp-list-table .column-preview {
|
1395 |
-
text-align: left;
|
1396 |
-
float: none; }
|
1397 |
-
.wp-list-table .column-preview input[type="checkbox"] {
|
1398 |
-
border: none;
|
1399 |
-
width: 30px;
|
1400 |
-
height: auto;
|
1401 |
-
box-shadow: none;
|
1402 |
-
margin: 0;
|
1403 |
-
text-align: center;
|
1404 |
-
background: transparent;
|
1405 |
-
-webkit-transform: rotate(-180deg);
|
1406 |
-
-moz-transform: rotate(-180deg);
|
1407 |
-
-ms-transform: rotate(-180deg);
|
1408 |
-
-o-transform: rotate(-180deg);
|
1409 |
-
transform: rotate(-180deg); }
|
1410 |
-
.wp-list-table .column-preview input[type="checkbox"]:before, .wp-list-table .column-preview input[type="checkbox"]:checked:before {
|
1411 |
-
font: 400 21px/1 fontawesome;
|
1412 |
-
content: "\f205";
|
1413 |
-
font-size: 24px;
|
1414 |
-
width: 30px;
|
1415 |
-
margin: 0;
|
1416 |
-
text-align: center; }
|
1417 |
-
.wp-list-table .column-preview input[type="checkbox"]:checked {
|
1418 |
-
-webkit-transform: rotate(0deg);
|
1419 |
-
-moz-transform: rotate(0deg);
|
1420 |
-
-ms-transform: rotate(0deg);
|
1421 |
-
-o-transform: rotate(0deg);
|
1422 |
-
transform: rotate(0deg); }
|
1423 |
-
.wp-list-table .column-preview input[type="checkbox"]:checked:before {
|
1424 |
-
margin-top: -1px; }
|
1425 |
-
|
1426 |
-
.post-type-page .column-lp-page {
|
1427 |
-
width: 200px; }
|
1428 |
-
|
1429 |
-
.post-type-page .for-plugin-page {
|
1430 |
-
color: #FF0000;
|
1431 |
-
font-size: 11px;
|
1432 |
-
margin: 0; }
|
1433 |
-
|
1434 |
-
#learn-press-box-edit-slug {
|
1435 |
-
background: #FFF;
|
1436 |
-
padding: 10px;
|
1437 |
-
border: 1px solid #DDD;
|
1438 |
-
margin: 0 -10px;
|
1439 |
-
overflow: hidden;
|
1440 |
-
color: #b79186; }
|
1441 |
-
#learn-press-box-edit-slug .button {
|
1442 |
-
float: right;
|
1443 |
-
height: 24px;
|
1444 |
-
line-height: 22px; }
|
1445 |
-
|
1446 |
-
.learn-press-modal {
|
1447 |
-
position: fixed;
|
1448 |
-
z-index: 1000000;
|
1449 |
-
width: 100%;
|
1450 |
-
height: 100%;
|
1451 |
-
top: 0;
|
1452 |
-
display: table; }
|
1453 |
-
.learn-press-modal .modal-overlay {
|
1454 |
-
position: fixed;
|
1455 |
-
z-index: 1000000;
|
1456 |
-
background: #000;
|
1457 |
-
opacity: 0.5;
|
1458 |
-
width: 100%;
|
1459 |
-
height: 100%;
|
1460 |
-
top: 0; }
|
1461 |
-
.learn-press-modal .modal-wrapper {
|
1462 |
-
display: table-cell;
|
1463 |
-
vertical-align: middle;
|
1464 |
-
z-index: 1000010;
|
1465 |
-
position: relative; }
|
1466 |
-
.learn-press-modal .modal-wrapper .modal-container {
|
1467 |
-
max-width: 800px;
|
1468 |
-
width: 90%;
|
1469 |
-
margin: 0px auto;
|
1470 |
-
background-color: #fff;
|
1471 |
-
border-radius: 2px;
|
1472 |
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
|
1473 |
-
transition: all .3s ease;
|
1474 |
-
overflow: hidden;
|
1475 |
-
-webkit-box-sizing: border-box;
|
1476 |
-
-moz-box-sizing: border-box;
|
1477 |
-
box-sizing: border-box; }
|
1478 |
-
.learn-press-modal .modal-wrapper header {
|
1479 |
-
font-size: 16px;
|
1480 |
-
padding: 15px 20px;
|
1481 |
-
border-bottom: 1px solid #DDD; }
|
1482 |
-
.learn-press-modal .modal-wrapper article {
|
1483 |
-
margin: 45px 20px; }
|
1484 |
-
.learn-press-modal .modal-wrapper article input[name="search"] {
|
1485 |
-
width: 100%;
|
1486 |
-
font-size: 16px;
|
1487 |
-
box-sizing: border-box;
|
1488 |
-
margin: 0;
|
1489 |
-
box-shadow: none;
|
1490 |
-
color: #999;
|
1491 |
-
padding: 8px 10px;
|
1492 |
-
border-radius: 2px;
|
1493 |
-
border-color: #e4e4e4;
|
1494 |
-
font-weight: lighter; }
|
1495 |
-
.learn-press-modal .modal-wrapper article .search-results li > label {
|
1496 |
-
display: block; }
|
1497 |
-
.learn-press-modal .modal-wrapper footer {
|
1498 |
-
padding: 15px 20px;
|
1499 |
-
overflow: hidden;
|
1500 |
-
border: 1px solid #eee; }
|
1501 |
-
.learn-press-modal .modal-wrapper footer .search-nav {
|
1502 |
-
float: left; }
|
1503 |
-
.learn-press-modal .modal-wrapper footer .search-nav a, .learn-press-modal .modal-wrapper footer .search-nav span {
|
1504 |
-
display: inline-block;
|
1505 |
-
line-height: 26px;
|
1506 |
-
height: 28px;
|
1507 |
-
margin: 0;
|
1508 |
-
padding: 0 10px 1px; }
|
1509 |
-
.learn-press-modal .modal-wrapper footer button {
|
1510 |
-
float: right;
|
1511 |
-
margin-left: 3px; }
|
1512 |
-
|
1513 |
-
#modal-search-items.loading .search-results:before {
|
1514 |
-
position: absolute;
|
1515 |
-
top: 75px;
|
1516 |
-
left: 0;
|
1517 |
-
right: 0;
|
1518 |
-
bottom: 0;
|
1519 |
-
display: block;
|
1520 |
-
content: '';
|
1521 |
-
z-index: 9;
|
1522 |
-
background: url("../../images/spinner.gif") no-repeat center center; }
|
1523 |
-
|
1524 |
-
.modal-search {
|
1525 |
-
position: relative;
|
1526 |
-
display: inline-block;
|
1527 |
-
min-width: 300px; }
|
1528 |
-
.modal-search .search-input {
|
1529 |
-
border: 1px solid #DDD;
|
1530 |
-
width: 100%;
|
1531 |
-
margin: 0;
|
1532 |
-
padding: 5px 10px;
|
1533 |
-
-webkit-box-shadow: none;
|
1534 |
-
-moz-box-shadow: none;
|
1535 |
-
box-shadow: none; }
|
1536 |
-
.modal-search .search-input:focus {
|
1537 |
-
-webkit-box-shadow: none;
|
1538 |
-
-moz-box-shadow: none;
|
1539 |
-
box-shadow: none; }
|
1540 |
-
.modal-search .search-input:focus {
|
1541 |
-
border-color: #DDD; }
|
1542 |
-
.modal-search .search-results-content {
|
1543 |
-
position: absolute;
|
1544 |
-
top: 100%;
|
1545 |
-
width: 100%;
|
1546 |
-
left: 0;
|
1547 |
-
background: #FFF;
|
1548 |
-
border: 1px solid #DDD;
|
1549 |
-
border-top: none;
|
1550 |
-
z-index: 1000;
|
1551 |
-
margin-top: -1px;
|
1552 |
-
-webkit-box-sizing: border-box;
|
1553 |
-
-moz-box-sizing: border-box;
|
1554 |
-
box-sizing: border-box; }
|
1555 |
-
.modal-search .search-results-content .search-results {
|
1556 |
-
margin: 0; }
|
1557 |
-
.modal-search .search-results-content .search-results .result-item {
|
1558 |
-
margin: 0;
|
1559 |
-
padding: 0;
|
1560 |
-
list-style: none; }
|
1561 |
-
.modal-search .search-results-content .search-results .result-item label {
|
1562 |
-
display: block;
|
1563 |
-
padding: 6px 10px;
|
1564 |
-
text-decoration: none;
|
1565 |
-
cursor: pointer;
|
1566 |
-
white-space: nowrap;
|
1567 |
-
overflow: hidden;
|
1568 |
-
text-overflow: ellipsis; }
|
1569 |
-
.modal-search .search-results-content .search-results .result-item:hover {
|
1570 |
-
background: #f4fcff; }
|
1571 |
-
.modal-search .has-items .search-input {
|
1572 |
-
border-bottom-color: transparent; }
|
1573 |
-
.modal-search .has-items .search-results-content {
|
1574 |
-
border-top: none; }
|
1575 |
-
.modal-search .checked-items {
|
1576 |
-
text-align: center; }
|
1577 |
-
.modal-search .checked-items .button {
|
1578 |
-
font-size: 12px;
|
1579 |
-
height: 20px;
|
1580 |
-
line-height: 20px; }
|
1581 |
-
.modal-search .checked-items .disabled {
|
1582 |
-
color: #777; }
|
1583 |
-
.modal-search .search-navigator {
|
1584 |
-
margin: 5px 0;
|
1585 |
-
text-align: center; }
|
1586 |
-
.modal-search .search-navigator .page-numbers {
|
1587 |
-
display: inline-block;
|
1588 |
-
padding: 2px 5px;
|
1589 |
-
text-decoration: none;
|
1590 |
-
line-height: 1; }
|
1591 |
-
.modal-search .search-navigator .page-numbers.next, .modal-search .search-navigator .page-numbers.prev {
|
1592 |
-
display: none; }
|
1593 |
-
|
1594 |
-
.lp-order-statuses {
|
1595 |
-
margin: 0; }
|
1596 |
-
.lp-order-statuses li {
|
1597 |
-
float: left;
|
1598 |
-
width: 100%;
|
1599 |
-
background: #FFF;
|
1600 |
-
margin: 0; }
|
1601 |
-
.lp-order-statuses li strong {
|
1602 |
-
font-size: 20px;
|
1603 |
-
font-weight: normal;
|
1604 |
-
color: #0073aa;
|
1605 |
-
margin-bottom: 5px;
|
1606 |
-
display: block; }
|
1607 |
-
.lp-order-statuses li strong:before {
|
1608 |
-
display: inline-block;
|
1609 |
-
width: 25px;
|
1610 |
-
height: 25px;
|
1611 |
-
font-family: dashicons;
|
1612 |
-
font-size: 25px;
|
1613 |
-
line-height: 25px;
|
1614 |
-
vertical-align: middle;
|
1615 |
-
content: ''; }
|
1616 |
-
.lp-order-statuses li p {
|
1617 |
-
font-size: 12px;
|
1618 |
-
color: #adadad;
|
1619 |
-
padding: 0;
|
1620 |
-
margin: 0; }
|
1621 |
-
.lp-order-statuses li.counter-number {
|
1622 |
-
padding: 10px 0 0;
|
1623 |
-
text-align: center;
|
1624 |
-
width: 50%; }
|
1625 |
-
.lp-order-statuses li.counter-number .counter-inner {
|
1626 |
-
margin: 0 5px;
|
1627 |
-
background: #F9F9F9;
|
1628 |
-
padding: 10px 0;
|
1629 |
-
border: 1px solid #f3f3f3; }
|
1630 |
-
.lp-order-statuses li.counter-number .counter-inner p {
|
1631 |
-
text-transform: lowercase; }
|
1632 |
-
.lp-order-statuses li.counter-number.order-completed strong:before {
|
1633 |
-
content: '\f502';
|
1634 |
-
color: #0085ba; }
|
1635 |
-
.lp-order-statuses li.counter-number.order-processing strong:before {
|
1636 |
-
content: "\f321";
|
1637 |
-
color: #563F7A;
|
1638 |
-
margin-left: -1px; }
|
1639 |
-
.lp-order-statuses li.counter-number.order-pending strong:before {
|
1640 |
-
content: "\f534";
|
1641 |
-
color: #AAA; }
|
1642 |
-
.lp-order-statuses li.counter-number.order-cancelled strong:before {
|
1643 |
-
content: "\f153";
|
1644 |
-
color: #FF0000; }
|
1645 |
-
.lp-order-statuses li.clear {
|
1646 |
-
float: none; }
|
1647 |
-
.lp-order-statuses li.featured-theme {
|
1648 |
-
margin: 12px -12px 0 -12px;
|
1649 |
-
border-top: 1px solid #EEE;
|
1650 |
-
float: none;
|
1651 |
-
clear: both;
|
1652 |
-
width: auto;
|
1653 |
-
padding: 8px 12px 0 12px; }
|
1654 |
-
.lp-order-statuses li.featured-theme .star-rating {
|
1655 |
-
display: inline-block;
|
1656 |
-
line-height: 14px;
|
1657 |
-
vertical-align: middle; }
|
1658 |
-
.lp-order-statuses li.featured-theme .star-rating .star {
|
1659 |
-
font-size: 14px;
|
1660 |
-
width: 14px;
|
1661 |
-
height: 14px; }
|
1662 |
-
.lp-order-statuses li.featured-theme > div {
|
1663 |
-
margin-bottom: 3px; }
|
1664 |
-
.lp-order-statuses li.featured-theme > div span {
|
1665 |
-
font-size: 12px;
|
1666 |
-
vertical-align: middle;
|
1667 |
-
color: #999; }
|
1668 |
-
.lp-order-statuses li:nth-child(even) .counter-inner {
|
1669 |
-
margin-left: 0; }
|
1670 |
-
.lp-order-statuses li:nth-child(odd) .counter-inner {
|
1671 |
-
margin-right: 0; }
|
1672 |
-
.lp-order-statuses li.total-raised {
|
1673 |
-
text-align: center;
|
1674 |
-
background: #F9F9F9;
|
1675 |
-
border: 1px solid #F3F3F3;
|
1676 |
-
padding: 10px 0;
|
1677 |
-
box-sizing: border-box; }
|
1678 |
-
.lp-order-statuses li.total-raised strong {
|
1679 |
-
margin-bottom: 10px;
|
1680 |
-
font-size: 26px; }
|
1681 |
-
.lp-order-statuses li.total-raised strong:before {
|
1682 |
-
content: '\f185';
|
1683 |
-
font-size: 30px;
|
1684 |
-
width: 30px;
|
1685 |
-
height: 30px;
|
1686 |
-
line-height: 30px;
|
1687 |
-
margin-right: 7px;
|
1688 |
-
margin-top: -3px; }
|
1689 |
-
.lp-order-statuses:after {
|
1690 |
-
clear: both;
|
1691 |
-
display: block;
|
1692 |
-
content: ''; }
|
1693 |
-
|
1694 |
-
.lp-place-holder {
|
1695 |
-
background: #fff;
|
1696 |
-
padding: 10px;
|
1697 |
-
display: block;
|
1698 |
-
margin: 0 auto;
|
1699 |
-
box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
|
1700 |
-
border-radius: 3px; }
|
1701 |
-
.lp-place-holder [class*="line-"] {
|
1702 |
-
height: 6px;
|
1703 |
-
width: 400px;
|
1704 |
-
background: #f6f7f9;
|
1705 |
-
margin-bottom: 13px;
|
1706 |
-
margin-right: 5px; }
|
1707 |
-
.lp-place-holder .thumbnail {
|
1708 |
-
height: 40px;
|
1709 |
-
width: 40px;
|
1710 |
-
float: left;
|
1711 |
-
margin-right: 20px;
|
1712 |
-
display: inline-block; }
|
1713 |
-
.lp-place-holder .line-heading {
|
1714 |
-
width: 80%;
|
1715 |
-
height: 20px; }
|
1716 |
-
.lp-place-holder .line-sm {
|
1717 |
-
width: 30%;
|
1718 |
-
margin-top: 10px; }
|
1719 |
-
.lp-place-holder .line-xs {
|
1720 |
-
width: 50%; }
|
1721 |
-
.lp-place-holder .line-df {
|
1722 |
-
margin-top: 30px;
|
1723 |
-
width: 380px; }
|
1724 |
-
.lp-place-holder .line-lg {
|
1725 |
-
width: 200px; }
|
1726 |
-
.lp-place-holder .line-lgx {
|
1727 |
-
width: 450px; }
|
1728 |
-
.lp-place-holder [class*="line"],
|
1729 |
-
.lp-place-holder .thumbnail {
|
1730 |
-
animation: lpTimeLine;
|
1731 |
-
animation-duration: 1s;
|
1732 |
-
animation-timing-function: linear;
|
1733 |
-
animation-iteration-count: infinite;
|
1734 |
-
background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
|
1735 |
-
background-size: 800px auto;
|
1736 |
-
background-position: 100px 0; }
|
1737 |
-
|
1738 |
-
@keyframes lpTimeLine {
|
1739 |
-
0% {
|
1740 |
-
background-position: -350px 0; }
|
1741 |
-
100% {
|
1742 |
-
background-position: 400px 0; } }
|
1743 |
-
|
1744 |
-
.post-type-lp_order #post-body-content {
|
1745 |
-
display: none; }
|
1746 |
-
|
1747 |
-
.post-type-lp_order #order_details .hndle, .post-type-lp_order #order_details .handlediv {
|
1748 |
-
display: none; }
|
1749 |
-
|
1750 |
-
.post-type-lp_order #order_details .inside {
|
1751 |
-
padding: 30px 30px;
|
1752 |
-
margin: 0; }
|
1753 |
-
|
1754 |
-
.post-type-lp_order #order_details .order-data-field {
|
1755 |
-
margin-bottom: 20px; }
|
1756 |
-
.post-type-lp_order #order_details .order-data-field label {
|
1757 |
-
display: block;
|
1758 |
-
margin-bottom: 5px;
|
1759 |
-
font-weight: bold; }
|
1760 |
-
|
1761 |
-
.post-type-lp_order #order_details .order-data-number {
|
1762 |
-
margin: 0 0 10px;
|
1763 |
-
font-size: 24px;
|
1764 |
-
font-weight: lighter; }
|
1765 |
-
|
1766 |
-
.post-type-lp_order #order_details .order-data-heading {
|
1767 |
-
margin-top: 40px; }
|
1768 |
-
|
1769 |
-
.post-type-lp_order #order_details .order-users {
|
1770 |
-
display: inline-block; }
|
1771 |
-
|
1772 |
-
.post-type-lp_order #order_details .order-data-date .order-date {
|
1773 |
-
width: 100px; }
|
1774 |
-
|
1775 |
-
.post-type-lp_order #order_details .order-data-date .order-hour, .post-type-lp_order #order_details .order-data-date .order-minute {
|
1776 |
-
width: 50px; }
|
1777 |
-
|
1778 |
-
.post-type-lp_order #order_details .order-items {
|
1779 |
-
margin: 0 -30px;
|
1780 |
-
border-top: 2px solid #DDD;
|
1781 |
-
padding: 0 30px; }
|
1782 |
-
.post-type-lp_order #order_details .order-items table {
|
1783 |
-
border-collapse: collapse;
|
1784 |
-
width: 100%; }
|
1785 |
-
.post-type-lp_order #order_details .order-items table thead th {
|
1786 |
-
border-bottom: 1px solid #DDD;
|
1787 |
-
text-align: left;
|
1788 |
-
padding: 12px 10px;
|
1789 |
-
font-size: 16px;
|
1790 |
-
font-weight: lighter; }
|
1791 |
-
.post-type-lp_order #order_details .order-items table tbody td, .post-type-lp_order #order_details .order-items table tfoot td {
|
1792 |
-
border-bottom: 1px solid #DDD;
|
1793 |
-
text-align: left;
|
1794 |
-
padding: 10px; }
|
1795 |
-
.post-type-lp_order #order_details .order-items table tbody tr:nth-child(odd) td {
|
1796 |
-
background: #F5F5F5; }
|
1797 |
-
.post-type-lp_order #order_details .order-items table tfoot td {
|
1798 |
-
border: none;
|
1799 |
-
padding-bottom: 0;
|
1800 |
-
text-align: right;
|
1801 |
-
font-size: 14px; }
|
1802 |
-
.post-type-lp_order #order_details .order-items table .column-price,
|
1803 |
-
.post-type-lp_order #order_details .order-items table .column-total,
|
1804 |
-
.post-type-lp_order #order_details .order-items table .column-quantity {
|
1805 |
-
text-align: right;
|
1806 |
-
width: 150px; }
|
1807 |
-
.post-type-lp_order #order_details .order-items table .row-subtotal td {
|
1808 |
-
padding-top: 20px; }
|
1809 |
-
.post-type-lp_order #order_details .order-items table .remove-order-item {
|
1810 |
-
text-decoration: none;
|
1811 |
-
outline: none;
|
1812 |
-
color: #CCC; }
|
1813 |
-
.post-type-lp_order #order_details .order-items table .remove-order-item .dashicons {
|
1814 |
-
font-size: 18px; }
|
1815 |
-
.post-type-lp_order #order_details .order-items table .remove-order-item:hover {
|
1816 |
-
color: #FF0000; }
|
1817 |
-
.post-type-lp_order #order_details .order-items table .order-item-row:hover .remove-order-item {
|
1818 |
-
display: inline-block; }
|
1819 |
-
|
1820 |
-
.color-schemas {
|
1821 |
-
margin: 0 20px 20px 0;
|
1822 |
-
float: left; }
|
1823 |
-
.color-schemas .wp-color-picker {
|
1824 |
-
width: 80px;
|
1825 |
-
height: 24px;
|
1826 |
-
vertical-align: top;
|
1827 |
-
margin: 0; }
|
1828 |
-
.color-schemas .wp-picker-holder {
|
1829 |
-
position: absolute; }
|
1830 |
-
.color-schemas .buttons {
|
1831 |
-
display: none; }
|
1832 |
-
.color-schemas table {
|
1833 |
-
border-collapse: collapse;
|
1834 |
-
position: relative; }
|
1835 |
-
.color-schemas table td, .color-schemas table th {
|
1836 |
-
padding: 10px 10px; }
|
1837 |
-
.color-schemas table tbody {
|
1838 |
-
border: 1px solid transparent;
|
1839 |
-
position: relative; }
|
1840 |
-
.color-schemas table tbody td, .color-schemas table tbody th {
|
1841 |
-
text-align: left;
|
1842 |
-
background: #F5F5F5; }
|
1843 |
-
.color-schemas table tbody tr:first-child td, .color-schemas table tbody tr:first-child th {
|
1844 |
-
padding-bottom: 0; }
|
1845 |
-
.color-schemas table:after {
|
1846 |
-
content: '';
|
1847 |
-
position: absolute;
|
1848 |
-
top: 0;
|
1849 |
-
left: 0;
|
1850 |
-
right: 0;
|
1851 |
-
bottom: 0;
|
1852 |
-
background: rgba(255, 255, 255, 0.7); }
|
1853 |
-
.color-schemas tfoot td, .color-schemas tfoot th {
|
1854 |
-
padding-left: 0;
|
1855 |
-
padding-right: 0; }
|
1856 |
-
.color-schemas .remove-schema {
|
1857 |
-
float: right;
|
1858 |
-
color: #FF0000; }
|
1859 |
-
.color-schemas .wp-color-result {
|
1860 |
-
margin: 0; }
|
1861 |
-
.color-schemas .clone-schema {
|
1862 |
-
display: none; }
|
1863 |
-
.color-schemas:first-child .remove-schema,
|
1864 |
-
.color-schemas:first-child .apply-schema {
|
1865 |
-
display: none; }
|
1866 |
-
.color-schemas:nth-child(2) {
|
1867 |
-
clear: both; }
|
1868 |
-
.color-schemas:hover tbody {
|
1869 |
-
opacity: 1; }
|
1870 |
-
.color-schemas.current tbody {
|
1871 |
-
border-color: #DDD; }
|
1872 |
-
.color-schemas.current tbody td, .color-schemas.current tbody th {
|
1873 |
-
background: rgba(5, 215, 255, 0.26); }
|
1874 |
-
.color-schemas.current table:after {
|
1875 |
-
display: none; }
|
1876 |
-
.color-schemas.current .clone-schema {
|
1877 |
-
display: inline-block; }
|
1878 |
-
|
1879 |
-
/**
|
1880 |
-
* General style for admin editor.
|
1881 |
-
*/
|
1882 |
-
.lp-admin-editor {
|
1883 |
-
background-color: #fff;
|
1884 |
-
border: 1px solid #ddd;
|
1885 |
-
margin: 20px 0 0 0;
|
1886 |
-
position: relative; }
|
1887 |
-
.lp-admin-editor .heading,
|
1888 |
-
.lp-admin-editor .lp-box-data-content {
|
1889 |
-
padding: 0; }
|
1890 |
-
|
1891 |
-
#learn-press-admin-editor-metabox-settings {
|
1892 |
-
margin-top: 20px; }
|
1893 |
-
|
1894 |
-
/**
|
1895 |
-
* Course admin editor.
|
1896 |
-
*/
|
1897 |
-
#admin-editor-lp_course .lp-course-curriculum .heading {
|
1898 |
-
padding: 12px 10px;
|
1899 |
-
position: relative; }
|
1900 |
-
#admin-editor-lp_course .lp-course-curriculum .heading h4 {
|
1901 |
-
margin: 0;
|
1902 |
-
font-size: 18px; }
|
1903 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections {
|
1904 |
-
font-family: Dashicons;
|
1905 |
-
position: absolute;
|
1906 |
-
top: 0;
|
1907 |
-
right: 0;
|
1908 |
-
bottom: 0;
|
1909 |
-
font-size: 30px;
|
1910 |
-
display: flex;
|
1911 |
-
justify-content: center;
|
1912 |
-
align-items: center;
|
1913 |
-
cursor: pointer;
|
1914 |
-
width: 40px;
|
1915 |
-
color: #999; }
|
1916 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections.close:before {
|
1917 |
-
content: '\f140'; }
|
1918 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections.open:before {
|
1919 |
-
content: '\f142'; }
|
1920 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .status {
|
1921 |
-
font-family: Dashicons;
|
1922 |
-
font-size: 20px;
|
1923 |
-
position: relative;
|
1924 |
-
top: 5px;
|
1925 |
-
margin-left: 10px;
|
1926 |
-
visibility: hidden; }
|
1927 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .status:before {
|
1928 |
-
content: "\f463"; }
|
1929 |
-
#admin-editor-lp_course .lp-course-curriculum .heading .status.loading {
|
1930 |
-
visibility: visible;
|
1931 |
-
animation: rotation 2s infinite linear;
|
1932 |
-
display: inline-block; }
|
1933 |
-
|
1934 |
-
#admin-editor-lp_course .lp-course-curriculum .curriculum-sections {
|
1935 |
-
margin: 0;
|
1936 |
-
border-top: 1px solid #ddd; }
|
1937 |
-
|
1938 |
-
#admin-editor-lp_course .lp-course-curriculum .section {
|
1939 |
-
border: 1px solid #e5e5e5;
|
1940 |
-
opacity: 1;
|
1941 |
-
background: #FFF;
|
1942 |
-
border-left: 0;
|
1943 |
-
border-right: 0;
|
1944 |
-
margin-bottom: -1px; }
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
#admin-editor-lp_course .lp-course-curriculum .section .section-head .
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
display: inline-block;
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
#admin-editor-lp_course .lp-course-curriculum .section .
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
margin: 0;
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
color: #
|
2157 |
-
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type
|
2158 |
-
display:
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
-
|
2185 |
-
|
2186 |
-
|
2187 |
-
|
2188 |
-
|
2189 |
-
|
2190 |
-
|
2191 |
-
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
|
2199 |
-
|
2200 |
-
|
2201 |
-
|
2202 |
-
|
2203 |
-
|
2204 |
-
#
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
#admin-editor-lp_course .lp-course-curriculum .section-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove
|
2275 |
-
display:
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
.
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row
|
2372 |
-
|
2373 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .
|
2410 |
-
width:
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
width:
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
#
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-
|
2456 |
-
|
2457 |
-
#
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
#
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
-
|
2520 |
-
|
2521 |
-
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-btn
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title input
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
|
2689 |
-
|
2690 |
-
|
2691 |
-
|
2692 |
-
|
2693 |
-
box-
|
2694 |
-
|
2695 |
-
#admin-editor-lp_quiz .lp-box-data-content .
|
2696 |
-
|
2697 |
-
|
2698 |
-
|
2699 |
-
|
2700 |
-
|
2701 |
-
#admin-editor-
|
2702 |
-
|
2703 |
-
|
2704 |
-
|
2705 |
-
|
2706 |
-
|
2707 |
-
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
#admin-editor-lp_question .lp-box-data-content table.list-question-answers
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
width:
|
2784 |
-
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
padding
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
#lp-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
margin: 0;
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
#learn-press-reset-
|
3047 |
-
#learn-press-reset-user-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
#learn-press-reset-
|
3052 |
-
|
3053 |
-
|
3054 |
-
margin
|
3055 |
-
#learn-press-reset-course-users
|
3056 |
-
#learn-press-reset-user-courses
|
3057 |
-
#learn-press-reset-user-item
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
#learn-press-reset-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
.learn-press-tip
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
-
|
3112 |
-
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
.rtl #admin-editor-lp_course .lp-course-curriculum .section-actions .
|
3167 |
-
|
3168 |
-
|
3169 |
-
.rtl #admin-editor-lp_course .lp-course-curriculum .actions {
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
.rtl #admin-editor-lp_quiz .
|
3180 |
-
|
3181 |
-
|
3182 |
-
.rtl #lp-
|
3183 |
-
|
3184 |
-
|
3185 |
-
.rtl #
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
.
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
|
3212 |
-
|
3213 |
-
|
3214 |
-
|
3215 |
-
|
3216 |
-
|
3217 |
-
|
3218 |
-
|
3219 |
-
.
|
3220 |
-
|
3221 |
-
|
3222 |
-
right:
|
3223 |
-
|
3224 |
-
|
3225 |
-
|
3226 |
-
|
3227 |
-
|
3228 |
-
|
3229 |
-
|
3230 |
-
|
3231 |
-
|
3232 |
-
|
3233 |
-
|
3234 |
-
|
3235 |
-
|
3236 |
-
|
3237 |
-
|
3238 |
-
|
3239 |
-
|
3240 |
-
|
3241 |
-
|
3242 |
-
|
3243 |
-
|
3244 |
-
|
3245 |
-
|
3246 |
-
|
3247 |
-
|
3248 |
-
|
3249 |
-
|
3250 |
-
|
3251 |
-
|
3252 |
-
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
|
3260 |
-
-
|
3261 |
-
-
|
3262 |
-
|
3263 |
-
|
3264 |
-
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
.
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
-
|
3290 |
-
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
3299 |
-
|
3300 |
-
|
3301 |
-
|
3302 |
-
|
3303 |
-
|
3304 |
-
|
3305 |
-
|
3306 |
-
|
3307 |
-
|
3308 |
-
|
3309 |
-
|
3310 |
-
|
3311 |
-
|
3312 |
-
|
3313 |
-
|
3314 |
-
|
3315 |
-
|
3316 |
-
|
3317 |
-
|
3318 |
-
|
3319 |
-
|
3320 |
-
|
3321 |
-
|
3322 |
-
|
3323 |
-
|
3324 |
-
|
3325 |
-
|
3326 |
-
|
3327 |
-
|
3328 |
-
|
3329 |
-
|
3330 |
-
|
3331 |
-
|
3332 |
-
|
3333 |
-
|
3334 |
-
|
3335 |
-
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
3340 |
-
|
3341 |
-
|
3342 |
-
|
3343 |
-
|
3344 |
-
|
3345 |
-
|
3346 |
-
|
3347 |
-
|
3348 |
-
|
3349 |
-
|
3350 |
-
|
3351 |
-
|
3352 |
-
|
3353 |
-
|
3354 |
-
|
3355 |
-
|
3356 |
-
|
3357 |
-
|
3358 |
-
|
3359 |
-
|
3360 |
-
|
3361 |
-
|
3362 |
-
|
3363 |
-
|
3364 |
-
|
3365 |
-
|
3366 |
-
|
3367 |
-
|
3368 |
-
|
3369 |
-
|
3370 |
-
|
3371 |
-
|
3372 |
-
|
3373 |
-
|
3374 |
-
|
3375 |
-
|
3376 |
-
|
3377 |
-
|
3378 |
-
|
3379 |
-
|
3380 |
-
|
3381 |
-
|
3382 |
-
|
3383 |
-
|
3384 |
-
|
3385 |
-
|
3386 |
-
|
3387 |
-
|
3388 |
-
#learn-press-updater {
|
3389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Mixin
|
3 |
+
*/
|
4 |
+
@-webkit-keyframes rotating4 /* Safari and Chrome */ {
|
5 |
+
from {
|
6 |
+
-webkit-transform: rotate(0deg);
|
7 |
+
-o-transform: rotate(0deg);
|
8 |
+
transform: rotate(0deg); }
|
9 |
+
to {
|
10 |
+
-webkit-transform: rotate(360deg);
|
11 |
+
-o-transform: rotate(360deg);
|
12 |
+
transform: rotate(360deg); } }
|
13 |
+
|
14 |
+
@keyframes rotating4 {
|
15 |
+
from {
|
16 |
+
-ms-transform: rotate(0deg);
|
17 |
+
-moz-transform: rotate(0deg);
|
18 |
+
-webkit-transform: rotate(0deg);
|
19 |
+
-o-transform: rotate(0deg);
|
20 |
+
transform: rotate(0deg); }
|
21 |
+
to {
|
22 |
+
-ms-transform: rotate(360deg);
|
23 |
+
-moz-transform: rotate(360deg);
|
24 |
+
-webkit-transform: rotate(360deg);
|
25 |
+
-o-transform: rotate(360deg);
|
26 |
+
transform: rotate(360deg); } }
|
27 |
+
|
28 |
+
@-webkit-keyframes animation4 /* Safari and Chrome */ {
|
29 |
+
from {
|
30 |
+
left: -40%;
|
31 |
+
width: 40%; }
|
32 |
+
to {
|
33 |
+
left: 100%;
|
34 |
+
width: 10%; } }
|
35 |
+
|
36 |
+
@keyframes animation4 {
|
37 |
+
from {
|
38 |
+
left: -40%;
|
39 |
+
width: 40%; }
|
40 |
+
to {
|
41 |
+
left: 100%;
|
42 |
+
width: 10%; } }
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Styles for displaying list of table
|
46 |
+
*/
|
47 |
+
.lp-toolbar-buttons {
|
48 |
+
position: relative;
|
49 |
+
z-index: 10;
|
50 |
+
height: 50px; }
|
51 |
+
.lp-toolbar-buttons .lp-toolbar-btn {
|
52 |
+
width: 30px;
|
53 |
+
height: 30px;
|
54 |
+
padding: 0;
|
55 |
+
text-align: center;
|
56 |
+
position: relative;
|
57 |
+
vertical-align: middle;
|
58 |
+
cursor: pointer;
|
59 |
+
_background: #FFF;
|
60 |
+
display: inline-block;
|
61 |
+
margin: 0; }
|
62 |
+
.lp-toolbar-buttons .lp-toolbar-btn a, .lp-toolbar-buttons .lp-toolbar-btn span {
|
63 |
+
color: #999;
|
64 |
+
box-shadow: none;
|
65 |
+
outline: none; }
|
66 |
+
.lp-toolbar-buttons .lp-toolbar-btn .lp-btn-icon {
|
67 |
+
width: 30px;
|
68 |
+
height: 30px;
|
69 |
+
text-align: center;
|
70 |
+
position: absolute;
|
71 |
+
top: 50%;
|
72 |
+
margin-top: -15px;
|
73 |
+
left: 50%;
|
74 |
+
margin-left: -15px;
|
75 |
+
line-height: 30px; }
|
76 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move {
|
77 |
+
cursor: ns-resize; }
|
78 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move span {
|
79 |
+
cursor: ns-resize; }
|
80 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move:hover a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-move span {
|
81 |
+
color: #0085ba; }
|
82 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove {
|
83 |
+
cursor: pointer; }
|
84 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove:hover a, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-remove:hover span {
|
85 |
+
color: #d05d5d; }
|
86 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle .dashicons-arrow-down,
|
87 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle .dashicons-arrow-down-alt2 {
|
88 |
+
display: none; }
|
89 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-up,
|
90 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-up-alt2 {
|
91 |
+
display: none; }
|
92 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-down,
|
93 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-toggle.closed .dashicons-arrow-down-alt2 {
|
94 |
+
display: inline-block; }
|
95 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown {
|
96 |
+
color: #000; }
|
97 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul {
|
98 |
+
position: absolute;
|
99 |
+
top: 100%;
|
100 |
+
right: 0;
|
101 |
+
background: #fdfeff;
|
102 |
+
margin: 0px 0;
|
103 |
+
border: 1px solid #DDD;
|
104 |
+
display: none; }
|
105 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li {
|
106 |
+
list-style: none;
|
107 |
+
margin: 0; }
|
108 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li a {
|
109 |
+
display: block;
|
110 |
+
white-space: nowrap;
|
111 |
+
text-decoration: none;
|
112 |
+
padding: 3px 8px;
|
113 |
+
font-size: 12px;
|
114 |
+
text-align: right;
|
115 |
+
color: #0073aa;
|
116 |
+
margin: 0; }
|
117 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li a:hover {
|
118 |
+
background: #dbf5ff; }
|
119 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-toolbar-btn-dropdown ul li.active a {
|
120 |
+
background: #dbf5ff; }
|
121 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled:hover {
|
122 |
+
_background: #F5F5F5; }
|
123 |
+
.lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled .lp-btn-icon, .lp-toolbar-buttons .lp-toolbar-btn.lp-btn-disabled:hover .lp-btn-icon {
|
124 |
+
color: #DDD; }
|
125 |
+
.lp-toolbar-buttons .lp-toolbar-btn:hover {
|
126 |
+
background: #dbf5ff;
|
127 |
+
display: inline-block; }
|
128 |
+
.lp-toolbar-buttons .lp-toolbar-btn:hover .lp-btn-icon {
|
129 |
+
color: #00a0d2; }
|
130 |
+
.lp-toolbar-buttons .lp-toolbar-btn:hover ul {
|
131 |
+
display: block; }
|
132 |
+
.lp-toolbar-buttons .lp-toolbar-btn:hover ul:hover {
|
133 |
+
display: block; }
|
134 |
+
|
135 |
+
.column-content-actions.lp-toolbar-buttons {
|
136 |
+
white-space: nowrap;
|
137 |
+
width: 30px;
|
138 |
+
padding: 0; }
|
139 |
+
|
140 |
+
.learn-press-box-data {
|
141 |
+
border: 1px solid #DDD;
|
142 |
+
margin: 20px 0 0 0;
|
143 |
+
position: relative; }
|
144 |
+
.learn-press-box-data .lp-box-data-head {
|
145 |
+
padding: 10px 15px;
|
146 |
+
background: #FFF; }
|
147 |
+
.learn-press-box-data .lp-box-data-head h3 {
|
148 |
+
font-size: 18px;
|
149 |
+
padding: 15px;
|
150 |
+
margin: 0; }
|
151 |
+
.learn-press-box-data .lp-box-data-head .lp-box-data-actions {
|
152 |
+
float: right;
|
153 |
+
position: relative;
|
154 |
+
z-index: 10; }
|
155 |
+
.learn-press-box-data .lp-box-data-head .lp-box-data-actions .lp-btn {
|
156 |
+
display: inline-block;
|
157 |
+
width: 30px;
|
158 |
+
text-align: center;
|
159 |
+
height: 50px;
|
160 |
+
line-height: 46px;
|
161 |
+
vertical-align: middle; }
|
162 |
+
.learn-press-box-data .lp-box-data-head .lp-box-data-actions:after {
|
163 |
+
clear: both;
|
164 |
+
display: block;
|
165 |
+
content: ''; }
|
166 |
+
.learn-press-box-data .lp-box-data-head:after {
|
167 |
+
clear: both;
|
168 |
+
display: block;
|
169 |
+
content: ''; }
|
170 |
+
.learn-press-box-data .lp-box-data-content {
|
171 |
+
padding: 15px;
|
172 |
+
border-top: 1px solid #DDD;
|
173 |
+
background: #FFF; }
|
174 |
+
.learn-press-box-data .lp-box-data-foot {
|
175 |
+
padding: 15px; }
|
176 |
+
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-up,
|
177 |
+
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-up-alt2 {
|
178 |
+
display: none; }
|
179 |
+
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-down,
|
180 |
+
.learn-press-box-data.closed .lp-btn-toggle .dashicons-arrow-down-alt2 {
|
181 |
+
display: inline-block; }
|
182 |
+
.learn-press-box-data.closed .lp-box-data-content {
|
183 |
+
display: none; }
|
184 |
+
|
185 |
+
.lp-list-options {
|
186 |
+
width: 100%;
|
187 |
+
border-collapse: collapse; }
|
188 |
+
.lp-list-options th, .lp-list-options td {
|
189 |
+
padding: 10px 15px;
|
190 |
+
background: #F5F5F5;
|
191 |
+
border-top: 1px solid #DDD; }
|
192 |
+
.lp-list-options thead th {
|
193 |
+
text-align: left; }
|
194 |
+
.lp-list-options tbody tr td {
|
195 |
+
background: #f4fcff;
|
196 |
+
padding: 0 15px; }
|
197 |
+
.lp-list-options tbody tr td.lp-toolbar-buttons {
|
198 |
+
width: 30px;
|
199 |
+
white-space: nowrap;
|
200 |
+
position: relative;
|
201 |
+
height: 42px;
|
202 |
+
_overflow: hidden; }
|
203 |
+
.lp-list-options tbody tr td.lp-toolbar-buttons .lp-toolbar-btn {
|
204 |
+
height: 43px;
|
205 |
+
position: relative;
|
206 |
+
margin-bottom: -4px;
|
207 |
+
margin-top: -4px;
|
208 |
+
visibility: hidden; }
|
209 |
+
.lp-list-options tbody tr:nth-child(odd) td {
|
210 |
+
background: #FFF; }
|
211 |
+
.lp-list-options tbody tr:hover td.lp-toolbar-buttons .lp-toolbar-btn {
|
212 |
+
visibility: visible; }
|
213 |
+
.lp-list-options tbody td {
|
214 |
+
text-align: left; }
|
215 |
+
.lp-list-options tbody td input[type="text"] {
|
216 |
+
width: 100%; }
|
217 |
+
.lp-list-options tbody td input[type="text"][value=""] {
|
218 |
+
font-style: italic; }
|
219 |
+
.lp-list-options tbody td.column-content-answer_correct {
|
220 |
+
width: 125px; }
|
221 |
+
.lp-list-options tbody td.lp-remove-list-option, .lp-list-options tbody td.lp-move-list-option {
|
222 |
+
width: 20px;
|
223 |
+
padding: 0;
|
224 |
+
text-align: center; }
|
225 |
+
.lp-list-options tbody td.lp-remove-list-option a, .lp-list-options tbody td.lp-move-list-option a {
|
226 |
+
visibility: hidden;
|
227 |
+
color: #999; }
|
228 |
+
.lp-list-options tbody td.lp-remove-list-option:hover, .lp-list-options tbody td.lp-move-list-option:hover {
|
229 |
+
background: #dbf5ff; }
|
230 |
+
.lp-list-options tbody td.lp-move-list-option {
|
231 |
+
cursor: ns-resize; }
|
232 |
+
.lp-list-options tbody td.lp-move-list-option a {
|
233 |
+
cursor: ns-resize; }
|
234 |
+
.lp-list-options tbody td.lp-move-list-option:hover a {
|
235 |
+
color: #0085ba; }
|
236 |
+
.lp-list-options tbody td.lp-remove-list-option {
|
237 |
+
cursor: pointer; }
|
238 |
+
.lp-list-options tbody td.lp-remove-list-option:hover a {
|
239 |
+
color: #d05d5d; }
|
240 |
+
|
241 |
+
.lp-animation {
|
242 |
+
-webkit-animation: spin 4s linear infinite;
|
243 |
+
-moz-animation: spin 4s linear infinite;
|
244 |
+
animation: spin 4s linear infinite; }
|
245 |
+
|
246 |
+
.lp-ajax-search {
|
247 |
+
position: relative;
|
248 |
+
display: inline-block;
|
249 |
+
z-index: 999999; }
|
250 |
+
.lp-ajax-search .lp-search-term {
|
251 |
+
height: 28px;
|
252 |
+
min-width: 300px;
|
253 |
+
margin: 0;
|
254 |
+
-webkit-box-shadow: none;
|
255 |
+
-moz-box-shadow: none;
|
256 |
+
box-shadow: none;
|
257 |
+
outline: none; }
|
258 |
+
.lp-ajax-search .lp-search-term:focus {
|
259 |
+
-webkit-box-shadow: none;
|
260 |
+
-moz-box-shadow: none;
|
261 |
+
box-shadow: none; }
|
262 |
+
.lp-ajax-search .lp-search-term:focus {
|
263 |
+
-webkit-box-shadow: none;
|
264 |
+
-moz-box-shadow: none;
|
265 |
+
box-shadow: none;
|
266 |
+
outline: none; }
|
267 |
+
.lp-ajax-search .lp-search-term:focus:focus {
|
268 |
+
-webkit-box-shadow: none;
|
269 |
+
-moz-box-shadow: none;
|
270 |
+
box-shadow: none; }
|
271 |
+
.lp-ajax-search .lp-search-results {
|
272 |
+
position: absolute;
|
273 |
+
background: #FFF;
|
274 |
+
border: 1px solid #DDD;
|
275 |
+
top: 100%;
|
276 |
+
width: 100%;
|
277 |
+
margin: -1px 0 0 0;
|
278 |
+
-webkit-box-sizing: border-box;
|
279 |
+
-moz-box-sizing: border-box;
|
280 |
+
box-sizing: border-box; }
|
281 |
+
.lp-ajax-search .lp-search-results .lp-search-items {
|
282 |
+
margin: 0;
|
283 |
+
max-height: 300px;
|
284 |
+
overflow: auto; }
|
285 |
+
.lp-ajax-search .lp-search-results .lp-search-items li {
|
286 |
+
margin: 0; }
|
287 |
+
.lp-ajax-search .lp-search-results .lp-search-items li label {
|
288 |
+
display: block;
|
289 |
+
padding: 8px 10px;
|
290 |
+
border-bottom: 1px solid #f3f3f3; }
|
291 |
+
.lp-ajax-search .lp-search-results .lp-search-items li label input {
|
292 |
+
float: left;
|
293 |
+
margin-right: -100%;
|
294 |
+
margin-top: 1px; }
|
295 |
+
.lp-ajax-search .lp-search-results .lp-search-items li label span {
|
296 |
+
margin-left: 25px;
|
297 |
+
display: inline-block; }
|
298 |
+
.lp-ajax-search .lp-search-results .lp-search-items li label span a.lp-add-item {
|
299 |
+
visibility: hidden;
|
300 |
+
margin-left: 10px; }
|
301 |
+
.lp-ajax-search .lp-search-results .lp-search-items li.active {
|
302 |
+
background: #dbf5ff; }
|
303 |
+
.lp-ajax-search .lp-search-results .lp-search-items li:hover {
|
304 |
+
background: #0085ba;
|
305 |
+
color: #FFF; }
|
306 |
+
.lp-ajax-search .lp-search-results .lp-search-items li:hover a.lp-add-item {
|
307 |
+
visibility: visible; }
|
308 |
+
.lp-ajax-search .lp-search-results .lp-search-actions {
|
309 |
+
border-top: 1px solid #DDD;
|
310 |
+
padding: 10px;
|
311 |
+
margin: 0; }
|
312 |
+
|
313 |
+
#learn-press-ajax-search-overlay {
|
314 |
+
position: fixed;
|
315 |
+
top: 0;
|
316 |
+
left: 0;
|
317 |
+
width: 100%;
|
318 |
+
height: 100%;
|
319 |
+
opacity: 0;
|
320 |
+
z-index: 99999;
|
321 |
+
display: none; }
|
322 |
+
|
323 |
+
.update-overlay {
|
324 |
+
position: fixed;
|
325 |
+
top: 0;
|
326 |
+
left: 0;
|
327 |
+
width: 100%;
|
328 |
+
height: 100%;
|
329 |
+
z-index: 99999;
|
330 |
+
background: rgba(255, 255, 255, 0.5); }
|
331 |
+
|
332 |
+
#course-editor.ajax-search #learn-press-ajax-search-overlay {
|
333 |
+
display: block; }
|
334 |
+
|
335 |
+
#course-editor.ajax-search .lp-ajax-search {
|
336 |
+
z-index: 100000; }
|
337 |
+
|
338 |
+
.advanced-list {
|
339 |
+
list-style: none; }
|
340 |
+
.advanced-list li {
|
341 |
+
display: inline-block;
|
342 |
+
background: #EEE;
|
343 |
+
padding: 3px 8px;
|
344 |
+
-webkit-border-radius: 2px;
|
345 |
+
-moz-border-radius: 2px;
|
346 |
+
border-radius: 2px; }
|
347 |
+
.advanced-list li .remove-item {
|
348 |
+
display: inline-block;
|
349 |
+
text-decoration: none;
|
350 |
+
line-height: 1;
|
351 |
+
vertical-align: middle;
|
352 |
+
margin-right: 5px;
|
353 |
+
cursor: pointer; }
|
354 |
+
.advanced-list li .remove-item:hover {
|
355 |
+
color: #0085ba; }
|
356 |
+
.advanced-list li .remove-item:before {
|
357 |
+
font-family: dashicons;
|
358 |
+
content: "\f335";
|
359 |
+
text-decoration: none; }
|
360 |
+
.advanced-list li span {
|
361 |
+
display: inline-block; }
|
362 |
+
.advanced-list.locked .remove-item {
|
363 |
+
display: none; }
|
364 |
+
|
365 |
+
.lp-label-counter {
|
366 |
+
border-radius: 20px;
|
367 |
+
display: inline-block;
|
368 |
+
height: 20px;
|
369 |
+
padding: 0 10px;
|
370 |
+
background: #2196F3;
|
371 |
+
line-height: 20px;
|
372 |
+
color: #FFF;
|
373 |
+
font-weight: bold; }
|
374 |
+
.lp-label-counter.disabled {
|
375 |
+
background: #DDD; }
|
376 |
+
|
377 |
+
@-moz-keyframes spin {
|
378 |
+
100% {
|
379 |
+
-moz-transform: rotate(360deg); } }
|
380 |
+
|
381 |
+
@-webkit-keyframes spin {
|
382 |
+
100% {
|
383 |
+
-webkit-transform: rotate(360deg); } }
|
384 |
+
|
385 |
+
@keyframes spin {
|
386 |
+
100% {
|
387 |
+
-webkit-transform: rotate(360deg);
|
388 |
+
transform: rotate(360deg); } }
|
389 |
+
|
390 |
+
.rwmb-duration {
|
391 |
+
border: 1px solid #ddd; }
|
392 |
+
|
393 |
+
ul .clearfix {
|
394 |
+
clear: both;
|
395 |
+
height: 0;
|
396 |
+
opacity: 0; }
|
397 |
+
|
398 |
+
.clearfix-after:after {
|
399 |
+
clear: both;
|
400 |
+
height: 0;
|
401 |
+
opacity: 0;
|
402 |
+
display: block;
|
403 |
+
content: ''; }
|
404 |
+
|
405 |
+
@-moz-keyframes lp-spinner {
|
406 |
+
100% {
|
407 |
+
-moz-transform: rotate(360deg); } }
|
408 |
+
|
409 |
+
@-webkit-keyframes lp-spinner {
|
410 |
+
100% {
|
411 |
+
-webkit-transform: rotate(360deg); } }
|
412 |
+
|
413 |
+
@keyframes lp-spinner {
|
414 |
+
100% {
|
415 |
+
-webkit-transform: rotate(360deg);
|
416 |
+
transform: rotate(360deg); } }
|
417 |
+
|
418 |
+
.lp-modal-choose-items-open {
|
419 |
+
overflow: hidden; }
|
420 |
+
|
421 |
+
.lp-modal-search {
|
422 |
+
background-color: red;
|
423 |
+
color: #777;
|
424 |
+
padding: 20px;
|
425 |
+
height: 100%; }
|
426 |
+
.lp-modal-search li.selected {
|
427 |
+
display: none; }
|
428 |
+
|
429 |
+
/* message box */
|
430 |
+
#learn-press-message-box-block {
|
431 |
+
position: fixed;
|
432 |
+
top: 0;
|
433 |
+
left: 0;
|
434 |
+
right: 0;
|
435 |
+
bottom: 0;
|
436 |
+
background-color: #000;
|
437 |
+
z-index: 99999;
|
438 |
+
opacity: 0.8; }
|
439 |
+
|
440 |
+
#learn-press-message-box-window {
|
441 |
+
position: fixed;
|
442 |
+
top: 0;
|
443 |
+
bottom: 0;
|
444 |
+
left: 0;
|
445 |
+
right: 0;
|
446 |
+
z-index: 100000;
|
447 |
+
color: #FFF;
|
448 |
+
text-align: center; }
|
449 |
+
|
450 |
+
#message-box-wrap {
|
451 |
+
margin: 0 auto;
|
452 |
+
/* text-align: center; */
|
453 |
+
display: inline-block;
|
454 |
+
text-align: left;
|
455 |
+
max-width: 70%; }
|
456 |
+
|
457 |
+
.message-box-title {
|
458 |
+
color: #FFF;
|
459 |
+
margin: 0 0 40px 0;
|
460 |
+
font-size: 34px; }
|
461 |
+
|
462 |
+
.message-box-content {
|
463 |
+
font-size: 16px;
|
464 |
+
line-height: 1.5; }
|
465 |
+
|
466 |
+
.message-box-animation {
|
467 |
+
background-image: url("../../images/animation.gif");
|
468 |
+
width: 220px;
|
469 |
+
height: 20px;
|
470 |
+
margin: 20px 0 0; }
|
471 |
+
|
472 |
+
.message-box-buttons {
|
473 |
+
margin: 20px 0 0;
|
474 |
+
border-top: 1px solid #929292;
|
475 |
+
padding-top: 20px; }
|
476 |
+
|
477 |
+
.message-box-button {
|
478 |
+
margin-right: 10px !important; }
|
479 |
+
|
480 |
+
.tipsy {
|
481 |
+
position: absolute; }
|
482 |
+
|
483 |
+
.learnpress a, .learnpress a:active {
|
484 |
+
outline: none;
|
485 |
+
box-shadow: none; }
|
486 |
+
|
487 |
+
.learnpress .lp-install-sample-data-options {
|
488 |
+
border: 1px solid #DDD;
|
489 |
+
padding: 0 20px 10px 20px; }
|
490 |
+
.learnpress .lp-install-sample-data-options legend {
|
491 |
+
font-size: 16px; }
|
492 |
+
|
493 |
+
/* Metabox email template field */
|
494 |
+
.lp-email-templates {
|
495 |
+
overflow: hidden;
|
496 |
+
margin-top: 5px; }
|
497 |
+
|
498 |
+
.learn-press-email-variables {
|
499 |
+
list-style: none;
|
500 |
+
padding: 0;
|
501 |
+
margin: 20px 0 0; }
|
502 |
+
.learn-press-email-variables li {
|
503 |
+
display: inline-block;
|
504 |
+
cursor: pointer; }
|
505 |
+
|
506 |
+
/* Metabox dropdown pages field */
|
507 |
+
.learn-press-dropdown-pages input[type="text"] {
|
508 |
+
min-width: 300px;
|
509 |
+
height: 29px;
|
510 |
+
vertical-align: top;
|
511 |
+
margin: 0; }
|
512 |
+
|
513 |
+
.learn-press-dropdown-pages .select2-selection__rendered {
|
514 |
+
line-height: 26px !important; }
|
515 |
+
|
516 |
+
.learn-press-dropdown-pages .quick-add-page-inline {
|
517 |
+
margin-top: 0; }
|
518 |
+
|
519 |
+
/* Tooltip */
|
520 |
+
.learn-press-tooltip {
|
521 |
+
display: inline-block;
|
522 |
+
font-size: 17px;
|
523 |
+
vertical-align: middle;
|
524 |
+
margin: 0 5px;
|
525 |
+
color: #999; }
|
526 |
+
.learn-press-tooltip.icon:after {
|
527 |
+
font-family: Dashicons;
|
528 |
+
content: "\f223"; }
|
529 |
+
.learn-press-tooltip:hover {
|
530 |
+
color: #0073aa;
|
531 |
+
opacity: 1; }
|
532 |
+
|
533 |
+
/* Metabox payment order field */
|
534 |
+
.rwmb-payment-order-wrapper .rwmb-label {
|
535 |
+
margin-bottom: 20px !important; }
|
536 |
+
|
537 |
+
.rwmb-payment-order-wrapper .rwmb-input {
|
538 |
+
margin-left: 0 !important; }
|
539 |
+
|
540 |
+
.learn-press-payments,
|
541 |
+
.learn-press-emails {
|
542 |
+
border-collapse: collapse;
|
543 |
+
border: 1px solid #DDD;
|
544 |
+
width: 100%;
|
545 |
+
font-size: 14px; }
|
546 |
+
.learn-press-payments th, .learn-press-payments td,
|
547 |
+
.learn-press-emails th,
|
548 |
+
.learn-press-emails td {
|
549 |
+
padding: 10px; }
|
550 |
+
.learn-press-payments .order,
|
551 |
+
.learn-press-emails .order {
|
552 |
+
width: 30px;
|
553 |
+
text-align: center;
|
554 |
+
padding-right: 0;
|
555 |
+
cursor: not-allowed;
|
556 |
+
color: #DDD; }
|
557 |
+
.learn-press-payments .name,
|
558 |
+
.learn-press-emails .name {
|
559 |
+
font-weight: normal;
|
560 |
+
text-transform: capitalize;
|
561 |
+
min-width: 250px; }
|
562 |
+
.learn-press-payments .name a,
|
563 |
+
.learn-press-emails .name a {
|
564 |
+
text-decoration: none; }
|
565 |
+
.learn-press-payments .status,
|
566 |
+
.learn-press-emails .status {
|
567 |
+
width: 100px;
|
568 |
+
text-align: center;
|
569 |
+
cursor: pointer; }
|
570 |
+
.learn-press-payments .status .dashicons,
|
571 |
+
.learn-press-emails .status .dashicons {
|
572 |
+
background: #DDD;
|
573 |
+
border-radius: 50%;
|
574 |
+
color: #FFF; }
|
575 |
+
.learn-press-payments .status a,
|
576 |
+
.learn-press-emails .status a {
|
577 |
+
display: block;
|
578 |
+
font-size: 12px;
|
579 |
+
text-decoration: none;
|
580 |
+
margin-top: 5px; }
|
581 |
+
.learn-press-payments .status.enabled .dashicons,
|
582 |
+
.learn-press-emails .status.enabled .dashicons {
|
583 |
+
background: #0085ba; }
|
584 |
+
.learn-press-payments thead th,
|
585 |
+
.learn-press-emails thead th {
|
586 |
+
text-align: left;
|
587 |
+
border-bottom: 1px solid #DDD; }
|
588 |
+
.learn-press-payments tbody tr:nth-child(even) td,
|
589 |
+
.learn-press-emails tbody tr:nth-child(even) td {
|
590 |
+
background: #FFF; }
|
591 |
+
.learn-press-payments tbody tr:nth-child(odd) td,
|
592 |
+
.learn-press-emails tbody tr:nth-child(odd) td {
|
593 |
+
background: #F5F5F5; }
|
594 |
+
.learn-press-payments tbody td,
|
595 |
+
.learn-press-emails tbody td {
|
596 |
+
border-bottom: 1px solid #EEE; }
|
597 |
+
.learn-press-payments tbody .ui-sortable-helper,
|
598 |
+
.learn-press-emails tbody .ui-sortable-helper {
|
599 |
+
border: 1px solid #DDD;
|
600 |
+
margin-left: -1px; }
|
601 |
+
.learn-press-payments tbody .ui-sortable-placeholder,
|
602 |
+
.learn-press-emails tbody .ui-sortable-placeholder {
|
603 |
+
visibility: visible !important;
|
604 |
+
border: 1px solid #DDD; }
|
605 |
+
.learn-press-payments tbody .ui-sortable-placeholder td,
|
606 |
+
.learn-press-emails tbody .ui-sortable-placeholder td {
|
607 |
+
background: #F7F7F7;
|
608 |
+
height: 35px;
|
609 |
+
padding: 0; }
|
610 |
+
.learn-press-payments ~ .email-actions,
|
611 |
+
.learn-press-emails ~ .email-actions {
|
612 |
+
text-align: right; }
|
613 |
+
.learn-press-payments.sortable .order:hover,
|
614 |
+
.learn-press-emails.sortable .order:hover {
|
615 |
+
cursor: ns-resize;
|
616 |
+
color: #0073aa; }
|
617 |
+
|
618 |
+
/* Submenu tools/templates */
|
619 |
+
.lp-template-overrides {
|
620 |
+
margin-top: 20px; }
|
621 |
+
.lp-template-overrides thead th h4 {
|
622 |
+
margin: 0; }
|
623 |
+
.lp-template-overrides tbody th {
|
624 |
+
font-weight: bold; }
|
625 |
+
.lp-template-overrides tbody th p {
|
626 |
+
margin: 0 0 0 10px;
|
627 |
+
display: inline-block; }
|
628 |
+
.lp-template-overrides tbody th p a {
|
629 |
+
font-weight: normal;
|
630 |
+
outline: none;
|
631 |
+
border: none;
|
632 |
+
box-shadow: none;
|
633 |
+
margin: 0;
|
634 |
+
padding: 2px 8px;
|
635 |
+
border-radius: 3px; }
|
636 |
+
.lp-template-overrides tbody th p a.current {
|
637 |
+
background: #00aadc;
|
638 |
+
color: #FFF; }
|
639 |
+
.lp-template-overrides .template-row.outdated code:before, .lp-template-overrides .template-row.up-to-date code:before {
|
640 |
+
font-family: Dashicons;
|
641 |
+
vertical-align: middle;
|
642 |
+
margin-top: -2px;
|
643 |
+
display: inline-block;
|
644 |
+
margin-right: 3px; }
|
645 |
+
.lp-template-overrides .template-row.outdated .template-version {
|
646 |
+
color: #FF0000; }
|
647 |
+
.lp-template-overrides .template-row.outdated .template-file code:before {
|
648 |
+
content: "\f534";
|
649 |
+
color: #FF0000; }
|
650 |
+
.lp-template-overrides .template-row.up-to-date .template-version {
|
651 |
+
color: #1859ff; }
|
652 |
+
.lp-template-overrides .template-row.up-to-date .template-file code:before {
|
653 |
+
content: "\f147";
|
654 |
+
color: #0085ba; }
|
655 |
+
.lp-template-overrides .template-version, .lp-template-overrides .core-version {
|
656 |
+
width: 100px; }
|
657 |
+
.lp-template-overrides #learn-press-no-templates td p {
|
658 |
+
color: #0073aa; }
|
659 |
+
|
660 |
+
/* General */
|
661 |
+
.description code {
|
662 |
+
font-size: smaller; }
|
663 |
+
|
664 |
+
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result {
|
665 |
+
display: none;
|
666 |
+
background: #F5F5F5;
|
667 |
+
padding: 10px; }
|
668 |
+
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result input {
|
669 |
+
width: 80px;
|
670 |
+
margin: 0;
|
671 |
+
-webkit-box-sizing: border-box;
|
672 |
+
-moz-box-sizing: border-box;
|
673 |
+
box-sizing: border-box; }
|
674 |
+
#field-_lp_course_result input[name="_lp_course_result"] ~ #passing-condition-quiz-result p {
|
675 |
+
margin: 7px 0 0;
|
676 |
+
color: #777;
|
677 |
+
font-style: italic; }
|
678 |
+
|
679 |
+
#field-_lp_course_result input[name="_lp_course_result"]:checked ~ #passing-condition-quiz-result {
|
680 |
+
display: block; }
|
681 |
+
|
682 |
+
.widget .widget-content .rwmb-field:not(:last-of-type) {
|
683 |
+
margin: 0 0 10px; }
|
684 |
+
.widget .widget-content .rwmb-field:not(:last-of-type):first-child {
|
685 |
+
margin-top: 10px; }
|
686 |
+
|
687 |
+
.widget .widget-content .rwmb-field:last-child {
|
688 |
+
margin-bottom: 10px; }
|
689 |
+
|
690 |
+
.widget .widget-content .rwmb-field .rwmb-label, .widget .widget-content .rwmb-field .rwmb-input {
|
691 |
+
width: 100%; }
|
692 |
+
|
693 |
+
.widget .widget-content .rwmb-field .rwmb-label {
|
694 |
+
margin-bottom: 2px; }
|
695 |
+
.widget .widget-content .rwmb-field .rwmb-label label {
|
696 |
+
font-weight: 400; }
|
697 |
+
|
698 |
+
.widget .widget-content .rwmb-field .rwmb-input input[type="text"] {
|
699 |
+
width: 100%; }
|
700 |
+
|
701 |
+
.course-attributes {
|
702 |
+
margin: 20px 0; }
|
703 |
+
.course-attributes .learn-press-attribute {
|
704 |
+
border: 1px solid #DDD;
|
705 |
+
margin-top: -1px;
|
706 |
+
margin-bottom: 0; }
|
707 |
+
.course-attributes .learn-press-attribute > h4 {
|
708 |
+
padding: 10px 15px;
|
709 |
+
margin: 0;
|
710 |
+
background: #F5F5F5; }
|
711 |
+
.course-attributes .learn-press-attribute .learn-press-attribute-data {
|
712 |
+
padding: 15px;
|
713 |
+
border-top: 1px solid #DDD; }
|
714 |
+
|
715 |
+
#wpfooter {
|
716 |
+
z-index: 20; }
|
717 |
+
|
718 |
+
.learn-press-advertisement-slider {
|
719 |
+
margin: 50px 20px 0 0;
|
720 |
+
position: relative;
|
721 |
+
overflow: hidden;
|
722 |
+
box-sizing: border-box;
|
723 |
+
z-index: 10; }
|
724 |
+
.learn-press-advertisement-slider .slider-items:after {
|
725 |
+
clear: both;
|
726 |
+
display: block;
|
727 |
+
content: ''; }
|
728 |
+
.learn-press-advertisement-slider .slide-item {
|
729 |
+
position: relative;
|
730 |
+
float: left;
|
731 |
+
width: 100%;
|
732 |
+
margin-right: -100%;
|
733 |
+
padding: 20px;
|
734 |
+
opacity: 0;
|
735 |
+
background: #FFF;
|
736 |
+
-webkit-box-sizing: border-box;
|
737 |
+
-moz-box-sizing: border-box;
|
738 |
+
box-sizing: border-box;
|
739 |
+
-webkit-transition: opacity 0.5s linear;
|
740 |
+
transition: opacity 0.5s linear; }
|
741 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
742 |
+
float: left;
|
743 |
+
width: 35%; }
|
744 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail a {
|
745 |
+
display: block;
|
746 |
+
line-height: 1;
|
747 |
+
margin-bottom: 0; }
|
748 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
749 |
+
max-width: 100%; }
|
750 |
+
.learn-press-advertisement-slider .slide-item .slide-detail {
|
751 |
+
margin-left: 35%;
|
752 |
+
padding-left: 20px; }
|
753 |
+
.learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
754 |
+
margin-top: 0; }
|
755 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
756 |
+
display: none; }
|
757 |
+
.learn-press-advertisement-slider .slide-item.slide-active {
|
758 |
+
opacity: 1; }
|
759 |
+
.learn-press-advertisement-slider .slider-controls {
|
760 |
+
position: absolute;
|
761 |
+
bottom: 20px;
|
762 |
+
right: 20px; }
|
763 |
+
.learn-press-advertisement-slider .slider-controls .next-item,
|
764 |
+
.learn-press-advertisement-slider .slider-controls .prev-item {
|
765 |
+
font-family: 'dashicons';
|
766 |
+
width: 40px;
|
767 |
+
height: 40px;
|
768 |
+
border: 1px solid #DDD;
|
769 |
+
line-height: 40px;
|
770 |
+
font-size: 16px;
|
771 |
+
cursor: pointer;
|
772 |
+
float: left;
|
773 |
+
margin-left: 10px;
|
774 |
+
text-align: center;
|
775 |
+
color: #DDD; }
|
776 |
+
.learn-press-advertisement-slider .slider-controls .next-item:hover,
|
777 |
+
.learn-press-advertisement-slider .slider-controls .prev-item:hover {
|
778 |
+
border-color: #0085ba; }
|
779 |
+
.learn-press-advertisement-slider .slider-controls .next-item:hover:before,
|
780 |
+
.learn-press-advertisement-slider .slider-controls .prev-item:hover:before {
|
781 |
+
color: #0085ba; }
|
782 |
+
.learn-press-advertisement-slider .slider-controls .next-item:before {
|
783 |
+
content: "\f345"; }
|
784 |
+
.learn-press-advertisement-slider .slider-controls .prev-item:before {
|
785 |
+
content: "\f341"; }
|
786 |
+
|
787 |
+
@media only screen and (max-width: 1200px) {
|
788 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
789 |
+
width: 50%; }
|
790 |
+
.learn-press-advertisement-slider .slide-item .slide-detail {
|
791 |
+
margin-left: 50%; }
|
792 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
793 |
+
display: block; }
|
794 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
795 |
+
display: none; } }
|
796 |
+
|
797 |
+
@media only screen and (max-width: 960px) {
|
798 |
+
.learn-press-advertisement-slider {
|
799 |
+
margin-left: 56px; }
|
800 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
801 |
+
width: 100%;
|
802 |
+
float: none; }
|
803 |
+
.learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
804 |
+
width: 100%; }
|
805 |
+
.learn-press-advertisement-slider .slide-item .slide-detail {
|
806 |
+
margin-left: 0;
|
807 |
+
padding-left: 0; }
|
808 |
+
.learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
809 |
+
padding-top: 20px; }
|
810 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
811 |
+
display: block; }
|
812 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
813 |
+
display: none; }
|
814 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .slide-controls {
|
815 |
+
margin-bottom: 0; }
|
816 |
+
.learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
|
817 |
+
margin-bottom: 0; }
|
818 |
+
.wp-responsive-open .learn-press-advertisement-slider {
|
819 |
+
margin-left: 56px; }
|
820 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-thumbnail {
|
821 |
+
width: 100%;
|
822 |
+
float: none; }
|
823 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-thumbnail img {
|
824 |
+
width: 100%; }
|
825 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail {
|
826 |
+
margin-left: 0;
|
827 |
+
padding-left: 0; }
|
828 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail h2 {
|
829 |
+
padding-top: 20px; }
|
830 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .description-short {
|
831 |
+
display: block; }
|
832 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .description-full {
|
833 |
+
display: none; }
|
834 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls {
|
835 |
+
margin-bottom: 0; }
|
836 |
+
.wp-responsive-open .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
|
837 |
+
margin-bottom: 0; } }
|
838 |
+
|
839 |
+
/*
|
840 |
+
.learn-press-advertisement-slider > .slide-item {
|
841 |
+
display: none;
|
842 |
+
}
|
843 |
+
.learn-press-advertisement-slider > .slide-item:first-child {
|
844 |
+
display: block;
|
845 |
+
}
|
846 |
+
.learn-press-advertisement-slider .lp-wrap-items {
|
847 |
+
position: relative;
|
848 |
+
overflow: hidden;
|
849 |
+
-webkit-transition: visibility 1s, opacity 1s;
|
850 |
+
transition: visibility 1s, opacity 1s;
|
851 |
+
padding: 20px;
|
852 |
+
background-color: #fff;
|
853 |
+
border: 1px solid #ddd;
|
854 |
+
margin-bottom: 30px;
|
855 |
+
}
|
856 |
+
.learn-press-advertisement-slider .theme-thumbnail {
|
857 |
+
float: left;
|
858 |
+
width: 35%;
|
859 |
+
}
|
860 |
+
.learn-press-advertisement-slider .theme-detail {
|
861 |
+
margin-left: 35%;
|
862 |
+
padding-left: 20px;
|
863 |
+
}
|
864 |
+
.learn-press-advertisement-slider .lp-item {
|
865 |
+
position: relative;
|
866 |
+
float: left;
|
867 |
+
margin-right: -100%;
|
868 |
+
width: 100%;
|
869 |
+
box-sizing: border-box;
|
870 |
+
visibility: hidden;
|
871 |
+
opacity: 0;
|
872 |
+
-webkit-transition: visibility 0.5s linear, opacity 0.5s linear;
|
873 |
+
transition: visibility 0.5s linear, opacity 0.5s linear;
|
874 |
+
}
|
875 |
+
.learn-press-advertisement-slider img {
|
876 |
+
width: 100%;
|
877 |
+
height: auto;
|
878 |
+
float: none;
|
879 |
+
}
|
880 |
+
.learn-press-advertisement-slider .lp-active {
|
881 |
+
visibility: visible;
|
882 |
+
opacity: 1;
|
883 |
+
}
|
884 |
+
.learn-press-advertisement-slider .slider-controls {
|
885 |
+
position: absolute;
|
886 |
+
bottom: 30px;
|
887 |
+
right: 0;
|
888 |
+
height: 50px;
|
889 |
+
-ms-transform: translateY(-50%);
|
890 |
+
-webkit-transform: translateY(-50%);
|
891 |
+
transform: translateY(-50%);
|
892 |
+
}
|
893 |
+
.learn-press-advertisement-slider .slider-controls:after {
|
894 |
+
content: '';
|
895 |
+
clear: both;
|
896 |
+
display: block;
|
897 |
+
}
|
898 |
+
.learn-press-advertisement-slider .slider-controls .prev-item,
|
899 |
+
.learn-press-advertisement-slider .slider-controls .next-item {
|
900 |
+
position: absolute;
|
901 |
+
top: 0;
|
902 |
+
font-family: 'dashicons';
|
903 |
+
width: 40px;
|
904 |
+
height: 40px;
|
905 |
+
border: 1px solid #000;
|
906 |
+
line-height: 40px;
|
907 |
+
font-size: 16px;
|
908 |
+
color: #000;
|
909 |
+
cursor: pointer;
|
910 |
+
}
|
911 |
+
.learn-press-advertisement-slider .slider-controls .prev-item {
|
912 |
+
right: 95px;
|
913 |
+
}
|
914 |
+
.learn-press-advertisement-slider .slider-controls .prev-item:before {
|
915 |
+
content: "\f341";
|
916 |
+
display: block;
|
917 |
+
text-align: center;
|
918 |
+
}
|
919 |
+
.learn-press-advertisement-slider .slider-controls .next-item {
|
920 |
+
right: 45px;
|
921 |
+
}
|
922 |
+
.learn-press-advertisement-slider .slider-controls .next-item:before {
|
923 |
+
content: "\f345";
|
924 |
+
display: block;
|
925 |
+
text-align: center;
|
926 |
+
}
|
927 |
+
@media only screen and (max-width: 1200px) {
|
928 |
+
.learn-press-advertisement-slider .theme-thumbnail {
|
929 |
+
width: 50%;
|
930 |
+
}
|
931 |
+
.learn-press-advertisement-slider .theme-detail {
|
932 |
+
margin-left: 50%;
|
933 |
+
}
|
934 |
+
}
|
935 |
+
@media only screen and (max-width: 960px) {
|
936 |
+
.learn-press-advertisement-slider {
|
937 |
+
margin-left: 36px;
|
938 |
+
}
|
939 |
+
.learn-press-advertisement-slider .theme-thumbnail {
|
940 |
+
float: none;
|
941 |
+
width: 100%;
|
942 |
+
}
|
943 |
+
.learn-press-advertisement-slider .theme-detail {
|
944 |
+
margin-top: 20px;
|
945 |
+
margin-left: 0;
|
946 |
+
padding-left: 0;
|
947 |
+
}
|
948 |
+
}
|
949 |
+
@media screen and (max-width: 782px) {
|
950 |
+
.learn-press-advertisement-slider {
|
951 |
+
margin-left: 0;
|
952 |
+
}
|
953 |
+
}
|
954 |
+
*/
|
955 |
+
.lp-admin-tabs {
|
956 |
+
position: relative;
|
957 |
+
margin-top: 20px; }
|
958 |
+
.lp-admin-tabs .lp-admin-tab-navs {
|
959 |
+
margin: 0 -250px 0 0;
|
960 |
+
width: 250px;
|
961 |
+
float: left;
|
962 |
+
padding: 10px 0px;
|
963 |
+
position: relative;
|
964 |
+
z-index: 5;
|
965 |
+
display: none;
|
966 |
+
-webkit-box-sizing: border-box;
|
967 |
+
-moz-box-sizing: border-box;
|
968 |
+
box-sizing: border-box; }
|
969 |
+
.lp-admin-tabs .lp-admin-tab-navs .nav-section {
|
970 |
+
margin: 0; }
|
971 |
+
.lp-admin-tabs .lp-admin-tab-navs .nav-section > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section > span {
|
972 |
+
display: block;
|
973 |
+
padding: 8px 20px;
|
974 |
+
outline: none;
|
975 |
+
box-shadow: none;
|
976 |
+
text-decoration: none;
|
977 |
+
text-transform: capitalize; }
|
978 |
+
.lp-admin-tabs .lp-admin-tab-navs .nav-section .learn-press-tooltip {
|
979 |
+
float: right;
|
980 |
+
margin-right: 0; }
|
981 |
+
.lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover {
|
982 |
+
border-left: 2px solid #563d7c;
|
983 |
+
color: #563d7c; }
|
984 |
+
.lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section.nav-section-active > span, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover > a, .lp-admin-tabs .lp-admin-tab-navs .nav-section:hover > span {
|
985 |
+
padding-left: 18px; }
|
986 |
+
.lp-admin-tabs.has-sections .lp-admin-tab-navs {
|
987 |
+
display: block; }
|
988 |
+
.lp-admin-tabs.has-sections .lp-admin-tab-content {
|
989 |
+
padding-left: 271px !important;
|
990 |
+
float: left;
|
991 |
+
width: 100%;
|
992 |
+
z-index: 0;
|
993 |
+
position: relative;
|
994 |
+
-webkit-box-sizing: border-box;
|
995 |
+
-moz-box-sizing: border-box;
|
996 |
+
box-sizing: border-box; }
|
997 |
+
.lp-admin-tabs.has-sections:before {
|
998 |
+
position: absolute;
|
999 |
+
top: 0;
|
1000 |
+
bottom: 0;
|
1001 |
+
left: 250px;
|
1002 |
+
border-left: 1px solid #DDD;
|
1003 |
+
content: '';
|
1004 |
+
z-index: 10; }
|
1005 |
+
.lp-admin-tabs:after {
|
1006 |
+
clear: both;
|
1007 |
+
display: block;
|
1008 |
+
content: '';
|
1009 |
+
z-index: 10; }
|
1010 |
+
|
1011 |
+
.wrap.learn-press-settings .lp-admin-tab-content {
|
1012 |
+
background: #FFF;
|
1013 |
+
padding: 18px; }
|
1014 |
+
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub {
|
1015 |
+
float: none;
|
1016 |
+
margin: 0 0 20px 0;
|
1017 |
+
border-bottom: 1px solid #DDD;
|
1018 |
+
padding-bottom: 20px; }
|
1019 |
+
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub .active {
|
1020 |
+
font-weight: bold; }
|
1021 |
+
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li {
|
1022 |
+
text-transform: capitalize; }
|
1023 |
+
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li:after {
|
1024 |
+
content: '|';
|
1025 |
+
display: inline-block;
|
1026 |
+
padding: 0 10px; }
|
1027 |
+
.wrap.learn-press-settings .lp-admin-tab-content .subsubsub li:last-child:after {
|
1028 |
+
content: ''; }
|
1029 |
+
|
1030 |
+
.wrap #learn-press-uninstall-sample-data {
|
1031 |
+
float: right;
|
1032 |
+
opacity: 0.5; }
|
1033 |
+
.wrap #learn-press-uninstall-sample-data:hover {
|
1034 |
+
opacity: 1; }
|
1035 |
+
|
1036 |
+
.learnpress .rwmb-field {
|
1037 |
+
margin-bottom: 20px;
|
1038 |
+
position: relative; }
|
1039 |
+
.learnpress .rwmb-field .rwmb-label {
|
1040 |
+
display: block;
|
1041 |
+
margin-bottom: 5px;
|
1042 |
+
float: left;
|
1043 |
+
width: 190px;
|
1044 |
+
font-size: 14px;
|
1045 |
+
text-transform: capitalize; }
|
1046 |
+
.learnpress .rwmb-field .rwmb-input {
|
1047 |
+
margin-left: 190px;
|
1048 |
+
float: none;
|
1049 |
+
width: auto; }
|
1050 |
+
.learnpress .rwmb-field .description {
|
1051 |
+
margin-top: 8px;
|
1052 |
+
color: #888; }
|
1053 |
+
.learnpress .rwmb-field .rwmb-input-list {
|
1054 |
+
margin-left: 0; }
|
1055 |
+
.learnpress .rwmb-field.rwmb-heading-wrapper h4 {
|
1056 |
+
font-size: 15px;
|
1057 |
+
margin: 0 0 5px 0;
|
1058 |
+
padding: 0 0 0;
|
1059 |
+
border-bottom: 2px solid #563d7c;
|
1060 |
+
display: inline-block;
|
1061 |
+
text-transform: initial; }
|
1062 |
+
.learnpress .rwmb-field.disabled .field-overlay {
|
1063 |
+
content: '';
|
1064 |
+
position: absolute;
|
1065 |
+
width: 100%;
|
1066 |
+
height: 100%;
|
1067 |
+
left: 0;
|
1068 |
+
top: 0;
|
1069 |
+
z-index: 10;
|
1070 |
+
background: #FFF;
|
1071 |
+
opacity: 0.6; }
|
1072 |
+
.learnpress .rwmb-field.rwmb-text-wrapper .rwmb-text {
|
1073 |
+
width: 50%;
|
1074 |
+
min-width: 200px; }
|
1075 |
+
.learnpress .rwmb-field.rwmb-duration-wrapper .rwmb-input select, .learnpress .rwmb-field.rwmb-duration-wrapper .rwmb-input input {
|
1076 |
+
vertical-align: top; }
|
1077 |
+
|
1078 |
+
.learnpress .lp-course-sale_start-field.hide, .learnpress .lp-course-sale_end-field.hide {
|
1079 |
+
display: none; }
|
1080 |
+
|
1081 |
+
.learnpress.lp-submenu-settings .lp-admin-settings-buttons {
|
1082 |
+
border-top: 1px solid #DDD;
|
1083 |
+
padding-top: 20px;
|
1084 |
+
margin-bottom: 0; }
|
1085 |
+
.learnpress.lp-submenu-settings .lp-admin-settings-buttons #learn-press-reset-settings {
|
1086 |
+
float: right; }
|
1087 |
+
|
1088 |
+
.learnpress.lp-submenu-settings .rwmb-input {
|
1089 |
+
color: #000;
|
1090 |
+
margin-left: 270px;
|
1091 |
+
float: none;
|
1092 |
+
width: auto; }
|
1093 |
+
|
1094 |
+
.learnpress .rwmb-google-fonts-wrapper .rwmb-input label {
|
1095 |
+
font-weight: bold;
|
1096 |
+
display: block;
|
1097 |
+
margin-bottom: 5px; }
|
1098 |
+
|
1099 |
+
.learnpress .rwmb-google-fonts-wrapper .rwmb-input input {
|
1100 |
+
width: 90%; }
|
1101 |
+
|
1102 |
+
.learnpress #learn-press-toggle-course-results {
|
1103 |
+
display: block; }
|
1104 |
+
|
1105 |
+
.learnpress #postbox-container-2 .inside .rwmb-meta-box {
|
1106 |
+
margin: 20px 0 0; }
|
1107 |
+
|
1108 |
+
.learnpress .lp-item-assigned {
|
1109 |
+
font-size: 14px; }
|
1110 |
+
.learnpress .lp-item-assigned a {
|
1111 |
+
text-decoration: none; }
|
1112 |
+
.learnpress .lp-item-assigned ul {
|
1113 |
+
margin-bottom: 0; }
|
1114 |
+
.learnpress .lp-item-assigned ul ul strong {
|
1115 |
+
font-weight: normal; }
|
1116 |
+
.learnpress .lp-item-assigned li {
|
1117 |
+
margin: 0; }
|
1118 |
+
.learnpress .lp-item-assigned li a {
|
1119 |
+
margin-bottom: 10px;
|
1120 |
+
display: inline-block; }
|
1121 |
+
|
1122 |
+
@media screen and (max-width: 1280px) {
|
1123 |
+
.learnpress #meta-box-tab-course_settings .rwmb-field .rwmb-label {
|
1124 |
+
width: auto;
|
1125 |
+
float: none; }
|
1126 |
+
.learnpress #meta-box-tab-course_settings .rwmb-field .rwmb-input {
|
1127 |
+
margin-left: 0;
|
1128 |
+
width: 100%;
|
1129 |
+
float: left; } }
|
1130 |
+
|
1131 |
+
.learn-press-tabs.vertical .tabs-heading {
|
1132 |
+
background: #FFF;
|
1133 |
+
border: 1px solid #DDD; }
|
1134 |
+
.learn-press-tabs.vertical .tabs-heading h4 {
|
1135 |
+
padding: 15px;
|
1136 |
+
margin: 0; }
|
1137 |
+
|
1138 |
+
.learn-press-tabs.vertical .tabs-nav {
|
1139 |
+
float: left;
|
1140 |
+
width: 220px;
|
1141 |
+
margin: 10px 0;
|
1142 |
+
background: #F5F5F5;
|
1143 |
+
position: relative;
|
1144 |
+
z-index: 100; }
|
1145 |
+
.learn-press-tabs.vertical .tabs-nav li {
|
1146 |
+
margin: 0;
|
1147 |
+
position: relative; }
|
1148 |
+
.learn-press-tabs.vertical .tabs-nav li a {
|
1149 |
+
display: block;
|
1150 |
+
padding: 10px 15px;
|
1151 |
+
text-decoration: none;
|
1152 |
+
background: #F5F5F5;
|
1153 |
+
box-shadow: none;
|
1154 |
+
box-sizing: border-box;
|
1155 |
+
border-top: 1px solid transparent;
|
1156 |
+
border-bottom: 1px solid transparent;
|
1157 |
+
text-transform: capitalize; }
|
1158 |
+
.learn-press-tabs.vertical .tabs-nav li.icon a:before {
|
1159 |
+
font-family: dashicons;
|
1160 |
+
font-size: 18px;
|
1161 |
+
vertical-align: top;
|
1162 |
+
margin-right: 8px; }
|
1163 |
+
.learn-press-tabs.vertical .tabs-nav li.active a {
|
1164 |
+
background: #FFF;
|
1165 |
+
font-weight: bold;
|
1166 |
+
width: 221px;
|
1167 |
+
border-color: #DDD; }
|
1168 |
+
|
1169 |
+
.learn-press-tabs.vertical .tabs-container {
|
1170 |
+
overflow: hidden;
|
1171 |
+
background: #F5F5F5;
|
1172 |
+
border: 1px solid #DDD;
|
1173 |
+
border-top: none;
|
1174 |
+
position: relative; }
|
1175 |
+
.learn-press-tabs.vertical .tabs-container .tabs-content-container {
|
1176 |
+
margin: 0 0 0 220px; }
|
1177 |
+
.learn-press-tabs.vertical .tabs-container .tabs-content-container > li {
|
1178 |
+
padding: 20px;
|
1179 |
+
float: left;
|
1180 |
+
width: 100%;
|
1181 |
+
margin-right: -100%;
|
1182 |
+
background: #FFF;
|
1183 |
+
border-left: 1px solid #DDD;
|
1184 |
+
margin-bottom: 0;
|
1185 |
+
display: none;
|
1186 |
+
-webkit-box-sizing: border-box;
|
1187 |
+
-moz-box-sizing: border-box;
|
1188 |
+
box-sizing: border-box; }
|
1189 |
+
|
1190 |
+
.learn-press-tabs.vertical:after {
|
1191 |
+
clear: both;
|
1192 |
+
display: block;
|
1193 |
+
content: ''; }
|
1194 |
+
|
1195 |
+
@media screen and (max-width: 1280px) {
|
1196 |
+
.learnpress .rwmb-field .rwmb-label {
|
1197 |
+
float: none; }
|
1198 |
+
.learnpress .rwmb-field .rwmb-input {
|
1199 |
+
margin-left: 0; } }
|
1200 |
+
|
1201 |
+
.learn-press-addons .lp-search-addon {
|
1202 |
+
margin: 0;
|
1203 |
+
width: 280px;
|
1204 |
+
font-size: 16px;
|
1205 |
+
font-weight: 300;
|
1206 |
+
line-height: 1.5;
|
1207 |
+
padding: 3px 5px;
|
1208 |
+
height: 32px; }
|
1209 |
+
|
1210 |
+
.learn-press-addons .addons-browse {
|
1211 |
+
margin: 20px 0 0; }
|
1212 |
+
.learn-press-addons .addons-browse .lp-addon-hidden {
|
1213 |
+
display: none !important; }
|
1214 |
+
.learn-press-addons .addons-browse .lp-active:nth-of-type(2n+1) {
|
1215 |
+
clear: none;
|
1216 |
+
margin-right: 0;
|
1217 |
+
margin-left: 8px; }
|
1218 |
+
.learn-press-addons .addons-browse .lp-active:nth-of-type(2n) {
|
1219 |
+
clear: both;
|
1220 |
+
margin-right: 8px;
|
1221 |
+
margin-left: 0; }
|
1222 |
+
.learn-press-addons .addons-browse .plugin-icon img {
|
1223 |
+
max-width: 100%; }
|
1224 |
+
.learn-press-addons .addons-browse .plugin-card .column-description p:not(.authors) {
|
1225 |
+
overflow: hidden;
|
1226 |
+
text-overflow: ellipsis;
|
1227 |
+
display: -webkit-box;
|
1228 |
+
-webkit-box-orient: vertical;
|
1229 |
+
-webkit-line-clamp: 3;
|
1230 |
+
line-height: 1.6;
|
1231 |
+
max-height: 4.8;
|
1232 |
+
min-height: 4.8;
|
1233 |
+
color: #777; }
|
1234 |
+
.learn-press-addons .addons-browse .plugin-card .search-highlight {
|
1235 |
+
text-decoration: underline; }
|
1236 |
+
.learn-press-addons .addons-browse .plugin-card-top h3 {
|
1237 |
+
overflow: hidden;
|
1238 |
+
text-overflow: ellipsis;
|
1239 |
+
display: -webkit-box;
|
1240 |
+
-webkit-box-orient: vertical;
|
1241 |
+
-webkit-line-clamp: 2;
|
1242 |
+
line-height: 1.3em;
|
1243 |
+
max-height: 2.6em;
|
1244 |
+
min-height: 2.6em; }
|
1245 |
+
.learn-press-addons .addons-browse .plugin-card-top .desc {
|
1246 |
+
min-height: 90px;
|
1247 |
+
margin-right: 0; }
|
1248 |
+
.learn-press-addons .addons-browse .plugin-card-top .button.activate-plugin, .learn-press-addons .addons-browse .plugin-card-top .button.install-now, .learn-press-addons .addons-browse .plugin-card-top .button.enable-now {
|
1249 |
+
background: #0085ba;
|
1250 |
+
border-color: #0073aa #006799 #006799;
|
1251 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
1252 |
+
box-shadow: 0 1px 0 #006799;
|
1253 |
+
color: #fff;
|
1254 |
+
text-decoration: none;
|
1255 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799; }
|
1256 |
+
.learn-press-addons .addons-browse .plugin-card-top .button.button-working {
|
1257 |
+
padding-right: 4px; }
|
1258 |
+
.learn-press-addons .addons-browse .plugin-card-top .button.button-working span {
|
1259 |
+
display: none; }
|
1260 |
+
.learn-press-addons .addons-browse .plugin-card-bottom .plugin-version {
|
1261 |
+
display: inline-block; }
|
1262 |
+
.learn-press-addons .addons-browse.premium .column-description p:not(.authors) {
|
1263 |
+
margin: 0;
|
1264 |
+
line-height: inherit; }
|
1265 |
+
.learn-press-addons .addons-browse:after {
|
1266 |
+
clear: both;
|
1267 |
+
display: block;
|
1268 |
+
content: ''; }
|
1269 |
+
|
1270 |
+
.related-themes .plugin-card-top {
|
1271 |
+
padding-bottom: 0; }
|
1272 |
+
|
1273 |
+
.related-themes .theme-content {
|
1274 |
+
position: relative; }
|
1275 |
+
|
1276 |
+
.related-themes .image-thumbnail img {
|
1277 |
+
width: 100%; }
|
1278 |
+
|
1279 |
+
.related-themes .theme-description {
|
1280 |
+
margin: 0 0 25px 0;
|
1281 |
+
overflow: hidden;
|
1282 |
+
text-overflow: ellipsis;
|
1283 |
+
display: -webkit-box;
|
1284 |
+
-webkit-box-orient: vertical;
|
1285 |
+
-webkit-line-clamp: 5;
|
1286 |
+
line-height: 1.6em;
|
1287 |
+
max-height: 8em;
|
1288 |
+
min-height: 8em;
|
1289 |
+
color: #777; }
|
1290 |
+
|
1291 |
+
.related-themes .theme-title {
|
1292 |
+
margin-right: 100px;
|
1293 |
+
font-size: 1.2em;
|
1294 |
+
line-height: 1.3em;
|
1295 |
+
margin-bottom: 0;
|
1296 |
+
min-height: 3.2em; }
|
1297 |
+
|
1298 |
+
.related-themes .theme-title a {
|
1299 |
+
color: #545454; }
|
1300 |
+
|
1301 |
+
.related-themes .theme-rating {
|
1302 |
+
float: right;
|
1303 |
+
display: inline-block; }
|
1304 |
+
|
1305 |
+
.related-themes .star-rating {
|
1306 |
+
display: inline-block; }
|
1307 |
+
|
1308 |
+
.related-themes .count-rating {
|
1309 |
+
font-size: 15px;
|
1310 |
+
position: relative;
|
1311 |
+
top: 2px; }
|
1312 |
+
|
1313 |
+
.related-themes .theme-detail {
|
1314 |
+
position: absolute;
|
1315 |
+
right: 3px;
|
1316 |
+
top: -3px;
|
1317 |
+
text-align: right;
|
1318 |
+
line-height: 1.6em; }
|
1319 |
+
.related-themes .theme-detail:after {
|
1320 |
+
content: '';
|
1321 |
+
display: block;
|
1322 |
+
clear: both; }
|
1323 |
+
.related-themes .theme-detail .theme-price {
|
1324 |
+
display: inline-block;
|
1325 |
+
font-size: 24px;
|
1326 |
+
color: #545454;
|
1327 |
+
font-weight: 700;
|
1328 |
+
line-height: 1.3em; }
|
1329 |
+
|
1330 |
+
.related-themes .theme-footer {
|
1331 |
+
clear: both;
|
1332 |
+
margin-left: -20px;
|
1333 |
+
margin-right: -20px;
|
1334 |
+
padding: 20px;
|
1335 |
+
background-color: #fafafa;
|
1336 |
+
border-top: 1px solid #ddd;
|
1337 |
+
overflow: hidden; }
|
1338 |
+
|
1339 |
+
@media screen and (min-width: 1600px) {
|
1340 |
+
.plugin-card:not(.hide-if-js):nth-child(even) {
|
1341 |
+
margin-right: 8px; }
|
1342 |
+
.plugin-card:not(.hide-if-js):nth-child(3n) {
|
1343 |
+
margin-right: 0; } }
|
1344 |
+
|
1345 |
+
/**
|
1346 |
+
* Order
|
1347 |
+
*/
|
1348 |
+
.post-type-lp_order .wp-list-table .column-order_status {
|
1349 |
+
width: 100px; }
|
1350 |
+
|
1351 |
+
.post-type-lp_order .wp-list-table .order_status span {
|
1352 |
+
display: inline-block; }
|
1353 |
+
.post-type-lp_order .wp-list-table .order_status span:after {
|
1354 |
+
font-family: fontawesome;
|
1355 |
+
display: inline-block;
|
1356 |
+
font-size: 20px;
|
1357 |
+
color: #FFF;
|
1358 |
+
text-align: center;
|
1359 |
+
line-height: 20px;
|
1360 |
+
width: 20px;
|
1361 |
+
height: 20px; }
|
1362 |
+
.post-type-lp_order .wp-list-table .order_status span.completed:after {
|
1363 |
+
content: "\f00c";
|
1364 |
+
color: #0085ba; }
|
1365 |
+
.post-type-lp_order .wp-list-table .order_status span.processing:after {
|
1366 |
+
content: "\f251";
|
1367 |
+
color: #563F7A; }
|
1368 |
+
.post-type-lp_order .wp-list-table .order_status span.pending:after {
|
1369 |
+
content: "\f017";
|
1370 |
+
color: #AAA; }
|
1371 |
+
.post-type-lp_order .wp-list-table .order_status span.cancelled:after {
|
1372 |
+
content: "\f057";
|
1373 |
+
color: #FF0000; }
|
1374 |
+
.post-type-lp_order .wp-list-table .order_status span.draft:after {
|
1375 |
+
content: "\f223";
|
1376 |
+
color: #69b391; }
|
1377 |
+
|
1378 |
+
.post-type-lp_order .wp-list-table .column-title,
|
1379 |
+
.post-type-lp_order .wp-list-table .column-order_total,
|
1380 |
+
.post-type-lp_order .wp-list-table .column-order_date {
|
1381 |
+
width: 150px; }
|
1382 |
+
|
1383 |
+
.post-type-lp_order .wp-list-table .column-order_items ol {
|
1384 |
+
margin: 0;
|
1385 |
+
padding: 0;
|
1386 |
+
list-style-position: inside; }
|
1387 |
+
|
1388 |
+
.post-type-lp_course .column-price .origin-price {
|
1389 |
+
font-size: 12px;
|
1390 |
+
text-decoration: line-through;
|
1391 |
+
margin-right: 10px;
|
1392 |
+
color: #FF0000; }
|
1393 |
+
|
1394 |
+
.wp-list-table .column-preview {
|
1395 |
+
text-align: left;
|
1396 |
+
float: none; }
|
1397 |
+
.wp-list-table .column-preview input[type="checkbox"] {
|
1398 |
+
border: none;
|
1399 |
+
width: 30px;
|
1400 |
+
height: auto;
|
1401 |
+
box-shadow: none;
|
1402 |
+
margin: 0;
|
1403 |
+
text-align: center;
|
1404 |
+
background: transparent;
|
1405 |
+
-webkit-transform: rotate(-180deg);
|
1406 |
+
-moz-transform: rotate(-180deg);
|
1407 |
+
-ms-transform: rotate(-180deg);
|
1408 |
+
-o-transform: rotate(-180deg);
|
1409 |
+
transform: rotate(-180deg); }
|
1410 |
+
.wp-list-table .column-preview input[type="checkbox"]:before, .wp-list-table .column-preview input[type="checkbox"]:checked:before {
|
1411 |
+
font: 400 21px/1 fontawesome;
|
1412 |
+
content: "\f205";
|
1413 |
+
font-size: 24px;
|
1414 |
+
width: 30px;
|
1415 |
+
margin: 0;
|
1416 |
+
text-align: center; }
|
1417 |
+
.wp-list-table .column-preview input[type="checkbox"]:checked {
|
1418 |
+
-webkit-transform: rotate(0deg);
|
1419 |
+
-moz-transform: rotate(0deg);
|
1420 |
+
-ms-transform: rotate(0deg);
|
1421 |
+
-o-transform: rotate(0deg);
|
1422 |
+
transform: rotate(0deg); }
|
1423 |
+
.wp-list-table .column-preview input[type="checkbox"]:checked:before {
|
1424 |
+
margin-top: -1px; }
|
1425 |
+
|
1426 |
+
.post-type-page .column-lp-page {
|
1427 |
+
width: 200px; }
|
1428 |
+
|
1429 |
+
.post-type-page .for-plugin-page {
|
1430 |
+
color: #FF0000;
|
1431 |
+
font-size: 11px;
|
1432 |
+
margin: 0; }
|
1433 |
+
|
1434 |
+
#learn-press-box-edit-slug {
|
1435 |
+
background: #FFF;
|
1436 |
+
padding: 10px;
|
1437 |
+
border: 1px solid #DDD;
|
1438 |
+
margin: 0 -10px;
|
1439 |
+
overflow: hidden;
|
1440 |
+
color: #b79186; }
|
1441 |
+
#learn-press-box-edit-slug .button {
|
1442 |
+
float: right;
|
1443 |
+
height: 24px;
|
1444 |
+
line-height: 22px; }
|
1445 |
+
|
1446 |
+
.learn-press-modal {
|
1447 |
+
position: fixed;
|
1448 |
+
z-index: 1000000;
|
1449 |
+
width: 100%;
|
1450 |
+
height: 100%;
|
1451 |
+
top: 0;
|
1452 |
+
display: table; }
|
1453 |
+
.learn-press-modal .modal-overlay {
|
1454 |
+
position: fixed;
|
1455 |
+
z-index: 1000000;
|
1456 |
+
background: #000;
|
1457 |
+
opacity: 0.5;
|
1458 |
+
width: 100%;
|
1459 |
+
height: 100%;
|
1460 |
+
top: 0; }
|
1461 |
+
.learn-press-modal .modal-wrapper {
|
1462 |
+
display: table-cell;
|
1463 |
+
vertical-align: middle;
|
1464 |
+
z-index: 1000010;
|
1465 |
+
position: relative; }
|
1466 |
+
.learn-press-modal .modal-wrapper .modal-container {
|
1467 |
+
max-width: 800px;
|
1468 |
+
width: 90%;
|
1469 |
+
margin: 0px auto;
|
1470 |
+
background-color: #fff;
|
1471 |
+
border-radius: 2px;
|
1472 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
|
1473 |
+
transition: all .3s ease;
|
1474 |
+
overflow: hidden;
|
1475 |
+
-webkit-box-sizing: border-box;
|
1476 |
+
-moz-box-sizing: border-box;
|
1477 |
+
box-sizing: border-box; }
|
1478 |
+
.learn-press-modal .modal-wrapper header {
|
1479 |
+
font-size: 16px;
|
1480 |
+
padding: 15px 20px;
|
1481 |
+
border-bottom: 1px solid #DDD; }
|
1482 |
+
.learn-press-modal .modal-wrapper article {
|
1483 |
+
margin: 45px 20px; }
|
1484 |
+
.learn-press-modal .modal-wrapper article input[name="search"] {
|
1485 |
+
width: 100%;
|
1486 |
+
font-size: 16px;
|
1487 |
+
box-sizing: border-box;
|
1488 |
+
margin: 0;
|
1489 |
+
box-shadow: none;
|
1490 |
+
color: #999;
|
1491 |
+
padding: 8px 10px;
|
1492 |
+
border-radius: 2px;
|
1493 |
+
border-color: #e4e4e4;
|
1494 |
+
font-weight: lighter; }
|
1495 |
+
.learn-press-modal .modal-wrapper article .search-results li > label {
|
1496 |
+
display: block; }
|
1497 |
+
.learn-press-modal .modal-wrapper footer {
|
1498 |
+
padding: 15px 20px;
|
1499 |
+
overflow: hidden;
|
1500 |
+
border: 1px solid #eee; }
|
1501 |
+
.learn-press-modal .modal-wrapper footer .search-nav {
|
1502 |
+
float: left; }
|
1503 |
+
.learn-press-modal .modal-wrapper footer .search-nav a, .learn-press-modal .modal-wrapper footer .search-nav span {
|
1504 |
+
display: inline-block;
|
1505 |
+
line-height: 26px;
|
1506 |
+
height: 28px;
|
1507 |
+
margin: 0;
|
1508 |
+
padding: 0 10px 1px; }
|
1509 |
+
.learn-press-modal .modal-wrapper footer button {
|
1510 |
+
float: right;
|
1511 |
+
margin-left: 3px; }
|
1512 |
+
|
1513 |
+
#modal-search-items.loading .search-results:before {
|
1514 |
+
position: absolute;
|
1515 |
+
top: 75px;
|
1516 |
+
left: 0;
|
1517 |
+
right: 0;
|
1518 |
+
bottom: 0;
|
1519 |
+
display: block;
|
1520 |
+
content: '';
|
1521 |
+
z-index: 9;
|
1522 |
+
background: url("../../images/spinner.gif") no-repeat center center; }
|
1523 |
+
|
1524 |
+
.modal-search {
|
1525 |
+
position: relative;
|
1526 |
+
display: inline-block;
|
1527 |
+
min-width: 300px; }
|
1528 |
+
.modal-search .search-input {
|
1529 |
+
border: 1px solid #DDD;
|
1530 |
+
width: 100%;
|
1531 |
+
margin: 0;
|
1532 |
+
padding: 5px 10px;
|
1533 |
+
-webkit-box-shadow: none;
|
1534 |
+
-moz-box-shadow: none;
|
1535 |
+
box-shadow: none; }
|
1536 |
+
.modal-search .search-input:focus {
|
1537 |
+
-webkit-box-shadow: none;
|
1538 |
+
-moz-box-shadow: none;
|
1539 |
+
box-shadow: none; }
|
1540 |
+
.modal-search .search-input:focus {
|
1541 |
+
border-color: #DDD; }
|
1542 |
+
.modal-search .search-results-content {
|
1543 |
+
position: absolute;
|
1544 |
+
top: 100%;
|
1545 |
+
width: 100%;
|
1546 |
+
left: 0;
|
1547 |
+
background: #FFF;
|
1548 |
+
border: 1px solid #DDD;
|
1549 |
+
border-top: none;
|
1550 |
+
z-index: 1000;
|
1551 |
+
margin-top: -1px;
|
1552 |
+
-webkit-box-sizing: border-box;
|
1553 |
+
-moz-box-sizing: border-box;
|
1554 |
+
box-sizing: border-box; }
|
1555 |
+
.modal-search .search-results-content .search-results {
|
1556 |
+
margin: 0; }
|
1557 |
+
.modal-search .search-results-content .search-results .result-item {
|
1558 |
+
margin: 0;
|
1559 |
+
padding: 0;
|
1560 |
+
list-style: none; }
|
1561 |
+
.modal-search .search-results-content .search-results .result-item label {
|
1562 |
+
display: block;
|
1563 |
+
padding: 6px 10px;
|
1564 |
+
text-decoration: none;
|
1565 |
+
cursor: pointer;
|
1566 |
+
white-space: nowrap;
|
1567 |
+
overflow: hidden;
|
1568 |
+
text-overflow: ellipsis; }
|
1569 |
+
.modal-search .search-results-content .search-results .result-item:hover {
|
1570 |
+
background: #f4fcff; }
|
1571 |
+
.modal-search .has-items .search-input {
|
1572 |
+
border-bottom-color: transparent; }
|
1573 |
+
.modal-search .has-items .search-results-content {
|
1574 |
+
border-top: none; }
|
1575 |
+
.modal-search .checked-items {
|
1576 |
+
text-align: center; }
|
1577 |
+
.modal-search .checked-items .button {
|
1578 |
+
font-size: 12px;
|
1579 |
+
height: 20px;
|
1580 |
+
line-height: 20px; }
|
1581 |
+
.modal-search .checked-items .disabled {
|
1582 |
+
color: #777; }
|
1583 |
+
.modal-search .search-navigator {
|
1584 |
+
margin: 5px 0;
|
1585 |
+
text-align: center; }
|
1586 |
+
.modal-search .search-navigator .page-numbers {
|
1587 |
+
display: inline-block;
|
1588 |
+
padding: 2px 5px;
|
1589 |
+
text-decoration: none;
|
1590 |
+
line-height: 1; }
|
1591 |
+
.modal-search .search-navigator .page-numbers.next, .modal-search .search-navigator .page-numbers.prev {
|
1592 |
+
display: none; }
|
1593 |
+
|
1594 |
+
.lp-order-statuses {
|
1595 |
+
margin: 0; }
|
1596 |
+
.lp-order-statuses li {
|
1597 |
+
float: left;
|
1598 |
+
width: 100%;
|
1599 |
+
background: #FFF;
|
1600 |
+
margin: 0; }
|
1601 |
+
.lp-order-statuses li strong {
|
1602 |
+
font-size: 20px;
|
1603 |
+
font-weight: normal;
|
1604 |
+
color: #0073aa;
|
1605 |
+
margin-bottom: 5px;
|
1606 |
+
display: block; }
|
1607 |
+
.lp-order-statuses li strong:before {
|
1608 |
+
display: inline-block;
|
1609 |
+
width: 25px;
|
1610 |
+
height: 25px;
|
1611 |
+
font-family: dashicons;
|
1612 |
+
font-size: 25px;
|
1613 |
+
line-height: 25px;
|
1614 |
+
vertical-align: middle;
|
1615 |
+
content: ''; }
|
1616 |
+
.lp-order-statuses li p {
|
1617 |
+
font-size: 12px;
|
1618 |
+
color: #adadad;
|
1619 |
+
padding: 0;
|
1620 |
+
margin: 0; }
|
1621 |
+
.lp-order-statuses li.counter-number {
|
1622 |
+
padding: 10px 0 0;
|
1623 |
+
text-align: center;
|
1624 |
+
width: 50%; }
|
1625 |
+
.lp-order-statuses li.counter-number .counter-inner {
|
1626 |
+
margin: 0 5px;
|
1627 |
+
background: #F9F9F9;
|
1628 |
+
padding: 10px 0;
|
1629 |
+
border: 1px solid #f3f3f3; }
|
1630 |
+
.lp-order-statuses li.counter-number .counter-inner p {
|
1631 |
+
text-transform: lowercase; }
|
1632 |
+
.lp-order-statuses li.counter-number.order-completed strong:before {
|
1633 |
+
content: '\f502';
|
1634 |
+
color: #0085ba; }
|
1635 |
+
.lp-order-statuses li.counter-number.order-processing strong:before {
|
1636 |
+
content: "\f321";
|
1637 |
+
color: #563F7A;
|
1638 |
+
margin-left: -1px; }
|
1639 |
+
.lp-order-statuses li.counter-number.order-pending strong:before {
|
1640 |
+
content: "\f534";
|
1641 |
+
color: #AAA; }
|
1642 |
+
.lp-order-statuses li.counter-number.order-cancelled strong:before {
|
1643 |
+
content: "\f153";
|
1644 |
+
color: #FF0000; }
|
1645 |
+
.lp-order-statuses li.clear {
|
1646 |
+
float: none; }
|
1647 |
+
.lp-order-statuses li.featured-theme {
|
1648 |
+
margin: 12px -12px 0 -12px;
|
1649 |
+
border-top: 1px solid #EEE;
|
1650 |
+
float: none;
|
1651 |
+
clear: both;
|
1652 |
+
width: auto;
|
1653 |
+
padding: 8px 12px 0 12px; }
|
1654 |
+
.lp-order-statuses li.featured-theme .star-rating {
|
1655 |
+
display: inline-block;
|
1656 |
+
line-height: 14px;
|
1657 |
+
vertical-align: middle; }
|
1658 |
+
.lp-order-statuses li.featured-theme .star-rating .star {
|
1659 |
+
font-size: 14px;
|
1660 |
+
width: 14px;
|
1661 |
+
height: 14px; }
|
1662 |
+
.lp-order-statuses li.featured-theme > div {
|
1663 |
+
margin-bottom: 3px; }
|
1664 |
+
.lp-order-statuses li.featured-theme > div span {
|
1665 |
+
font-size: 12px;
|
1666 |
+
vertical-align: middle;
|
1667 |
+
color: #999; }
|
1668 |
+
.lp-order-statuses li:nth-child(even) .counter-inner {
|
1669 |
+
margin-left: 0; }
|
1670 |
+
.lp-order-statuses li:nth-child(odd) .counter-inner {
|
1671 |
+
margin-right: 0; }
|
1672 |
+
.lp-order-statuses li.total-raised {
|
1673 |
+
text-align: center;
|
1674 |
+
background: #F9F9F9;
|
1675 |
+
border: 1px solid #F3F3F3;
|
1676 |
+
padding: 10px 0;
|
1677 |
+
box-sizing: border-box; }
|
1678 |
+
.lp-order-statuses li.total-raised strong {
|
1679 |
+
margin-bottom: 10px;
|
1680 |
+
font-size: 26px; }
|
1681 |
+
.lp-order-statuses li.total-raised strong:before {
|
1682 |
+
content: '\f185';
|
1683 |
+
font-size: 30px;
|
1684 |
+
width: 30px;
|
1685 |
+
height: 30px;
|
1686 |
+
line-height: 30px;
|
1687 |
+
margin-right: 7px;
|
1688 |
+
margin-top: -3px; }
|
1689 |
+
.lp-order-statuses:after {
|
1690 |
+
clear: both;
|
1691 |
+
display: block;
|
1692 |
+
content: ''; }
|
1693 |
+
|
1694 |
+
.lp-place-holder {
|
1695 |
+
background: #fff;
|
1696 |
+
padding: 10px;
|
1697 |
+
display: block;
|
1698 |
+
margin: 0 auto;
|
1699 |
+
box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
|
1700 |
+
border-radius: 3px; }
|
1701 |
+
.lp-place-holder [class*="line-"] {
|
1702 |
+
height: 6px;
|
1703 |
+
width: 400px;
|
1704 |
+
background: #f6f7f9;
|
1705 |
+
margin-bottom: 13px;
|
1706 |
+
margin-right: 5px; }
|
1707 |
+
.lp-place-holder .thumbnail {
|
1708 |
+
height: 40px;
|
1709 |
+
width: 40px;
|
1710 |
+
float: left;
|
1711 |
+
margin-right: 20px;
|
1712 |
+
display: inline-block; }
|
1713 |
+
.lp-place-holder .line-heading {
|
1714 |
+
width: 80%;
|
1715 |
+
height: 20px; }
|
1716 |
+
.lp-place-holder .line-sm {
|
1717 |
+
width: 30%;
|
1718 |
+
margin-top: 10px; }
|
1719 |
+
.lp-place-holder .line-xs {
|
1720 |
+
width: 50%; }
|
1721 |
+
.lp-place-holder .line-df {
|
1722 |
+
margin-top: 30px;
|
1723 |
+
width: 380px; }
|
1724 |
+
.lp-place-holder .line-lg {
|
1725 |
+
width: 200px; }
|
1726 |
+
.lp-place-holder .line-lgx {
|
1727 |
+
width: 450px; }
|
1728 |
+
.lp-place-holder [class*="line"],
|
1729 |
+
.lp-place-holder .thumbnail {
|
1730 |
+
animation: lpTimeLine;
|
1731 |
+
animation-duration: 1s;
|
1732 |
+
animation-timing-function: linear;
|
1733 |
+
animation-iteration-count: infinite;
|
1734 |
+
background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
|
1735 |
+
background-size: 800px auto;
|
1736 |
+
background-position: 100px 0; }
|
1737 |
+
|
1738 |
+
@keyframes lpTimeLine {
|
1739 |
+
0% {
|
1740 |
+
background-position: -350px 0; }
|
1741 |
+
100% {
|
1742 |
+
background-position: 400px 0; } }
|
1743 |
+
|
1744 |
+
.post-type-lp_order #post-body-content {
|
1745 |
+
display: none; }
|
1746 |
+
|
1747 |
+
.post-type-lp_order #order_details .hndle, .post-type-lp_order #order_details .handlediv {
|
1748 |
+
display: none; }
|
1749 |
+
|
1750 |
+
.post-type-lp_order #order_details .inside {
|
1751 |
+
padding: 30px 30px;
|
1752 |
+
margin: 0; }
|
1753 |
+
|
1754 |
+
.post-type-lp_order #order_details .order-data-field {
|
1755 |
+
margin-bottom: 20px; }
|
1756 |
+
.post-type-lp_order #order_details .order-data-field label {
|
1757 |
+
display: block;
|
1758 |
+
margin-bottom: 5px;
|
1759 |
+
font-weight: bold; }
|
1760 |
+
|
1761 |
+
.post-type-lp_order #order_details .order-data-number {
|
1762 |
+
margin: 0 0 10px;
|
1763 |
+
font-size: 24px;
|
1764 |
+
font-weight: lighter; }
|
1765 |
+
|
1766 |
+
.post-type-lp_order #order_details .order-data-heading {
|
1767 |
+
margin-top: 40px; }
|
1768 |
+
|
1769 |
+
.post-type-lp_order #order_details .order-users {
|
1770 |
+
display: inline-block; }
|
1771 |
+
|
1772 |
+
.post-type-lp_order #order_details .order-data-date .order-date {
|
1773 |
+
width: 100px; }
|
1774 |
+
|
1775 |
+
.post-type-lp_order #order_details .order-data-date .order-hour, .post-type-lp_order #order_details .order-data-date .order-minute {
|
1776 |
+
width: 50px; }
|
1777 |
+
|
1778 |
+
.post-type-lp_order #order_details .order-items {
|
1779 |
+
margin: 0 -30px;
|
1780 |
+
border-top: 2px solid #DDD;
|
1781 |
+
padding: 0 30px; }
|
1782 |
+
.post-type-lp_order #order_details .order-items table {
|
1783 |
+
border-collapse: collapse;
|
1784 |
+
width: 100%; }
|
1785 |
+
.post-type-lp_order #order_details .order-items table thead th {
|
1786 |
+
border-bottom: 1px solid #DDD;
|
1787 |
+
text-align: left;
|
1788 |
+
padding: 12px 10px;
|
1789 |
+
font-size: 16px;
|
1790 |
+
font-weight: lighter; }
|
1791 |
+
.post-type-lp_order #order_details .order-items table tbody td, .post-type-lp_order #order_details .order-items table tfoot td {
|
1792 |
+
border-bottom: 1px solid #DDD;
|
1793 |
+
text-align: left;
|
1794 |
+
padding: 10px; }
|
1795 |
+
.post-type-lp_order #order_details .order-items table tbody tr:nth-child(odd) td {
|
1796 |
+
background: #F5F5F5; }
|
1797 |
+
.post-type-lp_order #order_details .order-items table tfoot td {
|
1798 |
+
border: none;
|
1799 |
+
padding-bottom: 0;
|
1800 |
+
text-align: right;
|
1801 |
+
font-size: 14px; }
|
1802 |
+
.post-type-lp_order #order_details .order-items table .column-price,
|
1803 |
+
.post-type-lp_order #order_details .order-items table .column-total,
|
1804 |
+
.post-type-lp_order #order_details .order-items table .column-quantity {
|
1805 |
+
text-align: right;
|
1806 |
+
width: 150px; }
|
1807 |
+
.post-type-lp_order #order_details .order-items table .row-subtotal td {
|
1808 |
+
padding-top: 20px; }
|
1809 |
+
.post-type-lp_order #order_details .order-items table .remove-order-item {
|
1810 |
+
text-decoration: none;
|
1811 |
+
outline: none;
|
1812 |
+
color: #CCC; }
|
1813 |
+
.post-type-lp_order #order_details .order-items table .remove-order-item .dashicons {
|
1814 |
+
font-size: 18px; }
|
1815 |
+
.post-type-lp_order #order_details .order-items table .remove-order-item:hover {
|
1816 |
+
color: #FF0000; }
|
1817 |
+
.post-type-lp_order #order_details .order-items table .order-item-row:hover .remove-order-item {
|
1818 |
+
display: inline-block; }
|
1819 |
+
|
1820 |
+
.color-schemas {
|
1821 |
+
margin: 0 20px 20px 0;
|
1822 |
+
float: left; }
|
1823 |
+
.color-schemas .wp-color-picker {
|
1824 |
+
width: 80px;
|
1825 |
+
height: 24px;
|
1826 |
+
vertical-align: top;
|
1827 |
+
margin: 0; }
|
1828 |
+
.color-schemas .wp-picker-holder {
|
1829 |
+
position: absolute; }
|
1830 |
+
.color-schemas .buttons {
|
1831 |
+
display: none; }
|
1832 |
+
.color-schemas table {
|
1833 |
+
border-collapse: collapse;
|
1834 |
+
position: relative; }
|
1835 |
+
.color-schemas table td, .color-schemas table th {
|
1836 |
+
padding: 10px 10px; }
|
1837 |
+
.color-schemas table tbody {
|
1838 |
+
border: 1px solid transparent;
|
1839 |
+
position: relative; }
|
1840 |
+
.color-schemas table tbody td, .color-schemas table tbody th {
|
1841 |
+
text-align: left;
|
1842 |
+
background: #F5F5F5; }
|
1843 |
+
.color-schemas table tbody tr:first-child td, .color-schemas table tbody tr:first-child th {
|
1844 |
+
padding-bottom: 0; }
|
1845 |
+
.color-schemas table:after {
|
1846 |
+
content: '';
|
1847 |
+
position: absolute;
|
1848 |
+
top: 0;
|
1849 |
+
left: 0;
|
1850 |
+
right: 0;
|
1851 |
+
bottom: 0;
|
1852 |
+
background: rgba(255, 255, 255, 0.7); }
|
1853 |
+
.color-schemas tfoot td, .color-schemas tfoot th {
|
1854 |
+
padding-left: 0;
|
1855 |
+
padding-right: 0; }
|
1856 |
+
.color-schemas .remove-schema {
|
1857 |
+
float: right;
|
1858 |
+
color: #FF0000; }
|
1859 |
+
.color-schemas .wp-color-result {
|
1860 |
+
margin: 0; }
|
1861 |
+
.color-schemas .clone-schema {
|
1862 |
+
display: none; }
|
1863 |
+
.color-schemas:first-child .remove-schema,
|
1864 |
+
.color-schemas:first-child .apply-schema {
|
1865 |
+
display: none; }
|
1866 |
+
.color-schemas:nth-child(2) {
|
1867 |
+
clear: both; }
|
1868 |
+
.color-schemas:hover tbody {
|
1869 |
+
opacity: 1; }
|
1870 |
+
.color-schemas.current tbody {
|
1871 |
+
border-color: #DDD; }
|
1872 |
+
.color-schemas.current tbody td, .color-schemas.current tbody th {
|
1873 |
+
background: rgba(5, 215, 255, 0.26); }
|
1874 |
+
.color-schemas.current table:after {
|
1875 |
+
display: none; }
|
1876 |
+
.color-schemas.current .clone-schema {
|
1877 |
+
display: inline-block; }
|
1878 |
+
|
1879 |
+
/**
|
1880 |
+
* General style for admin editor.
|
1881 |
+
*/
|
1882 |
+
.lp-admin-editor {
|
1883 |
+
background-color: #fff;
|
1884 |
+
border: 1px solid #ddd;
|
1885 |
+
margin: 20px 0 0 0;
|
1886 |
+
position: relative; }
|
1887 |
+
.lp-admin-editor .heading,
|
1888 |
+
.lp-admin-editor .lp-box-data-content {
|
1889 |
+
padding: 0; }
|
1890 |
+
|
1891 |
+
#learn-press-admin-editor-metabox-settings {
|
1892 |
+
margin-top: 20px; }
|
1893 |
+
|
1894 |
+
/**
|
1895 |
+
* Course admin editor.
|
1896 |
+
*/
|
1897 |
+
#admin-editor-lp_course .lp-course-curriculum .heading {
|
1898 |
+
padding: 12px 10px;
|
1899 |
+
position: relative; }
|
1900 |
+
#admin-editor-lp_course .lp-course-curriculum .heading h4 {
|
1901 |
+
margin: 0;
|
1902 |
+
font-size: 18px; }
|
1903 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections {
|
1904 |
+
font-family: Dashicons;
|
1905 |
+
position: absolute;
|
1906 |
+
top: 0;
|
1907 |
+
right: 0;
|
1908 |
+
bottom: 0;
|
1909 |
+
font-size: 30px;
|
1910 |
+
display: flex;
|
1911 |
+
justify-content: center;
|
1912 |
+
align-items: center;
|
1913 |
+
cursor: pointer;
|
1914 |
+
width: 40px;
|
1915 |
+
color: #999; }
|
1916 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections.close:before {
|
1917 |
+
content: '\f140'; }
|
1918 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .collapse-sections.open:before {
|
1919 |
+
content: '\f142'; }
|
1920 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .status {
|
1921 |
+
font-family: Dashicons;
|
1922 |
+
font-size: 20px;
|
1923 |
+
position: relative;
|
1924 |
+
top: 5px;
|
1925 |
+
margin-left: 10px;
|
1926 |
+
visibility: hidden; }
|
1927 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .status:before {
|
1928 |
+
content: "\f463"; }
|
1929 |
+
#admin-editor-lp_course .lp-course-curriculum .heading .status.loading {
|
1930 |
+
visibility: visible;
|
1931 |
+
animation: rotation 2s infinite linear;
|
1932 |
+
display: inline-block; }
|
1933 |
+
|
1934 |
+
#admin-editor-lp_course .lp-course-curriculum .curriculum-sections {
|
1935 |
+
margin: 0;
|
1936 |
+
border-top: 1px solid #ddd; }
|
1937 |
+
|
1938 |
+
#admin-editor-lp_course .lp-course-curriculum .section {
|
1939 |
+
border: 1px solid #e5e5e5;
|
1940 |
+
opacity: 1;
|
1941 |
+
background: #FFF;
|
1942 |
+
border-left: 0;
|
1943 |
+
border-right: 0;
|
1944 |
+
margin-bottom: -1px; }
|
1945 |
+
#admin-editor-lp_course .lp-course-curriculum .section.close{
|
1946 |
+
color: inherit;
|
1947 |
+
float: none;
|
1948 |
+
font-size: inherit;
|
1949 |
+
font-weight: inherit;
|
1950 |
+
}
|
1951 |
+
#admin-editor-lp_course .lp-course-curriculum .section:first-child {
|
1952 |
+
border-top: 0; }
|
1953 |
+
#admin-editor-lp_course .lp-course-curriculum .section.new-section {
|
1954 |
+
margin-top: 1px; }
|
1955 |
+
#admin-editor-lp_course .lp-course-curriculum .section.new-section form {
|
1956 |
+
margin: 0; }
|
1957 |
+
#admin-editor-lp_course .lp-course-curriculum .section.new-section .section-head {
|
1958 |
+
background-color: #f4fcff; }
|
1959 |
+
#admin-editor-lp_course .lp-course-curriculum .section.new-section .section-head .creatable {
|
1960 |
+
position: relative;
|
1961 |
+
top: 1px; }
|
1962 |
+
#admin-editor-lp_course .lp-course-curriculum .section.new-section .section-head .creatable:before {
|
1963 |
+
content: "\f132"; }
|
1964 |
+
#admin-editor-lp_course .lp-course-curriculum .section.empty-section {
|
1965 |
+
position: relative; }
|
1966 |
+
#admin-editor-lp_course .lp-course-curriculum .section.empty-section:after {
|
1967 |
+
position: absolute;
|
1968 |
+
top: 0;
|
1969 |
+
left: 0;
|
1970 |
+
right: 0;
|
1971 |
+
bottom: 0;
|
1972 |
+
background: #FFF;
|
1973 |
+
content: '';
|
1974 |
+
opacity: 0.5; }
|
1975 |
+
#admin-editor-lp_course .lp-course-curriculum .section.empty-section .section-head .movable:before {
|
1976 |
+
content: "\f463";
|
1977 |
+
color: #a2a2a2;
|
1978 |
+
display: inline-block;
|
1979 |
+
-webkit-animation: rotating4 2s linear infinite;
|
1980 |
+
-moz-animation: rotating4 2s linear infinite;
|
1981 |
+
-ms-animation: rotating4 2s linear infinite;
|
1982 |
+
-o-animation: rotating4 2s linear infinite;
|
1983 |
+
animation: rotating4 2s linear infinite; }
|
1984 |
+
#admin-editor-lp_course .lp-course-curriculum .section.empty-section .section-collapse {
|
1985 |
+
display: none; }
|
1986 |
+
#admin-editor-lp_course .lp-course-curriculum .section:hover .section-actions .remove {
|
1987 |
+
display: inline-block; }
|
1988 |
+
#admin-editor-lp_course .lp-course-curriculum .section input {
|
1989 |
+
background-color: transparent;
|
1990 |
+
box-shadow: none; }
|
1991 |
+
#admin-editor-lp_course .lp-course-curriculum .section input:focus {
|
1992 |
+
box-shadow: none; }
|
1993 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head {
|
1994 |
+
background-color: #f4fcff;
|
1995 |
+
padding: 3px;
|
1996 |
+
position: relative;
|
1997 |
+
transition: background 500ms ease-out; }
|
1998 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .movable, #admin-editor-lp_course .lp-course-curriculum .section .section-head .creatable {
|
1999 |
+
display: inline-block;
|
2000 |
+
font-family: Dashicons;
|
2001 |
+
font-size: 20px;
|
2002 |
+
vertical-align: middle;
|
2003 |
+
width: 30px;
|
2004 |
+
text-align: center;
|
2005 |
+
margin-top: -4px;
|
2006 |
+
color: #999; }
|
2007 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .movable {
|
2008 |
+
cursor: url("../../images/openhand.cur") 7 5, default; }
|
2009 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .movable:before {
|
2010 |
+
content: "\f333"; }
|
2011 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .movable:hover {
|
2012 |
+
color: #0085ba; }
|
2013 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions {
|
2014 |
+
position: absolute;
|
2015 |
+
top: 0;
|
2016 |
+
right: 0;
|
2017 |
+
color: #444;
|
2018 |
+
height: 100%; }
|
2019 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions > * {
|
2020 |
+
cursor: pointer;
|
2021 |
+
display: inline-block;
|
2022 |
+
text-align: center;
|
2023 |
+
height: 100%; }
|
2024 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions .collapse:hover {
|
2025 |
+
color: #0085ba; }
|
2026 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions .collapse:before {
|
2027 |
+
display: inline-block;
|
2028 |
+
width: 40px;
|
2029 |
+
font-size: 30px;
|
2030 |
+
font-family: Dashicons;
|
2031 |
+
line-height: 42px;
|
2032 |
+
color: #999; }
|
2033 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions .collapse.open:before {
|
2034 |
+
content: '\f142'; }
|
2035 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-head .actions .collapse.close:before {
|
2036 |
+
content: '\f140'; }
|
2037 |
+
#admin-editor-lp_course .lp-course-curriculum .section .name {
|
2038 |
+
font-size: 24px;
|
2039 |
+
width: 100%;
|
2040 |
+
border: none;
|
2041 |
+
color: #777;
|
2042 |
+
font-weight: 600;
|
2043 |
+
line-height: 50px; }
|
2044 |
+
#admin-editor-lp_course .lp-course-curriculum .section .name:focus {
|
2045 |
+
color: #444; }
|
2046 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-collapse {
|
2047 |
+
overflow: hidden; }
|
2048 |
+
#admin-editor-lp_course .lp-course-curriculum .section .section-content {
|
2049 |
+
padding: 20px;
|
2050 |
+
border-top: 1px solid #e5e5e5; }
|
2051 |
+
#admin-editor-lp_course .lp-course-curriculum .section .details {
|
2052 |
+
margin-bottom: 20px; }
|
2053 |
+
#admin-editor-lp_course .lp-course-curriculum .section .title-input {
|
2054 |
+
font-size: 1.2em;
|
2055 |
+
border: none;
|
2056 |
+
line-height: 30px;
|
2057 |
+
width: calc(100% - 200px);
|
2058 |
+
padding-left: 0; }
|
2059 |
+
#admin-editor-lp_course .lp-course-curriculum .section .description-input {
|
2060 |
+
border: none;
|
2061 |
+
width: 100%;
|
2062 |
+
color: #999;
|
2063 |
+
font-style: italic;
|
2064 |
+
margin: 0;
|
2065 |
+
padding: 0; }
|
2066 |
+
#admin-editor-lp_course .lp-course-curriculum .section .description-input:focus {
|
2067 |
+
color: #444; }
|
2068 |
+
|
2069 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items {
|
2070 |
+
width: 100%;
|
2071 |
+
border-collapse: collapse; }
|
2072 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items ul {
|
2073 |
+
margin: 0;
|
2074 |
+
min-height: 5px;
|
2075 |
+
position: relative; }
|
2076 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item {
|
2077 |
+
border: 1px solid #eee;
|
2078 |
+
position: relative;
|
2079 |
+
margin: 0;
|
2080 |
+
border-bottom-width: 0;
|
2081 |
+
transition: background 200ms ease-out;
|
2082 |
+
display: flex;
|
2083 |
+
justify-content: center;
|
2084 |
+
align-items: center;
|
2085 |
+
background: #FFF; }
|
2086 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.ui-sortable-helper {
|
2087 |
+
border-bottom: 1px solid #EEE; }
|
2088 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item:nth-child(2n+1) {
|
2089 |
+
background-color: #f4fcff; }
|
2090 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.updating:before {
|
2091 |
+
position: absolute;
|
2092 |
+
content: '';
|
2093 |
+
top: 0;
|
2094 |
+
left: 0;
|
2095 |
+
right: 0;
|
2096 |
+
bottom: 0;
|
2097 |
+
z-index: 2; }
|
2098 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.removing {
|
2099 |
+
background-color: #ffeded; }
|
2100 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .drag {
|
2101 |
+
height: 20px;
|
2102 |
+
cursor: url("../../images/openhand.cur") 7 5, default;
|
2103 |
+
visibility: hidden;
|
2104 |
+
fill: #d5dce0;
|
2105 |
+
padding-top: 3px;
|
2106 |
+
flex: 0 0 18px; }
|
2107 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .drag:hover {
|
2108 |
+
fill: #0085ba; }
|
2109 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .icon {
|
2110 |
+
display: flex;
|
2111 |
+
align-items: center;
|
2112 |
+
justify-content: center; }
|
2113 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .title {
|
2114 |
+
margin-left: 5px;
|
2115 |
+
margin-right: 120px;
|
2116 |
+
flex-grow: 1;
|
2117 |
+
flex-basis: 100%; }
|
2118 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .title input {
|
2119 |
+
color: inherit; }
|
2120 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions {
|
2121 |
+
position: absolute;
|
2122 |
+
top: 0;
|
2123 |
+
right: 0;
|
2124 |
+
bottom: 0;
|
2125 |
+
display: flex;
|
2126 |
+
align-items: center;
|
2127 |
+
justify-content: center; }
|
2128 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .actions {
|
2129 |
+
margin: 0; }
|
2130 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .actions > * {
|
2131 |
+
margin-right: 10px;
|
2132 |
+
visibility: hidden; }
|
2133 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .actions .edit {
|
2134 |
+
text-decoration: none; }
|
2135 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .actions .remove {
|
2136 |
+
color: #a00; }
|
2137 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item:hover .drag {
|
2138 |
+
visibility: visible; }
|
2139 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item:not(.lp_lesson) .item-actions .actions .preview-item {
|
2140 |
+
display: none; }
|
2141 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item {
|
2142 |
+
border-bottom-width: 1px;
|
2143 |
+
position: relative;
|
2144 |
+
display: flex;
|
2145 |
+
align-items: center;
|
2146 |
+
transition: all 200ms ease-out; }
|
2147 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .drag {
|
2148 |
+
cursor: default; }
|
2149 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .title {
|
2150 |
+
display: inline-block;
|
2151 |
+
margin: 0;
|
2152 |
+
flex: 1; }
|
2153 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types {
|
2154 |
+
display: inline-block; }
|
2155 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types:hover, #admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types:focus {
|
2156 |
+
background-color: #fff; }
|
2157 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types:hover .type, #admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types:focus .type {
|
2158 |
+
display: inline-block; }
|
2159 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type {
|
2160 |
+
display: inline-block;
|
2161 |
+
padding: 8px 5px;
|
2162 |
+
color: #ccc; }
|
2163 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type input {
|
2164 |
+
display: none; }
|
2165 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type.current {
|
2166 |
+
color: #0085ba; }
|
2167 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type:before {
|
2168 |
+
font-family: Dashicons;
|
2169 |
+
font-size: 20px;
|
2170 |
+
position: relative;
|
2171 |
+
top: 2px; }
|
2172 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type.lp_quiz:before {
|
2173 |
+
content: '\f469'; }
|
2174 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type.lp_lesson:before {
|
2175 |
+
content: '\f330'; }
|
2176 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .new-section-item .types .type.empty-item:before {
|
2177 |
+
content: "\f463"; }
|
2178 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions {
|
2179 |
+
text-align: right; }
|
2180 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action {
|
2181 |
+
width: 30px;
|
2182 |
+
height: 30px;
|
2183 |
+
padding: 0;
|
2184 |
+
text-align: center;
|
2185 |
+
position: relative;
|
2186 |
+
vertical-align: middle;
|
2187 |
+
cursor: pointer;
|
2188 |
+
display: inline-block;
|
2189 |
+
margin: 0; }
|
2190 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action > a {
|
2191 |
+
width: 30px;
|
2192 |
+
height: 30px;
|
2193 |
+
line-height: 30px;
|
2194 |
+
color: #999; }
|
2195 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action > a:hover {
|
2196 |
+
color: #0073aa; }
|
2197 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item > a:hover {
|
2198 |
+
color: #d05d5d; }
|
2199 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item ul {
|
2200 |
+
position: absolute;
|
2201 |
+
top: 100%;
|
2202 |
+
width: 165px;
|
2203 |
+
right: 0;
|
2204 |
+
background: #fdfeff;
|
2205 |
+
margin: 0;
|
2206 |
+
border: 1px solid #DDD;
|
2207 |
+
z-index: 9;
|
2208 |
+
display: none;
|
2209 |
+
text-align: center; }
|
2210 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item ul li {
|
2211 |
+
margin: 0;
|
2212 |
+
border-bottom: 1px solid #eee;
|
2213 |
+
text-align: right; }
|
2214 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item ul li a {
|
2215 |
+
color: #0073aa;
|
2216 |
+
text-decoration: none;
|
2217 |
+
padding: 8px;
|
2218 |
+
display: block; }
|
2219 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item ul li a.delete-permanently {
|
2220 |
+
color: #d05d5d; }
|
2221 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item ul li:hover {
|
2222 |
+
background: #dbf5ff; }
|
2223 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .action.delete-item:hover ul {
|
2224 |
+
display: block; }
|
2225 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item:hover .item-actions .actions > * {
|
2226 |
+
visibility: visible;
|
2227 |
+
cursor: pointer; }
|
2228 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.lp_quiz .icon:before {
|
2229 |
+
content: '\f469'; }
|
2230 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.lp_lesson .icon:before {
|
2231 |
+
content: '\f330'; }
|
2232 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.empty-item {
|
2233 |
+
color: #a2a2a2;
|
2234 |
+
position: relative; }
|
2235 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.empty-item:after {
|
2236 |
+
position: absolute;
|
2237 |
+
top: 0;
|
2238 |
+
left: 0;
|
2239 |
+
right: 0;
|
2240 |
+
bottom: 0;
|
2241 |
+
background: #FFF;
|
2242 |
+
content: '';
|
2243 |
+
opacity: 0.5; }
|
2244 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.empty-item .item-actions {
|
2245 |
+
display: none; }
|
2246 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item.empty-item .icon:before {
|
2247 |
+
content: "\f463";
|
2248 |
+
color: #a2a2a2;
|
2249 |
+
-webkit-animation: rotating4 2s linear infinite;
|
2250 |
+
-moz-animation: rotating4 2s linear infinite;
|
2251 |
+
-ms-animation: rotating4 2s linear infinite;
|
2252 |
+
-o-animation: rotating4 2s linear infinite;
|
2253 |
+
animation: rotating4 2s linear infinite; }
|
2254 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .icon {
|
2255 |
+
font-size: 20px;
|
2256 |
+
color: #0085ba;
|
2257 |
+
text-align: center;
|
2258 |
+
flex: 0 0 29px; }
|
2259 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .icon:before {
|
2260 |
+
font-family: Dashicons; }
|
2261 |
+
#admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item input {
|
2262 |
+
font-size: 14px;
|
2263 |
+
border: none;
|
2264 |
+
width: 100%;
|
2265 |
+
padding: 8px 10px 8px 0; }
|
2266 |
+
|
2267 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions {
|
2268 |
+
padding: 0 20px 20px 20px; }
|
2269 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove {
|
2270 |
+
float: right;
|
2271 |
+
color: #a00;
|
2272 |
+
cursor: pointer;
|
2273 |
+
display: none; }
|
2274 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove .icon {
|
2275 |
+
display: inline-block; }
|
2276 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove .confirm {
|
2277 |
+
display: none; }
|
2278 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove.confirm .confirm {
|
2279 |
+
display: inline-block; }
|
2280 |
+
#admin-editor-lp_course .lp-course-curriculum .section-actions .remove.confirm .icon {
|
2281 |
+
display: none; }
|
2282 |
+
|
2283 |
+
#admin-editor-lp_course .lp-course-curriculum .ui-sortable-placeholder {
|
2284 |
+
visibility: visible !important;
|
2285 |
+
background: #bdf4fe !important;
|
2286 |
+
display: block;
|
2287 |
+
border-color: #bdf4fe !important; }
|
2288 |
+
|
2289 |
+
.wp-admin.post-type-lp_course #meta-box-tab-course_payment .learn-press-tip-floating {
|
2290 |
+
top: 40px;
|
2291 |
+
left: 100px;
|
2292 |
+
background: #a00;
|
2293 |
+
opacity: 0.8; }
|
2294 |
+
.wp-admin.post-type-lp_course #meta-box-tab-course_payment .learn-press-tip-floating::before {
|
2295 |
+
top: -7px;
|
2296 |
+
border: 7px solid transparent;
|
2297 |
+
border-bottom-color: #a00;
|
2298 |
+
border-top-width: 0; }
|
2299 |
+
|
2300 |
+
.section-item-counts {
|
2301 |
+
position: absolute;
|
2302 |
+
top: 0;
|
2303 |
+
right: 41px;
|
2304 |
+
white-space: nowrap;
|
2305 |
+
line-height: 44px;
|
2306 |
+
font-size: 12px; }
|
2307 |
+
.section-item-counts span {
|
2308 |
+
color: #999; }
|
2309 |
+
|
2310 |
+
/**
|
2311 |
+
* Quiz admin editor.
|
2312 |
+
*/
|
2313 |
+
#admin-editor-lp_quiz .lp-box-data-head {
|
2314 |
+
padding: 12px 10px; }
|
2315 |
+
#admin-editor-lp_quiz .lp-box-data-head h3 {
|
2316 |
+
padding: 0; }
|
2317 |
+
#admin-editor-lp_quiz .lp-box-data-head .status {
|
2318 |
+
font-family: Dashicons;
|
2319 |
+
font-size: 20px;
|
2320 |
+
position: relative;
|
2321 |
+
top: 5px;
|
2322 |
+
margin-left: 10px;
|
2323 |
+
visibility: hidden; }
|
2324 |
+
#admin-editor-lp_quiz .lp-box-data-head .status:before {
|
2325 |
+
content: "\f463"; }
|
2326 |
+
#admin-editor-lp_quiz .lp-box-data-head .status.loading {
|
2327 |
+
visibility: visible;
|
2328 |
+
animation: rotation 2s infinite linear;
|
2329 |
+
display: inline-block; }
|
2330 |
+
#admin-editor-lp_quiz .lp-box-data-head .collapse-list-questions {
|
2331 |
+
font-family: Dashicons;
|
2332 |
+
position: absolute;
|
2333 |
+
top: 0;
|
2334 |
+
right: 0;
|
2335 |
+
bottom: 0;
|
2336 |
+
font-size: 30px;
|
2337 |
+
display: flex;
|
2338 |
+
justify-content: center;
|
2339 |
+
align-items: center;
|
2340 |
+
cursor: pointer;
|
2341 |
+
width: 40px;
|
2342 |
+
height: 46px;
|
2343 |
+
color: #999; }
|
2344 |
+
|
2345 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions {
|
2346 |
+
color: #777;
|
2347 |
+
border-collapse: collapse; }
|
2348 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row {
|
2349 |
+
display: flex;
|
2350 |
+
flex-direction: row;
|
2351 |
+
text-align: center; }
|
2352 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > * {
|
2353 |
+
width: 100%;
|
2354 |
+
padding: 12px 10px; }
|
2355 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .sort {
|
2356 |
+
flex: 0 0 15px;
|
2357 |
+
cursor: url("../../images/openhand.cur") 7 5, default;
|
2358 |
+
visibility: hidden;
|
2359 |
+
position: relative;
|
2360 |
+
font-size: 18px;
|
2361 |
+
color: #d5dce0; }
|
2362 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .sort:hover {
|
2363 |
+
color: #0085ba; }
|
2364 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .order {
|
2365 |
+
flex: 0 0 30px;
|
2366 |
+
text-align: right;
|
2367 |
+
font-size: 15px;
|
2368 |
+
padding: 12px 0; }
|
2369 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .order:after {
|
2370 |
+
content: '.'; }
|
2371 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .type {
|
2372 |
+
width: 150px; }
|
2373 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .actions {
|
2374 |
+
width: 300px; }
|
2375 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row > .name {
|
2376 |
+
padding-left: 5px; }
|
2377 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row:hover > .sort {
|
2378 |
+
visibility: visible; }
|
2379 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .table-row .actions .lp-box-data-actions {
|
2380 |
+
text-align: right !important; }
|
2381 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .header {
|
2382 |
+
border-bottom: 1px solid #ddd;
|
2383 |
+
display: none; }
|
2384 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .header .table-row > * {
|
2385 |
+
font-weight: bold; }
|
2386 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .header .table-row > .order:after {
|
2387 |
+
content: ''; }
|
2388 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .header .table-row > .actions {
|
2389 |
+
padding: 12px 0; }
|
2390 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-actions .name input {
|
2391 |
+
width: 100%;
|
2392 |
+
font-size: 14px;
|
2393 |
+
border: none;
|
2394 |
+
background: transparent;
|
2395 |
+
box-shadow: none;
|
2396 |
+
font-weight: normal;
|
2397 |
+
color: #777;
|
2398 |
+
padding: 0;
|
2399 |
+
min-height: auto;
|
2400 |
+
line-height: 1; }
|
2401 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings {
|
2402 |
+
border: 1px solid #ddd;
|
2403 |
+
border-left: none;
|
2404 |
+
border-right: none; }
|
2405 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings > * {
|
2406 |
+
padding: 20px; }
|
2407 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options {
|
2408 |
+
border: 1px solid #ddd; }
|
2409 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .sort {
|
2410 |
+
width: 12px;
|
2411 |
+
padding: 8px 5px; }
|
2412 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .answer-text {
|
2413 |
+
padding-left: 5px;
|
2414 |
+
width: calc(100% - 100px); }
|
2415 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .order {
|
2416 |
+
width: 30px;
|
2417 |
+
text-align: right;
|
2418 |
+
padding: 0; }
|
2419 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .answer-correct {
|
2420 |
+
width: 65px;
|
2421 |
+
text-align: center; }
|
2422 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .actions {
|
2423 |
+
padding: 0;
|
2424 |
+
text-align: right; }
|
2425 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options .actions .lp-toolbar-btn {
|
2426 |
+
height: 42px; }
|
2427 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr {
|
2428 |
+
background: #fff;
|
2429 |
+
border: 1px solid #DDD; }
|
2430 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr:nth-child(2n) {
|
2431 |
+
background: #f4fcff; }
|
2432 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr td {
|
2433 |
+
padding: 0 10px;
|
2434 |
+
background: inherit;
|
2435 |
+
position: static;
|
2436 |
+
border: none; }
|
2437 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr td.sort {
|
2438 |
+
cursor: url("../../images/openhand.cur") 7 5, default;
|
2439 |
+
width: 12px; }
|
2440 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr td.answer-text {
|
2441 |
+
padding-left: 5px; }
|
2442 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr td.answer-correct {
|
2443 |
+
text-align: center; }
|
2444 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr .svg-icon {
|
2445 |
+
height: 18px;
|
2446 |
+
vertical-align: middle;
|
2447 |
+
visibility: hidden;
|
2448 |
+
fill: #d5dce0; }
|
2449 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr:hover .svg-icon {
|
2450 |
+
visibility: visible; }
|
2451 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr:hover .sort:hover .svg-icon {
|
2452 |
+
fill: #0085ba; }
|
2453 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-placeholder {
|
2454 |
+
visibility: visible !important; }
|
2455 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-placeholder td {
|
2456 |
+
height: 43px;
|
2457 |
+
background: #bdf4fe !important; }
|
2458 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-helper {
|
2459 |
+
border-left: none;
|
2460 |
+
border-right: none; }
|
2461 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-helper td {
|
2462 |
+
border-bottom: 1px solid #DDD; }
|
2463 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.ui-sortable-helper td.sort {
|
2464 |
+
border-left: 0; }
|
2465 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.empty-option .sort i {
|
2466 |
+
display: none; }
|
2467 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.empty-option .sort:before {
|
2468 |
+
font-family: Dashicons;
|
2469 |
+
content: "\f463";
|
2470 |
+
display: inline-block;
|
2471 |
+
font-size: 18px;
|
2472 |
+
position: absolute;
|
2473 |
+
left: 4px;
|
2474 |
+
top: 12px;
|
2475 |
+
-webkit-animation: rotating4 2s linear infinite;
|
2476 |
+
-moz-animation: rotating4 2s linear infinite;
|
2477 |
+
-ms-animation: rotating4 2s linear infinite;
|
2478 |
+
-o-animation: rotating4 2s linear infinite;
|
2479 |
+
animation: rotating4 2s linear infinite; }
|
2480 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.empty-option td {
|
2481 |
+
position: relative; }
|
2482 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody tr.empty-option td:after {
|
2483 |
+
content: '';
|
2484 |
+
top: 0;
|
2485 |
+
left: 0;
|
2486 |
+
right: 1px;
|
2487 |
+
bottom: 0;
|
2488 |
+
background: #FFF;
|
2489 |
+
position: absolute;
|
2490 |
+
opacity: 0.5; }
|
2491 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-settings .quiz-question-data table.lp-list-options tbody .answer-text input {
|
2492 |
+
width: 100%;
|
2493 |
+
font-size: 14px;
|
2494 |
+
border: none;
|
2495 |
+
background: transparent;
|
2496 |
+
box-shadow: none;
|
2497 |
+
font-weight: normal;
|
2498 |
+
color: #777;
|
2499 |
+
padding: 0; }
|
2500 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item {
|
2501 |
+
background: #fff;
|
2502 |
+
border-bottom: 1px solid #f1f1f1; }
|
2503 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item:nth-child(2n+1) {
|
2504 |
+
background: #f4fcff; }
|
2505 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.ui-sortable-helper {
|
2506 |
+
border-top: 1px solid #f1f1f1; }
|
2507 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.ui-sortable-placeholder {
|
2508 |
+
visibility: visible !important;
|
2509 |
+
background: #bdf4fe !important;
|
2510 |
+
display: block;
|
2511 |
+
border-color: #bdf4fe !important; }
|
2512 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question, #admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.updating {
|
2513 |
+
position: relative; }
|
2514 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question .question-actions .sort, #admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.updating .question-actions .sort {
|
2515 |
+
visibility: visible; }
|
2516 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question .question-actions .sort .fa, #admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.updating .question-actions .sort .fa {
|
2517 |
+
display: none; }
|
2518 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question .question-actions .sort:after, #admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.updating .question-actions .sort:after {
|
2519 |
+
font-family: Dashicons;
|
2520 |
+
content: "\f463";
|
2521 |
+
font-size: 20px;
|
2522 |
+
display: inline-block;
|
2523 |
+
position: absolute;
|
2524 |
+
left: 5px;
|
2525 |
+
-webkit-animation: rotating4 2s linear infinite;
|
2526 |
+
-moz-animation: rotating4 2s linear infinite;
|
2527 |
+
-ms-animation: rotating4 2s linear infinite;
|
2528 |
+
-o-animation: rotating4 2s linear infinite;
|
2529 |
+
animation: rotating4 2s linear infinite; }
|
2530 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question:after, #admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.updating:after {
|
2531 |
+
content: '';
|
2532 |
+
position: absolute;
|
2533 |
+
top: 0;
|
2534 |
+
left: 0;
|
2535 |
+
right: 0;
|
2536 |
+
bottom: 0;
|
2537 |
+
background: #FFF;
|
2538 |
+
opacity: 0.5; }
|
2539 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item.empty-question .question-settings {
|
2540 |
+
display: none; }
|
2541 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .cell {
|
2542 |
+
padding: 10px; }
|
2543 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .name input {
|
2544 |
+
width: 100%;
|
2545 |
+
font-size: 14px;
|
2546 |
+
border: none;
|
2547 |
+
background: transparent;
|
2548 |
+
box-shadow: none;
|
2549 |
+
font-weight: normal;
|
2550 |
+
color: #777;
|
2551 |
+
padding: 0; }
|
2552 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions {
|
2553 |
+
padding: 0;
|
2554 |
+
margin: 0; }
|
2555 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons {
|
2556 |
+
position: static;
|
2557 |
+
z-index: 10;
|
2558 |
+
height: 100%;
|
2559 |
+
text-align: left; }
|
2560 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons > div a {
|
2561 |
+
visibility: hidden; }
|
2562 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn {
|
2563 |
+
height: 100%; }
|
2564 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn .lp-btn-icon {
|
2565 |
+
width: 28px;
|
2566 |
+
height: 30px;
|
2567 |
+
text-align: center;
|
2568 |
+
position: absolute;
|
2569 |
+
top: 50%;
|
2570 |
+
margin-top: -15px;
|
2571 |
+
left: 50%;
|
2572 |
+
margin-left: -15px;
|
2573 |
+
line-height: 30px; }
|
2574 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn ul {
|
2575 |
+
z-index: 9; }
|
2576 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-btn-toggle {
|
2577 |
+
font-family: Dashicons;
|
2578 |
+
line-height: 42px;
|
2579 |
+
font-size: 16px; }
|
2580 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-btn-toggle.open::after {
|
2581 |
+
content: '\f343'; }
|
2582 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-btn-toggle.close::after {
|
2583 |
+
content: '\f347'; }
|
2584 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn-dropdown ul li {
|
2585 |
+
border-bottom: 1px solid #eee; }
|
2586 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn-dropdown ul li a {
|
2587 |
+
padding: 10px 25px; }
|
2588 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions .actions .lp-toolbar-buttons .lp-toolbar-btn-dropdown ul li a.remove {
|
2589 |
+
color: #0073aa; }
|
2590 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-actions:hover .lp-toolbar-buttons > div a {
|
2591 |
+
visibility: visible; }
|
2592 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings {
|
2593 |
+
background: #fff; }
|
2594 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options {
|
2595 |
+
text-align: left;
|
2596 |
+
padding-left: 0; }
|
2597 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .inside {
|
2598 |
+
margin: 0;
|
2599 |
+
padding: 0; }
|
2600 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .inside .rwmb-meta-box .rwmb-field {
|
2601 |
+
padding: 20px;
|
2602 |
+
margin: 0; }
|
2603 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .inside .rwmb-meta-box .rwmb-field:nth-child(2n+1) {
|
2604 |
+
background: #f4fcff; }
|
2605 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .postbox .hndle {
|
2606 |
+
cursor: default; }
|
2607 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .postbox .toggle {
|
2608 |
+
float: right;
|
2609 |
+
width: 36px;
|
2610 |
+
height: 36px;
|
2611 |
+
position: absolute;
|
2612 |
+
top: 0;
|
2613 |
+
right: 0;
|
2614 |
+
line-height: 36px;
|
2615 |
+
text-align: center; }
|
2616 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings .quiz-question-options .postbox .toggle:after {
|
2617 |
+
font-family: Dashicons;
|
2618 |
+
content: "\f460";
|
2619 |
+
font-size: 18px; }
|
2620 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings.closed .quiz-question-options {
|
2621 |
+
width: 38px; }
|
2622 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings.closed .postbox {
|
2623 |
+
min-width: 34px;
|
2624 |
+
height: 34px;
|
2625 |
+
line-height: 42px;
|
2626 |
+
text-align: center; }
|
2627 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings.closed .postbox .hndle {
|
2628 |
+
display: none; }
|
2629 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .main .question-item .question-settings.closed .postbox .toggle:after {
|
2630 |
+
content: "\f132"; }
|
2631 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer {
|
2632 |
+
border-top: 1px solid #DDD;
|
2633 |
+
margin-top: -1px; }
|
2634 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .order {
|
2635 |
+
line-height: 28px; }
|
2636 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row {
|
2637 |
+
text-align: left; }
|
2638 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title {
|
2639 |
+
position: relative;
|
2640 |
+
display: inline-block;
|
2641 |
+
min-width: 500px; }
|
2642 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title input {
|
2643 |
+
border: 0;
|
2644 |
+
width: 100%;
|
2645 |
+
margin: 0;
|
2646 |
+
padding: 6px 0;
|
2647 |
+
line-height: 1;
|
2648 |
+
min-height: auto;
|
2649 |
+
-webkit-box-shadow: none;
|
2650 |
+
-moz-box-shadow: none;
|
2651 |
+
box-shadow: none;
|
2652 |
+
-webkit-border-radius: 3px;
|
2653 |
+
-moz-border-radius: 3px;
|
2654 |
+
border-radius: 3px; }
|
2655 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title input:focus {
|
2656 |
+
-webkit-box-shadow: none;
|
2657 |
+
-moz-box-shadow: none;
|
2658 |
+
box-shadow: none; }
|
2659 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title input:focus {
|
2660 |
+
border-color: #DDD; }
|
2661 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .title input::placeholder {
|
2662 |
+
color: #999;
|
2663 |
+
font-style: italic;
|
2664 |
+
border-bottom: 1px solid #DDD;
|
2665 |
+
display: inline-block; }
|
2666 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new {
|
2667 |
+
display: inline-block;
|
2668 |
+
position: relative;
|
2669 |
+
vertical-align: top; }
|
2670 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new ul.question-types {
|
2671 |
+
position: absolute;
|
2672 |
+
margin: 0;
|
2673 |
+
background-color: #FFF;
|
2674 |
+
top: 100%;
|
2675 |
+
border: 1px solid #DDD;
|
2676 |
+
right: -2px;
|
2677 |
+
width: 200px;
|
2678 |
+
z-index: 9999999;
|
2679 |
+
display: none; }
|
2680 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new ul.question-types li {
|
2681 |
+
margin: 0; }
|
2682 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new ul.question-types li a {
|
2683 |
+
display: block;
|
2684 |
+
padding: 10px;
|
2685 |
+
line-height: 1;
|
2686 |
+
text-decoration: none;
|
2687 |
+
outline: none;
|
2688 |
+
box-shadow: none; }
|
2689 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new button:hover + .question-types {
|
2690 |
+
display: block; }
|
2691 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new button + .question-types:hover {
|
2692 |
+
display: block; }
|
2693 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .add-new button[disabled="disabled"]:hover + .question-types {
|
2694 |
+
display: none; }
|
2695 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question .select-item {
|
2696 |
+
display: inline; }
|
2697 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .footer .table-row .add-new-question button {
|
2698 |
+
height: 30px;
|
2699 |
+
box-shadow: 0 1px 0 #ccc !important; }
|
2700 |
+
|
2701 |
+
#admin-editor-lp_quiz .lp-box-data-content .question-button-actions {
|
2702 |
+
text-align: left; }
|
2703 |
+
|
2704 |
+
/**.section-item-counts span
|
2705 |
+
* Question admin editor.
|
2706 |
+
*/
|
2707 |
+
#admin-editor-lp_question {
|
2708 |
+
background: #fff; }
|
2709 |
+
#admin-editor-lp_question .lp-box-data-head {
|
2710 |
+
padding: 0 10px; }
|
2711 |
+
#admin-editor-lp_question .lp-box-data-head .heading {
|
2712 |
+
float: left;
|
2713 |
+
padding: 12px 10px; }
|
2714 |
+
#admin-editor-lp_question .lp-box-data-head .heading .section-item-counts {
|
2715 |
+
right: 50px; }
|
2716 |
+
#admin-editor-lp_question .lp-box-data-head .heading .section-item-counts span {
|
2717 |
+
background: #F5F5F5;
|
2718 |
+
padding: 0 9px;
|
2719 |
+
color: #00b9ff;
|
2720 |
+
margin-top: 8px;
|
2721 |
+
display: inline-block;
|
2722 |
+
line-height: 30px;
|
2723 |
+
height: 30px;
|
2724 |
+
-webkit-border-radius: 3px;
|
2725 |
+
-moz-border-radius: 3px;
|
2726 |
+
border-radius: 3px;
|
2727 |
+
border-top-right-radius: 0;
|
2728 |
+
border-bottom-right-radius: 0; }
|
2729 |
+
#admin-editor-lp_question .lp-box-data-head .lp-toolbar-buttons {
|
2730 |
+
height: 46px; }
|
2731 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions {
|
2732 |
+
margin-right: 10px;
|
2733 |
+
height: 30px;
|
2734 |
+
background: #BBB;
|
2735 |
+
margin-top: 8px;
|
2736 |
+
-webkit-border-radius: 3px;
|
2737 |
+
-moz-border-radius: 3px;
|
2738 |
+
border-radius: 3px;
|
2739 |
+
border-top-left-radius: 0;
|
2740 |
+
border-bottom-left-radius: 0; }
|
2741 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types a {
|
2742 |
+
color: #FFF; }
|
2743 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul {
|
2744 |
+
position: absolute;
|
2745 |
+
top: 100%;
|
2746 |
+
right: 0;
|
2747 |
+
height: auto;
|
2748 |
+
background: #fdfeff;
|
2749 |
+
margin: 0;
|
2750 |
+
border: 1px solid #DDD;
|
2751 |
+
display: none; }
|
2752 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul li {
|
2753 |
+
margin: 0; }
|
2754 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul li:hover, #admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul li.active {
|
2755 |
+
background: #dbf5ff; }
|
2756 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul li a {
|
2757 |
+
display: block;
|
2758 |
+
white-space: nowrap;
|
2759 |
+
text-decoration: none;
|
2760 |
+
padding: 5px;
|
2761 |
+
font-size: 12px;
|
2762 |
+
text-align: right;
|
2763 |
+
color: #0073aa;
|
2764 |
+
min-width: 100px; }
|
2765 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions .question-types ul:hover {
|
2766 |
+
display: block; }
|
2767 |
+
#admin-editor-lp_question .lp-box-data-head .question-actions:hover .question-types ul {
|
2768 |
+
display: block; }
|
2769 |
+
#admin-editor-lp_question .lp-box-data-content {
|
2770 |
+
padding: 20px; }
|
2771 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers {
|
2772 |
+
width: 100%;
|
2773 |
+
border: 1px solid #ddd; }
|
2774 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tr td {
|
2775 |
+
padding: 0 15px; }
|
2776 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers thead {
|
2777 |
+
background: #F5F5F5; }
|
2778 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers thead tr th {
|
2779 |
+
padding: 15px;
|
2780 |
+
background: #F5F5F5;
|
2781 |
+
border-bottom: 1px solid #DDD; }
|
2782 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .sort, #admin-editor-lp_question .lp-box-data-content table.list-question-answers .order, #admin-editor-lp_question .lp-box-data-content table.list-question-answers .actions {
|
2783 |
+
width: 10px; }
|
2784 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .sort {
|
2785 |
+
padding: 0 10px; }
|
2786 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .order {
|
2787 |
+
text-align: right;
|
2788 |
+
padding: 0;
|
2789 |
+
width: 30px; }
|
2790 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .answer-correct {
|
2791 |
+
width: 65px;
|
2792 |
+
text-align: center; }
|
2793 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .answer-text {
|
2794 |
+
padding-left: 5px; }
|
2795 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers .actions {
|
2796 |
+
padding-right: 0;
|
2797 |
+
text-align: right; }
|
2798 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr {
|
2799 |
+
background: #f4fcff;
|
2800 |
+
color: #777; }
|
2801 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr:nth-child(2n) {
|
2802 |
+
background: #fff; }
|
2803 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.sort {
|
2804 |
+
width: 15px;
|
2805 |
+
text-align: center;
|
2806 |
+
font-size: 18px;
|
2807 |
+
cursor: url("../../images/openhand.cur") 7 5, default;
|
2808 |
+
padding: 0; }
|
2809 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.sort .svg-icon {
|
2810 |
+
visibility: hidden;
|
2811 |
+
fill: #d5dce0;
|
2812 |
+
height: 18px;
|
2813 |
+
vertical-align: middle; }
|
2814 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.sort:hover .svg-icon {
|
2815 |
+
fill: #0085ba; }
|
2816 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.order {
|
2817 |
+
font-size: 14px; }
|
2818 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.answer-text input {
|
2819 |
+
width: 100%;
|
2820 |
+
font-size: 14px;
|
2821 |
+
border: none;
|
2822 |
+
background: transparent;
|
2823 |
+
box-shadow: none;
|
2824 |
+
font-weight: normal;
|
2825 |
+
color: #777;
|
2826 |
+
padding: 0; }
|
2827 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr td.lp-toolbar-buttons {
|
2828 |
+
z-index: auto; }
|
2829 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr:hover td.actions .remove-answer {
|
2830 |
+
visibility: visible;
|
2831 |
+
height: 42px; }
|
2832 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr:hover td.sort .svg-icon {
|
2833 |
+
visibility: visible; }
|
2834 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.ui-sortable-placeholder {
|
2835 |
+
visibility: visible !important; }
|
2836 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.ui-sortable-placeholder td {
|
2837 |
+
background: #bdf4fe !important;
|
2838 |
+
height: 43px; }
|
2839 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.ui-sortable-helper td {
|
2840 |
+
border-bottom: 1px solid #DDD; }
|
2841 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.ui-sortable-helper td.sort {
|
2842 |
+
border-left: 0; }
|
2843 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.new-option .svg-icon {
|
2844 |
+
display: none; }
|
2845 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.new-option td {
|
2846 |
+
position: relative; }
|
2847 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.new-option .sort:before {
|
2848 |
+
content: "\f463";
|
2849 |
+
font-family: Dashicons;
|
2850 |
+
position: absolute;
|
2851 |
+
left: 10px;
|
2852 |
+
top: 12px;
|
2853 |
+
display: inline-block;
|
2854 |
+
-webkit-animation: rotating4 2s linear infinite;
|
2855 |
+
-moz-animation: rotating4 2s linear infinite;
|
2856 |
+
-ms-animation: rotating4 2s linear infinite;
|
2857 |
+
-o-animation: rotating4 2s linear infinite;
|
2858 |
+
animation: rotating4 2s linear infinite; }
|
2859 |
+
#admin-editor-lp_question .lp-box-data-content table.list-question-answers tbody tr.new-option td:after {
|
2860 |
+
position: absolute;
|
2861 |
+
content: '';
|
2862 |
+
background: #FFF;
|
2863 |
+
top: 0;
|
2864 |
+
left: 0;
|
2865 |
+
right: 0;
|
2866 |
+
bottom: 0;
|
2867 |
+
opacity: 0.5; }
|
2868 |
+
#admin-editor-lp_question .lp-box-data-content .add-answer {
|
2869 |
+
margin: 15px 0 0 0; }
|
2870 |
+
|
2871 |
+
/**
|
2872 |
+
* Modal choose items.
|
2873 |
+
*/
|
2874 |
+
#lp-modal-choose-items {
|
2875 |
+
opacity: 0;
|
2876 |
+
display: none;
|
2877 |
+
position: fixed;
|
2878 |
+
top: 0;
|
2879 |
+
left: 0;
|
2880 |
+
right: 0;
|
2881 |
+
bottom: 0;
|
2882 |
+
z-index: -1;
|
2883 |
+
background-color: rgba(0, 0, 0, 0.5); }
|
2884 |
+
#lp-modal-choose-items.show {
|
2885 |
+
display: block;
|
2886 |
+
opacity: 1;
|
2887 |
+
z-index: 99999; }
|
2888 |
+
#lp-modal-choose-items.loading .lp-choose-items:before {
|
2889 |
+
position: absolute;
|
2890 |
+
top: 0;
|
2891 |
+
left: 0;
|
2892 |
+
right: 0;
|
2893 |
+
bottom: 0;
|
2894 |
+
display: block;
|
2895 |
+
content: '';
|
2896 |
+
z-index: 9;
|
2897 |
+
background: url("../../images/spinner.gif") no-repeat center center; }
|
2898 |
+
#lp-modal-choose-items .lp-choose-items {
|
2899 |
+
background-color: #fff;
|
2900 |
+
max-width: 800px;
|
2901 |
+
margin: 50px auto;
|
2902 |
+
border: 1px solid #ddd;
|
2903 |
+
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
2904 |
+
position: relative;
|
2905 |
+
transition: all 200ms ease-out; }
|
2906 |
+
#lp-modal-choose-items .lp-choose-items.show-preview .header .preview-title {
|
2907 |
+
display: flex;
|
2908 |
+
align-items: center; }
|
2909 |
+
#lp-modal-choose-items .lp-choose-items .header {
|
2910 |
+
position: relative; }
|
2911 |
+
#lp-modal-choose-items .lp-choose-items .header .preview-title {
|
2912 |
+
position: absolute;
|
2913 |
+
top: 0;
|
2914 |
+
left: 0;
|
2915 |
+
right: 0;
|
2916 |
+
bottom: 0;
|
2917 |
+
z-index: 10;
|
2918 |
+
padding-left: 20px;
|
2919 |
+
background-color: #fff;
|
2920 |
+
border-bottom: 1px solid #ddd;
|
2921 |
+
display: none;
|
2922 |
+
font-weight: 600; }
|
2923 |
+
#lp-modal-choose-items .lp-choose-items .header .preview-title h3 {
|
2924 |
+
margin: 0; }
|
2925 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs {
|
2926 |
+
margin: 0;
|
2927 |
+
border-bottom: 1px solid #ddd; }
|
2928 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab {
|
2929 |
+
display: inline-block;
|
2930 |
+
margin: 0;
|
2931 |
+
position: relative; }
|
2932 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab:not(:last-child):before {
|
2933 |
+
content: '';
|
2934 |
+
border-right: 1px solid #ddd;
|
2935 |
+
position: absolute;
|
2936 |
+
right: 0;
|
2937 |
+
height: 44px;
|
2938 |
+
top: 50%;
|
2939 |
+
margin-top: -22px; }
|
2940 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab.active:after {
|
2941 |
+
border: 1px solid #ddd;
|
2942 |
+
transform: rotate(45deg);
|
2943 |
+
display: inline-block;
|
2944 |
+
width: 10px;
|
2945 |
+
height: 10px;
|
2946 |
+
content: '';
|
2947 |
+
position: absolute;
|
2948 |
+
left: 50%;
|
2949 |
+
margin-left: -6px;
|
2950 |
+
bottom: -6px;
|
2951 |
+
background: #FFF;
|
2952 |
+
border-bottom: 0;
|
2953 |
+
border-right: 0; }
|
2954 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab.active a {
|
2955 |
+
color: #333; }
|
2956 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab a {
|
2957 |
+
padding: 0 20px;
|
2958 |
+
text-decoration: none;
|
2959 |
+
display: inline-block;
|
2960 |
+
font-weight: 600;
|
2961 |
+
height: 44px;
|
2962 |
+
line-height: 44px; }
|
2963 |
+
#lp-modal-choose-items .lp-choose-items .header .tabs .tab a:focus {
|
2964 |
+
box-shadow: none; }
|
2965 |
+
#lp-modal-choose-items .lp-choose-items .header .close {
|
2966 |
+
display: inline-block;
|
2967 |
+
position: absolute;
|
2968 |
+
top: 0;
|
2969 |
+
right: 0;
|
2970 |
+
cursor: pointer;
|
2971 |
+
font-size: 1em;
|
2972 |
+
padding: 12px;
|
2973 |
+
z-index: 30; }
|
2974 |
+
#lp-modal-choose-items .lp-choose-items .main {
|
2975 |
+
padding: 20px;
|
2976 |
+
position: relative;
|
2977 |
+
overflow: hidden;
|
2978 |
+
border-bottom: 1px solid #DDD; }
|
2979 |
+
#lp-modal-choose-items .lp-choose-items .main .section-item {
|
2980 |
+
cursor: pointer;
|
2981 |
+
transition: color 200ms ease-out;
|
2982 |
+
max-width: 100%;
|
2983 |
+
display: block;
|
2984 |
+
overflow: hidden;
|
2985 |
+
white-space: nowrap;
|
2986 |
+
text-overflow: ellipsis; }
|
2987 |
+
#lp-modal-choose-items .lp-choose-items .main .section-item:before {
|
2988 |
+
font-family: Dashicons;
|
2989 |
+
position: relative;
|
2990 |
+
top: 3px; }
|
2991 |
+
#lp-modal-choose-items .lp-choose-items .main .search {
|
2992 |
+
margin-bottom: 20px;
|
2993 |
+
background: transparent; }
|
2994 |
+
#lp-modal-choose-items .lp-choose-items .main .search input.modal-search-input {
|
2995 |
+
width: 100%;
|
2996 |
+
font-size: 1.2em;
|
2997 |
+
line-height: 1.5;
|
2998 |
+
padding: 10px 14px; }
|
2999 |
+
#lp-modal-choose-items .lp-choose-items .main .list-items {
|
3000 |
+
min-height: 260px;
|
3001 |
+
margin: 0;
|
3002 |
+
max-height: 460px;
|
3003 |
+
overflow-y: auto; }
|
3004 |
+
#lp-modal-choose-items .lp-choose-items .main .list-items li {
|
3005 |
+
margin: 15px 0;
|
3006 |
+
cursor: pointer; }
|
3007 |
+
#lp-modal-choose-items .lp-choose-items .main .pagination .index {
|
3008 |
+
line-height: 28px;
|
3009 |
+
margin-left: 20px; }
|
3010 |
+
#lp-modal-choose-items .lp-choose-items .lp-added-items-preview {
|
3011 |
+
position: absolute;
|
3012 |
+
top: 0;
|
3013 |
+
left: 0;
|
3014 |
+
right: 0;
|
3015 |
+
bottom: 0;
|
3016 |
+
background-color: #fff;
|
3017 |
+
z-index: 2;
|
3018 |
+
padding: 20px;
|
3019 |
+
transform: translate(100%, 0);
|
3020 |
+
max-height: 420px;
|
3021 |
+
overflow: auto; }
|
3022 |
+
#lp-modal-choose-items .lp-choose-items .lp-added-items-preview.show {
|
3023 |
+
transform: translate(0, 0); }
|
3024 |
+
#lp-modal-choose-items .lp-choose-items .lp-added-items-preview .list-added-items li {
|
3025 |
+
margin: 15px 0; }
|
3026 |
+
#lp-modal-choose-items .lp-choose-items .lp-added-items-preview .list-added-items li:first-child {
|
3027 |
+
margin: -10px 0 15px 0; }
|
3028 |
+
#lp-modal-choose-items .lp-choose-items .footer {
|
3029 |
+
padding: 20px; }
|
3030 |
+
|
3031 |
+
body.lp-item-moving {
|
3032 |
+
cursor: url("../../images/closedhand.cur") 7 5, default !important; }
|
3033 |
+
|
3034 |
+
@media screen and (max-width: 900px) {
|
3035 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .question-settings.table-row {
|
3036 |
+
display: block;
|
3037 |
+
width: auto;
|
3038 |
+
text-align: left; }
|
3039 |
+
#admin-editor-lp_quiz .lp-box-data-content .lp-list-questions .question-settings.table-row > * {
|
3040 |
+
width: auto; } }
|
3041 |
+
|
3042 |
+
#learn-press-reset-course-users,
|
3043 |
+
#learn-press-reset-user-courses,
|
3044 |
+
#learn-press-reset-user-item {
|
3045 |
+
max-width: 100%; }
|
3046 |
+
#learn-press-reset-course-users table,
|
3047 |
+
#learn-press-reset-user-courses table,
|
3048 |
+
#learn-press-reset-user-item table {
|
3049 |
+
width: 100%;
|
3050 |
+
border-collapse: collapse; }
|
3051 |
+
#learn-press-reset-course-users .courses-list,
|
3052 |
+
#learn-press-reset-user-courses .courses-list,
|
3053 |
+
#learn-press-reset-user-item .courses-list {
|
3054 |
+
margin: 0; }
|
3055 |
+
#learn-press-reset-course-users input[type="text"],
|
3056 |
+
#learn-press-reset-user-courses input[type="text"],
|
3057 |
+
#learn-press-reset-user-item input[type="text"] {
|
3058 |
+
min-width: 300px;
|
3059 |
+
height: 28px;
|
3060 |
+
margin-left: 0; }
|
3061 |
+
#learn-press-reset-course-users .action-reset.dashicons-trash,
|
3062 |
+
#learn-press-reset-user-courses .action-reset.dashicons-trash,
|
3063 |
+
#learn-press-reset-user-item .action-reset.dashicons-trash {
|
3064 |
+
color: #FF0000; }
|
3065 |
+
#learn-press-reset-course-users .action-reset.dashicons-update,
|
3066 |
+
#learn-press-reset-user-courses .action-reset.dashicons-update,
|
3067 |
+
#learn-press-reset-user-item .action-reset.dashicons-update {
|
3068 |
+
-webkit-animation: rotating4 2s linear infinite;
|
3069 |
+
-moz-animation: rotating4 2s linear infinite;
|
3070 |
+
-ms-animation: rotating4 2s linear infinite;
|
3071 |
+
-o-animation: rotating4 2s linear infinite;
|
3072 |
+
animation: rotating4 2s linear infinite; }
|
3073 |
+
|
3074 |
+
.learn-press-tip {
|
3075 |
+
display: none;
|
3076 |
+
line-height: 1;
|
3077 |
+
margin: 0 5px;
|
3078 |
+
font-size: 16px;
|
3079 |
+
vertical-align: baseline;
|
3080 |
+
cursor: pointer;
|
3081 |
+
font-style: normal; }
|
3082 |
+
.learn-press-tip.ready {
|
3083 |
+
display: inline-block; }
|
3084 |
+
.learn-press-tip:before {
|
3085 |
+
font-family: Fontawesome;
|
3086 |
+
content: "\f059"; }
|
3087 |
+
.learn-press-tip:hover {
|
3088 |
+
color: #0073aa; }
|
3089 |
+
|
3090 |
+
.learn-press-tip-floating {
|
3091 |
+
background: rgba(39, 115, 170, 0.9);
|
3092 |
+
padding: 8px 10px;
|
3093 |
+
line-height: 1.2em;
|
3094 |
+
color: #FFF;
|
3095 |
+
min-width: 20px;
|
3096 |
+
position: absolute;
|
3097 |
+
margin-left: -1px;
|
3098 |
+
font-size: 12px;
|
3099 |
+
z-index: 9999;
|
3100 |
+
-webkit-border-radius: 3px;
|
3101 |
+
-moz-border-radius: 3px;
|
3102 |
+
border-radius: 3px; }
|
3103 |
+
.learn-press-tip-floating .close {
|
3104 |
+
display: inline-block;
|
3105 |
+
position: absolute;
|
3106 |
+
width: 16px;
|
3107 |
+
height: 16px;
|
3108 |
+
right: -8px;
|
3109 |
+
top: -8px;
|
3110 |
+
border: 1px solid #FFF;
|
3111 |
+
text-align: center;
|
3112 |
+
line-height: 16px;
|
3113 |
+
background: #468fbc;
|
3114 |
+
color: #FFF;
|
3115 |
+
cursor: pointer;
|
3116 |
+
-webkit-border-radius: 50%;
|
3117 |
+
-moz-border-radius: 50%;
|
3118 |
+
border-radius: 50%; }
|
3119 |
+
.learn-press-tip-floating .close:before {
|
3120 |
+
content: "\f00d";
|
3121 |
+
font-family: Fontawesome; }
|
3122 |
+
.learn-press-tip-floating p {
|
3123 |
+
margin: 0; }
|
3124 |
+
.learn-press-tip-floating:before {
|
3125 |
+
content: '';
|
3126 |
+
position: absolute;
|
3127 |
+
width: 0;
|
3128 |
+
height: 0;
|
3129 |
+
bottom: -7px;
|
3130 |
+
border: 7px solid transparent;
|
3131 |
+
border-top-color: rgba(39, 115, 170, 0.9);
|
3132 |
+
border-bottom-width: 0;
|
3133 |
+
left: 50%;
|
3134 |
+
margin-left: -7px; }
|
3135 |
+
|
3136 |
+
@media screen and (max-width: 782px) {
|
3137 |
+
.learn-press-dropdown-pages .select2-container {
|
3138 |
+
vertical-align: top; }
|
3139 |
+
.learn-press-dropdown-pages .select2-container .select2-selection--single {
|
3140 |
+
height: 31px; }
|
3141 |
+
.learn-press-dropdown-pages .select2-selection__rendered {
|
3142 |
+
line-height: 31px !important; }
|
3143 |
+
#learn-press-advertisement {
|
3144 |
+
margin: 0 12px;
|
3145 |
+
padding-bottom: 0; }
|
3146 |
+
#learn-press-advertisement .slider-controls {
|
3147 |
+
bottom: 40px; } }
|
3148 |
+
|
3149 |
+
.rtl .section-item-counts {
|
3150 |
+
left: 41px;
|
3151 |
+
right: auto; }
|
3152 |
+
|
3153 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .heading .status {
|
3154 |
+
margin-right: 10px; }
|
3155 |
+
|
3156 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .collapse-sections {
|
3157 |
+
left: 0;
|
3158 |
+
right: unset !important; }
|
3159 |
+
|
3160 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .title {
|
3161 |
+
margin-right: 5px; }
|
3162 |
+
|
3163 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions {
|
3164 |
+
left: 0;
|
3165 |
+
right: unset !important; }
|
3166 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .ui-sortable {
|
3167 |
+
right: unset !important;
|
3168 |
+
left: 0; }
|
3169 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .section-list-items .section-item .item-actions .actions .ui-sortable li {
|
3170 |
+
text-align: left; }
|
3171 |
+
|
3172 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .section-actions .remove {
|
3173 |
+
float: left; }
|
3174 |
+
|
3175 |
+
.rtl #admin-editor-lp_course .lp-course-curriculum .actions {
|
3176 |
+
right: unset !important;
|
3177 |
+
left: 0; }
|
3178 |
+
|
3179 |
+
.rtl #admin-editor-lp_quiz .lp-list-questions .question-item .lp-toolbar-btn-dropdown ul {
|
3180 |
+
left: 0;
|
3181 |
+
right: unset !important; }
|
3182 |
+
.rtl #admin-editor-lp_quiz .lp-list-questions .question-item .lp-toolbar-btn-dropdown ul li a {
|
3183 |
+
text-align: left; }
|
3184 |
+
|
3185 |
+
.rtl #admin-editor-lp_quiz .add-new-question {
|
3186 |
+
text-align: right; }
|
3187 |
+
|
3188 |
+
.rtl #lp-modal-choose-items .header .preview-title {
|
3189 |
+
padding-right: 20px; }
|
3190 |
+
|
3191 |
+
.rtl #lp-modal-choose-items .header .close {
|
3192 |
+
left: 0;
|
3193 |
+
right: unset; }
|
3194 |
+
|
3195 |
+
.button.disabled {
|
3196 |
+
pointer-events: none; }
|
3197 |
+
|
3198 |
+
.lp-notice,
|
3199 |
+
.learn-press-notice {
|
3200 |
+
position: relative;
|
3201 |
+
padding: 12px; }
|
3202 |
+
.lp-notice h4,
|
3203 |
+
.learn-press-notice h4 {
|
3204 |
+
margin: 10px 0 15px; }
|
3205 |
+
.lp-notice p,
|
3206 |
+
.learn-press-notice p {
|
3207 |
+
margin: 0 0 5px 0;
|
3208 |
+
padding: 0 2px; }
|
3209 |
+
.lp-notice.lp-upgrade-notice,
|
3210 |
+
.learn-press-notice.lp-upgrade-notice {
|
3211 |
+
background: #BCEFFE;
|
3212 |
+
border-left-color: #02B7FB;
|
3213 |
+
position: relative; }
|
3214 |
+
.lp-notice.lp-upgrade-notice .close-notice,
|
3215 |
+
.learn-press-notice.lp-upgrade-notice .close-notice {
|
3216 |
+
position: absolute;
|
3217 |
+
top: 5px;
|
3218 |
+
right: 10px; }
|
3219 |
+
.lp-notice .lp-message-dismiss,
|
3220 |
+
.learn-press-notice .lp-message-dismiss {
|
3221 |
+
position: absolute;
|
3222 |
+
right: 12px;
|
3223 |
+
top: 12px; }
|
3224 |
+
.lp-notice .notice-dismiss,
|
3225 |
+
.learn-press-notice .notice-dismiss {
|
3226 |
+
position: absolute;
|
3227 |
+
top: 0;
|
3228 |
+
right: 1px;
|
3229 |
+
border: none;
|
3230 |
+
margin: 0;
|
3231 |
+
padding: 9px;
|
3232 |
+
background: 0 0;
|
3233 |
+
color: #72777c;
|
3234 |
+
cursor: pointer;
|
3235 |
+
outline: none;
|
3236 |
+
-webkit-box-shadow: none;
|
3237 |
+
-moz-box-shadow: none;
|
3238 |
+
box-shadow: none; }
|
3239 |
+
.lp-notice .notice-dismiss:before,
|
3240 |
+
.learn-press-notice .notice-dismiss:before {
|
3241 |
+
background: 0 0;
|
3242 |
+
color: #72777c;
|
3243 |
+
content: "\f153";
|
3244 |
+
display: block;
|
3245 |
+
font: normal 16px/20px dashicons;
|
3246 |
+
speak: none;
|
3247 |
+
height: 20px;
|
3248 |
+
text-align: center;
|
3249 |
+
width: 20px;
|
3250 |
+
-webkit-font-smoothing: antialiased; }
|
3251 |
+
|
3252 |
+
.learn-press-dropdown-pages {
|
3253 |
+
display: inline-block; }
|
3254 |
+
|
3255 |
+
.lp-notice-update-database {
|
3256 |
+
border-left-color: #FF0000; }
|
3257 |
+
.lp-notice-update-database.do-updating:before {
|
3258 |
+
display: inline-block;
|
3259 |
+
content: "\f463";
|
3260 |
+
font-family: dashicons;
|
3261 |
+
font-size: 20px;
|
3262 |
+
float: left;
|
3263 |
+
margin: 9px 5px 0 -5px;
|
3264 |
+
color: #2773aa;
|
3265 |
+
-webkit-animation: rotating4 2s linear infinite;
|
3266 |
+
-moz-animation: rotating4 2s linear infinite;
|
3267 |
+
-ms-animation: rotating4 2s linear infinite;
|
3268 |
+
-o-animation: rotating4 2s linear infinite;
|
3269 |
+
animation: rotating4 2s linear infinite; }
|
3270 |
+
|
3271 |
+
#adminmenu .update-plugins.lp-plugins-count {
|
3272 |
+
padding: 0 5px; }
|
3273 |
+
|
3274 |
+
.search-box input[name="post-search-author"],
|
3275 |
+
.search-box .select2-container {
|
3276 |
+
margin: 0;
|
3277 |
+
min-width: 200px;
|
3278 |
+
vertical-align: top; }
|
3279 |
+
|
3280 |
+
.learn-press-notice-assigned-item {
|
3281 |
+
color: #FF0000; }
|
3282 |
+
|
3283 |
+
.learnpress .actions {
|
3284 |
+
margin: 0; }
|
3285 |
+
|
3286 |
+
#learn-press-syncs li {
|
3287 |
+
position: relative; }
|
3288 |
+
#learn-press-syncs li.syncing, #learn-press-syncs li.synced {
|
3289 |
+
padding-left: 24px; }
|
3290 |
+
#learn-press-syncs li.syncing input[type="checkbox"], #learn-press-syncs li.synced input[type="checkbox"] {
|
3291 |
+
display: none; }
|
3292 |
+
#learn-press-syncs li.syncing:after {
|
3293 |
+
content: "\f463";
|
3294 |
+
-webkit-animation: rotating4 2s linear infinite;
|
3295 |
+
-moz-animation: rotating4 2s linear infinite;
|
3296 |
+
-ms-animation: rotating4 2s linear infinite;
|
3297 |
+
-o-animation: rotating4 2s linear infinite;
|
3298 |
+
animation: rotating4 2s linear infinite; }
|
3299 |
+
#learn-press-syncs li.synced:after {
|
3300 |
+
content: "\f147";
|
3301 |
+
color: #2773aa; }
|
3302 |
+
#learn-press-syncs li:after {
|
3303 |
+
font-family: dashicons;
|
3304 |
+
display: block;
|
3305 |
+
position: absolute;
|
3306 |
+
left: -3px;
|
3307 |
+
top: 0px;
|
3308 |
+
height: 24px;
|
3309 |
+
width: 24px;
|
3310 |
+
font-size: 19px;
|
3311 |
+
text-align: center;
|
3312 |
+
line-height: 24px; }
|
3313 |
+
|
3314 |
+
#learn-press-updater .updater-progress {
|
3315 |
+
position: relative;
|
3316 |
+
margin: 0 2px; }
|
3317 |
+
#learn-press-updater .updater-progress ul {
|
3318 |
+
display: flex;
|
3319 |
+
height: 5px;
|
3320 |
+
position: relative;
|
3321 |
+
background: #EEE; }
|
3322 |
+
#learn-press-updater .updater-progress ul li {
|
3323 |
+
flex: 1;
|
3324 |
+
position: relative;
|
3325 |
+
margin: 0; }
|
3326 |
+
#learn-press-updater .updater-progress ul li:after {
|
3327 |
+
content: attr(data-version);
|
3328 |
+
background: #DDD;
|
3329 |
+
padding: 3px 5px;
|
3330 |
+
border-radius: 3px;
|
3331 |
+
font-size: 12px;
|
3332 |
+
color: #FFF;
|
3333 |
+
position: absolute;
|
3334 |
+
right: 0;
|
3335 |
+
top: -30px;
|
3336 |
+
display: none; }
|
3337 |
+
#learn-press-updater .updater-progress ul li:before {
|
3338 |
+
content: ''; }
|
3339 |
+
#learn-press-updater .updater-progress ul li:last-child:after {
|
3340 |
+
_display: block; }
|
3341 |
+
#learn-press-updater .updater-progress ul:after {
|
3342 |
+
height: 20px;
|
3343 |
+
position: absolute;
|
3344 |
+
top: 0;
|
3345 |
+
left: 0;
|
3346 |
+
width: 0; }
|
3347 |
+
#learn-press-updater .updater-progress .updater-progress-status {
|
3348 |
+
position: absolute;
|
3349 |
+
height: 5px;
|
3350 |
+
top: 0;
|
3351 |
+
left: 0;
|
3352 |
+
width: 0;
|
3353 |
+
background: #5bc4f9;
|
3354 |
+
-webkit-transition: width 0.25s;
|
3355 |
+
-moz-transition: width 0.25s;
|
3356 |
+
-ms-transition: width 0.25s;
|
3357 |
+
-o-transition: width 0.25s;
|
3358 |
+
transition: width 0.25s; }
|
3359 |
+
#learn-press-updater .updater-progress .updater-progress-status:before {
|
3360 |
+
_content: attr(data-value) "%";
|
3361 |
+
position: absolute;
|
3362 |
+
top: -20px;
|
3363 |
+
right: 0;
|
3364 |
+
background: #5bc4f9;
|
3365 |
+
padding: 0 5px;
|
3366 |
+
font-size: 12px;
|
3367 |
+
color: #FFF;
|
3368 |
+
border-radius: 3px; }
|
3369 |
+
#learn-press-updater .updater-progress .updater-progress-status .updater-progress-animation {
|
3370 |
+
position: absolute;
|
3371 |
+
height: 5px;
|
3372 |
+
top: 0;
|
3373 |
+
left: 0;
|
3374 |
+
width: 100%;
|
3375 |
+
background: #5bc4f9;
|
3376 |
+
overflow: hidden; }
|
3377 |
+
#learn-press-updater .updater-progress .updater-progress-status .updater-progress-animation:not(.completed):after {
|
3378 |
+
content: '';
|
3379 |
+
height: 5px;
|
3380 |
+
background: #8dd9ff;
|
3381 |
+
position: absolute;
|
3382 |
+
-webkit-animation: animation4 1.5s ease-out infinite;
|
3383 |
+
-moz-animation: animation4 1.5s ease-out infinite;
|
3384 |
+
-ms-animation: animation4 1.5s ease-out infinite;
|
3385 |
+
-o-animation: animation4 1.5s ease-out infinite;
|
3386 |
+
animation: animation4 1.5s ease-out infinite; }
|
3387 |
+
|
3388 |
+
#learn-press-updater .updating-message {
|
3389 |
+
color: #a24666; }
|
3390 |
+
|
3391 |
+
#learn-press-updater .completed-message {
|
3392 |
+
color: #3c8eb7; }
|
3393 |
+
|
3394 |
+
#learn-press-updater {
|
3395 |
+
display: none; }
|
assets/js/admin/utils.js
CHANGED
@@ -876,7 +876,8 @@ Object(_utils_extend__WEBPACK_IMPORTED_MODULE_0__["default"])('Utils', {
|
|
876 |
url: lpGlobalSettings.ajax,
|
877 |
data: {
|
878 |
action: 'learnpress_create_page',
|
879 |
-
page_name: page_name
|
|
|
880 |
},
|
881 |
type: 'post',
|
882 |
dataType: 'html',
|
876 |
url: lpGlobalSettings.ajax,
|
877 |
data: {
|
878 |
action: 'learnpress_create_page',
|
879 |
+
page_name: page_name,
|
880 |
+
'lp-settings-nonce': $('input[name=lp-settings-nonce]').val()
|
881 |
},
|
882 |
type: 'post',
|
883 |
dataType: 'html',
|
assets/js/admin/utils.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=29)}([,function(e,t,n){"use strict";t.a=function(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}},function(e,t){!function(e){function t(t,n){var i=e(t),a=i.attr("data-id")||LP.uniqueId();n=e.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,i.data()),i.attr("data-id",a);var s=i.attr("data-content-tip")||i.html(),o=e('<div class="learn-press-tip-floating">'+s+"</div>"),r=null,c=0,l=!1,d="el"===n.arrowOffset?i.outerWidth()/2:8,u=e("#__"+a);function h(){if(r)clearTimeout(r);else{n.single&&e(".learn-press-tip").not(i).LP("QuickTip","close"),o.appendTo(document.body);var t=i.offset();o.css({top:t.top-o.outerHeight()-8,left:t.left-o.outerWidth()/2+d})}}function f(){r&&clearTimeout(r),r=setTimeout((function(){o.detach(),r=null}),c)}function p(){c=0,f(),c=n.closeInterval}return 0===u.length&&e(document.body).append(e("<div />").attr("id","__"+a).html(s).css("display","none")),s=u.html(),o.addClass(n.tipClass),i.data("content-tip",s),i.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(o.append('<a class="close"></a>'),o.on("click",".close",(function(){p()}))),l||i.html(""),"click"===n.event&&i.on("click",(function(e){e.stopPropagation(),h()})),e(document).on("learn-press/close-all-quick-tip",(function(){p()})),i.hover((function(e){e.stopPropagation(),"click"!==n.event&&h()}),(function(e){e.stopPropagation(),n.autoClose&&f()})).addClass("ready"),{close:p,open:function(){h()}}}e.fn.LP("QuickTip",(function(n){return e.each(this,(function(){var i=e(this).data("quick-tip");i||(i=new t(this,n),e(this).data("quick-tip",i)),"string"===e.type(n)&&i[n]&&i[n].apply(i)}))}))}(jQuery)},function(e,t,n){"use strict";function i(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}n.d(t,"a",(function(){return i}))},,function(e,t,n){"use strict";n.r(t);var i,a=n(1),s=window.jQuery;void 0!==s&&(s.fn.LP=i=function(e,t){if(s.isFunction(t))s.fn["LP_"+e]=t;else if(e){var n=[];if(arguments.length>1)for(var i=1;i<arguments.length;i++)n.push(arguments[i]);return s.isFunction(s(this)["LP_"+e])?s(this)["LP_"+e].apply(this,n):this}return this});var o=i,r=n(2),c=n.n(r),l=window.jQuery,d={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm:function(e,t){var n=l(e);l("[learn-press-quick-confirm]").each((function(){var e;(e=l(this).data("quick-confirm"))&&(console.log(e),e.destroy())})),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(e,t){var n=l(e),i=l('<span class="learn-press-quick-confirm"></span>').insertAfter(n),a=l(e).position()||{left:0,top:0},s=null,o=null,r=3,c=function(){i.fadeOut("fast",(function(){l(this).remove(),i.parent().css("position","")})),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),d()},d=function(){o&&clearInterval(o),s&&clearInterval(s)},u=function(){s=setInterval((function(){0==--r&&(c.call(i[0]),l.isFunction(t.onCancel)&&t.onCancel(t.data),d()),i.find("span").html(" ("+r+")")}),1e3),o=setInterval((function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(d(),i.remove(),i.parent().css("position",""),l.isFunction(t.onCancel)&&t.onCancel(t.data))}),350)};t=l.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},t||{}),i.html(t.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+r+")</span>").css({}),i.click((function(){l.isFunction(t.onOk)&&t.onOk(t.data),c()})).hover((function(){d()}),(function(){u()})),i.css({left:a.left+n.outerWidth()-i.outerWidth()+t.offset.left,top:a.top+n.outerHeight()+t.offset.top+5}).hide().fadeIn("fast"),u(),this.destroy=function(){i.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),d()}}(e,t))},show:function(e,t){l.proxy((function(){t=l.extend({title:"",buttons:"",events:!1,autohide:!1,message:e,data:!1,id:LP.uniqueId(),onHide:null},t||{}),this.instances.push(t),this.instance=t;l(document);var n=l(document.body);this.$block||(this.$block=l('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=l('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click((function(){}))),this._createWindow(e,t.title,t.buttons),this.$block.show(),this.$window.show().attr("instance",t.id),l(window).bind("resize.message-box",l.proxy(this.update,this)).bind("scroll.message-box",l.proxy(this.update,this)),this.update(!0),t.autohide&&setTimeout((function(){LP.MessageBox.hide(),l.isFunction(t.onHide)&&t.onHide.call(LP.MessageBox,t)}),t.autohide)}),this)()},blockUI:function(e){e=(!1!==e?e||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(e)},hide:function(e,t){t?this._removeInstance(t.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),l(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update:function(e){var t=this,n=this.$window.find("#message-box-wrap"),i=n.data("timer"),a=function(){LP.Hook.doAction("learn_press_message_box_before_resize",t);var e=n.find(".message-box-content").css("height","").css("overflow","hidden"),i=(n.outerWidth(),n.outerHeight()),a=e.height(),s=l(window).height();n.offset().top;a>s-50?(e.css({height:s-25}),i=n.outerHeight()):e.css("height","").css("overflow",""),n.css({marginTop:(l(window).height()-i)/2}),LP.Hook.doAction("learn_press_message_box_resize",i,t)};e&&a(),i&&clearTimeout(i),i=setTimeout(a,250)},_removeInstance:function(e){for(var t=0;t<this.instances.length;t++)if(this.instances[t].id===e){this.instances.splice(t,1);var n=this.instances.length;n?(this.instance=this.instances[n-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance:function(e){for(var t=0;t<this.instances.length;t++)if(this.instances[t].id===e)return this.instances[t]},_createWindow:function(e,t,n){var i=this.$window.find("#message-box-wrap").html("");if(t&&i.append('<h3 class="message-box-title">'+t+"</h3>"),i.append(l('<div class="message-box-content"></div>').html(e)),n){var a=l('<div class="message-box-buttons"></div>');switch(n){case"yesNo":a.append(this._createButton(LP_Settings.localize.button_yes,"yes")),a.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":a.append(this._createButton(LP_Settings.localize.button_ok,"ok")),a.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:a.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}i.append(a)}},_createButton:function(e,t){var n=l('<button type="button" class="button message-box-button message-box-button-'+t+'">'+e+"</button>"),i="on"+(t.substr(0,1).toUpperCase()+t.substr(1));return n.data("callback",i).click((function(){var e=l(this).data("instance"),t=e.events[l(this).data("callback")];"function"===l.type(t)&&!1===t.apply(LP.MessageBox,[e])||LP.MessageBox.hide(null,e)})).data("instance",this.instance),n}},u=function(e){var t={},n=window.jQuery;this.on=function(n,i){var a=n.split("."),s="";return a.length>1&&(n=a[0],s=a[1]),t[n]||(t[n]=[[],{}]),s?(t[n][1][s]||(t[n][1][s]=[]),t[n][1][s].push(i)):t[n][0].push(i),e},this.off=function(i,a){var s=i.split("."),o="";if(s.length>1&&(i=s[0],o=s[1]),!t[i])return e;var r=-1;if(o){if(!t[i][1][o])return e;if(n.isFunction(a)){if((r=t[i][1][o].indexOf(a))<0)return e;t[i][1][o].splice(r,1)}else t[i][1][o]=[]}else if(n.isFunction(a)){if((r=t[i][0].indexOf(a))<0)return e;t[i][0].splice(r,1)}else t[i][0]=[];return e},this.callEvent=function(i,a){if(t[i]){if(t[i][0])for(var s=0;s<t[i][0].length;s++)n.isFunction(t[i][0][s])&&t[i][s][0].apply(e,a);if(t[i][1])for(var s in t[i][1])for(var o=0;o<t[i][1][s].length;o++)n.isFunction(t[i][1][s][o])&&t[i][1][s][o].apply(e,a)}}},h={hooks:{action:{},filter:{}},addAction:function(e,t,n,i){return this.addHook("action",e,t,n,i),this},addFilter:function(e,t,n,i){return this.addHook("filter",e,t,n,i),this},doAction:function(e){return this.doHook("action",e,arguments),this},applyFilters:function(e){return this.doHook("filter",e,arguments)},removeAction:function(e,t){return this.removeHook("action",e,t),this},removeFilter:function(e,t,n){return this.removeHook("filter",e,t,n),this},addHook:function(e,t,n,i,a){void 0===this.hooks[e][t]&&(this.hooks[e][t]=[]);var s=this.hooks[e][t];return void 0===a&&(a=t+"_"+s.length),this.hooks[e][t].push({tag:a,callable:n,priority:i}),this},doHook:function(e,t,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[e][t]){var i,a=this.hooks[e][t];a.sort((function(e,t){return e.priority-t.priority}));for(var s=0;s<a.length;s++)"function"!=typeof(i=a[s].callable)&&(i=window[i]),"action"===e?i.apply(null,n):n[0]=i.apply(null,n)}return"filter"===e?n[0]:this},removeHook:function(e,t,n,i){if(void 0!==this.hooks[e][t])for(var a=this.hooks[e][t],s=a.length-1;s>=0;s--)void 0!==i&&i!==a[s].tag||void 0!==n&&n!==a[s].priority||a.splice(s,1);return this}};n(7);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=jQuery;String.prototype.getQueryVar=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(this);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(e,t){var n=this,i=n.split("#");return n=i[0],e.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=e+"="+t):-1!=n.indexOf("&"+e+"=")||-1!=n.indexOf("?"+e+"=")?n=n.replace(new RegExp(e+"=([^&#]*)","g"),e+"="+t):(n+=n.match(/\?/)?"&":"?",n+=e+"="+t),n+(i[1]?"#"+i[1]:"")},String.prototype.removeQueryVar=function(e){var t=this,n=t.split("#");t=n[0],e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+e+"([[][^=]*)?=([^&#]*)","g");return(t=t.replace(i,""))+(n[1]?"#"+n[1]:"")},0==v.isEmptyObject("")&&(v.isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0});var m={Hook:h,setUrl:function(e,t,n){e&&(history.pushState({},n,e),LP.Hook.doAction("learn_press_set_location_url",e))},toggleGroupSection:function(e,t){var n=v(e);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle((function(){v(this).is(":visible")?v(t).addClass("toggle-on").removeClass("toggle-off"):v(t).addClass("toggle-off").removeClass("toggle-on")}))},overflow:function(e,t){var n=v(e),i=n.css("overflow");t?n.css("overflow",t).data("overflow",i):n.css("overflow",n.data("overflow"))},getUrl:function(){return window.location.href},addQueryVar:function(e,t,n){return(void 0===n?window.location.href:n).addQueryVar(e,t)},removeQueryVar:function(e,t){return(void 0===t?window.location.href:t).removeQueryVar(e)},reload:function(e){e||(e=window.location.href),window.location.href=e},parseResponse:function(e,t){var n=e.match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/);return n&&(e=n[1]),"json"===(t||"json")?this.parseJSON(e):e},parseJSON:function(e){var t=(e+"").match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/);try{e=t?v.parseJSON(t[1]):v.parseJSON(e)}catch(t){e={}}return e},ajax:function(e){var t=e.type||"post",n=e.dataType||"json",i=e.action?v.extend(e.data,{"lp-ajax":e.action}):e.data,a=e.beforeSend||function(){},s=e.url||window.location.href;v.ajax({data:i,url:s,type:t,dataType:"html",beforeSend:a.apply(null,e),success:function(t){var i=LP.parseResponse(t,n);v.isFunction(e.success)&&e.success(i,t)},error:function(){v.isFunction(e.error)&&e.error.apply(null,LP.funcArgs2Array())}})},doAjax:function(e){var t=e.type||"post",n=e.dataType||"json",i=(void 0===e.prefix||"learnpress_")+e.action,a=e.action?v.extend(e.data,{action:i}):e.data;v.ajax({data:a,url:e.url||window.location.href,type:t,dataType:"html",success:function(t){var i=LP.parseResponse(t,n);v.isFunction(e.success)&&e.success(i,t)},error:function(){v.isFunction(e.error)&&e.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},addFilter:function(e,t){var n=v(document),i="LP."+e;return n.on(i,t),LP.log(n.data("events")),this},applyFilters:function(){var e=v(document),t=arguments[0],n=this.funcArgs2Array(arguments);return e.hasEvent(t)?(n[0]="LP."+t,e.triggerHandler.apply(e,n)):n[1]},addAction:function(e,t){return this.addFilter(e,t)},doAction:function(){var e=v(document),t=arguments[0],n=this.funcArgs2Array(arguments);e.hasEvent(t)&&(n[0]="LP."+t,e.trigger.apply(e,n))},toElement:function(e,t){if(0!==v(e).length){t=v.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},t||{});var n,i=v(t.container);0===i.length&&(i=v("body, html")),n=i.offset().top;var a=v(e).offset().top+i.scrollTop()-n-t.offset;t.invisible&&function(e,t){var n=i.scrollTop(),a=n+i.height(),s=v(e).offset().top-i.offset().top,o=s+v(e).height();return!0===t?n<s&&a>o:s<=a&&o>=n}(e,!0)||i.fadeIn(10).delay(t.delay).animate({scrollTop:a},t.duration,t.callback)}},uniqueId:function(e,t){var n;void 0===e&&(e="");var i=function(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?new Array(t-e.length+1).join("0")+e:e};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=e,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(this.php_js.uniqidSeed,5),t&&(n+=(10*Math.random()).toFixed(8).toString()),n},log:function(){for(var e=0,t=arguments.length;e<t;e++)console.log(arguments[e])},blockContent:function(){0===v("#learn-press-block-content").length&&v(LP.template("learn-press-template-block-content",{})).appendTo(v("body")),LP.hideMainScrollbar().addClass("block-content"),v(document).trigger("learn_press_block_content")},unblockContent:function(){setTimeout((function(){LP.showMainScrollbar().removeClass("block-content"),v(document).trigger("learn_press_unblock_content")}),350)},hideMainScrollbar:function(e){e||(e="html, body");var t=v(e);return t.each((function(){var e=v(this),t=e.css("overflow");e.css("overflow","hidden").attr("overflow",t)})),t},showMainScrollbar:function(e){e||(e="html, body");var t=v(e);return t.each((function(){var e=v(this),t=e.attr("overflow");e.css("overflow",t).removeAttr("overflow")})),t},template:"undefined"!=typeof _?_.memoize((function(e,t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},a=function(t){return(n=n||_.template(v("#"+e).html(),null,i))(t)};return t?a(t):a}),(function(e,t){return e+"-"+JSON.stringify(t)})):function(){return""},alert:function(e,t){var n="",i="";"string"==typeof e?i=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(i=e.message)),v.alerts.alert(i,n,(function(e){LP._on_alert_hide(),t&&t(e)})),this._on_alert_show()},confirm:function(e,t){var n="",i="";"string"==typeof e?i=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(i=e.message)),v.alerts.confirm(i,n,(function(e){LP._on_alert_hide(),t&&t(e)})),this._on_alert_show()},_on_alert_show:function(){var e=v("#popup_container");v('<span id="popup_container_placeholder" />').insertAfter(e).data("xxx",e);e.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide:function(){var e=v("#popup_container_placeholder"),t=e.data("xxx");t&&t.replaceWith(e),t.appendTo(v(document.body)),t.stop().animate({top:"+=50",opacity:0},250,(function(){v(this).remove()}))},sendMessage:function(e,t,n,i){v.isPlainObject(e)&&(e=JSON.stringify(e)),n=n||"*",(t=t||window).postMessage(e,n,i)},receiveMessage:function(e,t){var n=e.origin||e.originalEvent.origin,i=e.data||e.originalEvent.data||"";("string"==typeof i||i instanceof String)&&0===i.indexOf("{")&&(i=LP.parseJSON(i)),LP.Hook.doAction("learn_press_receive_message",i,n)}};v(document).ready((function(){var e,t;void 0!==v.alerts&&(v.alerts.overlayColor="#000",v.alerts.overlayOpacity=.5,v.alerts.okButton=lpGlobalSettings.localize.button_ok,v.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),v(".learn-press-message.fixed").each((function(){var e=v(this),t=e.data();!function(e,t){t.delayIn&&setTimeout((function(){e.show().hide().fadeIn()}),t.delayIn),t.delayOut&&setTimeout((function(){e.fadeOut()}),t.delayOut+(t.delayIn||0))}(e,t)})),v("body").on("click",".learn-press-nav-tabs li a",(function(e){e.preventDefault();var t=v(this);t.closest("li").addClass("active").siblings().removeClass("active"),v(t.attr("data-tab")).addClass("active").siblings().removeClass("active"),v(document).trigger("learn-press/nav-tabs/clicked",t)})),setTimeout((function(){v(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")}),300),v("body.course-item-popup").parent().css("overflow","hidden"),e=null,t=function(){v(".auto-check-lines").checkLines((function(e){e>1?v(this).removeClass("single-lines"):v(this).addClass("single-lines"),v(this).attr("rows",e)}))},v(window).on("resize.check-lines",(function(){e?(e&&clearTimeout(e),e=setTimeout(t,300)):t()})),v(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),v(".learn-press-icon").LP_Tooltip({offset:[30,30]}),v(".learn-press-message[data-autoclose]").each((function(){var e=v(this),t=parseInt(e.data("autoclose"));t&&setTimeout((function(e){e.fadeOut()}),t,e)})),v(document).on("click",(function(){v(document).trigger("learn-press/close-all-quick-tip")}))})),Object(a.a)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({Event_Callback:u,MessageBox:d},m));t.default={fn:o,QuickTip:c.a}},,function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $=window.jQuery,serializeJSON=function serializeJSON(path){var isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea"),unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,(function(){var that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(match){var keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=_typeof(indexed[match[0]])&&(indexed[match[0]]={}),$.each(keys,(function(i,prop){prop=prop.replace(/\]|\[/g,"");var rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);var evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(e){console.log("Error:"+e+"\n"+objExp)}}))):indexed[match[0]]=this.value}})),path){path="['"+path.replace(".","']['")+"']";var c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=function(e){return e=$.extend({},{offset:[0,0]},e||{}),$.each(this,(function(){var t=$(this),n=t.data("content");if(n&&void 0===t.data("LP_Tooltip")){var i=null;t.hover((function(a){i=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();var s=t.offset();if($.isArray(e.offset)){var o=e.offset[1],r=e.offset[0];$.isNumeric(r)&&(s.left+=r),$.isNumeric(o)&&(s.top+=o)}i.css({top:s.top,left:s.left}),i.fadeIn()}),(function(){i&&i.remove()})),t.data("tooltip",!0)}}))},hasEvent=function(e){var t=$(this).data("events");if(void 0===t.LP)return!1;for(i=0;i<t.LP.length;i++)if(t.LP[i].namespace==e)return!0;return!1},dataToJSON=function(){var e={};return $.each(this[0].attributes,(function(){var t=this.name.match(/^data-(.*)/);t&&(e[t[1]]=this.value)})),e},rows=function(){var e=$(this).height(),t=$(this).css("line-height").replace("px","");return $(this).attr({height:e,"line-height":t}),Math.floor(e/parseInt(t))},checkLines=function(e){return this.each((function(){var t=$(this).rows();e.call(this,t)}))},findNext=function(e){var t=$(e),n=this.first(),i=t.index(n),a=t.eq(i+1);return!!a.length&&a},findPrev=function(e){var t=$(e),n=this.first(),i=t.index(n),a=t.eq(i-1);return!!a.length&&a},progress=function(e){return this.each((function(){var t=parseInt(e/100*360),n=$(this);t<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+t+"deg)"})}))};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress;var _unused_webpack_default_export={serializeJSON:serializeJSON,LP_Tooltip:LP_Tooltip,hasEvent:hasEvent,dataToJSON:dataToJSON,rows:rows,checkLines:checkLines,findNext:findNext,findPrev:findPrev,progress:progress}},function(e,t){!function(e){window.conditional_logic_gray_state=function(t,n){t?e(this).removeClass("disabled"):e(this).addClass("disabled")};var t=window.Conditional_Logic=function(t){this.options=e.extend({},t||{}),this.updateAll()};t.prototype=e.extend(t.prototype,{evaluate:function(t,n){if(n&&n&&e.isArray(n.conditional)){var i=void 0,a=n.conditional;for(var s in a){var o=this.evaluateRequirement(a[s]),r=(a[s].combine||"and").toLowerCase();void 0!==o&&void 0!==i?i="and"===r?i&&o:i||o:void 0===i&&(i=o)}return i}},evaluateRequirement:function(t){if(t&&t.field){void 0===t.compare&&(t.compare="=");var n=e("#field-"+t.field);switch(t.state){case"show":return n.is(":visible");case"hide":return!n.is(":visible");default:var i="";switch(this.getFieldType(n)){case"yes-no":var a=n.find('input[type="checkbox"]');i=a.is(":checked")?a.val():"";break;case"radio":i=n.find("input:checked").val();break;default:i=n.find("input, select").val()}return this.compare(t.value,i,t.compare)}}},compare:function(t,n,i){var a=void 0;switch(i){case"===":a=n===t;break;case"==":case"=":case"equals":case"equal":a=n===t;break;case"!==":a=n!==t;break;case"!=":case"not equal":a=n!==t;break;case">=":case"greater or equal":case"equal or greater":a=n>=t;break;case"<=":case"smaller or equal":case"equal or smaller":a=n<=t;break;case">":case"greater":a=n>t;break;case"<":case"smaller":a=n<t;break;case"contains":case"in":var s,o;e.isArray(n)&&!e.isArray(t)?(s=n,o=t):e.isArray(t)&&!e.isArray(n)&&(s=t,o=n),s&&o?-1===e.inArray(o,s)&&(a=!1):-1===n.indexOf(t)&&-1===t.indexOf(n)&&(a=!1);break;default:a=n===t}return void 0===a||a},hasConditional:function(e,t){if(this.options.conditionals){if(!this.options.conditionals[t])return!1;for(var n in this.options.conditionals[t].conditional)if(this.options.conditionals[t].conditional[n].field===e)return this.options.conditionals[t];return!1}},update:function(t,n){var i=e(t),a=this.getFieldName(i);n=n||e(".rwmb-field"),_.forEach(n,(function(t){var n=e(t),s=this.getFieldName(n);if(s!==a){var o=this.hasConditional(a,s);if(o){var r=this.evaluate(i,o);void 0!==r&&("hide"===o.state&&(r=!r),e.isFunction(window[o.state_callback])?window[o.state_callback].call(n,r,n):n.toggle(r))}}}),this)},updateAll:function(){var t=e(".rwmb-field"),n=this;_.forEach(t,(function(i){var a=e(i),s=this.getFieldType(a),o=a.find(".rwmb-field-name").val();o&&(a.attr("id","field-"+o),-1!==_.indexOf(this.supportFields,s)&&a.find("input, select, textarea").on("change",(function(){n.update(e(this).closest(".rwmb-field"),t)})).trigger("change"))}),this)},getFieldType:function(t){var n=e(t);if(0===n.length)return!1;var i=n.get(0).className.match(/rwmb-([^\s]*)-wrapper/);return!!i&&i[1]},getFieldName:function(t){return e(t).find(".rwmb-field-name").val()},supportFields:["yes-no","text","number","radio"]}),e(document).ready((function(){void 0!==window.lp_conditional_logic&&new t({conditionals:lp_conditional_logic})}))}(jQuery)},,function(e,t){!function(e){function t(t,n){this.options=e.extend({},n||{});var i=e(t),a=i.find(".slide-item"),s=e('<div class="slider-controls"><div class="prev-item"></div><div class="next-item"></div></div>'),o=e('<div class="slider-items"></div>').append(a),r=0,c=null;function l(e){e=void 0!==e?e:r;var t=a.eq(e);t.show(),setTimeout((function(){t.addClass("slide-active")}),1),t.siblings().removeClass("slide-active"),c&&clearTimeout(c),c=setTimeout((function(){t.siblings().hide()}),500)}function d(){r<a.length-1?r++:r=0,l(r)}function u(){r>0?r--:r=a.length-1,l(r)}i.append(o),a.each((function(){e(this).append(s.clone())})),i.on("click",".next-item",d),i.on("click",".prev-item",u),l()}e.fn.LP("Advertisement",(function(n){return e.each(this,(function(){var i=e(this).data("LP_Advertisement_Slider");return i||(i=new t(this,n),e(this).data("LP_Advertisement_Slider",i)),this}))}))}(jQuery)},function(e,t){!function(){var e=window.jQuery;function t(t,n){this.options=e.extend({ID:"",name:"Add new page"},n||{});var i=e(t),a=i.find("select"),s=i.find(".list-pages-wrapper"),o=i.find(".quick-add-page-actions"),r=i.find(".quick-add-page-inline");a.change((function(){o.addClass("hide-if-js"),"add_new_page"===this.value?(s.addClass("hide-if-js"),r.removeClass("hide-if-js").find("input").focus().val("")):parseInt(this.value)&&(o.find("a.edit-page").attr("href","post.php?post="+this.value+"&action=edit"),o.find("a.view-page").attr("href",lpGlobalSettings.siteurl+"?page_id="+this.value),o.removeClass("hide-if-js"),a.attr("data-selected",this.value))})),a.css("width",a.width()+50).find("option").each((function(){e(this).html(e(this).html().replace(/ /g,""))})),a.select2({allowClear:!0}),a.on("select2:select",(function(e){e.params.data})),i.on("click",".quick-add-page-inline button",(function(){var t=e(this),n=r.find("input"),i=n.val();if(!i)return alert("Please enter the name of page"),void n.focus();t.prop("disabled",!0),e.ajax({url:lpGlobalSettings.ajax,data:{action:"learnpress_create_page",page_name:i},type:"post",dataType:"html",success:function(n){var i,o,c;(n=LP.parseJSON(n)).page?(i={ID:n.page.ID,name:n.page.post_title,positions:n.positions},o=e('<option value="'+i.ID+'">'+i.name+"</option>"),c=e.inArray(i.ID+"",i.positions),e(".learn-press-dropdown-pages select").each((function(){var t=e(this),n=o.clone();0==c?e("option",t).each((function(){if(parseInt(e(this).val()))return n.insertBefore(e(this)),!1})):c==i.positions.length-1?t.append(n):n.insertAfter(e('option[value="'+i.positions[c-1]+'"]',t))})),a.val(n.page.ID).focus().trigger("change"),r.addClass("hide-if-js")):n.error&&alert(n.error),t.prop("disabled",!1),s.removeClass("hide-if-js")}})})).on("click",".quick-add-page-inline a",(function(e){e.preventDefault(),r.addClass("hide-if-js"),a.val(a.attr("data-selected")+"").removeAttr("disabled").trigger("change"),s.removeClass("hide-if-js")})).on("click",".button-quick-add-page",(function(e){a.val("add_new_page").trigger("change")})).on("keypress keydown",'.quick-add-page-inline input[type="text"]',(function(t){13==t.keyCode&&"keypress"==t.type?(t.preventDefault(),e(this).siblings("button").trigger("click")):27==t.keyCode&&"keydown"==t.type&&e(this).siblings("a").trigger("click")}))}void 0!==e&&e.fn.LP("DropdownPages",(function(){return e.each(this,(function(){var n=e(this).data("DropdownPages");return n||(n=new t(this,{}),e(this).data("DropdownPages",n)),n}))}))}()},function(e,t){var n,i;n=jQuery,i=function(e,t){var i=this,a=n(e).hasClass("advanced-list")?n(e):n(".advanced-list",e);function s(e){a.children(":eq("+(e-1)+")").remove(),i.options.onRemove&&i.options.onRemove.call(i)}this.options=n.extend({template:'<li data-id="{{id}}"><span class="remove-item"></span><span>{{text}}</span> </li>'},t||{}),this.$el=a,a.on("click",".remove-item",(function(e){e.preventDefault(),s(a.children().index(n(this).closest("li"))+1)})),this.add=function(e,t){var s,o={},r=(s=n(i.options.template)).length?s.html():i.options.template;for(var c in n.isPlainObject(e)?o=n.extend({id:0,text:""},e):"string"==typeof e?o={id:"",text:e}:void 0!==e[0]&&(o={id:e[1]?e[1]:"",text:e[0]}),o){var l=new RegExp("{{"+c+"}}","g");r=r.replace(l,o[c])}if(r=n(r),void 0!==t){var d=a.children(":eq("+(t-1)+")");d.length?r.insertBefore(d):a.append(r)}else a.append(r);a.children().detach().each((function(){a.append("\n").append(this)})),i.options.onAdd&&i.options.onAdd.call(i)},this.remove=s},n.fn.LP("AdvancedList",(function(e){for(var t=[],a=1;a<arguments.length;a++)t.push(arguments[a]);return n.each(this,(function(){var a=n(this).data("advancedList");return a||(a=new i(this,e),n(this).data("advancedList",a)),"string"==typeof e&&n.isFunction(a[e])?a[e].apply(a,t):this}))}))},function(e,t){var n,i;n=jQuery,i=function(e,t){var i=e.find(".tabs-nav").find("li"),a=i.parent(),s=e.find(".tabs-content-container > li"),o=null,r=null;function c(e){var t=e.height(),n=a.outerHeight();t=t<n?n+2*parseInt(a.css("margin")):void 0,e.css("visibility","").css({height:t})}function l(){e.on("click",".tabs-nav a",(function(e){var t,a,l;e.preventDefault(),o=n(this).parent(),t=o,a=i.index(t),l=t.find("a").attr("href"),r=s.eq(a),t.addClass("active").siblings("li.active").removeClass("active"),r.show().css({visibility:"hidden"}),c(r),r.hide(),r.show(),r.siblings("li.active").fadeOut(0,(function(){r.addClass("active").siblings("li.active").removeClass("active")})),LP.setUrl(l)}))}l(),(o=i.filter(".active")).length||(o=i.first()),o.find("a").trigger("click"),n(window).on("resize.calculate-tab",(function(){c(e.find(".tabs-content-container .active").css("height",""))}))},n.fn.LP("AdminTab",(function(e){return e=n.extend({},e||{}),n.each(this,(function(){var t=n(this),a=t.data("learn-press/tabs");return a||(a=new i(t,e),t.data("learn-press/tabs",a)),t}))}))},function(e,t){var n=window.jQuery,i=window._;window.$Vue=window.$Vue||window.Vue,n(document).ready((function(){var e=!!$Vue&&$Vue.http;document.getElementById("vue-modal-search-users")&&$Vue&&($Vue.component("learn-press-modal-search-users",{template:"#learn-press-modal-search-users",data:function(){return{paged:1,term:"",hasUsers:!1,selected:[]}},watch:{show:function(e){e&&n(this.$refs.search).focus()}},props:["multiple","context","contextId","show","callbacks","textFormat","exclude"],created:function(){},methods:{doSearch:function(e){this.term=e.target.value,this.paged=1,this.search()},search:i.debounce((function(t){var a=this;e.post(window.location.href,{type:this.postType,context:this.context,context_id:this.contextId,term:t||this.term,paged:this.paged,multiple:this.multiple?"yes":"no",text_format:this.textFormat,exclude:this.exclude,"lp-ajax":"modal_search_users"},{emulateJSON:!0,params:{}}).then((function(e){var t=LP.parseJSON(e.body||e.bodyText);a.hasUsers=!!i.size(t.users),n(a.$el).find(".search-results").html(t.html).find('input[type="checkbox"]').each((function(){var e=parseInt(n(this).val());i.indexOf(a.selected,e)>=0&&(this.checked=!0)})),i.debounce((function(){n(a.$el).find(".search-nav").html(t.nav).find("a, span").addClass("button").filter("span").addClass("disabled")}),10)()}))}),500),loadPage:function(e){e.preventDefault();var t=n(e.target);if(!t.is("span")){if(t.hasClass("next"))this.paged++;else if(t.hasClass("prev"))this.paged--;else{var i=t.html();this.paged=parseInt(i)}this.search()}},selectItem:function(e){var t=n(e.target).closest("li"),a=t.find('input[type="checkbox"]'),s=parseInt(a.val()),o=i.findLastIndex(this.selected,{id:s});this.multiple?a.is(":checked")?-1===o&&this.selected.push(t.closest("li").data("data")):o>=0&&this.selected.splice(o,1):(e.preventDefault(),this.selected=[t.closest("li").data("data")],this.addUsers())},addUsers:function(){n(this.$el).find(".lp-result-item"),this.callbacks&&this.callbacks.addUsers&&this.callbacks.addUsers.call(this,this.selected),n(document).triggerHandler("learn-press/modal-add-users",this.selected)},close:function(){this.$emit("close")}}}),window.LP.$modalSearchUsers=new $Vue({el:"#vue-modal-search-users",data:{show:!1,term:"",multiple:!1,callbacks:{},textFormat:"{{display_name}} ({{email}})",exclude:0},methods:{open:function(e){i.each(e.data,(function(e,t){this[t]=e}),this),this.callbacks=e.callbacks,this.focusSearch()},close:function(){this.show=!1},focusSearch:i.debounce((function(){n('input[name="search"]',this.$el).focus()}),200)}}))}))},function(e,t){var n=window.jQuery,i=window._;window.$Vue=window.$Vue||window.Vue,n(document).ready((function(){var e=!!$Vue&&$Vue.http;document.getElementById("vue-modal-search-items")&&$Vue&&($Vue.component("learn-press-modal-search-items",{template:"#learn-press-modal-search-items",data:function(){return{paged:1,term:"",hasItems:!1,selected:[]}},watch:{show:function(e){e&&n(this.$refs.search).focus()}},props:["postType","context","contextId","show","callbacks","exclude"],created:function(){},mounted:function(){this.term="",this.paged=1,this.search()},methods:{doSearch:function(e){this.term=e.target.value,this.paged=1,this.search()},search:i.debounce((function(t){n("#modal-search-items").addClass("loading");var a=this;e.post(window.location.href,{type:this.postType,context:this.context,context_id:this.contextId,term:t||this.term,paged:this.paged,exclude:this.exclude,"lp-ajax":"modal_search_items"},{emulateJSON:!0,params:{}}).then((function(e){var t=LP.parseJSON(e.body||e.bodyText);a.hasItems=!!i.size(t.items),n("#modal-search-items").removeClass("loading"),n(a.$el).find(".search-results").html(t.html).find('input[type="checkbox"]').each((function(){var e=parseInt(n(this).val());i.indexOf(a.selected,e)>=0&&(this.checked=!0)})),i.debounce((function(){n(a.$el).find(".search-nav").html(t.nav).find("a, span").addClass("button").filter("span").addClass("disabled")}),10)()}))}),500),loadPage:function(e){e.preventDefault();var t=n(e.target);if(!t.is("span")){if(t.hasClass("next"))this.paged++;else if(t.hasClass("prev"))this.paged--;else{var i=t.html();this.paged=parseInt(i)}this.search()}},selectItem:function(e){var t=n(e.target).closest("li").find('input[type="checkbox"]'),a=parseInt(t.val()),s=i.indexOf(this.selected,a);t.is(":checked")?-1===s&&this.selected.push(a):s>=0&&this.selected.splice(s,1)},addItems:function(){this.callbacks&&this.callbacks.addItems&&this.callbacks.addItems.call(this),n(document).triggerHandler("learn-press/add-order-items",this.selected)},close:function(){this.$emit("close")}}}),window.LP.$modalSearchItems=new $Vue({el:"#vue-modal-search-items",data:{show:!1,term:"",postType:"",callbacks:{},exclude:"",context:""},methods:{open:function(e){i.each(e.data,(function(e,t){this[t]=e}),this),this.callbacks=e.callbacks,this.focusSearch()},close:function(){this.show=!1},focusSearch:i.debounce((function(){n('input[name="search"]',this.$el).focus()}),200)}}))}))},,,,,,function(e,t){var n,i,a,s,o;n=jQuery,i=null,a=null,s=null,o=function(e){s||(s=a.clone());var t=e.toLowerCase().split(/\s+/).filter((function(e,t){return e.length>=3}));a.each((function(e){var i,a,o=n(this).html(""),r=(i=s.eq(e),a=o,i.find(".plugin-card").each((function(){var e,i=n(this),s=i.find(".item-title").text().toLowerCase(),o=i.find(".column-description, .theme-description").text();if(t.length){if(e=new RegExp(t.join("|"),"ig"),s.match(e)||o.match(e)){var r=i.clone();a.append(r)}}else a.append(i.clone())})),o.children().length);o.prev("h2").find("span").html(r)}))},n(document).on("keyup",".lp-search-addon",(function(e){i&&clearTimeout(i),i=setTimeout(o,300,e.target.value)})).ready((function(){a=n(".addons-browse")}))},,,,,,,,function(e,t,n){"use strict";n.r(t);var i=n(5),a=n(1),s=window.jQuery,o=function(e,t){var n=wp.hooks;t=s.extend({el:null},t||{}),n&&n.doAction("before-dismiss-notice","LP",e,t),s.ajax({url:"",data:s.extend({"lp-dismiss-notice":e},t.data||{}),dataType:"text",success:function(i){(i=LP.parseJSON(i)).dismissed===e&&s(t.el).fadeOut(),n&&n.doAction("dismissed-notice","LP",e,t)}})};!function(e){void 0!==e&&e(document).on("click",".lp-notice [data-dismiss-notice]",(function(){var t=e(this).data(),n=t.dismissNotice;delete t.dismissNotice,o(n,{data:t,el:e(this).closest(".lp-notice")})}))}(window.jQuery),Object(a.a)("Utils",{dismissNotice:o});var r=o,c=n(10),l=n.n(c),d=n(11),u=n.n(d),h=n(12),f=n.n(h),p=n(13),v=n.n(p),m=n(3),g=n(14),b=n.n(g),y=n(15),w=n.n(y);n(21),n(8);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(n,!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},i,{dismissNotice:r,Advertisement:l.a,DropdownPages:u.a,AdvancedList:f.a,AdminTabs:v.a,isEmail:m.a,ModalSearchItems:w.a,ModalSearchUsers:b.a})}]);
|
1 |
+
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var s=t[i]={i:i,l:!1,exports:{}};return e[i].call(s.exports,s,s.exports,n),s.l=!0,s.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)n.d(i,s,function(t){return e[t]}.bind(null,s));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./assets/src/js/admin/utils/index.js")}({"./assets/src/js/admin/utils/admin-notice.js":function(e,t,n){"use strict";n.r(t);var i=n("./assets/src/js/utils/extend.js"),s=window.jQuery,a=function(e,t){var n=wp.hooks;t=s.extend({el:null},t||{}),n&&n.doAction("before-dismiss-notice","LP",e,t),s.ajax({url:"",data:s.extend({"lp-dismiss-notice":e},t.data||{}),dataType:"text",success:function(i){(i=LP.parseJSON(i)).dismissed===e&&s(t.el).fadeOut(),n&&n.doAction("dismissed-notice","LP",e,t)}})};!function(e){void 0!==e&&e(document).on("click",".lp-notice [data-dismiss-notice]",function(){var t=e(this).data(),n=t.dismissNotice;delete t.dismissNotice,a(n,{data:t,el:e(this).closest(".lp-notice")})})}(window.jQuery),Object(i.default)("Utils",{dismissNotice:a}),t.default=a},"./assets/src/js/admin/utils/admin-tabs.js":function(e,t){var n,i;n=jQuery,i=function(e,t){var i=e.find(".tabs-nav").find("li"),s=i.parent(),a=e.find(".tabs-content-container > li"),o=null,r=null;function c(e){var t=e.height(),n=s.outerHeight();t=t<n?n+2*parseInt(s.css("margin")):void 0,e.css("visibility","").css({height:t})}function l(){e.on("click",".tabs-nav a",function(e){var t,s,l;e.preventDefault(),o=n(this).parent(),t=o,s=i.index(t),l=t.find("a").attr("href"),r=a.eq(s),t.addClass("active").siblings("li.active").removeClass("active"),r.show().css({visibility:"hidden"}),c(r),r.hide(),r.show(),r.siblings("li.active").fadeOut(0,function(){r.addClass("active").siblings("li.active").removeClass("active")}),LP.setUrl(l)})}l(),(o=i.filter(".active")).length||(o=i.first()),o.find("a").trigger("click"),n(window).on("resize.calculate-tab",function(){c(e.find(".tabs-content-container .active").css("height",""))})},n.fn.LP("AdminTab",function(e){return e=n.extend({},e||{}),n.each(this,function(){var t=n(this),s=t.data("learn-press/tabs");return s||(s=new i(t,e),t.data("learn-press/tabs",s)),t})})},"./assets/src/js/admin/utils/advanced-list.js":function(e,t){var n,i;n=jQuery,i=function(e,t){var i=this,s=n(e).hasClass("advanced-list")?n(e):n(".advanced-list",e);function a(e){s.children(":eq("+(e-1)+")").remove(),i.options.onRemove&&i.options.onRemove.call(i)}this.options=n.extend({template:'<li data-id="{{id}}"><span class="remove-item"></span><span>{{text}}</span> </li>'},t||{}),this.$el=s,s.on("click",".remove-item",function(e){e.preventDefault(),a(s.children().index(n(this).closest("li"))+1)}),this.add=function(e,t){var a={},o=(r=n(i.options.template),r.length?r.html():i.options.template);var r;for(var c in n.isPlainObject(e)?a=n.extend({id:0,text:""},e):"string"==typeof e?a={id:"",text:e}:void 0!==e[0]&&(a={id:e[1]?e[1]:"",text:e[0]}),a){var l=new RegExp("{{"+c+"}}","g");o=o.replace(l,a[c])}if(o=n(o),void 0!==t){var d=s.children(":eq("+(t-1)+")");d.length?o.insertBefore(d):s.append(o)}else s.append(o);s.children().detach().each(function(){s.append("\n").append(this)}),i.options.onAdd&&i.options.onAdd.call(i)},this.remove=a},n.fn.LP("AdvancedList",function(e){for(var t=[],s=1;s<arguments.length;s++)t.push(arguments[s]);return n.each(this,function(){var s=n(this).data("advancedList");return s||(s=new i(this,e),n(this).data("advancedList",s)),"string"==typeof e&&n.isFunction(s[e])?s[e].apply(s,t):this})})},"./assets/src/js/admin/utils/advertisement.js":function(e,t){!function(e){function t(t,n){this.options=e.extend({},n||{});var i=e(t),s=i.find(".slide-item"),a=e('<div class="slider-controls"><div class="prev-item"></div><div class="next-item"></div></div>'),o=e('<div class="slider-items"></div>').append(s),r=0,c=null;function l(e){e=void 0!==e?e:r;var t=s.eq(e);t.show(),setTimeout(function(){t.addClass("slide-active")},1),t.siblings().removeClass("slide-active"),c&&clearTimeout(c),c=setTimeout(function(){t.siblings().hide()},500)}function d(){r<s.length-1?r++:r=0,l(r)}function u(){r>0?r--:r=s.length-1,l(r)}i.append(o),s.each(function(){e(this).append(a.clone())}),i.on("click",".next-item",d),i.on("click",".prev-item",u),l()}e.fn.LP("Advertisement",function(n){return e.each(this,function(){var i=e(this).data("LP_Advertisement_Slider");return i||(i=new t(this,n),e(this).data("LP_Advertisement_Slider",i)),this})})}(jQuery)},"./assets/src/js/admin/utils/conditional-logic.js":function(e,t){!function(e){window.conditional_logic_gray_state=function(t,n){t?e(this).removeClass("disabled"):e(this).addClass("disabled")};var t=window.Conditional_Logic=function(t){this.options=e.extend({},t||{}),this.updateAll()};t.prototype=e.extend(t.prototype,{evaluate:function(t,n){if(n&&n&&e.isArray(n.conditional)){var i=void 0,s=n.conditional;for(var a in s){var o=this.evaluateRequirement(s[a]),r=(s[a].combine||"and").toLowerCase();void 0!==o&&void 0!==i?i="and"===r?i&&o:i||o:void 0===i&&(i=o)}return i}},evaluateRequirement:function(t){if(t&&t.field){void 0===t.compare&&(t.compare="=");var n=e("#field-"+t.field);switch(t.state){case"show":return n.is(":visible");case"hide":return!n.is(":visible");default:var i="";switch(this.getFieldType(n)){case"yes-no":var s=n.find('input[type="checkbox"]');i=s.is(":checked")?s.val():"";break;case"radio":i=n.find("input:checked").val();break;default:i=n.find("input, select").val()}return this.compare(t.value,i,t.compare)}}},compare:function(t,n,i){var s=void 0;switch(i){case"===":s=n===t;break;case"==":case"=":case"equals":case"equal":s=n===t;break;case"!==":s=n!==t;break;case"!=":case"not equal":s=n!==t;break;case">=":case"greater or equal":case"equal or greater":s=n>=t;break;case"<=":case"smaller or equal":case"equal or smaller":s=n<=t;break;case">":case"greater":s=n>t;break;case"<":case"smaller":s=n<t;break;case"contains":case"in":var a,o;e.isArray(n)&&!e.isArray(t)?(a=n,o=t):e.isArray(t)&&!e.isArray(n)&&(a=t,o=n),a&&o?-1===e.inArray(o,a)&&(s=!1):-1===n.indexOf(t)&&-1===t.indexOf(n)&&(s=!1);break;default:s=n===t}return void 0===s||s},hasConditional:function(e,t){if(this.options.conditionals){if(!this.options.conditionals[t])return!1;for(var n in this.options.conditionals[t].conditional)if(this.options.conditionals[t].conditional[n].field===e)return this.options.conditionals[t];return!1}},update:function(t,n){var i=e(t),s=this.getFieldName(i);n=n||e(".rwmb-field"),_.forEach(n,function(t){var n=e(t),a=this.getFieldName(n);if(a!==s){var o=this.hasConditional(s,a);if(o){var r=this.evaluate(i,o);void 0!==r&&("hide"===o.state&&(r=!r),e.isFunction(window[o.state_callback])?window[o.state_callback].call(n,r,n):n.toggle(r))}}},this)},updateAll:function(){var t=e(".rwmb-field"),n=this;_.forEach(t,function(i){var s=e(i),a=this.getFieldType(s),o=s.find(".rwmb-field-name").val();o&&(s.attr("id","field-"+o),-1!==_.indexOf(this.supportFields,a)&&s.find("input, select, textarea").on("change",function(){n.update(e(this).closest(".rwmb-field"),t)}).trigger("change"))},this)},getFieldType:function(t){var n=e(t);if(0===n.length)return!1;var i=n.get(0).className.match(/rwmb-([^\s]*)-wrapper/);return!!i&&i[1]},getFieldName:function(t){return e(t).find(".rwmb-field-name").val()},supportFields:["yes-no","text","number","radio"]}),e(document).ready(function(){void 0!==window.lp_conditional_logic&&new t({conditionals:lp_conditional_logic})})}(jQuery)},"./assets/src/js/admin/utils/dropdown-pages.js":function(e,t){!function(){var e=window.jQuery;function t(t,n){this.options=e.extend({ID:"",name:"Add new page"},n||{});var i=e(t),s=i.find("select"),a=i.find(".list-pages-wrapper"),o=i.find(".quick-add-page-actions"),r=i.find(".quick-add-page-inline");s.change(function(){o.addClass("hide-if-js"),"add_new_page"===this.value?(a.addClass("hide-if-js"),r.removeClass("hide-if-js").find("input").focus().val("")):parseInt(this.value)&&(o.find("a.edit-page").attr("href","post.php?post="+this.value+"&action=edit"),o.find("a.view-page").attr("href",lpGlobalSettings.siteurl+"?page_id="+this.value),o.removeClass("hide-if-js"),s.attr("data-selected",this.value))}),s.css("width",s.width()+50).find("option").each(function(){e(this).html(e(this).html().replace(/ /g,""))}),s.select2({allowClear:!0}),s.on("select2:select",function(e){e.params.data}),i.on("click",".quick-add-page-inline button",function(){var t=e(this),n=r.find("input"),i=n.val();if(!i)return alert("Please enter the name of page"),void n.focus();t.prop("disabled",!0),e.ajax({url:lpGlobalSettings.ajax,data:{action:"learnpress_create_page",page_name:i,"lp-settings-nonce":e("input[name=lp-settings-nonce]").val()},type:"post",dataType:"html",success:function(n){var i,o,c;(n=LP.parseJSON(n)).page?(i={ID:n.page.ID,name:n.page.post_title,positions:n.positions},o=e('<option value="'+i.ID+'">'+i.name+"</option>"),c=e.inArray(i.ID+"",i.positions),e(".learn-press-dropdown-pages select").each(function(){var t=e(this),n=o.clone();0==c?e("option",t).each(function(){if(parseInt(e(this).val()))return n.insertBefore(e(this)),!1}):c==i.positions.length-1?t.append(n):n.insertAfter(e('option[value="'+i.positions[c-1]+'"]',t))}),s.val(n.page.ID).focus().trigger("change"),r.addClass("hide-if-js")):n.error&&alert(n.error),t.prop("disabled",!1),a.removeClass("hide-if-js")}})}).on("click",".quick-add-page-inline a",function(e){e.preventDefault(),r.addClass("hide-if-js"),s.val(s.attr("data-selected")+"").removeAttr("disabled").trigger("change"),a.removeClass("hide-if-js")}).on("click",".button-quick-add-page",function(e){s.val("add_new_page").trigger("change")}).on("keypress keydown",'.quick-add-page-inline input[type="text"]',function(t){13==t.keyCode&&"keypress"==t.type?(t.preventDefault(),e(this).siblings("button").trigger("click")):27==t.keyCode&&"keydown"==t.type&&e(this).siblings("a").trigger("click")})}void 0!==e&&e.fn.LP("DropdownPages",function(){return e.each(this,function(){var n=e(this).data("DropdownPages");return n||(n=new t(this,{}),e(this).data("DropdownPages",n)),n})})}()},"./assets/src/js/admin/utils/index.js":function(e,t,n){"use strict";n.r(t);var i=n("./assets/src/js/utils/index.js"),s=n("./assets/src/js/admin/utils/admin-notice.js"),a=n("./assets/src/js/admin/utils/advertisement.js"),o=n.n(a),r=n("./assets/src/js/admin/utils/dropdown-pages.js"),c=n.n(r),l=n("./assets/src/js/admin/utils/advanced-list.js"),d=n.n(l),u=n("./assets/src/js/admin/utils/admin-tabs.js"),f=n.n(u),h=n("./assets/src/js/utils/email-validator.js"),p=n("./assets/src/js/admin/utils/modal-search-users.js"),v=n.n(p),m=n("./assets/src/js/admin/utils/modal-search-items.js"),g=n.n(m);n("./assets/src/js/admin/utils/search-items.js"),n("./assets/src/js/admin/utils/conditional-logic.js");function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.default=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(n,!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},i,{dismissNotice:s.default,Advertisement:o.a,DropdownPages:c.a,AdvancedList:d.a,AdminTabs:f.a,isEmail:h.default,ModalSearchItems:g.a,ModalSearchUsers:v.a})},"./assets/src/js/admin/utils/modal-search-items.js":function(e,t){var n=window.jQuery,i=window._;window.$Vue=window.$Vue||window.Vue,n(document).ready(function(){var e=!!$Vue&&$Vue.http;document.getElementById("vue-modal-search-items")&&$Vue&&($Vue.component("learn-press-modal-search-items",{template:"#learn-press-modal-search-items",data:function(){return{paged:1,term:"",hasItems:!1,selected:[]}},watch:{show:function(e){e&&n(this.$refs.search).focus()}},props:["postType","context","contextId","show","callbacks","exclude"],created:function(){},mounted:function(){this.term="",this.paged=1,this.search()},methods:{doSearch:function(e){this.term=e.target.value,this.paged=1,this.search()},search:i.debounce(function(t){n("#modal-search-items").addClass("loading");var s=this;e.post(window.location.href,{type:this.postType,context:this.context,context_id:this.contextId,term:t||this.term,paged:this.paged,exclude:this.exclude,"lp-ajax":"modal_search_items"},{emulateJSON:!0,params:{}}).then(function(e){var t=LP.parseJSON(e.body||e.bodyText);s.hasItems=!!i.size(t.items),n("#modal-search-items").removeClass("loading"),n(s.$el).find(".search-results").html(t.html).find('input[type="checkbox"]').each(function(){var e=parseInt(n(this).val());i.indexOf(s.selected,e)>=0&&(this.checked=!0)}),i.debounce(function(){n(s.$el).find(".search-nav").html(t.nav).find("a, span").addClass("button").filter("span").addClass("disabled")},10)()})},500),loadPage:function(e){e.preventDefault();var t=n(e.target);if(!t.is("span")){if(t.hasClass("next"))this.paged++;else if(t.hasClass("prev"))this.paged--;else{var i=t.html();this.paged=parseInt(i)}this.search()}},selectItem:function(e){var t=n(e.target).closest("li").find('input[type="checkbox"]'),s=parseInt(t.val()),a=i.indexOf(this.selected,s);t.is(":checked")?-1===a&&this.selected.push(s):a>=0&&this.selected.splice(a,1)},addItems:function(){this.callbacks&&this.callbacks.addItems&&this.callbacks.addItems.call(this),n(document).triggerHandler("learn-press/add-order-items",this.selected)},close:function(){this.$emit("close")}}}),window.LP.$modalSearchItems=new $Vue({el:"#vue-modal-search-items",data:{show:!1,term:"",postType:"",callbacks:{},exclude:"",context:""},methods:{open:function(e){i.each(e.data,function(e,t){this[t]=e},this),this.callbacks=e.callbacks,this.focusSearch()},close:function(){this.show=!1},focusSearch:i.debounce(function(){n('input[name="search"]',this.$el).focus()},200)}}))})},"./assets/src/js/admin/utils/modal-search-users.js":function(e,t){var n=window.jQuery,i=window._;window.$Vue=window.$Vue||window.Vue,n(document).ready(function(){var e=!!$Vue&&$Vue.http;document.getElementById("vue-modal-search-users")&&$Vue&&($Vue.component("learn-press-modal-search-users",{template:"#learn-press-modal-search-users",data:function(){return{paged:1,term:"",hasUsers:!1,selected:[]}},watch:{show:function(e){e&&n(this.$refs.search).focus()}},props:["multiple","context","contextId","show","callbacks","textFormat","exclude"],created:function(){},methods:{doSearch:function(e){this.term=e.target.value,this.paged=1,this.search()},search:i.debounce(function(t){var s=this;e.post(window.location.href,{type:this.postType,context:this.context,context_id:this.contextId,term:t||this.term,paged:this.paged,multiple:this.multiple?"yes":"no",text_format:this.textFormat,exclude:this.exclude,"lp-ajax":"modal_search_users"},{emulateJSON:!0,params:{}}).then(function(e){var t=LP.parseJSON(e.body||e.bodyText);s.hasUsers=!!i.size(t.users),n(s.$el).find(".search-results").html(t.html).find('input[type="checkbox"]').each(function(){var e=parseInt(n(this).val());i.indexOf(s.selected,e)>=0&&(this.checked=!0)}),i.debounce(function(){n(s.$el).find(".search-nav").html(t.nav).find("a, span").addClass("button").filter("span").addClass("disabled")},10)()})},500),loadPage:function(e){e.preventDefault();var t=n(e.target);if(!t.is("span")){if(t.hasClass("next"))this.paged++;else if(t.hasClass("prev"))this.paged--;else{var i=t.html();this.paged=parseInt(i)}this.search()}},selectItem:function(e){var t=n(e.target).closest("li"),s=t.find('input[type="checkbox"]'),a=parseInt(s.val()),o=i.findLastIndex(this.selected,{id:a});this.multiple?s.is(":checked")?-1===o&&this.selected.push(t.closest("li").data("data")):o>=0&&this.selected.splice(o,1):(e.preventDefault(),this.selected=[t.closest("li").data("data")],this.addUsers())},addUsers:function(){n(this.$el).find(".lp-result-item"),this.callbacks&&this.callbacks.addUsers&&this.callbacks.addUsers.call(this,this.selected),n(document).triggerHandler("learn-press/modal-add-users",this.selected)},close:function(){this.$emit("close")}}}),window.LP.$modalSearchUsers=new $Vue({el:"#vue-modal-search-users",data:{show:!1,term:"",multiple:!1,callbacks:{},textFormat:"{{display_name}} ({{email}})",exclude:0},methods:{open:function(e){i.each(e.data,function(e,t){this[t]=e},this),this.callbacks=e.callbacks,this.focusSearch()},close:function(){this.show=!1},focusSearch:i.debounce(function(){n('input[name="search"]',this.$el).focus()},200)}}))})},"./assets/src/js/admin/utils/search-items.js":function(e,t){var n,i,s,a,o;n=jQuery,i=null,s=null,a=null,o=function(e){a||(a=s.clone());var t=e.toLowerCase().split(/\s+/).filter(function(e,t){return e.length>=3});s.each(function(e){var i,s,o=n(this).html(""),r=(i=a.eq(e),s=o,i.find(".plugin-card").each(function(){var e,i=n(this),a=i.find(".item-title").text().toLowerCase(),o=i.find(".column-description, .theme-description").text();if(t.length){if(e=new RegExp(t.join("|"),"ig"),a.match(e)||o.match(e)){var r=i.clone();s.append(r)}}else s.append(i.clone())}),o.children().length);o.prev("h2").find("span").html(r)})},n(document).on("keyup",".lp-search-addon",function(e){i&&clearTimeout(i),i=setTimeout(o,300,e.target.value)}).ready(function(){s=n(".addons-browse")})},"./assets/src/js/utils/email-validator.js":function(e,t,n){"use strict";function i(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}n.r(t),n.d(t,"default",function(){return i})},"./assets/src/js/utils/event-callback.js":function(e,t,n){"use strict";n.r(t);t.default=function(e){var t={},n=window.jQuery;this.on=function(n,i){var s=n.split("."),a="";return s.length>1&&(n=s[0],a=s[1]),t[n]||(t[n]=[[],{}]),a?(t[n][1][a]||(t[n][1][a]=[]),t[n][1][a].push(i)):t[n][0].push(i),e},this.off=function(i,s){var a=i.split("."),o="";if(a.length>1&&(i=a[0],o=a[1]),!t[i])return e;var r=-1;if(o){if(!t[i][1][o])return e;if(n.isFunction(s)){if((r=t[i][1][o].indexOf(s))<0)return e;t[i][1][o].splice(r,1)}else t[i][1][o]=[]}else if(n.isFunction(s)){if((r=t[i][0].indexOf(s))<0)return e;t[i][0].splice(r,1)}else t[i][0]=[];return e},this.callEvent=function(i,s){if(t[i]){if(t[i][0])for(var a=0;a<t[i][0].length;a++)n.isFunction(t[i][0][a])&&t[i][a][0].apply(e,s);if(t[i][1])for(var a in t[i][1])for(var o=0;o<t[i][1][a].length;o++)n.isFunction(t[i][1][a][o])&&t[i][1][a][o].apply(e,s)}}}},"./assets/src/js/utils/extend.js":function(e,t,n){"use strict";n.r(t),t.default=function(){window.LP=window.LP||{},"string"==typeof arguments[0]?(LP[arguments[0]]=LP[arguments[0]]||{},LP[arguments[0]]=jQuery.extend(LP[arguments[0]],arguments[1])):LP=jQuery.extend(LP,arguments[0])}},"./assets/src/js/utils/fn.js":function(e,t,n){"use strict";n.r(t);var i,s=window.jQuery;void 0!==s&&(s.fn.LP=i=function(e,t){if(s.isFunction(t))s.fn["LP_"+e]=t;else if(e){var n=[];if(arguments.length>1)for(var i=1;i<arguments.length;i++)n.push(arguments[i]);return s.isFunction(s(this)["LP_"+e])?s(this)["LP_"+e].apply(this,n):this}return this}),t.default=i},"./assets/src/js/utils/hook.js":function(e,t,n){"use strict";n.r(t);var i={hooks:{action:{},filter:{}},addAction:function(e,t,n,i){return this.addHook("action",e,t,n,i),this},addFilter:function(e,t,n,i){return this.addHook("filter",e,t,n,i),this},doAction:function(e){return this.doHook("action",e,arguments),this},applyFilters:function(e){return this.doHook("filter",e,arguments)},removeAction:function(e,t){return this.removeHook("action",e,t),this},removeFilter:function(e,t,n){return this.removeHook("filter",e,t,n),this},addHook:function(e,t,n,i,s){void 0===this.hooks[e][t]&&(this.hooks[e][t]=[]);var a=this.hooks[e][t];return void 0===s&&(s=t+"_"+a.length),this.hooks[e][t].push({tag:s,callable:n,priority:i}),this},doHook:function(e,t,n){if(n=Array.prototype.slice.call(n,1),void 0!==this.hooks[e][t]){var i,s=this.hooks[e][t];s.sort(function(e,t){return e.priority-t.priority});for(var a=0;a<s.length;a++)"function"!=typeof(i=s[a].callable)&&(i=window[i]),"action"===e?i.apply(null,n):n[0]=i.apply(null,n)}return"filter"===e?n[0]:this},removeHook:function(e,t,n,i){if(void 0!==this.hooks[e][t])for(var s=this.hooks[e][t],a=s.length-1;a>=0;a--)void 0!==i&&i!==s[a].tag||void 0!==n&&n!==s[a].priority||s.splice(a,1);return this}};t.default=i},"./assets/src/js/utils/index.js":function(e,t,n){"use strict";n.r(t);var i=n("./assets/src/js/utils/extend.js"),s=n("./assets/src/js/utils/fn.js"),a=n("./assets/src/js/utils/quick-tip.js"),o=n.n(a),r=n("./assets/src/js/utils/message-box.js"),c=n("./assets/src/js/utils/event-callback.js"),l=n("./assets/src/js/utils/hook.js");n("./assets/src/js/utils/jquery.plugins.js");function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=jQuery;String.prototype.getQueryVar=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(this);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},String.prototype.addQueryVar=function(e,t){var n=this,i=n.split("#");return n=i[0],e.match(/\[/)?(n+=n.match(/\?/)?"&":"?",n+=e+"="+t):-1!=n.indexOf("&"+e+"=")||-1!=n.indexOf("?"+e+"=")?n=n.replace(new RegExp(e+"=([^&#]*)","g"),e+"="+t):(n+=n.match(/\?/)?"&":"?",n+=e+"="+t),n+(i[1]?"#"+i[1]:"")},String.prototype.removeQueryVar=function(e){var t=this,n=t.split("#");t=n[0],e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+e+"([[][^=]*)?=([^&#]*)","g");return(t=t.replace(i,""))+(n[1]?"#"+n[1]:"")},0==f.isEmptyObject("")&&(f.isEmptyObject=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0});var h={Hook:l.default,setUrl:function(e,t,n){e&&(history.pushState({},n,e),LP.Hook.doAction("learn_press_set_location_url",e))},toggleGroupSection:function(e,t){var n=f(e);n.hasClass("hide-if-js")&&n.hide().removeClass("hide-if-js"),n.removeClass("hide-if-js").slideToggle(function(){f(this).is(":visible")?f(t).addClass("toggle-on").removeClass("toggle-off"):f(t).addClass("toggle-off").removeClass("toggle-on")})},overflow:function(e,t){var n=f(e),i=n.css("overflow");t?n.css("overflow",t).data("overflow",i):n.css("overflow",n.data("overflow"))},getUrl:function(){return window.location.href},addQueryVar:function(e,t,n){return(void 0===n?window.location.href:n).addQueryVar(e,t)},removeQueryVar:function(e,t){return(void 0===t?window.location.href:t).removeQueryVar(e)},reload:function(e){e||(e=window.location.href),window.location.href=e},parseResponse:function(e,t){var n=e.match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/);return n&&(e=n[1]),"json"===(t||"json")?this.parseJSON(e):e},parseJSON:function(e){var t=(e+"").match(/<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/);try{e=t?f.parseJSON(t[1]):f.parseJSON(e)}catch(t){e={}}return e},ajax:function(e){var t=e.type||"post",n=e.dataType||"json",i=e.action?f.extend(e.data,{"lp-ajax":e.action}):e.data,s=e.beforeSend||function(){},a=e.url||window.location.href;f.ajax({data:i,url:a,type:t,dataType:"html",beforeSend:s.apply(null,e),success:function(t){var i=LP.parseResponse(t,n);f.isFunction(e.success)&&e.success(i,t)},error:function(){f.isFunction(e.error)&&e.error.apply(null,LP.funcArgs2Array())}})},doAjax:function(e){var t=e.type||"post",n=e.dataType||"json",i=(void 0===e.prefix||"learnpress_")+e.action,s=e.action?f.extend(e.data,{action:i}):e.data;f.ajax({data:s,url:e.url||window.location.href,type:t,dataType:"html",success:function(t){var i=LP.parseResponse(t,n);f.isFunction(e.success)&&e.success(i,t)},error:function(){f.isFunction(e.error)&&e.error.apply(null,LP.funcArgs2Array())}})},funcArgs2Array:function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t},addFilter:function(e,t){var n=f(document),i="LP."+e;return n.on(i,t),LP.log(n.data("events")),this},applyFilters:function(){var e=f(document),t=arguments[0],n=this.funcArgs2Array(arguments);return e.hasEvent(t)?(n[0]="LP."+t,e.triggerHandler.apply(e,n)):n[1]},addAction:function(e,t){return this.addFilter(e,t)},doAction:function(){var e=f(document),t=arguments[0],n=this.funcArgs2Array(arguments);e.hasEvent(t)&&(n[0]="LP."+t,e.trigger.apply(e,n))},toElement:function(e,t){if(0!==f(e).length){t=f.extend({delay:300,duration:"slow",offset:50,container:null,callback:null,invisible:!1},t||{});var n,i=f(t.container);0===i.length&&(i=f("body, html")),n=i.offset().top;var s=f(e).offset().top+i.scrollTop()-n-t.offset;t.invisible&&function(e,t){var n=i.scrollTop(),s=n+i.height(),a=f(e).offset().top-i.offset().top,o=a+f(e).height();return!0===t?n<a&&s>o:a<=s&&o>=n}(e,!0)||i.fadeIn(10).delay(t.delay).animate({scrollTop:s},t.duration,t.callback)}},uniqueId:function(e,t){var n;void 0===e&&(e="");var i=function(e,t){return t<(e=parseInt(e,10).toString(16)).length?e.slice(e.length-t):t>e.length?new Array(t-e.length+1).join("0")+e:e};return this.php_js||(this.php_js={}),this.php_js.uniqidSeed||(this.php_js.uniqidSeed=Math.floor(123456789*Math.random())),this.php_js.uniqidSeed++,n=e,n+=i(parseInt((new Date).getTime()/1e3,10),8),n+=i(this.php_js.uniqidSeed,5),t&&(n+=(10*Math.random()).toFixed(8).toString()),n},log:function(){for(var e=0,t=arguments.length;e<t;e++)console.log(arguments[e])},blockContent:function(){0===f("#learn-press-block-content").length&&f(LP.template("learn-press-template-block-content",{})).appendTo(f("body")),LP.hideMainScrollbar().addClass("block-content"),f(document).trigger("learn_press_block_content")},unblockContent:function(){setTimeout(function(){LP.showMainScrollbar().removeClass("block-content"),f(document).trigger("learn_press_unblock_content")},350)},hideMainScrollbar:function(e){e||(e="html, body");var t=f(e);return t.each(function(){var e=f(this),t=e.css("overflow");e.css("overflow","hidden").attr("overflow",t)}),t},showMainScrollbar:function(e){e||(e="html, body");var t=f(e);return t.each(function(){var e=f(this),t=e.attr("overflow");e.css("overflow",t).removeAttr("overflow")}),t},template:"undefined"!=typeof _?_.memoize(function(e,t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},s=function(t){return(n=n||_.template(f("#"+e).html(),null,i))(t)};return t?s(t):s},function(e,t){return e+"-"+JSON.stringify(t)}):function(){return""},alert:function(e,t){var n="",i="";"string"==typeof e?i=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(i=e.message)),f.alerts.alert(i,n,function(e){LP._on_alert_hide(),t&&t(e)}),this._on_alert_show()},confirm:function(e,t){var n="",i="";"string"==typeof e?i=e:(void 0!==e.title&&(n=e.title),void 0!==e.message&&(i=e.message)),f.alerts.confirm(i,n,function(e){LP._on_alert_hide(),t&&t(e)}),this._on_alert_show()},_on_alert_show:function(){var e=f("#popup_container");f('<span id="popup_container_placeholder" />').insertAfter(e).data("xxx",e);e.stop().css("top","-=50").css("opacity","0").animate({top:"+=50",opacity:1},250)},_on_alert_hide:function(){var e=f("#popup_container_placeholder"),t=e.data("xxx");t&&t.replaceWith(e),t.appendTo(f(document.body)),t.stop().animate({top:"+=50",opacity:0},250,function(){f(this).remove()})},sendMessage:function(e,t,n,i){f.isPlainObject(e)&&(e=JSON.stringify(e)),n=n||"*",(t=t||window).postMessage(e,n,i)},receiveMessage:function(e,t){var n=e.origin||e.originalEvent.origin,i=e.data||e.originalEvent.data||"";("string"==typeof i||i instanceof String)&&0===i.indexOf("{")&&(i=LP.parseJSON(i)),LP.Hook.doAction("learn_press_receive_message",i,n)}};f(document).ready(function(){var e,t;void 0!==f.alerts&&(f.alerts.overlayColor="#000",f.alerts.overlayOpacity=.5,f.alerts.okButton=lpGlobalSettings.localize.button_ok,f.alerts.cancelButton=lpGlobalSettings.localize.button_cancel),f(".learn-press-message.fixed").each(function(){var e=f(this),t=e.data();!function(e,t){t.delayIn&&setTimeout(function(){e.show().hide().fadeIn()},t.delayIn),t.delayOut&&setTimeout(function(){e.fadeOut()},t.delayOut+(t.delayIn||0))}(e,t)}),f("body").on("click",".learn-press-nav-tabs li a",function(e){e.preventDefault();var t=f(this);t.closest("li").addClass("active").siblings().removeClass("active"),f(t.attr("data-tab")).addClass("active").siblings().removeClass("active"),f(document).trigger("learn-press/nav-tabs/clicked",t)}),setTimeout(function(){f(".learn-press-nav-tabs li.active:not(.default) a").trigger("click")},300),f("body.course-item-popup").parent().css("overflow","hidden"),e=null,t=function(){f(".auto-check-lines").checkLines(function(e){e>1?f(this).removeClass("single-lines"):f(this).addClass("single-lines"),f(this).attr("rows",e)})},f(window).on("resize.check-lines",function(){e?(e&&clearTimeout(e),e=setTimeout(t,300)):t()}),f(".learn-press-tooltip, .lp-passing-conditional").LP_Tooltip({offset:[24,24]}),f(".learn-press-icon").LP_Tooltip({offset:[30,30]}),f(".learn-press-message[data-autoclose]").each(function(){var e=f(this),t=parseInt(e.data("autoclose"));t&&setTimeout(function(e){e.fadeOut()},t,e)}),f(document).on("click",function(){f(document).trigger("learn-press/close-all-quick-tip")})}),Object(i.default)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(n,!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({Event_Callback:c.default,MessageBox:r.default},h)),t.default={fn:s.default,QuickTip:o.a}},"./assets/src/js/utils/jquery.plugins.js":function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}__webpack_require__.r(__webpack_exports__);var $=window.jQuery,serializeJSON=function serializeJSON(path){var isInput=$(this).is("input")||$(this).is("select")||$(this).is("textarea"),unIndexed=isInput?$(this).serializeArray():$(this).find("input, select, textarea").serializeArray(),indexed={},validate=/(\[([a-zA-Z0-9_-]+)?\]?)/g,arrayKeys={},end=!1;if($.each(unIndexed,function(){var that=this,match=this.name.match(/^([0-9a-zA-Z_-]+)/);if(match){var keys=this.name.match(validate),objPath="indexed['"+match[0]+"']";keys?("object"!=_typeof(indexed[match[0]])&&(indexed[match[0]]={}),$.each(keys,function(i,prop){prop=prop.replace(/\]|\[/g,"");var rawPath=objPath.replace(/'|\[|\]/g,""),objExp="",preObjPath=objPath;""==prop?(null==arrayKeys[rawPath]?arrayKeys[rawPath]=0:arrayKeys[rawPath]++,objPath+="['"+arrayKeys[rawPath]+"']"):(isNaN(prop)||(arrayKeys[rawPath]=prop),objPath+="['"+prop+"']");try{i==keys.length-1?(objExp=objPath+"=that.value;",end=!0):(objExp=objPath+"={}",end=!1);var evalString="if( typeof "+objPath+" == 'undefined'){"+objExp+";}else{if(end){if(typeof "+preObjPath+"!='object'){"+preObjPath+"={};}"+objExp+"}}";eval(evalString)}catch(e){console.log("Error:"+e+"\n"+objExp)}})):indexed[match[0]]=this.value}}),path){path="['"+path.replace(".","']['")+"']";var c="try{indexed = indexed"+path+"}catch(ex){console.log(c, ex);}";eval(c)}return indexed},LP_Tooltip=function(e){return e=$.extend({},{offset:[0,0]},e||{}),$.each(this,function(){var t=$(this),n=t.data("content");if(n&&void 0===t.data("LP_Tooltip")){var i=null;t.hover(function(s){i=$('<div class="learn-press-tooltip-bubble"/>').html(n).appendTo($("body")).hide();var a=t.offset();if($.isArray(e.offset)){var o=e.offset[1],r=e.offset[0];$.isNumeric(r)&&(a.left+=r),$.isNumeric(o)&&(a.top+=o)}i.css({top:a.top,left:a.left}),i.fadeIn()},function(){i&&i.remove()}),t.data("tooltip",!0)}})},hasEvent=function(e){var t=$(this).data("events");if(void 0===t.LP)return!1;for(i=0;i<t.LP.length;i++)if(t.LP[i].namespace==e)return!0;return!1},dataToJSON=function(){var e={};return $.each(this[0].attributes,function(){var t=this.name.match(/^data-(.*)/);t&&(e[t[1]]=this.value)}),e},rows=function(){var e=$(this).height(),t=$(this).css("line-height").replace("px","");return $(this).attr({height:e,"line-height":t}),Math.floor(e/parseInt(t))},checkLines=function(e){return this.each(function(){var t=$(this).rows();e.call(this,t)})},findNext=function(e){var t=$(e),n=this.first(),i=t.index(n),s=t.eq(i+1);return!!s.length&&s},findPrev=function(e){var t=$(e),n=this.first(),i=t.index(n),s=t.eq(i-1);return!!s.length&&s},progress=function(e){return this.each(function(){var t=parseInt(e/100*360),n=$(this);t<180?n.find(".progress-circle").removeClass("gt-50"):n.find(".progress-circle").addClass("gt-50"),n.find(".fill").css({transform:"rotate("+t+"deg)"})})};$.fn.serializeJSON=serializeJSON,$.fn.LP_Tooltip=LP_Tooltip,$.fn.hasEvent=hasEvent,$.fn.dataToJSON=dataToJSON,$.fn.rows=rows,$.fn.checkLines=checkLines,$.fn.findNext=findNext,$.fn.findPrev=findPrev,$.fn.progress=progress,__webpack_exports__.default={serializeJSON:serializeJSON,LP_Tooltip:LP_Tooltip,hasEvent:hasEvent,dataToJSON:dataToJSON,rows:rows,checkLines:checkLines,findNext:findNext,findPrev:findPrev,progress:progress}},"./assets/src/js/utils/message-box.js":function(e,t,n){"use strict";n.r(t);var i=window.jQuery,s={$block:null,$window:null,events:{},instances:[],instance:null,quickConfirm:function(e,t){var n=i(e);i("[learn-press-quick-confirm]").each(function(){var e;(e=i(this).data("quick-confirm"))&&(console.log(e),e.destroy())}),!n.attr("learn-press-quick-confirm")&&n.attr("learn-press-quick-confirm","true").data("quick-confirm",new function(e,t){var n=i(e),s=i('<span class="learn-press-quick-confirm"></span>').insertAfter(n),a=i(e).position()||{left:0,top:0},o=null,r=null,c=3,l=function(){s.fadeOut("fast",function(){i(this).remove(),s.parent().css("position","")}),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),d()},d=function(){r&&clearInterval(r),o&&clearInterval(o)},u=function(){o=setInterval(function(){0==--c&&(l.call(s[0]),i.isFunction(t.onCancel)&&t.onCancel(t.data),d()),s.find("span").html(" ("+c+")")},1e3),r=setInterval(function(){n.is(":visible")&&"hidden"!=n.css("visibility")||(d(),s.remove(),s.parent().css("position",""),i.isFunction(t.onCancel)&&t.onCancel(t.data))},350)};t=i.extend({message:"",data:null,onOk:null,onCancel:null,offset:{top:0,left:0}},t||{}),s.html(t.message||n.attr("data-confirm-remove")||"Are you sure?").append("<span> ("+c+")</span>").css({}),s.click(function(){i.isFunction(t.onOk)&&t.onOk(t.data),l()}).hover(function(){d()},function(){u()}),s.css({left:a.left+n.outerWidth()-s.outerWidth()+t.offset.left,top:a.top+n.outerHeight()+t.offset.top+5}).hide().fadeIn("fast"),u(),this.destroy=function(){s.remove(),n.removeAttr("learn-press-quick-confirm").data("quick-confirm",void 0),d()}}(e,t))},show:function(e,t){i.proxy(function(){t=i.extend({title:"",buttons:"",events:!1,autohide:!1,message:e,data:!1,id:LP.uniqueId(),onHide:null},t||{}),this.instances.push(t),this.instance=t;i(document);var n=i(document.body);this.$block||(this.$block=i('<div id="learn-press-message-box-block"></div>').appendTo(n)),this.$window||(this.$window=i('<div id="learn-press-message-box-window"><div id="message-box-wrap"></div> </div>').insertAfter(this.$block),this.$window.click(function(){})),this._createWindow(e,t.title,t.buttons),this.$block.show(),this.$window.show().attr("instance",t.id),i(window).bind("resize.message-box",i.proxy(this.update,this)).bind("scroll.message-box",i.proxy(this.update,this)),this.update(!0),t.autohide&&setTimeout(function(){LP.MessageBox.hide(),i.isFunction(t.onHide)&&t.onHide.call(LP.MessageBox,t)},t.autohide)},this)()},blockUI:function(e){e=(!1!==e?e||"Wait a moment":"")+'<div class="message-box-animation"></div>',this.show(e)},hide:function(e,t){t?this._removeInstance(t.id):this.instance&&this._removeInstance(this.instance.id),0===this.instances.length?(this.$block&&this.$block.hide(),this.$window&&this.$window.hide(),i(window).unbind("resize.message-box",this.update).unbind("scroll.message-box",this.update)):this.instance&&this._createWindow(this.instance.message,this.instance.title,this.instance.buttons)},update:function(e){var t=this,n=this.$window.find("#message-box-wrap"),s=n.data("timer"),a=function(){LP.Hook.doAction("learn_press_message_box_before_resize",t);var e=n.find(".message-box-content").css("height","").css("overflow","hidden"),s=(n.outerWidth(),n.outerHeight()),a=e.height(),o=i(window).height();n.offset().top;a>o-50?(e.css({height:o-25}),s=n.outerHeight()):e.css("height","").css("overflow",""),n.css({marginTop:(i(window).height()-s)/2}),LP.Hook.doAction("learn_press_message_box_resize",s,t)};e&&a(),s&&clearTimeout(s),s=setTimeout(a,250)},_removeInstance:function(e){for(var t=0;t<this.instances.length;t++)if(this.instances[t].id===e){this.instances.splice(t,1);var n=this.instances.length;n?(this.instance=this.instances[n-1],this.$window.attr("instance",this.instance.id)):(this.instance=!1,this.$window.removeAttr("instance"));break}},_getInstance:function(e){for(var t=0;t<this.instances.length;t++)if(this.instances[t].id===e)return this.instances[t]},_createWindow:function(e,t,n){var s=this.$window.find("#message-box-wrap").html("");if(t&&s.append('<h3 class="message-box-title">'+t+"</h3>"),s.append(i('<div class="message-box-content"></div>').html(e)),n){var a=i('<div class="message-box-buttons"></div>');switch(n){case"yesNo":a.append(this._createButton(LP_Settings.localize.button_yes,"yes")),a.append(this._createButton(LP_Settings.localize.button_no,"no"));break;case"okCancel":a.append(this._createButton(LP_Settings.localize.button_ok,"ok")),a.append(this._createButton(LP_Settings.localize.button_cancel,"cancel"));break;default:a.append(this._createButton(LP_Settings.localize.button_ok,"ok"))}s.append(a)}},_createButton:function(e,t){var n=i('<button type="button" class="button message-box-button message-box-button-'+t+'">'+e+"</button>"),s="on"+(t.substr(0,1).toUpperCase()+t.substr(1));return n.data("callback",s).click(function(){var e=i(this).data("instance"),t=e.events[i(this).data("callback")];"function"===i.type(t)&&!1===t.apply(LP.MessageBox,[e])||LP.MessageBox.hide(null,e)}).data("instance",this.instance),n}};t.default=s},"./assets/src/js/utils/quick-tip.js":function(e,t){!function(e){function t(t,n){var i=e(t),s=i.attr("data-id")||LP.uniqueId();n=e.extend({event:"hover",autoClose:!0,single:!0,closeInterval:1e3,arrowOffset:null,tipClass:""},n,i.data()),i.attr("data-id",s);var a=i.attr("data-content-tip")||i.html(),o=e('<div class="learn-press-tip-floating">'+a+"</div>"),r=null,c=0,l=!1,d="el"===n.arrowOffset?i.outerWidth()/2:8,u=e("#__"+s);function f(){if(r)clearTimeout(r);else{n.single&&e(".learn-press-tip").not(i).LP("QuickTip","close"),o.appendTo(document.body);var t=i.offset();o.css({top:t.top-o.outerHeight()-8,left:t.left-o.outerWidth()/2+d})}}function h(){r&&clearTimeout(r),r=setTimeout(function(){o.detach(),r=null},c)}function p(){c=0,h(),c=n.closeInterval}return 0===u.length&&e(document.body).append(e("<div />").attr("id","__"+s).html(a).css("display","none")),a=u.html(),o.addClass(n.tipClass),i.data("content-tip",a),i.attr("data-content-tip")&&(l=!0),c=n.closeInterval,!1===n.autoClose&&(o.append('<a class="close"></a>'),o.on("click",".close",function(){p()})),l||i.html(""),"click"===n.event&&i.on("click",function(e){e.stopPropagation(),f()}),e(document).on("learn-press/close-all-quick-tip",function(){p()}),i.hover(function(e){e.stopPropagation(),"click"!==n.event&&f()},function(e){e.stopPropagation(),n.autoClose&&h()}).addClass("ready"),{close:p,open:function(){f()}}}e.fn.LP("QuickTip",function(n){return e.each(this,function(){var i=e(this).data("quick-tip");i||(i=new t(this,n),e(this).data("quick-tip",i)),"string"===e.type(n)&&i[n]&&i[n].apply(i)})})}(jQuery)}});
|
inc/admin/class-lp-admin-ajax.php
CHANGED
@@ -31,27 +31,25 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
31 |
|
32 |
$ajaxEvents = array(
|
33 |
'create_page' => false,
|
34 |
-
'plugin_action' => false,
|
35 |
'modal_search_items' => false,
|
36 |
'dismiss_notice' => false,
|
37 |
'search_users' => false,
|
38 |
'load_chart' => false,
|
39 |
'search_course_category' => false,
|
40 |
/////////////
|
41 |
-
//'be_teacher' => false,
|
42 |
'custom_stats' => false,
|
43 |
'ignore_setting_up' => false,
|
44 |
'get_page_permalink' => false,
|
45 |
'dummy_image' => false,
|
46 |
-
'update_add_on_status' => false,
|
47 |
-
//'plugin_install' => false,
|
48 |
'bundle_activate_add_ons' => false,
|
49 |
'install_sample_data' => false,
|
50 |
|
51 |
// Remove Notice
|
52 |
'remove_notice_popup' => false,
|
53 |
// Update order status
|
54 |
-
'update_order_status' => false,
|
55 |
);
|
56 |
foreach ( $ajaxEvents as $ajaxEvent => $nopriv ) {
|
57 |
add_action( 'wp_ajax_learnpress_' . $ajaxEvent, array( __CLASS__, $ajaxEvent ) );
|
@@ -315,9 +313,10 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
315 |
}
|
316 |
|
317 |
/**
|
|
|
|
|
318 |
* @since 3.0.2
|
319 |
*
|
320 |
-
* @param LP_Admin_Editor $editor
|
321 |
*/
|
322 |
public static function admin_editor( &$editor ) {
|
323 |
$result = $editor->dispatch();
|
@@ -819,6 +818,10 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
819 |
die();
|
820 |
}
|
821 |
|
|
|
|
|
|
|
|
|
822 |
public static function plugin_action() {
|
823 |
$url = learn_press_get_request( 'url' );
|
824 |
ob_start();
|
@@ -826,19 +829,40 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
826 |
ob_get_clean();
|
827 |
echo wp_remote_get( admin_url( 'admin.php?page=learn-press-addons&tab=installed' ) );
|
828 |
die();
|
829 |
-
}
|
830 |
|
831 |
/**
|
832 |
* Create a new page with the title passed via $_REQUEST
|
833 |
*/
|
834 |
public static function create_page() {
|
835 |
-
$
|
836 |
-
|
837 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
838 |
|
|
|
839 |
if ( $page_id = LP_Helper::create_page( $page_name ) ) {
|
840 |
-
$response['
|
841 |
-
$
|
|
|
|
|
842 |
preg_match_all( '!value=\"([0-9]+)\"!', $html, $matches );
|
843 |
$response['positions'] = $matches[1];
|
844 |
$response['html'] = '<a href="' . get_edit_post_link( $page_id ) . '" target="_blank">' . __( 'Edit Page', 'learnpress' ) . '</a> ';
|
@@ -971,24 +995,19 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
971 |
}
|
972 |
|
973 |
/*
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
}
|
978 |
-
|
979 |
-
$plugin_name = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
|
980 |
-
$response = learn_press_install_add_on( $plugin_name );
|
981 |
-
learn_press_send_json( $response );
|
982 |
-
die();
|
983 |
-
}*/
|
984 |
-
|
985 |
public static function update_add_on_status() {
|
986 |
$plugin = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
|
987 |
$t = ! empty( $_REQUEST['t'] ) ? $_REQUEST['t'] : '';
|
988 |
$response = array();
|
|
|
989 |
if ( ! current_user_can( 'activate_plugins' ) ) {
|
990 |
$response['error'] = __( 'You do not have the permission to deactivate plugins on this site.', 'learnpress' );
|
|
|
991 |
}
|
|
|
992 |
if ( $plugin && $t ) {
|
993 |
if ( $t == 'activate' ) {
|
994 |
activate_plugin( $plugin, false, is_network_admin() );
|
@@ -997,11 +1016,10 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
997 |
}
|
998 |
$is_activate = is_plugin_active( $plugin );
|
999 |
$response['status'] = $is_activate ? 'activate' : 'deactivate';
|
1000 |
-
|
1001 |
}
|
|
|
1002 |
wp_send_json( $response );
|
1003 |
-
|
1004 |
-
}
|
1005 |
|
1006 |
/**
|
1007 |
* Output the image to browser with text and params passed via $_GET
|
@@ -1018,10 +1036,10 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
1018 |
public static function get_page_permalink() {
|
1019 |
$page_id = ! empty( $_REQUEST['page_id'] ) ? $_REQUEST['page_id'] : '';
|
1020 |
?>
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
<?php
|
1026 |
die();
|
1027 |
}
|
@@ -1037,14 +1055,6 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
1037 |
die();
|
1038 |
}
|
1039 |
|
1040 |
-
/*
|
1041 |
-
public static function be_teacher() {
|
1042 |
-
$user_id = get_current_user_id();
|
1043 |
-
$be_teacher = new WP_User( $user_id );
|
1044 |
-
$be_teacher->set_role( LP_TEACHER_ROLE );
|
1045 |
-
die;
|
1046 |
-
}*/
|
1047 |
-
|
1048 |
public static function ignore_setting_up() {
|
1049 |
update_option( '_lpr_ignore_setting_up', 1, true );
|
1050 |
die;
|
@@ -1053,8 +1063,8 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
1053 |
public static function remove_notice_popup() {
|
1054 |
|
1055 |
if ( isset( $_POST['action'] ) && $_POST['action'] === 'learnpress_remove_notice_popup'
|
1056 |
-
|
1057 |
-
|
1058 |
) {
|
1059 |
|
1060 |
$slug = 'learnpress_notice_' . $_POST['slug'] . '_' . $_POST['user'];
|
@@ -1066,21 +1076,55 @@ if ( ! class_exists( 'LP_Admin_Ajax' ) ) {
|
|
1066 |
|
1067 |
}
|
1068 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1069 |
public static function update_order_status() {
|
|
|
|
|
|
|
|
|
|
|
1070 |
|
1071 |
$order_id = learn_press_get_request( 'order_id' );
|
1072 |
$value = learn_press_get_request( 'value' );
|
1073 |
|
1074 |
-
$
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1078 |
|
1079 |
wp_update_post( $order ) ? $response['success'] = true : $response['success'] = false;
|
1080 |
|
1081 |
learn_press_send_json( $response );
|
1082 |
-
|
1083 |
-
die();
|
1084 |
}
|
1085 |
|
1086 |
public static function upload_user_avatar() {
|
31 |
|
32 |
$ajaxEvents = array(
|
33 |
'create_page' => false,
|
34 |
+
//'plugin_action' => false,
|
35 |
'modal_search_items' => false,
|
36 |
'dismiss_notice' => false,
|
37 |
'search_users' => false,
|
38 |
'load_chart' => false,
|
39 |
'search_course_category' => false,
|
40 |
/////////////
|
|
|
41 |
'custom_stats' => false,
|
42 |
'ignore_setting_up' => false,
|
43 |
'get_page_permalink' => false,
|
44 |
'dummy_image' => false,
|
45 |
+
//'update_add_on_status' => false,
|
|
|
46 |
'bundle_activate_add_ons' => false,
|
47 |
'install_sample_data' => false,
|
48 |
|
49 |
// Remove Notice
|
50 |
'remove_notice_popup' => false,
|
51 |
// Update order status
|
52 |
+
//'update_order_status' => false,
|
53 |
);
|
54 |
foreach ( $ajaxEvents as $ajaxEvent => $nopriv ) {
|
55 |
add_action( 'wp_ajax_learnpress_' . $ajaxEvent, array( __CLASS__, $ajaxEvent ) );
|
313 |
}
|
314 |
|
315 |
/**
|
316 |
+
* @param LP_Admin_Editor $editor
|
317 |
+
*
|
318 |
* @since 3.0.2
|
319 |
*
|
|
|
320 |
*/
|
321 |
public static function admin_editor( &$editor ) {
|
322 |
$result = $editor->dispatch();
|
818 |
die();
|
819 |
}
|
820 |
|
821 |
+
/*
|
822 |
+
* comment by tungnnx
|
823 |
+
* @reason not uses - low security
|
824 |
+
* @since 3.2.6.8
|
825 |
public static function plugin_action() {
|
826 |
$url = learn_press_get_request( 'url' );
|
827 |
ob_start();
|
829 |
ob_get_clean();
|
830 |
echo wp_remote_get( admin_url( 'admin.php?page=learn-press-addons&tab=installed' ) );
|
831 |
die();
|
832 |
+
}*/
|
833 |
|
834 |
/**
|
835 |
* Create a new page with the title passed via $_REQUEST
|
836 |
*/
|
837 |
public static function create_page() {
|
838 |
+
$response = array( 'code' => 0, 'message' => '' );
|
839 |
+
|
840 |
+
/**
|
841 |
+
* Check valid
|
842 |
+
*
|
843 |
+
* 1. Capability - user can edit pages (add\edit\delete)
|
844 |
+
* 2. Check nonce return true
|
845 |
+
* 3. param post page_name not empty
|
846 |
+
*
|
847 |
+
* @since 3.2.6.8
|
848 |
+
* @author tungnx
|
849 |
+
*/
|
850 |
+
if ( ! current_user_can( 'edit_pages' ) || ! isset( $_POST['lp-settings-nonce'] )
|
851 |
+
|| ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['lp-settings-nonce'] ) ), 'lp-settings' )
|
852 |
+
|| empty( $_POST['page_name'] )
|
853 |
+
) {
|
854 |
+
$response['message'] = 'Request invalid';
|
855 |
+
learn_press_send_json( $response );
|
856 |
+
}
|
857 |
+
|
858 |
+
$page_name = sanitize_text_field( wp_unslash( $_POST['page_name'] ) );
|
859 |
|
860 |
+
if ( $page_name ) {
|
861 |
if ( $page_id = LP_Helper::create_page( $page_name ) ) {
|
862 |
+
$response['code'] = 1;
|
863 |
+
$response['message'] = 'create page success';
|
864 |
+
$response['page'] = get_post( $page_id );
|
865 |
+
$html = learn_press_pages_dropdown( '', '', array( 'echo' => false ) );
|
866 |
preg_match_all( '!value=\"([0-9]+)\"!', $html, $matches );
|
867 |
$response['positions'] = $matches[1];
|
868 |
$response['html'] = '<a href="' . get_edit_post_link( $page_id ) . '" target="_blank">' . __( 'Edit Page', 'learnpress' ) . '</a> ';
|
995 |
}
|
996 |
|
997 |
/*
|
998 |
+
* comment by tungnnx
|
999 |
+
* @reason not use
|
1000 |
+
* @since 3.2.6.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
public static function update_add_on_status() {
|
1002 |
$plugin = ! empty( $_REQUEST['plugin'] ) ? $_REQUEST['plugin'] : '';
|
1003 |
$t = ! empty( $_REQUEST['t'] ) ? $_REQUEST['t'] : '';
|
1004 |
$response = array();
|
1005 |
+
|
1006 |
if ( ! current_user_can( 'activate_plugins' ) ) {
|
1007 |
$response['error'] = __( 'You do not have the permission to deactivate plugins on this site.', 'learnpress' );
|
1008 |
+
wp_send_json( $response );
|
1009 |
}
|
1010 |
+
|
1011 |
if ( $plugin && $t ) {
|
1012 |
if ( $t == 'activate' ) {
|
1013 |
activate_plugin( $plugin, false, is_network_admin() );
|
1016 |
}
|
1017 |
$is_activate = is_plugin_active( $plugin );
|
1018 |
$response['status'] = $is_activate ? 'activate' : 'deactivate';
|
|
|
1019 |
}
|
1020 |
+
|
1021 |
wp_send_json( $response );
|
1022 |
+
}*/
|
|
|
1023 |
|
1024 |
/**
|
1025 |
* Output the image to browser with text and params passed via $_GET
|
1036 |
public static function get_page_permalink() {
|
1037 |
$page_id = ! empty( $_REQUEST['page_id'] ) ? $_REQUEST['page_id'] : '';
|
1038 |
?>
|
1039 |
+
<a href="<?php echo get_edit_post_link( $page_id ); ?>"
|
1040 |
+
target="_blank"><?php _e( 'Edit Page', 'learnpress' ); ?></a>
|
1041 |
+
<a href="<?php echo get_permalink( $page_id ); ?>"
|
1042 |
+
target="_blank"><?php _e( 'View Page', 'learnpress' ); ?></a>
|
1043 |
<?php
|
1044 |
die();
|
1045 |
}
|
1055 |
die();
|
1056 |
}
|
1057 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1058 |
public static function ignore_setting_up() {
|
1059 |
update_option( '_lpr_ignore_setting_up', 1, true );
|
1060 |
die;
|
1063 |
public static function remove_notice_popup() {
|
1064 |
|
1065 |
if ( isset( $_POST['action'] ) && $_POST['action'] === 'learnpress_remove_notice_popup'
|
1066 |
+
&& isset( $_POST['slug'] ) && ! empty( $_POST['slug'] )
|
1067 |
+
&& isset( $_POST['user'] ) && ! empty( $_POST['user'] )
|
1068 |
) {
|
1069 |
|
1070 |
$slug = 'learnpress_notice_' . $_POST['slug'] . '_' . $_POST['user'];
|
1076 |
|
1077 |
}
|
1078 |
|
1079 |
+
/**
|
1080 |
+
* @editBy tungnx
|
1081 |
+
* @reason fix security, anyone can modify status of any post
|
1082 |
+
*
|
1083 |
+
* @since 3.2.6.8
|
1084 |
+
*/
|
1085 |
public static function update_order_status() {
|
1086 |
+
$response = array( 'success' => false, 'message' => 'Request invalid' );
|
1087 |
+
|
1088 |
+
if ( ! current_user_can( 'administrator' ) ) {
|
1089 |
+
learn_press_send_json( $response );
|
1090 |
+
}
|
1091 |
|
1092 |
$order_id = learn_press_get_request( 'order_id' );
|
1093 |
$value = learn_press_get_request( 'value' );
|
1094 |
|
1095 |
+
if ( empty( $order_id ) || empty( $value ) ) {
|
1096 |
+
learn_press_send_json( $response );
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
$order_id = absint( $order_id );
|
1100 |
+
$value = sanitize_text_field( $value );
|
1101 |
+
|
1102 |
+
$lp_order = get_post( $order_id );
|
1103 |
+
|
1104 |
+
if ( ! ( $lp_order instanceof WP_Post ) ) {
|
1105 |
+
learn_press_send_json( $response );
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
if ( $lp_order->post_type != 'lp_order' ) {
|
1109 |
+
learn_press_send_json( $response );
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
$statusValidArr = array( 'lp-completed', 'lp-cancelled', 'lp-pending', 'lp-refunded', 'lp-cancelled', 'lp-processing' );
|
1113 |
+
|
1114 |
+
if ( ! in_array( $value, $statusValidArr ) ) {
|
1115 |
+
learn_press_send_json( $response );
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
if ( $value ) {
|
1119 |
+
$order = array(
|
1120 |
+
'ID' => $order_id,
|
1121 |
+
'post_status' => $value,
|
1122 |
+
);
|
1123 |
+
}
|
1124 |
|
1125 |
wp_update_post( $order ) ? $response['success'] = true : $response['success'] = false;
|
1126 |
|
1127 |
learn_press_send_json( $response );
|
|
|
|
|
1128 |
}
|
1129 |
|
1130 |
public static function upload_user_avatar() {
|
inc/admin/class-lp-modal-search-items.php
CHANGED
@@ -92,8 +92,8 @@ if ( ! class_exists( 'LP_Modal_Search_Items' ) ) {
|
|
92 |
protected function _get_items() {
|
93 |
global $wpdb;
|
94 |
|
95 |
-
|
96 |
-
|
97 |
$user = learn_press_get_current_user();
|
98 |
|
99 |
$term = $this->_options['term'];
|
@@ -101,16 +101,17 @@ if ( ! class_exists( 'LP_Modal_Search_Items' ) ) {
|
|
101 |
$context = $this->_options['context'];
|
102 |
$context_id = $this->_options['context_id'];
|
103 |
|
|
|
104 |
if ( $current_items_in_order ) {
|
105 |
foreach ( $current_items_in_order as $item ) {
|
106 |
-
$sql = "SELECT meta_value
|
107 |
FROM {$wpdb->prefix}learnpress_order_itemmeta
|
108 |
WHERE meta_key = '_course_id'
|
109 |
-
AND learnpress_order_item_id = $item
|
110 |
$id = $wpdb->get_results( $sql, OBJECT );
|
111 |
array_push( $current_items, $id[0]->meta_value );
|
112 |
}
|
113 |
-
}
|
114 |
|
115 |
// @since 3.0.0
|
116 |
$exclude = array_unique( (array) apply_filters( 'learn-press/modal-search-items/exclude', $this->_options['exclude'], $type, $context, $context_id ) );
|
@@ -266,7 +267,7 @@ if ( ! class_exists( 'LP_Modal_Search_Items' ) ) {
|
|
266 |
}
|
267 |
|
268 |
/**
|
269 |
-
* @param array
|
270 |
* @param string $context
|
271 |
* @param string $context_id
|
272 |
*
|
@@ -289,7 +290,7 @@ if ( ! class_exists( 'LP_Modal_Search_Items' ) ) {
|
|
289 |
* @param $exclude
|
290 |
* @param $type
|
291 |
* @param string $context
|
292 |
-
* @param null
|
293 |
*
|
294 |
* @return array
|
295 |
*/
|
92 |
protected function _get_items() {
|
93 |
global $wpdb;
|
94 |
|
95 |
+
//$current_items = array();
|
96 |
+
//$current_items_in_order = learn_press_get_request( 'current_items' );
|
97 |
$user = learn_press_get_current_user();
|
98 |
|
99 |
$term = $this->_options['term'];
|
101 |
$context = $this->_options['context'];
|
102 |
$context_id = $this->_options['context_id'];
|
103 |
|
104 |
+
/*
|
105 |
if ( $current_items_in_order ) {
|
106 |
foreach ( $current_items_in_order as $item ) {
|
107 |
+
$sql = $wpdb->prepare( "SELECT meta_value
|
108 |
FROM {$wpdb->prefix}learnpress_order_itemmeta
|
109 |
WHERE meta_key = '_course_id'
|
110 |
+
AND learnpress_order_item_id = %d", $item );
|
111 |
$id = $wpdb->get_results( $sql, OBJECT );
|
112 |
array_push( $current_items, $id[0]->meta_value );
|
113 |
}
|
114 |
+
}*/
|
115 |
|
116 |
// @since 3.0.0
|
117 |
$exclude = array_unique( (array) apply_filters( 'learn-press/modal-search-items/exclude', $this->_options['exclude'], $type, $context, $context_id ) );
|
267 |
}
|
268 |
|
269 |
/**
|
270 |
+
* @param array $args
|
271 |
* @param string $context
|
272 |
* @param string $context_id
|
273 |
*
|
290 |
* @param $exclude
|
291 |
* @param $type
|
292 |
* @param string $context
|
293 |
+
* @param null $context_id
|
294 |
*
|
295 |
* @return array
|
296 |
*/
|
inc/admin/helpers/class-lp-plugins-helper.php
CHANGED
@@ -347,7 +347,11 @@ class LP_Plugins_Helper {
|
|
347 |
* @return bool
|
348 |
*/
|
349 |
public static function _filter_plugin( $plugin ) {
|
350 |
-
|
|
|
|
|
|
|
|
|
351 |
}
|
352 |
|
353 |
/**
|
347 |
* @return bool
|
348 |
*/
|
349 |
public static function _filter_plugin( $plugin ) {
|
350 |
+
if ( ! empty( $plugin ) ) {
|
351 |
+
return $plugin && preg_match( '!^learnpress-.*!', $plugin->slug );
|
352 |
+
} else {
|
353 |
+
return false;
|
354 |
+
}
|
355 |
}
|
356 |
|
357 |
/**
|
inc/admin/lp-admin-functions.php
CHANGED
@@ -1380,89 +1380,6 @@ function learn_press_copy_post_meta( $from_id, $to_id ) {
|
|
1380 |
}
|
1381 |
}
|
1382 |
|
1383 |
-
/**
|
1384 |
-
* Install a plugin
|
1385 |
-
*
|
1386 |
-
* @param string $plugin_name
|
1387 |
-
*
|
1388 |
-
* @return array
|
1389 |
-
*/
|
1390 |
-
function learn_press_install_add_on( $plugin_name ) {
|
1391 |
-
require_once( LP_PLUGIN_PATH . '/inc/admin/class-lp-upgrader.php' );
|
1392 |
-
$upgrader = new LP_Upgrader();
|
1393 |
-
global $wp_filesystem;
|
1394 |
-
$response = array();
|
1395 |
-
|
1396 |
-
$package = 'http://thimpress.com/lprepo/' . $plugin_name . '.zip';
|
1397 |
-
|
1398 |
-
$package = $upgrader->download_package( $package );
|
1399 |
-
if ( is_wp_error( $package ) ) {
|
1400 |
-
$response['error'] = $package;
|
1401 |
-
} else {
|
1402 |
-
$working_dir = $upgrader->unpack_package( $package, true, $plugin_name );
|
1403 |
-
if ( is_wp_error( $working_dir ) ) {
|
1404 |
-
$response['error'] = $working_dir;
|
1405 |
-
} else {
|
1406 |
-
|
1407 |
-
$wp_upgrader = new WP_Upgrader();
|
1408 |
-
$options = array(
|
1409 |
-
'source' => $working_dir,
|
1410 |
-
'destination' => WP_PLUGIN_DIR,
|
1411 |
-
'clear_destination' => false, // Do not overwrite files.
|
1412 |
-
'clear_working' => true,
|
1413 |
-
'hook_extra' => array(
|
1414 |
-
'type' => 'plugin',
|
1415 |
-
'action' => 'install'
|
1416 |
-
)
|
1417 |
-
);
|
1418 |
-
//$response = array();
|
1419 |
-
$result = $wp_upgrader->install_package( $options );
|
1420 |
-
|
1421 |
-
if ( is_wp_error( $result ) ) {
|
1422 |
-
$response['error'] = $result;
|
1423 |
-
} else {
|
1424 |
-
$response = $result;
|
1425 |
-
$response['text'] = __( 'Installed', 'learnpress' );
|
1426 |
-
}
|
1427 |
-
}
|
1428 |
-
}
|
1429 |
-
|
1430 |
-
return $response;
|
1431 |
-
}
|
1432 |
-
|
1433 |
-
function learn_press_accept_become_a_teacher() {
|
1434 |
-
$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : '';
|
1435 |
-
$user_id = ! empty( $_REQUEST['user_id'] ) ? $_REQUEST['user_id'] : '';
|
1436 |
-
if ( ! $action || ! $user_id || ( $action != 'accept-to-be-teacher' ) ) {
|
1437 |
-
return;
|
1438 |
-
}
|
1439 |
-
|
1440 |
-
if ( ! learn_press_user_maybe_is_a_teacher( $user_id ) ) {
|
1441 |
-
$be_teacher = new WP_User( $user_id );
|
1442 |
-
$be_teacher->set_role( LP_TEACHER_ROLE );
|
1443 |
-
delete_transient( 'learn_press_become_teacher_sent_' . $user_id );
|
1444 |
-
do_action( 'learn_press_user_become_a_teacher', $user_id );
|
1445 |
-
$redirect = add_query_arg( 'become-a-teacher-accepted', 'yes' );
|
1446 |
-
$redirect = remove_query_arg( 'action', $redirect );
|
1447 |
-
wp_redirect( $redirect );
|
1448 |
-
}
|
1449 |
-
}
|
1450 |
-
|
1451 |
-
add_action( 'plugins_loaded', 'learn_press_accept_become_a_teacher' );
|
1452 |
-
|
1453 |
-
function learn_press_user_become_a_teacher_notice() {
|
1454 |
-
if ( $user_id = learn_press_get_request( 'user_id' ) && learn_press_get_request( 'become-a-teacher-accepted' ) == 'yes' ) {
|
1455 |
-
$user = new WP_User( $user_id );
|
1456 |
-
?>
|
1457 |
-
<div class="updated">
|
1458 |
-
<p><?php printf( __( 'The user %s has become a teacher', 'learnpress' ), $user->user_login ); ?></p>
|
1459 |
-
</div>
|
1460 |
-
<?php
|
1461 |
-
}
|
1462 |
-
}
|
1463 |
-
|
1464 |
-
add_action( 'admin_notices', 'learn_press_user_become_a_teacher_notice' );
|
1465 |
-
|
1466 |
/**
|
1467 |
* Check to see if a plugin is already installed or not
|
1468 |
*
|
1380 |
}
|
1381 |
}
|
1382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1383 |
/**
|
1384 |
* Check to see if a plugin is already installed or not
|
1385 |
*
|
inc/admin/views/meta-boxes/order/order-item.php
CHANGED
@@ -21,11 +21,11 @@
|
|
21 |
|
22 |
</td>
|
23 |
<td class="column-price align-right">
|
24 |
-
<?php echo learn_press_format_price( $item['total'], $currency_symbol ); ?>
|
25 |
</td>
|
26 |
<td class="column-quantity align-right">
|
27 |
<small class="times">×</small>
|
28 |
-
<?php echo $item['quantity']; ?>
|
29 |
</td>
|
30 |
-
|
31 |
</tr>
|
21 |
|
22 |
</td>
|
23 |
<td class="column-price align-right">
|
24 |
+
<?php echo learn_press_format_price( isset( $item['total'] ) ? $item['total'] : 0, $currency_symbol ); ?>
|
25 |
</td>
|
26 |
<td class="column-quantity align-right">
|
27 |
<small class="times">×</small>
|
28 |
+
<?php echo isset( $item['quantity'] ) ? $item['quantity'] : 0; ?>
|
29 |
</td>
|
30 |
+
<td class="column-total align-right"><?php echo learn_press_format_price( isset( $item['total'] ) ? $item['total'] : 0, $currency_symbol ); ?></td>
|
31 |
</tr>
|
inc/background-process/class-lp-background-query-items.php
CHANGED
@@ -282,7 +282,7 @@ if ( ! class_exists( 'LP_Background_Query_Items' ) ) {
|
|
282 |
$all_themes[ $theme['id'] ] = $theme;
|
283 |
}
|
284 |
|
285 |
-
if ( $education_themes = learn_press_get_education_themes() ) {
|
286 |
$themes['other'] = array_diff_key( $all_themes, $education_themes );
|
287 |
$themes['education'] = array_diff_key( $all_themes, $themes['other'] );
|
288 |
} else {
|
282 |
$all_themes[ $theme['id'] ] = $theme;
|
283 |
}
|
284 |
|
285 |
+
if ( function_exists('learn_press_get_education_themes') && $education_themes = learn_press_get_education_themes() ) {
|
286 |
$themes['other'] = array_diff_key( $all_themes, $education_themes );
|
287 |
$themes['education'] = array_diff_key( $all_themes, $themes['other'] );
|
288 |
} else {
|
inc/class-lp-helper.php
CHANGED
@@ -302,4 +302,17 @@ class LP_Helper {
|
|
302 |
public static function uniq(){
|
303 |
|
304 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
302 |
public static function uniq(){
|
303 |
|
304 |
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Get the current url
|
308 |
+
*
|
309 |
+
* @return string
|
310 |
+
* @since 3.2.6.8
|
311 |
+
* @author tungnx
|
312 |
+
*/
|
313 |
+
public static function getUrlCurrent() {
|
314 |
+
$schema = is_ssl() ? 'https://' : 'http://';
|
315 |
+
|
316 |
+
return $schema . $_SERVER['HTTP_HOST'] . untrailingslashit( $_SERVER['REQUEST_URI'] );
|
317 |
+
}
|
318 |
}
|
inc/class-lp-nonce-helper.php
CHANGED
@@ -1,85 +1,85 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Class LP_Nonce_Helper
|
5 |
-
*/
|
6 |
-
class LP_Nonce_Helper {
|
7 |
-
/**
|
8 |
-
* Create nonce for course action.
|
9 |
-
* Return nonce created with format 'learn-press-$action-$course_id-course-$user_id'
|
10 |
-
*
|
11 |
-
* @param string $action [retake, purchase, enroll]
|
12 |
-
* @param int $course_id
|
13 |
-
* @param int $user_id
|
14 |
-
*
|
15 |
-
* @since 3.0.0
|
16 |
-
*
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function create_course( $action, $course_id = 0, $user_id = 0 ) {
|
20 |
-
if ( ! $course_id ) {
|
21 |
-
$course_id = get_the_ID();
|
22 |
-
}
|
23 |
-
|
24 |
-
if ( ! $user_id ) {
|
25 |
-
$user_id = get_current_user_id();
|
26 |
-
}
|
27 |
-
|
28 |
-
return wp_create_nonce( sprintf( 'learn-press-%s-course-%s-%s', $action, $course_id, $user_id ) );
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Verify nonce for course action.
|
33 |
-
*
|
34 |
-
* @param string $nonce
|
35 |
-
* @param string $action
|
36 |
-
* @param int $course_id
|
37 |
-
* @param int $user_id
|
38 |
-
*
|
39 |
-
* @since 3.0.0
|
40 |
-
*
|
41 |
-
* @return bool
|
42 |
-
*/
|
43 |
-
public static function verify_course( $nonce, $action, $course_id = 0, $user_id = 0 ) {
|
44 |
-
if ( ! $course_id ) {
|
45 |
-
$course_id = get_the_ID();
|
46 |
-
}
|
47 |
-
|
48 |
-
if ( ! $user_id ) {
|
49 |
-
$user_id = get_current_user_id();
|
50 |
-
}
|
51 |
-
|
52 |
-
return wp_verify_nonce( $nonce, sprintf( 'learn-press-%s-course-%s-%s', $action, $course_id, $user_id ) );
|
53 |
-
}
|
54 |
-
|
55 |
-
public static function quiz_action( $action, $quiz_id, $course_id, $ajax = false ) {
|
56 |
-
?>
|
57 |
-
<input type="hidden" name="quiz-id" value="<?php echo $quiz_id; ?>">
|
58 |
-
<input type="hidden" name="course-id" value="<?php echo $course_id; ?>">
|
59 |
-
<?php if ( $ajax ) { ?>
|
60 |
-
<input type="hidden" name="lp-ajax" value="<?php echo $action; ?>-quiz">
|
61 |
-
<?php } else { ?>
|
62 |
-
<input type="hidden" name="lp-<?php echo $action; ?>-quiz" value="<?php echo $quiz_id; ?>">
|
63 |
-
<?php } ?>
|
64 |
-
<input type="hidden" name="<?php echo $action; ?>-quiz-nonce"
|
65 |
-
value="<?php echo wp_create_nonce( sprintf( 'learn-press/quiz/%s/%s-%s-%s', $action, get_current_user_id(), $course_id, $quiz_id ) ); ?>">
|
66 |
-
<?php
|
67 |
-
}
|
68 |
-
|
69 |
-
public static function verify_quiz_action( $action, $nonce = '', $quiz_id = 0, $course_id = 0 ) {
|
70 |
-
if ( ! $nonce ) {
|
71 |
-
$nonce = LP_Request::get_post( $action . '-quiz-nonce' );
|
72 |
-
}
|
73 |
-
|
74 |
-
if ( ! $quiz_id ) {
|
75 |
-
global $lp_course_item;
|
76 |
-
$quiz_id = $lp_course_item instanceof LP_Course_Item ? $lp_course_item->get_id() : 0;
|
77 |
-
}
|
78 |
-
|
79 |
-
if ( ! $course_id ) {
|
80 |
-
$course_id = get_the_ID();
|
81 |
-
}
|
82 |
-
|
83 |
-
return wp_verify_nonce( $nonce, sprintf( 'learn-press/quiz/%s/%s-%s-%s', $action, get_current_user_id(), $course_id, $quiz_id ) );
|
84 |
-
}
|
85 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class LP_Nonce_Helper
|
5 |
+
*/
|
6 |
+
class LP_Nonce_Helper {
|
7 |
+
/**
|
8 |
+
* Create nonce for course action.
|
9 |
+
* Return nonce created with format 'learn-press-$action-$course_id-course-$user_id'
|
10 |
+
*
|
11 |
+
* @param string $action [retake, purchase, enroll]
|
12 |
+
* @param int $course_id
|
13 |
+
* @param int $user_id
|
14 |
+
*
|
15 |
+
* @since 3.0.0
|
16 |
+
*
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function create_course( $action, $course_id = 0, $user_id = 0 ) {
|
20 |
+
if ( ! $course_id ) {
|
21 |
+
$course_id = get_the_ID();
|
22 |
+
}
|
23 |
+
|
24 |
+
if ( ! $user_id ) {
|
25 |
+
$user_id = get_current_user_id();
|
26 |
+
}
|
27 |
+
|
28 |
+
return wp_create_nonce( sprintf( 'learn-press-%s-course-%s-%s', $action, $course_id, $user_id ) );
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Verify nonce for course action.
|
33 |
+
*
|
34 |
+
* @param string $nonce
|
35 |
+
* @param string $action
|
36 |
+
* @param int $course_id
|
37 |
+
* @param int $user_id
|
38 |
+
*
|
39 |
+
* @since 3.0.0
|
40 |
+
*
|
41 |
+
* @return bool
|
42 |
+
*/
|
43 |
+
public static function verify_course( $nonce, $action, $course_id = 0, $user_id = 0 ) {
|
44 |
+
if ( ! $course_id ) {
|
45 |
+
$course_id = get_the_ID();
|
46 |
+
}
|
47 |
+
|
48 |
+
if ( ! $user_id ) {
|
49 |
+
$user_id = get_current_user_id();
|
50 |
+
}
|
51 |
+
|
52 |
+
return wp_verify_nonce( $nonce, sprintf( 'learn-press-%s-course-%s-%s', $action, $course_id, $user_id ) );
|
53 |
+
}
|
54 |
+
|
55 |
+
public static function quiz_action( $action, $quiz_id, $course_id, $ajax = false ) {
|
56 |
+
?>
|
57 |
+
<input type="hidden" name="quiz-id" value="<?php echo $quiz_id; ?>">
|
58 |
+
<input type="hidden" name="course-id" value="<?php echo $course_id; ?>">
|
59 |
+
<?php if ( $ajax ) { ?>
|
60 |
+
<input type="hidden" name="lp-ajax" value="<?php echo $action; ?>-quiz">
|
61 |
+
<?php } else { ?>
|
62 |
+
<input type="hidden" name="lp-<?php echo $action; ?>-quiz" value="<?php echo $quiz_id; ?>">
|
63 |
+
<?php } ?>
|
64 |
+
<input type="hidden" name="<?php echo $action; ?>-quiz-nonce"
|
65 |
+
value="<?php echo wp_create_nonce( sprintf( 'learn-press/quiz/%s/%s-%s-%s', $action, get_current_user_id(), $course_id, $quiz_id ) ); ?>">
|
66 |
+
<?php
|
67 |
+
}
|
68 |
+
|
69 |
+
public static function verify_quiz_action( $action, $nonce = '', $quiz_id = 0, $course_id = 0 ) {
|
70 |
+
if ( ! $nonce ) {
|
71 |
+
$nonce = LP_Request::get_post( $action . '-quiz-nonce' );
|
72 |
+
}
|
73 |
+
|
74 |
+
if ( ! $quiz_id ) {
|
75 |
+
global $lp_course_item;
|
76 |
+
$quiz_id = $lp_course_item instanceof LP_Course_Item ? $lp_course_item->get_id() : 0;
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( ! $course_id ) {
|
80 |
+
$course_id = get_the_ID();
|
81 |
+
}
|
82 |
+
|
83 |
+
return wp_verify_nonce( $nonce, sprintf( 'learn-press/quiz/%s/%s-%s-%s', $action, get_current_user_id(), $course_id, $quiz_id ) );
|
84 |
+
}
|
85 |
}
|
inc/class-lp-page-controller.php
CHANGED
@@ -305,7 +305,7 @@ class LP_Page_Controller {
|
|
305 |
// If there is no template is valid in theme or plugin
|
306 |
if ( ! ( $lp_template = $this->_find_template( $template ) ) ) {
|
307 |
// Get template of wp page.
|
308 |
-
|
309 |
if(get_option( 'template' ) == 'twentytwenty' ){
|
310 |
$template = get_singular_template();
|
311 |
}
|
@@ -313,7 +313,7 @@ class LP_Page_Controller {
|
|
313 |
} else {
|
314 |
$template = $lp_template;
|
315 |
}
|
316 |
-
|
317 |
global $post;
|
318 |
setup_postdata( $post );
|
319 |
add_filter( 'the_content', array( $this, 'single_content' ), $this->_filter_content_priority );
|
@@ -533,11 +533,11 @@ class LP_Page_Controller {
|
|
533 |
// PHP 7
|
534 |
LP()->wp_query = clone $wp_query;
|
535 |
|
536 |
-
|
537 |
if(get_option( 'template' ) == 'twentytwenty' ){
|
538 |
$template = get_singular_template();
|
539 |
}
|
540 |
-
|
541 |
* Fix in case a static page is used for archive course page and
|
542 |
* it's slug is the same with course archive slug (courses).
|
543 |
* In this case, WP know it as a course archive page not a
|
305 |
// If there is no template is valid in theme or plugin
|
306 |
if ( ! ( $lp_template = $this->_find_template( $template ) ) ) {
|
307 |
// Get template of wp page.
|
308 |
+
$template = get_page_template();
|
309 |
if(get_option( 'template' ) == 'twentytwenty' ){
|
310 |
$template = get_singular_template();
|
311 |
}
|
313 |
} else {
|
314 |
$template = $lp_template;
|
315 |
}
|
316 |
+
if ( $this->_is_single() ) {
|
317 |
global $post;
|
318 |
setup_postdata( $post );
|
319 |
add_filter( 'the_content', array( $this, 'single_content' ), $this->_filter_content_priority );
|
533 |
// PHP 7
|
534 |
LP()->wp_query = clone $wp_query;
|
535 |
|
536 |
+
$template = get_page_template();
|
537 |
if(get_option( 'template' ) == 'twentytwenty' ){
|
538 |
$template = get_singular_template();
|
539 |
}
|
540 |
+
/**
|
541 |
* Fix in case a static page is used for archive course page and
|
542 |
* it's slug is the same with course archive slug (courses).
|
543 |
* In this case, WP know it as a course archive page not a
|
inc/class-lp-schedules.php
CHANGED
@@ -16,10 +16,10 @@ class LP_Schedules {
|
|
16 |
* LP_Schedules constructor.
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
-
|
20 |
if ( learn_press_get_request( 'action' ) == 'heartbeat' || ! is_admin() ) {
|
21 |
-
add_filter( 'init', array( $this, '_update_current_user_course_expired' ) );
|
22 |
-
add_filter( 'init', array( $this, 'fix_bug_auto_finish_not_enrolled_course' ) );// remove this code on LP 3.2.3
|
23 |
}
|
24 |
}
|
25 |
|
16 |
* LP_Schedules constructor.
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
+
//Todo: can remove this class
|
20 |
if ( learn_press_get_request( 'action' ) == 'heartbeat' || ! is_admin() ) {
|
21 |
+
//add_filter( 'init', array( $this, '_update_current_user_course_expired' ) );
|
22 |
+
//add_filter( 'init', array( $this, 'fix_bug_auto_finish_not_enrolled_course' ) );// remove this code on LP 3.2.3
|
23 |
}
|
24 |
}
|
25 |
|
inc/course/abstract-course.php
CHANGED
@@ -1658,8 +1658,11 @@ if ( ! function_exists( 'LP_Abstract_Course' ) ) {
|
|
1658 |
return apply_filters( 'learn-press/course-external-link', $this->get_data( 'external_link' ), $this->get_id() );
|
1659 |
}
|
1660 |
|
|
|
|
|
|
|
1661 |
public function get_external_link_text() {
|
1662 |
-
return apply_filters( 'learn-press/course-external-link-text', _x( '
|
1663 |
}
|
1664 |
|
1665 |
/**
|
1658 |
return apply_filters( 'learn-press/course-external-link', $this->get_data( 'external_link' ), $this->get_id() );
|
1659 |
}
|
1660 |
|
1661 |
+
/**
|
1662 |
+
* @return string
|
1663 |
+
*/
|
1664 |
public function get_external_link_text() {
|
1665 |
+
return apply_filters( 'learn-press/course-external-link-text', _x( 'Enroll', 'Enroll with external link', 'learnpress' ), $this->get_id() );
|
1666 |
}
|
1667 |
|
1668 |
/**
|
inc/course/class-lp-course-item.php
CHANGED
@@ -134,8 +134,12 @@ if ( ! class_exists( 'LP_Course_Item' ) ) {
|
|
134 |
public function get_format() {
|
135 |
|
136 |
if ( ! metadata_exists( 'post', $this->get_id(), 'post_format' ) ) {
|
137 |
-
$curd
|
138 |
-
$
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
$format = get_post_meta( $this->get_id(), 'post_format', true );// ( false !== ( $format = LP_Object_Cache::get( 'item-format-' . $this->get_id(), 'learn-press/item-formats' ) ) ) ? $format : get_post_format( $this->get_id() );
|
141 |
|
134 |
public function get_format() {
|
135 |
|
136 |
if ( ! metadata_exists( 'post', $this->get_id(), 'post_format' ) ) {
|
137 |
+
$curd = new LP_Course_CURD();
|
138 |
+
$course = $this->get_course();
|
139 |
+
|
140 |
+
if ( isset( $course ) ) {
|
141 |
+
$curd->update_items_format( $course->get_id() );
|
142 |
+
}
|
143 |
}
|
144 |
$format = get_post_meta( $this->get_id(), 'post_format', true );// ( false !== ( $format = LP_Object_Cache::get( 'item-format-' . $this->get_id(), 'learn-press/item-formats' ) ) ) ? $format : get_post_format( $this->get_id() );
|
145 |
|
inc/course/class-lp-course-section.php
CHANGED
@@ -192,7 +192,7 @@ class LP_Course_Section extends LP_Abstract_Object_Data {
|
|
192 |
return $items;
|
193 |
}
|
194 |
|
195 |
-
if (
|
196 |
$filtered_items = array();
|
197 |
|
198 |
if ( $type ) {
|
@@ -207,7 +207,8 @@ class LP_Course_Section extends LP_Abstract_Object_Data {
|
|
207 |
continue;
|
208 |
}
|
209 |
}
|
210 |
-
|
|
|
211 |
$filtered_items[] = $item;
|
212 |
}
|
213 |
}
|
192 |
return $items;
|
193 |
}
|
194 |
|
195 |
+
if ( ! empty( $type ) ) {
|
196 |
$filtered_items = array();
|
197 |
|
198 |
if ( $type ) {
|
207 |
continue;
|
208 |
}
|
209 |
}
|
210 |
+
|
211 |
+
if ( in_array( learn_press_get_post_type( $item->get_id() ), $type ) ) {
|
212 |
$filtered_items[] = $item;
|
213 |
}
|
214 |
}
|
inc/curds/class-lp-order-curd.php
CHANGED
@@ -94,6 +94,7 @@ class LP_Order_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
94 |
*
|
95 |
* @return mixed
|
96 |
*/
|
|
|
97 |
public function read_items( $order ) {
|
98 |
global $wpdb;
|
99 |
$screen = function_exists('get_current_screen')? get_current_screen():null;
|
@@ -126,6 +127,61 @@ class LP_Order_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
126 |
}
|
127 |
|
128 |
return $items;// apply_filters( 'learn_press_order_get_items', $items, $this );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
130 |
|
131 |
public function get_item_meta( &$item ) {
|
@@ -364,13 +420,13 @@ class LP_Order_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
364 |
WHERE order_id = %d
|
365 |
", $from );
|
366 |
if ( $items = $order->get_items() ) {
|
367 |
-
//
|
368 |
-
//
|
369 |
-
// $sql = $wpdb->prepare( "
|
370 |
-
// SELECT order_item_id, oim.meta_value AS course_id
|
371 |
-
// FROM {$wpdb->learnpress_order_itemmeta} oim
|
372 |
-
// INNER JOIN {$wpdb->learnpress_order_items} oi ON oi.order_item_id = oim.learnpress_order_item_id AND oim.meta_key = %s
|
373 |
-
// ", '_course_id' );
|
374 |
|
375 |
if ( ! $to_order = learn_press_get_order( $to ) ) {
|
376 |
return false;
|
@@ -417,9 +473,9 @@ class LP_Order_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
417 |
*
|
418 |
* @param LP_Order $order
|
419 |
*
|
|
|
420 |
* @throws Exception
|
421 |
*
|
422 |
-
* @return mixed
|
423 |
*/
|
424 |
public function load( &$order ) {
|
425 |
$the_id = $order->get_id();
|
94 |
*
|
95 |
* @return mixed
|
96 |
*/
|
97 |
+
/* old function - comment by tungnx
|
98 |
public function read_items( $order ) {
|
99 |
global $wpdb;
|
100 |
$screen = function_exists('get_current_screen')? get_current_screen():null;
|
127 |
}
|
128 |
|
129 |
return $items;// apply_filters( 'learn_press_order_get_items', $items, $this );
|
130 |
+
} */
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Get order's items
|
134 |
+
*
|
135 |
+
* @param LP_Order $order
|
136 |
+
*
|
137 |
+
* @return mixed
|
138 |
+
* @author tungnx
|
139 |
+
*/
|
140 |
+
public function read_items( $order ) {
|
141 |
+
global $wpdb;
|
142 |
+
|
143 |
+
$table_order_items = $wpdb->learnpress_order_items;
|
144 |
+
$table_order_item_meta = $wpdb->learnpress_order_itemmeta;
|
145 |
+
|
146 |
+
$query = $wpdb->prepare( "SELECT o_item.order_item_id, o_item.order_item_name, o_itemmeta.meta_value, o_itemmeta.meta_key
|
147 |
+
From $table_order_items as o_item
|
148 |
+
INNER JOIN $table_order_item_meta as o_itemmeta
|
149 |
+
ON o_item.order_item_id = o_itemmeta.learnpress_order_item_id
|
150 |
+
WHERE o_item.order_id = %d
|
151 |
+
LIMIT %d",
|
152 |
+
$order->get_id(), 4 * 50 );
|
153 |
+
|
154 |
+
//Todo: write query to function and call ajax load more
|
155 |
+
$order_item_metas = $wpdb->get_results( $query, OBJECT );
|
156 |
+
|
157 |
+
$items = array();
|
158 |
+
|
159 |
+
foreach ( $order_item_metas as $order_item_meta ) {
|
160 |
+
if ( ! array_key_exists( $order_item_meta->order_item_id, $items ) ) {
|
161 |
+
$items[ $order_item_meta->order_item_id ] = array();
|
162 |
+
$items[ $order_item_meta->order_item_id ]['id'] = $order_item_meta->order_item_id;
|
163 |
+
$items[ $order_item_meta->order_item_id ]['name'] = isset( $order_item_meta->order_item_name ) ? $order_item_meta->order_item_name : '';
|
164 |
+
}
|
165 |
+
|
166 |
+
switch ( $order_item_meta->meta_key ) {
|
167 |
+
case '_course_id':
|
168 |
+
$items[ $order_item_meta->order_item_id ]['course_id'] = $order_item_meta->meta_value;
|
169 |
+
break;
|
170 |
+
case '_quantity':
|
171 |
+
$items[ $order_item_meta->order_item_id ]['quantity'] = $order_item_meta->meta_value;
|
172 |
+
break;
|
173 |
+
case '_subtotal':
|
174 |
+
$items[ $order_item_meta->order_item_id ]['subtotal'] = $order_item_meta->meta_value;
|
175 |
+
break;
|
176 |
+
case '_total':
|
177 |
+
$items[ $order_item_meta->order_item_id ]['total'] = $order_item_meta->meta_value;
|
178 |
+
break;
|
179 |
+
default:
|
180 |
+
$items[ $order_item_meta->order_item_id ][ $order_item_meta->meta_key ] = $order_item_meta->meta_value;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
return $items; // apply_filters( 'learn_press_order_get_items', $items, $this );
|
185 |
}
|
186 |
|
187 |
public function get_item_meta( &$item ) {
|
420 |
WHERE order_id = %d
|
421 |
", $from );
|
422 |
if ( $items = $order->get_items() ) {
|
423 |
+
//
|
424 |
+
//
|
425 |
+
// $sql = $wpdb->prepare( "
|
426 |
+
// SELECT order_item_id, oim.meta_value AS course_id
|
427 |
+
// FROM {$wpdb->learnpress_order_itemmeta} oim
|
428 |
+
// INNER JOIN {$wpdb->learnpress_order_items} oi ON oi.order_item_id = oim.learnpress_order_item_id AND oim.meta_key = %s
|
429 |
+
// ", '_course_id' );
|
430 |
|
431 |
if ( ! $to_order = learn_press_get_order( $to ) ) {
|
432 |
return false;
|
473 |
*
|
474 |
* @param LP_Order $order
|
475 |
*
|
476 |
+
* @return mixed
|
477 |
* @throws Exception
|
478 |
*
|
|
|
479 |
*/
|
480 |
public function load( &$order ) {
|
481 |
$the_id = $order->get_id();
|
inc/curds/class-lp-user-curd.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Class LP_User_CURD
|
5 |
*
|
6 |
-
* @since 3.0
|
7 |
*/
|
8 |
class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
9 |
|
@@ -422,7 +422,7 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
422 |
* @return bool
|
423 |
*/
|
424 |
public function read_course( $user_id = null, $course_id = null, $force = false ) {
|
425 |
-
LP_Debug::logTime( __FUNCTION__ );
|
426 |
if ( is_null( $user_id ) ) {
|
427 |
$user_id = get_current_user_id();
|
428 |
}
|
@@ -466,16 +466,22 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
466 |
LIMIT 0, 1
|
467 |
", LP_COURSE_CPT, $user_id, $course_id );
|
468 |
|
469 |
-
|
470 |
-
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
472 |
} else {
|
473 |
$result = '';
|
474 |
}
|
475 |
|
476 |
LP_Object_Cache::set( 'course-' . $user_id . '-' . $course_id, $result, 'learn-press/user-item-courses' );
|
477 |
|
478 |
-
LP_Debug::logTime( __FUNCTION__ );
|
479 |
|
480 |
return $result;
|
481 |
}
|
@@ -1205,13 +1211,13 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
1205 |
//$orders = $this->get_orders( $user_id );
|
1206 |
$query = array( 'total' => 0, 'pages' => 0, 'items' => false );
|
1207 |
|
1208 |
-
// //if ( ! $orders ) {
|
1209 |
-
// // throw new Exception( "Error", 0 );
|
1210 |
-
// //}
|
1211 |
-
//
|
1212 |
-
// //$course_ids = array_keys( $orders );
|
1213 |
-
// //$query_args = $course_ids;
|
1214 |
-
// $query_args[] = $user_id;
|
1215 |
$limit = $args['limit'];
|
1216 |
$where = "WHERE 1";
|
1217 |
$offset = ( $args['paged'] - 1 ) * $limit;
|
@@ -1325,10 +1331,10 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
1325 |
|
1326 |
$query = array( 'total' => 0, 'pages' => 0, 'items' => false );
|
1327 |
|
1328 |
-
// $orders = $this->get_orders( $user_id, array(
|
1329 |
-
// 'status' => 'completed processing cancelled',
|
1330 |
-
// 'group_by_order' => true
|
1331 |
-
// ) );
|
1332 |
|
1333 |
if ( ! $course_ids ) {
|
1334 |
throw new Exception( "", 0 );
|
@@ -1359,27 +1365,27 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
1359 |
// HAVING
|
1360 |
$having = "HAVING 1";
|
1361 |
|
1362 |
-
// learn_press_debug( $wpdb->get_results( $query ) );
|
1363 |
-
//
|
1364 |
-
// $order_format = array_fill( 0, sizeof( $valid_orders ), '%d' );
|
1365 |
-
//
|
1366 |
-
// // SELECT
|
1367 |
-
// $select = "SELECT ui.* ";
|
1368 |
-
//
|
1369 |
-
// // FROM
|
1370 |
-
// $from = "FROM {$wpdb->learnpress_user_items} ui";
|
1371 |
-
//
|
1372 |
-
// // JOIN
|
1373 |
-
// $join = $wpdb->prepare( "INNER JOIN {$wpdb->posts} c ON c.ID = ui.item_id AND c.post_type = %s", LP_COURSE_CPT );
|
1374 |
-
// $join .= $wpdb->prepare( "INNER JOIN {$wpdb->posts} o ON o.ID = ui.ref_id AND o.post_type = %s", LP_ORDER_CPT );
|
1375 |
-
//
|
1376 |
-
// // WHERE
|
1377 |
-
// $where = $wpdb->prepare( "WHERE 1 AND user_id = %d AND c.post_status = %s", $user_id, 'publish' );
|
1378 |
-
// $where .= $wpdb->prepare( "AND o.post_status IN(%s)", 'lp-completed' );
|
1379 |
-
//
|
1380 |
-
// // HAVING
|
1381 |
-
// $having = "HAVING 1";
|
1382 |
-
//
|
1383 |
// ORDER BY
|
1384 |
$orderby = "ORDER BY start_time DESC";
|
1385 |
|
@@ -1518,17 +1524,17 @@ class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
|
1518 |
public function query_courses_by_order( $user_id ) {
|
1519 |
global $wpdb;
|
1520 |
|
1521 |
-
// $query = $wpdb->prepare( "
|
1522 |
-
// SELECT course.ID AS course_id, `order`.ID AS order_id, `order`.post_parent AS order_parent
|
1523 |
-
// FROM {$wpdb->posts} `order`
|
1524 |
-
// INNER JOIN {$wpdb->learnpress_order_items} oi ON oi.order_id = `order`.ID
|
1525 |
-
// INNER JOIN {$wpdb->learnpress_order_itemmeta} oim ON oi.order_item_id = oim.learnpress_order_item_id AND oim.meta_key = %s
|
1526 |
-
// INNER JOIN {$wpdb->posts} course ON course.ID = oim.meta_value
|
1527 |
-
// INNER JOIN {$wpdb->postmeta} pmu ON pmu.post_id = `order`.ID AND pmu.meta_key = %s
|
1528 |
-
// WHERE pmu.meta_value = %d
|
1529 |
-
// ORDER BY order_id DESC
|
1530 |
-
// ", '_course_id', '_user_id', $user_id );
|
1531 |
-
// $course_ids = $wpdb->get_col( $query );
|
1532 |
|
1533 |
$query = $wpdb->prepare( "
|
1534 |
SELECT item_id
|
3 |
/**
|
4 |
* Class LP_User_CURD
|
5 |
*
|
6 |
+
* @since 3.0.1
|
7 |
*/
|
8 |
class LP_User_CURD extends LP_Object_Data_CURD implements LP_Interface_CURD {
|
9 |
|
422 |
* @return bool
|
423 |
*/
|
424 |
public function read_course( $user_id = null, $course_id = null, $force = false ) {
|
425 |
+
#LP_Debug::logTime( __FUNCTION__ );
|
426 |
if ( is_null( $user_id ) ) {
|
427 |
$user_id = get_current_user_id();
|
428 |
}
|
466 |
LIMIT 0, 1
|
467 |
", LP_COURSE_CPT, $user_id, $course_id );
|
468 |
|
469 |
+
// Check is page single course
|
470 |
+
$isPageSingleCourse = false;
|
471 |
+
|
472 |
+
if ( learn_press_is_course() && is_single() ) {
|
473 |
+
$isPageSingleCourse = true;
|
474 |
+
}
|
475 |
+
|
476 |
+
if ( $isPageSingleCourse ) {
|
477 |
+
$result = $wpdb->get_row( $query, ARRAY_A );
|
478 |
} else {
|
479 |
$result = '';
|
480 |
}
|
481 |
|
482 |
LP_Object_Cache::set( 'course-' . $user_id . '-' . $course_id, $result, 'learn-press/user-item-courses' );
|
483 |
|
484 |
+
#LP_Debug::logTime( __FUNCTION__ );
|
485 |
|
486 |
return $result;
|
487 |
}
|
1211 |
//$orders = $this->get_orders( $user_id );
|
1212 |
$query = array( 'total' => 0, 'pages' => 0, 'items' => false );
|
1213 |
|
1214 |
+
// //if ( ! $orders ) {
|
1215 |
+
// // throw new Exception( "Error", 0 );
|
1216 |
+
// //}
|
1217 |
+
//
|
1218 |
+
// //$course_ids = array_keys( $orders );
|
1219 |
+
// //$query_args = $course_ids;
|
1220 |
+
// $query_args[] = $user_id;
|
1221 |
$limit = $args['limit'];
|
1222 |
$where = "WHERE 1";
|
1223 |
$offset = ( $args['paged'] - 1 ) * $limit;
|
1331 |
|
1332 |
$query = array( 'total' => 0, 'pages' => 0, 'items' => false );
|
1333 |
|
1334 |
+
// $orders = $this->get_orders( $user_id, array(
|
1335 |
+
// 'status' => 'completed processing cancelled',
|
1336 |
+
// 'group_by_order' => true
|
1337 |
+
// ) );
|
1338 |
|
1339 |
if ( ! $course_ids ) {
|
1340 |
throw new Exception( "", 0 );
|
1365 |
// HAVING
|
1366 |
$having = "HAVING 1";
|
1367 |
|
1368 |
+
// learn_press_debug( $wpdb->get_results( $query ) );
|
1369 |
+
//
|
1370 |
+
// $order_format = array_fill( 0, sizeof( $valid_orders ), '%d' );
|
1371 |
+
//
|
1372 |
+
// // SELECT
|
1373 |
+
// $select = "SELECT ui.* ";
|
1374 |
+
//
|
1375 |
+
// // FROM
|
1376 |
+
// $from = "FROM {$wpdb->learnpress_user_items} ui";
|
1377 |
+
//
|
1378 |
+
// // JOIN
|
1379 |
+
// $join = $wpdb->prepare( "INNER JOIN {$wpdb->posts} c ON c.ID = ui.item_id AND c.post_type = %s", LP_COURSE_CPT );
|
1380 |
+
// $join .= $wpdb->prepare( "INNER JOIN {$wpdb->posts} o ON o.ID = ui.ref_id AND o.post_type = %s", LP_ORDER_CPT );
|
1381 |
+
//
|
1382 |
+
// // WHERE
|
1383 |
+
// $where = $wpdb->prepare( "WHERE 1 AND user_id = %d AND c.post_status = %s", $user_id, 'publish' );
|
1384 |
+
// $where .= $wpdb->prepare( "AND o.post_status IN(%s)", 'lp-completed' );
|
1385 |
+
//
|
1386 |
+
// // HAVING
|
1387 |
+
// $having = "HAVING 1";
|
1388 |
+
//
|
1389 |
// ORDER BY
|
1390 |
$orderby = "ORDER BY start_time DESC";
|
1391 |
|
1524 |
public function query_courses_by_order( $user_id ) {
|
1525 |
global $wpdb;
|
1526 |
|
1527 |
+
// $query = $wpdb->prepare( "
|
1528 |
+
// SELECT course.ID AS course_id, `order`.ID AS order_id, `order`.post_parent AS order_parent
|
1529 |
+
// FROM {$wpdb->posts} `order`
|
1530 |
+
// INNER JOIN {$wpdb->learnpress_order_items} oi ON oi.order_id = `order`.ID
|
1531 |
+
// INNER JOIN {$wpdb->learnpress_order_itemmeta} oim ON oi.order_item_id = oim.learnpress_order_item_id AND oim.meta_key = %s
|
1532 |
+
// INNER JOIN {$wpdb->posts} course ON course.ID = oim.meta_value
|
1533 |
+
// INNER JOIN {$wpdb->postmeta} pmu ON pmu.post_id = `order`.ID AND pmu.meta_key = %s
|
1534 |
+
// WHERE pmu.meta_value = %d
|
1535 |
+
// ORDER BY order_id DESC
|
1536 |
+
// ", '_course_id', '_user_id', $user_id );
|
1537 |
+
// $course_ids = $wpdb->get_col( $query );
|
1538 |
|
1539 |
$query = $wpdb->prepare( "
|
1540 |
SELECT item_id
|
inc/libraries/meta-box/css/autocomplete.css
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
.rwmb-autocomplete-result {
|
2 |
-
border-bottom: 1px solid #ccc;
|
3 |
-
padding: 1em 0;
|
4 |
-
overflow: hidden;
|
5 |
-
}
|
6 |
-
.rwmb-autocomplete-result .label {
|
7 |
-
float: left;
|
8 |
-
width: 90%;
|
9 |
-
}
|
10 |
-
.rwmb-autocomplete-result .actions {
|
11 |
-
width: 10%;
|
12 |
-
float: right;
|
13 |
-
cursor: pointer;
|
14 |
-
}
|
1 |
+
.rwmb-autocomplete-result {
|
2 |
+
border-bottom: 1px solid #ccc;
|
3 |
+
padding: 1em 0;
|
4 |
+
overflow: hidden;
|
5 |
+
}
|
6 |
+
.rwmb-autocomplete-result .label {
|
7 |
+
float: left;
|
8 |
+
width: 90%;
|
9 |
+
}
|
10 |
+
.rwmb-autocomplete-result .actions {
|
11 |
+
width: 10%;
|
12 |
+
float: right;
|
13 |
+
cursor: pointer;
|
14 |
+
}
|
inc/libraries/meta-box/css/background.css
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
.rwmb-background-row {
|
2 |
-
margin-bottom: 5px;
|
3 |
-
}
|
4 |
-
.rwmb-background-wrapper .wp-picker-container {
|
5 |
-
position: relative;
|
6 |
-
display: inline-block;
|
7 |
-
vertical-align: top;
|
8 |
-
}
|
9 |
-
.rwmb-background-wrapper .wp-picker-holder {
|
10 |
-
position: absolute;
|
11 |
-
z-index: 9;
|
12 |
-
min-width: 255px;
|
13 |
-
}
|
14 |
-
.rwmb-background-wrapper .rwmb-select {
|
15 |
-
width: 49%;
|
16 |
-
max-width: 230px;
|
17 |
-
}
|
1 |
+
.rwmb-background-row {
|
2 |
+
margin-bottom: 5px;
|
3 |
+
}
|
4 |
+
.rwmb-background-wrapper .wp-picker-container {
|
5 |
+
position: relative;
|
6 |
+
display: inline-block;
|
7 |
+
vertical-align: top;
|
8 |
+
}
|
9 |
+
.rwmb-background-wrapper .wp-picker-holder {
|
10 |
+
position: absolute;
|
11 |
+
z-index: 9;
|
12 |
+
min-width: 255px;
|
13 |
+
}
|
14 |
+
.rwmb-background-wrapper .rwmb-select {
|
15 |
+
width: 49%;
|
16 |
+
max-width: 230px;
|
17 |
+
}
|
inc/libraries/meta-box/css/button-group.css
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
.rwmb-button-input-list li {
|
2 |
-
margin-bottom: 0;
|
3 |
-
list-style: none;
|
4 |
-
}
|
5 |
-
.rwmb-button-input-list .rwmb-button_group {
|
6 |
-
display: none;
|
7 |
-
}
|
8 |
-
.rwmb-button-input-list li label {
|
9 |
-
display: inline-block;
|
10 |
-
border: #ccc solid 1px;
|
11 |
-
position: relative;
|
12 |
-
z-index: 1;
|
13 |
-
padding: 5px 10px;
|
14 |
-
background: #fff;
|
15 |
-
}
|
16 |
-
.rwmb-button-input-list li label.selected {
|
17 |
-
border-color: #0073aa;
|
18 |
-
background: #0073aa;
|
19 |
-
color: #fff;
|
20 |
-
z-index: 2;
|
21 |
-
}
|
22 |
-
/* Layout not inline
|
23 |
-
-------------------------------------------------*/
|
24 |
-
.rwmb-button-input-list:not(.rwmb-inline) li label {
|
25 |
-
border-top-width: 0;
|
26 |
-
}
|
27 |
-
.rwmb-button-input-list:not(.rwmb-inline) li:first-child label {
|
28 |
-
border-top-width: 1px;
|
29 |
-
}
|
30 |
-
.rwmb-button-input-list:not(.rwmb-inline) li label.selected {
|
31 |
-
border-bottom: 1px solid #fff;
|
32 |
-
}
|
33 |
-
.rwmb-button-input-list:not(.rwmb-inline) li:last-child label.selected {
|
34 |
-
border-bottom-color: #0073aa;
|
35 |
-
}
|
36 |
-
.rwmb-button-input-list:not(.rwmb-inline) > li:first-child:not(:last-child) label {
|
37 |
-
border-top-left-radius: 3px;
|
38 |
-
border-top-right-radius: 3px;
|
39 |
-
}
|
40 |
-
.rwmb-button-input-list:not(.rwmb-inline) > li:last-child:not(:first-child) label {
|
41 |
-
border-bottom-right-radius: 3px;
|
42 |
-
border-bottom-left-radius: 3px;
|
43 |
-
}
|
44 |
-
/* Layout inline
|
45 |
-
---------------------------------------------*/
|
46 |
-
.rwmb-button-input-list.rwmb-inline li {
|
47 |
-
display: inline-block;
|
48 |
-
}
|
49 |
-
.rwmb-button-input-list.rwmb-inline li label {
|
50 |
-
border-left-width: 0;
|
51 |
-
}
|
52 |
-
.rwmb-button-input-list.rwmb-inline li:first-child label {
|
53 |
-
border-left-width: 1px;
|
54 |
-
}
|
55 |
-
.rwmb-button-input-list.rwmb-inline li label.selected {
|
56 |
-
border-right-color: rgb(255, 255, 255);
|
57 |
-
}
|
58 |
-
.rwmb-button-input-list.rwmb-inline li:last-child label.selected {
|
59 |
-
border-right-color: #0073aa;
|
60 |
-
}
|
61 |
-
.rwmb-button-input-list.rwmb-inline > li:first-child:not(:last-child) label {
|
62 |
-
border-top-left-radius: 3px;
|
63 |
-
border-bottom-left-radius: 3px;
|
64 |
-
}
|
65 |
-
.rwmb-button-input-list.rwmb-inline > li:last-child:not(:first-child) label {
|
66 |
-
border-top-right-radius: 3px;
|
67 |
-
border-bottom-right-radius: 3px;
|
68 |
-
}
|
1 |
+
.rwmb-button-input-list li {
|
2 |
+
margin-bottom: 0;
|
3 |
+
list-style: none;
|
4 |
+
}
|
5 |
+
.rwmb-button-input-list .rwmb-button_group {
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
.rwmb-button-input-list li label {
|
9 |
+
display: inline-block;
|
10 |
+
border: #ccc solid 1px;
|
11 |
+
position: relative;
|
12 |
+
z-index: 1;
|
13 |
+
padding: 5px 10px;
|
14 |
+
background: #fff;
|
15 |
+
}
|
16 |
+
.rwmb-button-input-list li label.selected {
|
17 |
+
border-color: #0073aa;
|
18 |
+
background: #0073aa;
|
19 |
+
color: #fff;
|
20 |
+
z-index: 2;
|
21 |
+
}
|
22 |
+
/* Layout not inline
|
23 |
+
-------------------------------------------------*/
|
24 |
+
.rwmb-button-input-list:not(.rwmb-inline) li label {
|
25 |
+
border-top-width: 0;
|
26 |
+
}
|
27 |
+
.rwmb-button-input-list:not(.rwmb-inline) li:first-child label {
|
28 |
+
border-top-width: 1px;
|
29 |
+
}
|
30 |
+
.rwmb-button-input-list:not(.rwmb-inline) li label.selected {
|
31 |
+
border-bottom: 1px solid #fff;
|
32 |
+
}
|
33 |
+
.rwmb-button-input-list:not(.rwmb-inline) li:last-child label.selected {
|
34 |
+
border-bottom-color: #0073aa;
|
35 |
+
}
|
36 |
+
.rwmb-button-input-list:not(.rwmb-inline) > li:first-child:not(:last-child) label {
|
37 |
+
border-top-left-radius: 3px;
|
38 |
+
border-top-right-radius: 3px;
|
39 |
+
}
|
40 |
+
.rwmb-button-input-list:not(.rwmb-inline) > li:last-child:not(:first-child) label {
|
41 |
+
border-bottom-right-radius: 3px;
|
42 |
+
border-bottom-left-radius: 3px;
|
43 |
+
}
|
44 |
+
/* Layout inline
|
45 |
+
---------------------------------------------*/
|
46 |
+
.rwmb-button-input-list.rwmb-inline li {
|
47 |
+
display: inline-block;
|
48 |
+
}
|
49 |
+
.rwmb-button-input-list.rwmb-inline li label {
|
50 |
+
border-left-width: 0;
|
51 |
+
}
|
52 |
+
.rwmb-button-input-list.rwmb-inline li:first-child label {
|
53 |
+
border-left-width: 1px;
|
54 |
+
}
|
55 |
+
.rwmb-button-input-list.rwmb-inline li label.selected {
|
56 |
+
border-right-color: rgb(255, 255, 255);
|
57 |
+
}
|
58 |
+
.rwmb-button-input-list.rwmb-inline li:last-child label.selected {
|
59 |
+
border-right-color: #0073aa;
|
60 |
+
}
|
61 |
+
.rwmb-button-input-list.rwmb-inline > li:first-child:not(:last-child) label {
|
62 |
+
border-top-left-radius: 3px;
|
63 |
+
border-bottom-left-radius: 3px;
|
64 |
+
}
|
65 |
+
.rwmb-button-input-list.rwmb-inline > li:last-child:not(:first-child) label {
|
66 |
+
border-top-right-radius: 3px;
|
67 |
+
border-bottom-right-radius: 3px;
|
68 |
+
}
|
inc/libraries/meta-box/css/color.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
.rwmb-color-wrapper .wp-picker-container {
|
2 |
-
position: relative;
|
3 |
-
}
|
4 |
-
.rwmb-color-wrapper .wp-picker-holder {
|
5 |
-
position: absolute;
|
6 |
-
z-index: 99;
|
7 |
-
min-width: 255px;
|
8 |
-
}
|
1 |
+
.rwmb-color-wrapper .wp-picker-container {
|
2 |
+
position: relative;
|
3 |
+
}
|
4 |
+
.rwmb-color-wrapper .wp-picker-holder {
|
5 |
+
position: absolute;
|
6 |
+
z-index: 99;
|
7 |
+
min-width: 255px;
|
8 |
+
}
|
inc/libraries/meta-box/css/datepicker.css
CHANGED
@@ -1,231 +1,231 @@
|
|
1 |
-
/* Fix empty block below admin footer (issue #24) */
|
2 |
-
#ui-datepicker-div {
|
3 |
-
display: none;
|
4 |
-
z-index: 99999 !important;
|
5 |
-
}
|
6 |
-
|
7 |
-
/* Style for multiple months */
|
8 |
-
.ui-datepicker-multi .ui-datepicker-group {
|
9 |
-
padding: 0 .5%;
|
10 |
-
box-sizing: border-box;
|
11 |
-
}
|
12 |
-
.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-calendar {
|
13 |
-
width: 100%;
|
14 |
-
}
|
15 |
-
|
16 |
-
/* Date Picker Default Styles */
|
17 |
-
.ui-datepicker {
|
18 |
-
padding: 0;
|
19 |
-
border: 1px solid #ddd;
|
20 |
-
-webkit-border-radius: 0;
|
21 |
-
-moz-border-radius: 0;
|
22 |
-
border-radius: 0;
|
23 |
-
}
|
24 |
-
.ui-datepicker * {
|
25 |
-
padding: 0;
|
26 |
-
font-family: "Open Sans", sans-serif;
|
27 |
-
-webkit-border-radius: 0;
|
28 |
-
-moz-border-radius: 0;
|
29 |
-
border-radius: 0;
|
30 |
-
}
|
31 |
-
.ui-datepicker table {
|
32 |
-
font-size: 13px;
|
33 |
-
margin: 0;
|
34 |
-
}
|
35 |
-
.ui-datepicker .ui-datepicker-header,
|
36 |
-
.ui-timepicker-div .ui-widget-header{
|
37 |
-
border: none;
|
38 |
-
background: #23282d;
|
39 |
-
color: #fff;
|
40 |
-
font-weight: normal;
|
41 |
-
}
|
42 |
-
.ui-datepicker .ui-datepicker-header .ui-state-hover {
|
43 |
-
background: #23282d;
|
44 |
-
border-color: transparent;
|
45 |
-
cursor: pointer;
|
46 |
-
-webkit-border-radius: 0;
|
47 |
-
-moz-border-radius: 0;
|
48 |
-
border-radius: 0;
|
49 |
-
}
|
50 |
-
.ui-datepicker thead {
|
51 |
-
background: #23282d;
|
52 |
-
color: #fff;
|
53 |
-
}
|
54 |
-
.ui-datepicker .ui-datepicker-title {
|
55 |
-
margin-top: .4em;
|
56 |
-
margin-bottom: .3em;
|
57 |
-
color: #fff;
|
58 |
-
font-size: 14px;
|
59 |
-
}
|
60 |
-
.ui-datepicker .ui-datepicker-prev-hover,
|
61 |
-
.ui-datepicker .ui-datepicker-next-hover,
|
62 |
-
.ui-datepicker .ui-datepicker-next,
|
63 |
-
.ui-datepicker .ui-datepicker-prev {
|
64 |
-
height: 1em;
|
65 |
-
top: .9em;
|
66 |
-
border: none;
|
67 |
-
}
|
68 |
-
.ui-datepicker .ui-datepicker-prev-hover {
|
69 |
-
left: 2px;
|
70 |
-
}
|
71 |
-
.ui-datepicker .ui-datepicker-next-hover {
|
72 |
-
right: 2px;
|
73 |
-
}
|
74 |
-
.ui-datepicker .ui-datepicker-next span,
|
75 |
-
.ui-datepicker .ui-datepicker-prev span {
|
76 |
-
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvPtqdpVxjlD1AHIH6AupDbovH1nqkgllLd3apnQJUjV362dmDEnjOya5FUltsEqqbdtxa5Dbppx3uQ+sNLv6mblCcwLIoKlXTQ/7rQkmX4IKzdMv4xgxbgLMO3rYXyTzuhEJEDjiSGDgiAQIHJEAgSMSIHBEAgSOSIDAEQkQOOJ8ADPutPN/zGgyH8BvRoDLGdMT5wPIKbjN02U+gNsdnuV9oUjSbD6AnwdMrkK7gVYt3311u8zv0r5vfNq1L8xsgPp8gAz20fAilORvs8tdsX3mA0i5k1N3x5dBue7icyGgzwfgvus48OoF+DDu9ukzH0Bqf355s9OHnLMNmqQ0F2jjDJIcrrM+H0Ail6v/KUoe3cECpl85XecDTDv/x4zoDg4ccSAocEQCBI5IgMARCRA4IgECRyRA4IgECBwnp52BmQNNcZS/+1hp4/yf7BZ9IpUwzRyQMwftXUHumFMouX4JIED09fvsD0AtJE3RNg1X/jPTJ6IWNznaxvYrgU+oBnFPaAFcxU88CmCPn3hUkE8RSHD2+OQvEWT6Z7M0Com7BuQSygQiR2zA1Yi1/KuXAN/i22bruCspGUMHT6In0nUV7ZIDKmMnrFRNnUulaF72PJAgl3VXpZObgZrLBGh6E0gerccVyoed7dq4n3ETD+2SgXz0tq0BqQn66HbXQU3e5DGw6uJ8QvEyuQt0M1jW4epi/bpoVwtype5zE9kWboq75VoOTHdw6E8B851+i8fIOB8gcMSRwMARCRA4IgECRyRA4IgECByRAIEjEiBw6ItDi81Spwf3fuCThE8N+HhE28VzrY32TaURKgIUC6N8tntvVwHjQztdrpz71YC01Wzljes1jp35KYvDXoZe6xogI5cA+MWh8hJOH492jzk3PgrYdPltDWHPv18N2NLoGctre41iVyVw9UDdlqbXFujqQ8E+26m7lmDbFoj6zaRx58Cmx72FuzvnfhvS8z63umkTQ+5aWF4Zh1ufSJpm2WFsc1gn9TBNCeBfAUmDuH45kKvQJ3332n57+q7YLgK460A2oJsAMoEsBGj2FFBVQBuPVaLo4LWT9iml3wZVvtveQ0ipr+bS4grO7yAgpV/E5O8BXJqrvRuk9c1mLhvOB5AqQL+BkYovZ04qoqRDLZp72hdnAjcBpRIcGBtIHDTW4AfJvAfla2/8commlwA/XzU5t4iQr4JdYvtVL18Ov2tw9yltkp72L7Vx3wOwiPMBVPScb0xaOEQCBI44FBw4IgECRyRA4IgECByRAIEjEmDcmLPHKnM+gAuSv8qn6L2O/u5Jo3vuEsdg94yVvT4fQILkMfcZJSw8dqseC0zt6Lq4Sl4enjiXv7oNbIsvaZ8SqoEgNVvu3X7rg43q0sh2b//2HWgGJI+dK3ZiDaeetXk7pcWj5CX1L+mxgL8HsE06kP1V1aWhzaSFrOW4p03Z9zAg+Pr6kgZnuXS59N0rm2cS5vsCqips+gZu8xKSNIhbSP2WQLsXb7ffQkIyo6uH8Ncs7RFwzKh6ANVR2CZrrjcJuJ2tXa+OidKD8D2E/smFGE8r5lLQe48ZMb9+CTgoM8V14FkHn0334nEgzgfw8fa7t4eQUc0F4KdUyFVfXYTsu4sUIZOGUjVE2wk1EwHvDSRrB+7jLLXdBI7D2eo3a7HtjabPTSQAB0Fnxrg+iO5gHTPTNR8XIgECRxwKDhyRAIEjEiBwRAIEjkiAwDF7BEhny1u26DAJ4OfLllw25CW1hUhxeCxP4tPeB2Fm0Gy7eJ/tpBOsdMjPIQqSpGK4tlvWV1igN4B3gU4AeZRaHu0uWnWKQ5YCVA6U8mv3sq5/pQxxaIlffGu3qbra+/i9an7BURFA3+69jsofbtsyPUGSm/8DNi25a8+6/g+wIqydLVLn09dnFJha/LaPCA7FULDf6nYJxVwbm/nNuThmL+L6LZ2tS8xw5vYR0lvOg4I6JSxB3Uwm7FMZ/CZE2CeVmQSyTcngc+jaPkEn+IK9Ar4LqhdGqFVm32DE/dYL39dK2OQZBah2H1E4gvld+fX8+Lw2IgIAtz+A38r1ul/evUONJM1uHuUQurbE61wB9w5CgcL/hRH6rNjq+7hhv4voBv/tI4LCrM0HmJT5IyyYNQJEHDNmzxcQcayIBAgckQCBIxIgcCwSAfqlJ6A/Ef0nsZQfzd63OtPICDDMK24Xw9aaXnZ4+l0g3NBmCzQ1Yh975fc9Nna/Ez1O4ld4FEc4wqP4FUuBvjP3a7l0zZKGXe6KCTxnHHIKxtwOoqs0oAENSUUVtjo/JFgOKj+3tbhqCF57doyor8lHmrRPJvqN5HoOudytGfHXDPkSrRPREi0R0TotCTXAp1GHVEP+EjXEtncZyxAFk+8BAO5YJnPcxpdxD0CK2+W5O7hgZeMXLCOKy+W3o5rsJr4htL89ZBtLZNgHYU9LYQ9bSg8AbBlyN95Xcpfl0Ix/H8t4EEAf942wej6BLUbim5suL5+XsYb3y++lpoIA9/NPdRqGmuV7AH6EI3G2z1L+ecMa4qNC7Ct4D9uC/JLmSr6kUDHD2woFtvC2ISWoizP5FYYfxS/K759g8/AgPoEEp4RcXhRkpkeSl/MvoE4YLc0IXpj/D/DP6unqWnboUPAjHNXC6FnICLAiaLO1G8DVAwBvlRQgXMJbTIiCAnXzZ0iNz3rufl3M6Qb+G38I4B+xwcZ/GygpxOdgK++p9N7qOFCY/4+wrFPA936WM3+9AgG5o8razk9ZmasHKCgAi/mRpw7rTd5549PEEn6efzvLSB/Eu9jAfQAbeBcP4f8MuTkLqe0yU3dH7wrxOfxN7Vxm/i/gQQD/AADFBdz/MbBufrOAp3AKp7CMU9ZO8gE8gAcAcC3spsP8QA9v4RIu4S3LdM4+DjDEEAct7/OX8Vv5sVzLXw9nQPgFNrCBEyCcEaeUblmMf075s2EJLrhCfIs5l5H+Bj6G7wAALuBOJmj/RFsv4rIzzg+FkK4eoIcDIG/7B0z19zU5R4HfMD7NKspayQayOyK9n3gY9wH8pPx9HxvCjKIuHfxRxxD8hNmf5OXL7s9K86N8DEwdj1HuR5iXNfnL1scV+2PMjQk+BhYPSdWnLRd95hGQe4hzPeg1fQwGjayl9wmhlpDXXzwEDtSzs+MO7gP4HeX3e5YbqcmCAJxXWvr4tWeYztSUNbyvtX7E+QDBY5F8AREtEAkQOCIBAkckQOCIBFgsvIJXmkXQCZCC4FqYbQeVjoyujxZ9cB71LeXxte5vGxqPvUNDvm3IuUEn1Vu+NgE5APylo34GGLSut9P4Cr6C045QI4wwKn8pdZISUZ/6RJTWBhF2aSkfRrhG6zRkh0Fu5AMR23TDkMuebPPos+G3FE82EdEWOxBSHPX47oGcLMw6rdP6hORFmGxQx5QMqBiQS83hmtw6RNuEvHQpo/suERHdFWu3GEwa0TkCQU+gn4+h1dUT9RqNg3FyENGf5X9XrRXUp2wCSt+iH5YUXAYmAv07ge4R6N+InzJBtJ5L1gU5RPlpWqLTFnlR/SMaNa7BAtusfLsWe5tNf0hEI0qrkUTVHVw4Kfew1WqjFnWuAO85fAL7+DF+gJ/jPYtPsI89XMIbVpduF/wTfhffwwa+hyfwL9ZQ2Vj6hijXxyx1/LLmJ6wwwk0AyP/X6+9Q+8WDn21x1uMMAHwJwEp+eUzxAcoe4IYxmt6nG417ALWDs/UAV4noL4joFbaF9InY1j+uHuBvCfRdAn2Llpj0H3X0AIUcotzeA4y03JmXgIGS6wyDRuX7qib7KlOD5+hcPXUziX5OhHr1j4MAn6HfpM/R+fyvifn1WXE2AqRElFKaXy9N+XeI6Nv539/V5EX5bNfwSv64Q87Hr6692XG+IQFMd10q1JDsatLOmwrUT122RENCyaEBE0ImQN1f18T8ZvFkAvDys/Rdeph26WH6e/q0IV+t5W5trPLK/LAeuolTUW6T3s1vBE35iIpr/25bAsBxUJ6N1DM8b+C+Vb5lVDD3FJCWRecJYidghsccuesih8P8Pi73ggIpI3uKPsxv/LbpQ3qKIcBVGtXj+ibvNqh+H8rfg0qTlmXzmxTYqkld07plORFRz2GcLvKR0/yux8CKAqkl9nPl9+dqsa09kK87eB3v+gWM6IgBoHvsx4QRAOCWeTrOBwgc0RcQOCIBAkckQOCIBAgc4REgcxsPGMmgfDZ61EOPbTfFOburVgmwXlbAemt9NLUqSEHYyb/vwDar4Vq+qHS3RoHfxy4u4zI+hU/hh/h0LWZWO1fzX9mepeq+55v4LAhP4AkQPovNWnx5+4ph7cF+6JC7QgxraRgjQObZdSLapSEN6ZAqpwc34CENZpAzRPtjlOdrnR1UybBDoB1rLorhkHPsUNep8vgYOxa6Q8M8B5meAZO+fRyv8FKklmEw+UwVO7XoycYa+7k3B0z51BjrxXc1QDZKvENEh1YjTpMAxVgWn0Zh9uqzruGaONZ5gj5CCSX0ETrBGmRIIKJB6dPncicTQPWHmCuXMm9Iv6zjOgGgzaKoEyDTul2OyXIEOEOr+cEQYJhX4w4748dFAHJWgdu4cvx1Rcb1UDuKnDN/KuonSspjjUn9eh5rlx9SpWz3kOLgCWBPn8oZV7wGKn2cQwKdYwkAhQB8n7JOm7RZ+isZAuzkVcdP+XIxXA7RTMoTyOVTk1p/NeMpw8CQf5uI1vKD6DqjYVC6bLn0iU53IsBD+dmHyv9m7KL/GhLROUsPYK+/PhGdoTO0Smdok4iuZefV9wV8gBQ38fn8FknecR9OubSbuFvKpbBe7mOSrdE38U38cfn9+/g9TZYqM56AK/UxcazjS8qvl/EzIfWslszyrwD4EADwS2aDGcKKNs/KfMHFI9p5ws8MuT5f6Ca+bMzayrbwzybL7jHb+RMeB/BfAID/VGpX62APaUhD2qXZvAksWh+fxjfL1p/hrhG3n7f71Kp/s2w759jUd+gqUd4Odxh59vmQ5UbPnGhjtt/H6DHjv9x/NL8HGFKfNmmTNolos34JUK+xNvPP/lPAXSrmxnLVM3CksEPbtM1Op0IeO6MQRwESfpln12ohhrUOfGjEPFc7mt0DEA3Lw0IA31Y4LQLIR6q0+rtkes2z1uFTOlv+s57lkFIqbieTWtzP02eoJ9QSEZT7DF22lD8FZP/NbejqBDEpMhSlaum0MkZ3sIqH8BKAF/E/rHSEFdzM32aQ4n/xa9qbDVz3SIC+meUk5j23QCRA4AjPFxChIRIgcEQCBA6TAEPrfuEXcau8obwlbokaMU/QHhRuExHRbeYB5ou1h5AvTuVhLx5jPtQfz5TGfcYIdlF7eixwkVG4R0R71uR+6jkgA48Qx3/sKfTfm3puJkCA21T4nMw+4DWWAK8xCuWBoNowhNX8HEncy6tcIVxyor1yuGiPlfvlf46O6uszmoH1PsCGpgQAgV24WTd/vZ9Q19byBnSFGBHR07RET1s1+JVuQQmQXf8Lr7PeB+gFl6phm2zLwlTz7zKSQfnJXyZcxkFu+DQnAid/Ov/2tKBhT0hjgQkwIBOqAfwJwHfeuqZ7jEeuiGczvy8BUrL3MVSOsNf99RXsBOgT0R7t0R75+BXm5DArwPzelACuozBS3fyZ2W3mn4UeYIFvAqv2nyp+58oMX2cJ8HVGoasHsB1qD8THn/49gJuCc3hwRasX8ilW+hSj0FU5dqnU+nUDj1qH6PoUkIWZutHGT4A91sBqFTxfkz5vNeNASFCiR9ve43iPBSOAvzv4SQzx5/n3r+EN/Ou0xzCnhLbvAppRxPkAgSN6AwNHJEDgiAQIHJEAgSMSIHBEApgYgFpL5xAqAYjZNkEHYVyvhJgWbgjvNgeAAXZbS+cTxigd0a4wGqd6A0xJES+1ahjQbu4IGtCuoAGEfHmTLt/WNLVx1w4cg80Dj9hFDdi1zNXBV5/NhBIB1Hj1ah6UcQb5CntZg50Atvg+BJCksqOnLl2QIWFbIflpHS4CZCasfutSEErjuTTYCGCP7yZAUxPbpfwGDHN58DeBd3AB32hxPbmDC7iAbJ3cBWXMPFHOXhB3wi002OCKfzxYJG9AjeWLfA/gOgK8B1CdQYQ7eElsX5Szv/icL6hPLrbcZ/f57aRziegNNDHArmBiWTqHiAQIHHEkMHBEAgSOSIDAEQkQOCIBAodJAFJeLB4RACoCpPlWqWdx1rLXfjZ0dM0ijZhLFARIcVhuDvMIDlkjb+ACvoYXcejxQglzeGHbGIHcPmZ5hA15je0Q0V8RiOhFyvbFtY0ep+JewtWovOt3/1jl8bAchVGJ7hEI9CINCHSPbG+n3qFzlDllU6tSfqfapXw79dP5n7nT7WmSNlwv5CTKl8q/pdYOocCOkwCA8wDeBAC8BAB4Exs4X9vKdAObuIkreASXcIgruN6oq/mk0ukkqI9Afzz/S8Avvzqd/30S/ObyHwewkstXFmu8fpLIfAEpDnFfedHRPWxgRdsJt0CKQ9zBBezgClvJlO9UX9+t/re13/9h7JU7aXmEDXlXsEvVoukR8Zu4ZL7w7H0VtpfK2ObL6O8Wr883mrQ8Hpaj8AZm78O4jzfxLDbAv5Gjmg1wAWDcomrrX7A1tIuLyh28jmv5g+AbuBZfFh8K4nyAwBF9AYEjEiBwRAIEjkiAwFERwPU+gK7yJ3G9lF/Hk8cun3T5pi1vi1yn630AXeWubeYmLZ90+aYtb31kHxeJQ/U+gK5y10aTk5ZPunzTlnc4skvA5bJDSJQRvMvMNxWm/IU8boIXDPmzin4wZ5/l1FvkSYv4l9n4XPlc5Vfz3zz+20iUELb4klzNBW+VhsgGgqrRoKT2S5dzGSnkCYDnAbyunRmffp/4bv1qiKbxE/ALzKjBb1K01OV/AgD4a2v9FWc38Q7GskhNJYD+Lup6Blxy4AW8DuB5vCZWsK2C3PoTVpuvAdz6ZQJ0r5+kPN9O/jjeUcw/FgKc7K5CwYfK/+YgZ48gQ12O3kZDony2iU8ecV1usj8VZI/jnmb+sWDcl4ARgFtofwno3sXb81fX0K4Ll/T79SCuHsqW/uO4p5l/DD1AdhP4Kit7lfkmyZ8HcBM382+q/HUlFjFnX1ekLjlEOVi5nn+qnX1Vk7jkbeunKB+1lr+jmZ9PtSmCeAyb9mPopOWdxwEWfyBm2gNRk5Z3JgDoSbpeKr9OT9aCdpVfpFul/BYziDFp+aTLN215yyNOCAkc0RsYOCIBAkckQOCIBAgckQCBIxIgcKjOoLrTUcesyyNaQPcGLpffjtjQXeURM4f6JaCb6Y6cGrq13KSzhggNJgFcBjzCkShfxpHSD9ThMqA6JYoDtfT1R1hgEmAZEA24jGVRfoRlkSAEecJE7qGwIq47HjPql4DlFlr02LKGbu3XRaCIhtDfF6BJamFnXR7RAtEbGDjiQFDgiAQIHJEAgSMSIHBEAgSOSIDAMb8E6MUBoXFAJ0D3cTZCH4T+xPPdwz5WJ55KANAJsJr/TRuu1p2Z/2Da2VwE6ATYz/+mC1frjuYfI3x7AEKv9tcMzKokFpl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
|
77 |
-
background-position: -32px 0;
|
78 |
-
margin-top: 0;
|
79 |
-
top: 0;
|
80 |
-
font-weight: normal;
|
81 |
-
}
|
82 |
-
.ui-datepicker .ui-datepicker-prev span {
|
83 |
-
background-position: -96px 0;
|
84 |
-
}
|
85 |
-
.ui-datepicker th {
|
86 |
-
padding: 0.75em 0;
|
87 |
-
color: #fff;
|
88 |
-
font-weight: normal;
|
89 |
-
border: none;
|
90 |
-
border-top: 1px solid #32373c;
|
91 |
-
}
|
92 |
-
.ui-datepicker td {
|
93 |
-
background: #f1f1f1;
|
94 |
-
border: none;
|
95 |
-
padding: 0;
|
96 |
-
}
|
97 |
-
.ui-datepicker td .ui-state-default {
|
98 |
-
background: transparent;
|
99 |
-
border: none;
|
100 |
-
text-align: center;
|
101 |
-
padding: .5em;
|
102 |
-
margin: 0;
|
103 |
-
font-weight: normal;
|
104 |
-
color: #32373c;
|
105 |
-
}
|
106 |
-
.ui-datepicker td .ui-state-active,
|
107 |
-
.ui-datepicker td .ui-state-hover {
|
108 |
-
background: #0073aa;
|
109 |
-
color: #fff;
|
110 |
-
}
|
111 |
-
.ui-datepicker td.ui-state-disabled,
|
112 |
-
.ui-datepicker td.ui-state-disabled .ui-state-default {
|
113 |
-
opacity: 1;
|
114 |
-
color: #999;
|
115 |
-
}
|
116 |
-
/* Other Datepicker Color Schemes */
|
117 |
-
/* Blue */
|
118 |
-
.admin-color-blue .ui-datepicker .ui-datepicker-header,
|
119 |
-
.admin-color-blue .ui-timepicker-div .ui-widget-header,
|
120 |
-
.admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
121 |
-
.admin-color-blue .ui-datepicker thead {
|
122 |
-
background: #4796b3;
|
123 |
-
}
|
124 |
-
.admin-color-blue .ui-datepicker th {
|
125 |
-
border-color: #52accc;
|
126 |
-
}
|
127 |
-
.admin-color-blue .ui-datepicker td .ui-state-active,
|
128 |
-
.admin-color-blue .ui-datepicker td .ui-state-hover {
|
129 |
-
background: #096484;
|
130 |
-
}
|
131 |
-
/* Coffee */
|
132 |
-
.admin-color-coffee .ui-datepicker .ui-datepicker-header,
|
133 |
-
.admin-color-cofee .ui-timepicker-div .ui-widget-header,
|
134 |
-
.admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
135 |
-
.admin-color-coffee .ui-datepicker thead {
|
136 |
-
background: #46403c;
|
137 |
-
}
|
138 |
-
.admin-color-coffee .ui-datepicker th {
|
139 |
-
border-color: #59524c;
|
140 |
-
}
|
141 |
-
.admin-color-coffee .ui-datepicker td .ui-state-active,
|
142 |
-
.admin-color-coffee .ui-datepicker td .ui-state-hover {
|
143 |
-
background: #c7a589;
|
144 |
-
}
|
145 |
-
/* Ectoplasm */
|
146 |
-
.admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
|
147 |
-
.admin-color-ectoplasm .ui-timepicker-div .ui-widget-header,
|
148 |
-
.admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
149 |
-
.admin-color-ectoplasm .ui-datepicker thead {
|
150 |
-
background: #413256;
|
151 |
-
}
|
152 |
-
.admin-color-ectoplasm .ui-datepicker th {
|
153 |
-
border-color: #523f6d;
|
154 |
-
}
|
155 |
-
.admin-color-ectoplasm .ui-datepicker td .ui-state-active,
|
156 |
-
.admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
|
157 |
-
background: #a3b745;
|
158 |
-
}
|
159 |
-
/* Midnight */
|
160 |
-
.admin-color-midnight .ui-datepicker .ui-datepicker-header,
|
161 |
-
.admin-color-midnight .ui-timepicker-div .ui-widget-header,
|
162 |
-
.admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
163 |
-
.admin-color-midnight .ui-datepicker thead {
|
164 |
-
background: #26292c;
|
165 |
-
}
|
166 |
-
.admin-color-midnight .ui-datepicker th {
|
167 |
-
border-color: #363b3f;
|
168 |
-
}
|
169 |
-
.admin-color-midnight .ui-datepicker td .ui-state-active,
|
170 |
-
.admin-color-midnight .ui-datepicker td .ui-state-hover {
|
171 |
-
background: #e14d43;
|
172 |
-
}
|
173 |
-
/* Ocean */
|
174 |
-
.admin-color-ocean .ui-datepicker .ui-datepicker-header,
|
175 |
-
.admin-color-ocean .ui-timepicker-div .ui-widget-header,
|
176 |
-
.admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
177 |
-
.admin-color-ocean .ui-datepicker thead {
|
178 |
-
background: #627c83;
|
179 |
-
}
|
180 |
-
.admin-color-ocean .ui-datepicker th {
|
181 |
-
border-color: #738e96;
|
182 |
-
}
|
183 |
-
.admin-color-ocean .ui-datepicker td .ui-state-active,
|
184 |
-
.admin-color-ocean .ui-datepicker td .ui-state-hover {
|
185 |
-
background: #9ebaa0;
|
186 |
-
}
|
187 |
-
/* Sunrise */
|
188 |
-
.admin-color-sunrise .ui-datepicker .ui-datepicker-header,
|
189 |
-
.admin-color-sunrise .ui-timepicker-div .ui-widget-header,
|
190 |
-
.admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
191 |
-
.admin-color-sunrise .ui-datepicker thead {
|
192 |
-
background: #be3631;
|
193 |
-
}
|
194 |
-
.admin-color-sunrise .ui-datepicker th {
|
195 |
-
border-color: #cf4944;
|
196 |
-
}
|
197 |
-
.admin-color-sunrise .ui-datepicker td .ui-state-active,
|
198 |
-
.admin-color-sunrise .ui-datepicker td .ui-state-hover {
|
199 |
-
background: #dd823b;
|
200 |
-
}
|
201 |
-
/* Light */
|
202 |
-
.admin-color-light .ui-datepicker .ui-datepicker-header,
|
203 |
-
.admin-color-light .ui-timepicker-div .ui-widget-header,
|
204 |
-
.admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
205 |
-
.admin-color-light .ui-datepicker thead {
|
206 |
-
background: #e5e5e5;
|
207 |
-
}
|
208 |
-
.admin-color-light .ui-datepicker td {
|
209 |
-
background: #fff;
|
210 |
-
}
|
211 |
-
.admin-color-light .ui-datepicker .ui-datepicker-next span,
|
212 |
-
.admin-color-light .ui-datepicker .ui-datepicker-prev span {
|
213 |
-
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMUIxRjI2RjhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMUIxRjI3MDhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjExQjFGMjZEOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjExQjFGMjZFOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kKfR4AAAHcRJREFUeNrsXWuMXsdZnuMu4CUN2S0t0a6o4sQqAaooTncrKGrUNbe2qSC2uQqpqtexbCqI0xaQEBclKUL8qts6stqNkuwWiYqbajtqS9oAuyEISrubrLmUFnBSfmRXFa12KT+cKk2GM9mZ7ng858w7l3PmnO88jzQ633e+8565vs+8M9+8MwXnnAEAMEzsQREAAAgAAIABYkx9OHXqFEoDMDFVho0yTJdhE8UxOjhz5gwsAICk/Exep1AkGAK0DY6G93L+eUblnw4gATPNqMceEsBURMVxSwhFbO8TEj838j4V8B6eQHF1RWyzDnTl3zRIIDTNsCJ6RABdMf+mM6XBjNfsDXP1wm2hkEGN+ze1eyFpngYJ9IcAYs0/vQEVkenz7X1SwRZv2xNhqeJNVRcxac5Vj0AAAcSYf13pBVMMPfS8xyhhaFpy9pqhQ6CqNOe0ZgBPAgg1/7rcC8aQQJEx7lzkGzoEqkpz7noEPOcAmhhPxjTGzcA42zR/m0jDZkSPGZPvmCFQVZqh/B3EWMfTV6CKvm2F5LJAQhYCmWlGPYIAAJAPMMQhAAAAIAAAAEAAAACAAAAAAAEAAAACAAAABAAAAAhAA/zI8+wHoMcL772BEkBsA0i1J0CsM0yIAvGa0CZ55doPIIU7uF7uIJKeEUCKBpDS6yumEW4kTPt0S+mOVf7YtG84voekHXsB9IQAUlXeZgMk0JYC2dIe6swS2vBTK79P2mMdmTZayBPQEAGkrLyUJDDdkvLb0h7ryRZCAtOZlD/F8G264TwBDRJAURNYJhLwbcSpepqU+wFs9KDcqhR1OkHa4Q7cQbTlDRjjVRa6H0BuFInKbTqQ0IpE8YYqrl7n8CgcOAHkVKK+I+d+ACj/AQ4BAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAeg1sCw64IJYBFwPNt4li1Mp/DJUPBSAoQUwZ8AwKlCLOQdT5HmLlh1ZCikM6eUsyOXqUJvMRW/660hcRaUlBHDyjEqdsuzxTW+O+BJCi8lOdyRcSf5GoAaWqhJAelCcsvyKB8sQocmzeU7SBWAuorbabmjxqy3+spcrnERkPbUhFR8z3UAVIMQ7NVQbcEneRIO/UvBSW/PuWAw+U54naQJFgCFZVlgV1DiDH2LlI/K5UzNlmL55ScYtEaQ9VoFTpbbsNhHaCqdKdoh045fe0pPxFBiKJnXtIwcAx6SgSpD+VCR3bA8XmPdUkZB+sv9TzGLV135QFUHTgXTl7z5Tx5yzH0PynznvRkTJscx4lZvhHjnesw4XXFRTIP/I/qvFiJSAADBggAAAAAQAAAAIAAAAEAAAACAAAABAAAABDIwB1suvQT3WNXU3YZ6RqA6m8QtuML/Zk6N60P8rhoBs9bABdJZO2G05omadsA0Vg/DZvuKkW4lZyKY7GM9Ocwx14inm6A28Q7zVdCSGVzztKAr7pmkqYh5DyT9kGeIDy1x1QO9Vg3E1YQDmPRXceklt3OGjV91w9H6Ugiw5aAr6706Q42Ti2/FO1gZCdeTYqLBkfIoptBzEWUGia60z/UEvOVZaNTwKGNIC6sVdo5fNMSp9SAXwbQS4yrMt7G+vbiwTtILUV7Itp4r1G5gCaVP62HCtiG38KBs6xFx5FCbpo9VQ1dNv4e7qFdhBjAcWmWcA8Xj3FMe/WuYw9HWwAdZMvoZWfk4FTKUCKrb24R/2lMEFD0rtZU9Z9PCo+9nj1IlDeVZaNEkATPb5vQcb0eKkYOCQdmyy9uedbH6kIkEeUv82nfbPFNKQq981Ew+DQ4V/tMe9jDTJnFzazYJEkkGszkk2WvucqPOOf1sa9PgTYtf0D+riZSGvx4mAQoE0SAjoGLAUGABAAAAAgAAAAQAAAAIAAAAAAAQBAVnAUQfsEkMobLdSjKlWl6/GjIYUpX+6yCz0hCfUeSACpvNFCPapSnYmnxy/eN83SHFLat14s9njwgsUf8JpCgXlLaR88AVR5o/n6NKf2KQ+NX5GJz8KWlCfqhnok8kRxhypwEdgTV3kDxigwi6w7kECCOQDfjQ1iPKpsCt/WxgrcQn4pThj2aYS2k3lTmNJNPEvNrw+BxJ7KDEQQQJ0LYRs+0dNaXLEbK8QoSpHAjCwSKVauHoxnym/Kd6QYjgyKAKq80dpi4VhvuBSurLlNxqLCAuEtNvqu9cQ8sO5SHfM+qCGAbbzssyXSlFFpIRsihO4HkMqVNbbx8wQkEDoOjm30tmGQ7xCCB86rxMjWkQCD8l8NH2/AjcAKjPGlZwHviXFlTWmG6uWQwowtAuOPSXusK23oxjAxsk0ORwZNAG1MIqV6X1dcWYvM70mhwLn86aGwGYcAAAAlBAEAAAACAAAABAAAAAgAAAAQAAAAIIDRxwTD8lFgoASQ0g871LGGJ5T1fYdQ/i02On+HxZ50CwyIAGIP1kzpCDOZqXy2LEQyEamAOWR1bIAEAAoBxKyfjlnPbfbUqhee9FAUcxmpz9l6usk/aXnHlmf85r0YQk1lPW2g6QNVBMAjeyCbPzj3JBSlbLryb0dYH769vpLflnGHnCxr5t0n/3V7ErjSkmo7N2AAGCOY/TygF09hRTCL8ucYi2+zdA41VOWvKjdX+ZvbsBUV9TuNpg/YCMBstFWffUzQWK+0WMSOu32tj7q8u8qhqpenluFGTb4LTfk30fQBGwHUKV0R0fCLSDLIRSCFQQKcMBfBa4ZCrrzUlU8XdtcBBjAH4OqNQhXWd0+8mP34YuQnLbJbWh62CUpW1NwriKQTgqrt3KD4gDcBxI7fQ7elKioCi5APGfPrsqn+hiwSP2cidjs1AEOA6IZYJG7UOREzB5ALmww9PpCIAIYOKBIw2CEAAAAgAAAAQAAAAIAAAAAAAQDNYoZdvZZhpkfpF5PLe42ACeeOE8Aho8Ety3tt4/0szoc/FiKuBVa9l8BMC8q/arm/6hH3TEbyEIr+rTLcXIbLMtws740Fpj8kHzcZsjd55iNEPjZOgV9whJg8XKVLeoWcK8P7yvC0/D4h79lg+3vskOX5w2U475no32dXH8t1kvktB64jDNc75svwL2U4UfH7LWVY81ReHbMR8qsOef250KPNRKO5VPP7/jI84yCA15dhvQzj8p4ggQNl+LIkAuaZfp98VNX9JY82wCxlcIkgFyJj4s/l9aTsiFLWY1FHAExTfoEV5rcCjkog4r0HA5jRlwTGLfcuE+QWy/BgYO+3qhW0uSJPnXa8WpMHpeCrNeSxyppdn3Cpouz0MnTFr5T/Go3Y1h3vrStPlXcKmjiVqm+Hy1aROLextVlxOrY8C1kp/5dlQwldQrvX+L4Q8I7vCIzbZQG4cLiCqLj87ZxDfq2CBCg9P69ogL7nFIqy+4bl/vd4lMM18nkR33cHluUdEcO4GIIIdYcviGkpWlT+nyjD39SZa4yo9FQo5Xe9pyASwGRg2sYD0x9jAQh83kICSvk/T3yHSQIU5dcx4fhOKbvrI8pUmPtfK8Pb5fe/kveYR/6ZhYR8ymDWsKhmCcOzvsNU/l+UdVZJAqlnZqnK76O8oeaU3us826IFYJIA81R+G0n6TuLtd3ynWGD/bdy7waPnvygVfl0jBHHve8vwPLH3rduZqs0l2inM+dh3/EoZPu45b3FSG4J9Urt/xfC7ib8Btzwadp3yqjCuffbBd2nBpwdbjFR+gSmNBJTy+2zEKRReOPUckmGTtTuTL8rpB40wTig/kcfvl439G1LxD8h2xuVvoRuSznoq/r6Ka+xwNMc7/iSA+MWw+TvZ7qSiUv6VJi2AVJM04wni+VLgO2MtgCm2u+OO3utvEhv/TI08lQRe6/juakSXDHNenx+qsya+T3vO9k/BunxfyI5Eucz3y5nf4bMvxzNG/S3UKX8oAcxGmDkU5f8DqYBVv6UimSbmACjjzNkG5XVFrPvuakT63MWYTJPr7z+dJFzPuCbSeIK6/cuKK7UTWKy43+Y7QvCMhcStyv9yYXK+U9anTp1iwBXj7VsqfhfktDaQsuBar/9MT9OeqmPoG9SEoFX5z5w5k20I0HWsGdcho0Dae4tnKGUAXwAAGDBAAAAAAgAAAAQAAAAIAACATuAPZchCAOqU3NgjsUNg+i23vSeADcpHnbIYZ5bZ/bAp/+EfYtV7EXDm3qPhhEOeusCpypf8pp7IK/xRZPuZk6FtXFuG35Hh2sh3HdXCFRirUf4trcFST+gVm4gIBxB95dP9bMcD7kZ5pfhzi4U4a1qlndQUsKiRUygaUH61QMfljivK7AtGWlTaxP03svrFPue0PJtYIJShy3NygdEWOqmFJLoTzzqj+7jnllf4baNNCCVYIij9smzzy/LepNSDykU1hu6oOnxQku6C9h7KOROfNj7fHqH85oIkkf6vvFwoloVAuvLr3mirhMSLlwk/+Lrz50M3dPCRV0r3a2U4q13FfgWnPRvQjCQjteGJyzOv6mBPah4oPVVByP/nyvCjbMdF+7Yy/EMZfozRnWk423XiUTK3MvdKPpu8Qoi8+D/7BbbjonyTh7zZ+NUKvMWG26Ape9JCykWN9eYi8JOMvlJVtVmR9/NSr8XnpbqFQKbyq15vVv7WxgKLqn0EfLwM3ySJ6D/L8O9sx7tNrOJ71lP5Rd7Vzka+brm58Ndl+JEyPCaV6DFZHn8bOBzTFTJUXuCWAHmh/M8HyJk936Jn+9vybJuhFpmOGxI9o3CPluZDhpWybZsDWGDV69EVCSy00IC3ZdiSYZv5H8/1j2X4uTJ8VjaGT0r2PBeg/Oc0S6AP+Em2s/b9bdJ8FFfhTkrdYONmS2/lQ/ymvAqvCJAXPf9e5rfBy9EahXetxZ8zlN88X3KrwTmB3y3DB2p+/4B8xoV9Mqh0npblMS+HP9tVcwAnLeNZphHCWsXYtItQFsBXy/BP0pQU138LUP6Ynp+zMH/wSW3uxdcCEi6gP1+GP5VKL66/xGhuqcJj8UvamFu59CrzPUReKP6LEfL6HICv8psK/2QL1utWgHWr8Jtl+I2a30LIr5K8Xb4AIY1+SzOZ9xkm98EWFH+WoGwfb0n5Y0nAtIqo+C22sxmEmNi5Xl7Ffgq/V4YjNXJi/uY5456pdPs7LG9T/iXPcl4xlJhbFHjbUU9VJECZANT/cft7eX2zabo78q+P+VfqImvCGeh5trsT8Fci5wxC9hRci4xTWTuhyi9m+b9QMxZ+Y8PKr8qdSetHv/6MQ+45Y7z+r57x5pZf1Ig2RPkplhZlHsxGAtTZf9E+XirDu9nuZJ+YHPyI/O1xot6oMf9hXwKo2hBR78maxMmantJn+GGm1TftoT3/ag0JuP4CVD3cJa3xbHn0gLp83e8uiJ54M6IOc8nPJ1B+ZakuG0qs/w1IJW19GEclcTHp+ctl+Avt3oPyPS8Q33FaK4/aeFPvByDGiRcZAIwO5rShQR9wVPtcSYJN7QcA5QdGDSs9S6+X5QNfAAAYMEAAAAACAAAABAAAAAgAGCno7sVzRJk5drUb7s2J0uPzV2wX3MAHSQC3WhrArRnSxwfYCNQ+DI8Y9x9h/nsz3Meu9H1YJpDAj8vnjsjwOhnE8twfIsSpt533Vih/YQQdwnPxHVL+TTJwee82QvwzlrZLPVDFtReDaz8GinzsOw556g2v0yPbOgC15nulDB+W9xZlwzPdOykJ8WV9m3zMO3LgqCwzVV6qTCkLVPQ8i3cck8o/71kWKg0KYj+GZwnyIv5rLPe/VYZvMporrYj3UUk+qgz09NT51KdwBzdXkFK9WDmju5tT47Zhy/EOtZpR30BmVbtfEPJvi+Pb7thqHYDNAlDKLypJLOn9Wba7BnmdARQsamV5VCu3RQ9ZJpXeVH6qW+s+47uPG/TzUtkvy/BNSQBUPMp2l4NPsqv98ldaqIP9bNeblHlaA+buT75W6LbMp+7J6uPRyo20zBDJ0YQ4i3FaC/9DHQJ8WDM71RFH8y0pT5W50sZwgBODCwcqFJbiT3+MVXuzKYuAMoy4N7IcXtK+v8Toh2t+SPb8qpzuNZR/ifCO8Yrgg1XP+wp72ZW7P+3V4qce8inK/7Rm0jPmdzhpETF/UkjiEW3tNWzHGew1WrgCdSsBdeU/Rhx7VLFUm6Z8ivMJY3GRXX023LzH8OlYpPLbNnVhmvldhz+TCm/6DFySyu2CGPdfsMw5+KzPF77/L7A8uMby/Wvy86uJ73iP9lmQofIsvZFoBfAKsqJ0Pspa+LpG3nuk8j/Fdrboq50D4DKRE0ajU5XZxpZeLOIdvEFZah6qfOepcyh/XIZ3Wu4L99DbA5WfqoAi7fdU/PZ+tutp6Jt3KoHp4+gXtfsvyOEIdQ6gapztGsPfWPM8Z/UernrcVcO797UwB/AG+fmr2v3n9LZbNwdwQBvzPyp7fqX8B4jKYc7uVs34UuV93lE4QowsNQ/rFSb8eoDy61aE8At/0jG5pCv/QdkgC4/eVxDUAzLdeqAov8qjauhM63HUfAZ1DC3C/7GdM+5f4WF+zzK/reNMvFKGZ+X1WuNzDKjD6Ng5gBukbl+vBSaJgbuGABeloq+zK/9C8v0HYMhQ5r8qs6fZ7r8ALrzT6PFFr/k6trspxJuJY1/X7rV1eFqm/3Py+w8QlV8nsRU5Dl6RQ4ctLf/HPN71dc+0rzH75itiQ1HXCcfCVNePprd9PkwYgt3o+J3SCXKP+za8lmTKNnw8+FD/BoyBMuNNc/9Jqfx1vuVc6wXXEtWdb/nr/1psa+NefbvsPTUNWd2/qwxfZDubuW4GtCVlKt9kmcsoHJOAr2e7e2Ay7bPYTq5ug9JDjLbnpNoxK+QddbKUoewVQ4CmjwcvMsv3EdsV+b695fJ6tWa++/yjIHr3v5NEtaiRldog43/LcB1hMuzhyPRXbQ3nOpzleXb1rlLUcj2foA7Ot6k3YwwAqk3vXw+UXaohN+ZQ/lQktsaG2YF4Ab4AAAACAAAABAAAAAhAwyFGXwGocIccA5rLZ5cY/WQaAAAyE8A5I1Bwdxk+VYZ3WX57l/ztbhQ7AHSbAN5m9PyH5D1Xz3/GuGdbOXfGwxJYldbDakDenjUskLkE5TWHJuNVb2ZYRdH0gwDUARyTbHddtutQjiMe8VKfnTGuPthnfF9OoPzLRBI4ajT8owHxxb4jVl4p7IxFuV2Y9bwPdIgA9N5f92F2WQF3VTQiTnw2NZT1MZngXXMagbhIQCia6bO/6KmAse9Q8qK+xuV1MYAEZiy9+QzUZrQJQO/pJ9iVa5dPBiphKE4GxqunXy0/XQk08+cM68G1xn7R837ds/OSwOY936GU/zNsZ2XbZzQS8MUa1GQ4BDBnjP31HVWUFdDmOPg/jKsvVNqFI85hovLrPbyv8qfGeWmBnQ+QfcLxndVYbLGbrsxo5LGmkQish44TwDKhB19uMX0rMv5YpTvI3GvPbWZ+TuVXhDvB/P+KFXiL43udxRa7hHZBU3jdnXUBKtddApirMKEnCGaywFmPeKnPzrG4GXzVmCm7sKywK3fLCVX+ec/7dc8uSitm0fMd4rnHyvBWtuPd9lb5PWRbt5mEMrAAOkwAyxUmtG1zBduzF2pMSsqzrCaeUKvD15w1SSCk51+yKJrvcdWx71jSSOCypvxLnuUnTPdZwzKgzAmYlkQqywJokADWPBuGicfLcJwge1w+SzXdGaOfyZ5q2HEw0uxfMhr9UoZ3xMoXzL6vAP7KGyGMJa5Y4cP9X3LM+h7jN7ErjJjMesJTGWN6jSKCBNBbAYMigFR4Qob3ongBEGl/hgAAAIAAAAAAAQAAAAIAAAAEAAAACAAYIOZYuG9AjCyQkQBEpVF931nNO3jNd6B5LLC49fdzLHwVZows0AELQFVgLBH4koYZ30RAGlTaJyz3eEAaFE4Q5U/UpIl7lIXvseRmfCdkmOuI8nOGXZV6NwRomwjM+IQjz0FNeeYIJucy2/UADEl/yjznIFJmKKCPInOtDEOtvirZAlZBf+cAVEM+0eLYc1lrMIXWmHlNz20+G6N4ZhpClLBtxWc15ZMTGP71nABWZK/6YEtpU/EdNBrQQWZfXlpUPBvjx2+mwRex8Y8SsCS4pwSw0nJDNuOb0Ex61+YgKxoRqDmAkPSnzPNKBiIoKoKP7MGIeA/WWAEHoXYdYuWK48G5bKz3RzRa8zjn2KPCgXhz27fs5yzDqjZkgYbhOh48RYUVMAF7b26vaNZUm7JAB+cAgGFihWFfBRAAAAAgAAAAQAAAAIAAAAAAAQAAMJoEEHqyLQAAPSUAsXruHu37DTJMeLxX92C7z1MWAIBMBKBO0zXPortR3qcq8gG2swhEnAVwr5S9NUF6XQ4lJ5jdjVaFEyMuDwBeMFcCnpbXfzbur2i/HyO896ImJ5YTn2M7J/Qe0H5rAmLzi8JBIPpptaMmDwDBFoDo3eeloqohgDDf1Uk+6/J3ihWgeqxH5PPKEWY9cDjg40oqDsO8Vl71z+I6XoZVh/y1Mj79HSr4yvMI+b2WK0UeAIIsgP3yqh/ceb/2+YLswfcTeiDx3G1s51TbeTmEOCyHAuL7BxvM06sqCKQgEskrjWthvIMRFFi/vsqTxFS8k4b8JMOyWqBBC+CSvN5Z8eydxnOuIcCS1ogFEWzL6+mGen6F6yxhQl43mPsMRPHsD7Pdo9H1dzxHkL9OyutXJe8bv/4eavwAEGQBbEszfY7t/PW3pP12VPbqK/I5quIWsucXcwD7yvAoCzujnoqTZfii4/e1EZYHAC+Y+wHcKsfpasx/Qfb8BzTT/qInAajvaiOIZYIpq5vstisAABGo2g/golTy+9jOX4FK8c/Le9QZ/Lq9AAoP+aorAACJhwA6CRxG0QDA6AO+AAAAAgAAAAQAAAAIAACA4RLAHWxnDYDpiLIkf3Mht/xb2M5KQ1P+g/K3UZfve/0NXb5VmOsA7i7DGYeMePCBit9yy99Vhocc8sfL8PCIyve9/oYu3xrUOgCdAAQ7fYoo/44yfNrCfDnlf6oMnyXK/3QZHh8x+b7X39DlsxCAPgQ4YrMQmH3xzRHivSq45I+zqxcPHXfI31mRfkZ89k6P9PvIFy3Ff8Qjfmr9FQnkWab411j1sWi+8RcJ2n8RqCutDQF4TaI5oXJ9HXfq5AvNJGaaycs948+V/lTxp0h/1Tuajr8gposFps8n/iKg/Yjff1X7/tGA9mc+Kzxkn3KQY6sWAPVosMJTSaoyR5XnxliXMjZ2pYdHKHcIScRWcJE4/b7vSJl2lqD9hKSfW0jABx8xCMAHb5DKblP+zmCMdRcvVnxuAzyBhZBKgXIrcEgHkKL8U8Qb60D27kA5ofxPd1356wggtgJ4ogZ4VF6X2O5fKzENKpQEeCISaav8eKTyxhIgz0AaLgskxIL6aGD+n9JIoLPKL6BPAp71kDtLvBcqr8b+izLo96rkH/ZQpoeJ93gCeRYhzzzkz3oQCqX+eEL5ttuPWX88g/xTNcp/tosEcMFDAS4Q71XBJf+QpQE+5JD/hIcCfoJ4jyWQ5y3Ff8Ejfmr98QTyLEP83EFATcvrJMAidaU1AhD/Kx8nyBxnV/8H3QV58b/qKYL8KWb/D7bv8n2vv6HLZycAZVrOsZ39/E18SP72sMM0zSkvVliJRRYfs/z2MfnbAyMs3/f6G7p8+5MlxlJgAAAGANtKQAAABgYQAACAAAAAAAEAAAACAAAABAAAwIjD5QtgA2V9O+Tj5AEgKwEIjFvuXfZ4d255AAASDAFyKt3lBGnI2ePiSDOg1wQQq4CXtRCCcSk7nkkBq7aEokI/1BQAekcA4zXmOFWBxyPkL2skEKqAjMXtI8BZvg0pACD7EGA8Y/rGE6QhZ+/LO5AGAKjEWINj/9zyAAAEEkDKDS0hDwA9HgIAAAACAAAABAAAAAgAAAAQAAAAIAAAAEAAAAVTDAuDgB4QQBdWsYm4Z7TrKCj/Rhmm0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
|
214 |
-
}
|
215 |
-
.admin-color-light .ui-datepicker th {
|
216 |
-
border-color: #fff;
|
217 |
-
}
|
218 |
-
.admin-color-light .ui-datepicker .ui-datepicker-title,
|
219 |
-
.admin-color-light .ui-datepicker td .ui-state-default,
|
220 |
-
.admin-color-light .ui-datepicker th {
|
221 |
-
color: #555;
|
222 |
-
}
|
223 |
-
.admin-color-light .ui-datepicker td .ui-state-active,
|
224 |
-
.admin-color-light .ui-datepicker td .ui-state-hover {
|
225 |
-
color: #fff;
|
226 |
-
background: #888;
|
227 |
-
}
|
228 |
-
.admin-color-light .ui-datepicker td.ui-state-disabled,
|
229 |
-
.admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
|
230 |
-
color: #ccc;
|
231 |
-
}
|
1 |
+
/* Fix empty block below admin footer (issue #24) */
|
2 |
+
#ui-datepicker-div {
|
3 |
+
display: none;
|
4 |
+
z-index: 99999 !important;
|
5 |
+
}
|
6 |
+
|
7 |
+
/* Style for multiple months */
|
8 |
+
.ui-datepicker-multi .ui-datepicker-group {
|
9 |
+
padding: 0 .5%;
|
10 |
+
box-sizing: border-box;
|
11 |
+
}
|
12 |
+
.ui-datepicker-multi .ui-datepicker-group .ui-datepicker-calendar {
|
13 |
+
width: 100%;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* Date Picker Default Styles */
|
17 |
+
.ui-datepicker {
|
18 |
+
padding: 0;
|
19 |
+
border: 1px solid #ddd;
|
20 |
+
-webkit-border-radius: 0;
|
21 |
+
-moz-border-radius: 0;
|
22 |
+
border-radius: 0;
|
23 |
+
}
|
24 |
+
.ui-datepicker * {
|
25 |
+
padding: 0;
|
26 |
+
font-family: "Open Sans", sans-serif;
|
27 |
+
-webkit-border-radius: 0;
|
28 |
+
-moz-border-radius: 0;
|
29 |
+
border-radius: 0;
|
30 |
+
}
|
31 |
+
.ui-datepicker table {
|
32 |
+
font-size: 13px;
|
33 |
+
margin: 0;
|
34 |
+
}
|
35 |
+
.ui-datepicker .ui-datepicker-header,
|
36 |
+
.ui-timepicker-div .ui-widget-header{
|
37 |
+
border: none;
|
38 |
+
background: #23282d;
|
39 |
+
color: #fff;
|
40 |
+
font-weight: normal;
|
41 |
+
}
|
42 |
+
.ui-datepicker .ui-datepicker-header .ui-state-hover {
|
43 |
+
background: #23282d;
|
44 |
+
border-color: transparent;
|
45 |
+
cursor: pointer;
|
46 |
+
-webkit-border-radius: 0;
|
47 |
+
-moz-border-radius: 0;
|
48 |
+
border-radius: 0;
|
49 |
+
}
|
50 |
+
.ui-datepicker thead {
|
51 |
+
background: #23282d;
|
52 |
+
color: #fff;
|
53 |
+
}
|
54 |
+
.ui-datepicker .ui-datepicker-title {
|
55 |
+
margin-top: .4em;
|
56 |
+
margin-bottom: .3em;
|
57 |
+
color: #fff;
|
58 |
+
font-size: 14px;
|
59 |
+
}
|
60 |
+
.ui-datepicker .ui-datepicker-prev-hover,
|
61 |
+
.ui-datepicker .ui-datepicker-next-hover,
|
62 |
+
.ui-datepicker .ui-datepicker-next,
|
63 |
+
.ui-datepicker .ui-datepicker-prev {
|
64 |
+
height: 1em;
|
65 |
+
top: .9em;
|
66 |
+
border: none;
|
67 |
+
}
|
68 |
+
.ui-datepicker .ui-datepicker-prev-hover {
|
69 |
+
left: 2px;
|
70 |
+
}
|
71 |
+
.ui-datepicker .ui-datepicker-next-hover {
|
72 |
+
right: 2px;
|
73 |
+
}
|
74 |
+
.ui-datepicker .ui-datepicker-next span,
|
75 |
+
.ui-datepicker .ui-datepicker-prev span {
|
76 |
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAQAAABFnnJAAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAAAEgAAABIAEbJaz4AABe4SURBVHja7V1diCXHdf56vbZmVl6nxwKFO2yyq1mM4qAwM7oDsR6C7iYIKesH3V1QHgyBu5YYJwHjrB9NQCuByIthHbAga6TZxeBgHMJKISZ+SDIb1oQgRtoVgtjGyD8PmSGQMIpfJmCLk4f+q6o+daq6+965P1VfM3Pv7VN16ud8Vd1dp6o6IUSEjBPTzkDEdBEJEDgiAXT0QOhNOxPHiUgAFT3sA9gPiQLjJsD0208Pbe9rM/OvwkaBQvP0yzhG6ASQO0AqDwmu9mOPT3nqPWsYV9qFEduVIDP/QU4BSfMC9REqAcbRAa520FDELdphc3SJCyRIcADgAAkSQXOXMs4ckrIxFEUs2oENBNSqR0WmJ2kVv2hltvRdaVPHvPtqdpVxjlD1AHIH6AupDbovH1nqkgllLd3apnQJUjV362dmDEnjOya5FUltsEqqbdtxa5Dbppx3uQ+sNLv6mblCcwLIoKlXTQ/7rQkmX4IKzdMv4xgxbgLMO3rYXyTzuhEJEDjiSGDgiAQIHJEAgSMSIHBEAgSOSIDAEQkQOOJ8ADPutPN/zGgyH8BvRoDLGdMT5wPIKbjN02U+gNsdnuV9oUjSbD6AnwdMrkK7gVYt3311u8zv0r5vfNq1L8xsgPp8gAz20fAilORvs8tdsX3mA0i5k1N3x5dBue7icyGgzwfgvus48OoF+DDu9ukzH0Bqf355s9OHnLMNmqQ0F2jjDJIcrrM+H0Ail6v/KUoe3cECpl85XecDTDv/x4zoDg4ccSAocEQCBI5IgMARCRA4IgECRyRA4IgECBwnp52BmQNNcZS/+1hp4/yf7BZ9IpUwzRyQMwftXUHumFMouX4JIED09fvsD0AtJE3RNg1X/jPTJ6IWNznaxvYrgU+oBnFPaAFcxU88CmCPn3hUkE8RSHD2+OQvEWT6Z7M0Com7BuQSygQiR2zA1Yi1/KuXAN/i22bruCspGUMHT6In0nUV7ZIDKmMnrFRNnUulaF72PJAgl3VXpZObgZrLBGh6E0gerccVyoed7dq4n3ETD+2SgXz0tq0BqQn66HbXQU3e5DGw6uJ8QvEyuQt0M1jW4epi/bpoVwtype5zE9kWboq75VoOTHdw6E8B851+i8fIOB8gcMSRwMARCRA4IgECRyRA4IgECByRAIEjEiBw6ItDi81Spwf3fuCThE8N+HhE28VzrY32TaURKgIUC6N8tntvVwHjQztdrpz71YC01Wzljes1jp35KYvDXoZe6xogI5cA+MWh8hJOH492jzk3PgrYdPltDWHPv18N2NLoGctre41iVyVw9UDdlqbXFujqQ8E+26m7lmDbFoj6zaRx58Cmx72FuzvnfhvS8z63umkTQ+5aWF4Zh1ufSJpm2WFsc1gn9TBNCeBfAUmDuH45kKvQJ3332n57+q7YLgK460A2oJsAMoEsBGj2FFBVQBuPVaLo4LWT9iml3wZVvtveQ0ipr+bS4grO7yAgpV/E5O8BXJqrvRuk9c1mLhvOB5AqQL+BkYovZ04qoqRDLZp72hdnAjcBpRIcGBtIHDTW4AfJvAfla2/8commlwA/XzU5t4iQr4JdYvtVL18Ov2tw9yltkp72L7Vx3wOwiPMBVPScb0xaOEQCBI44FBw4IgECRyRA4IgECByRAIEjEmDcmLPHKnM+gAuSv8qn6L2O/u5Jo3vuEsdg94yVvT4fQILkMfcZJSw8dqseC0zt6Lq4Sl4enjiXv7oNbIsvaZ8SqoEgNVvu3X7rg43q0sh2b//2HWgGJI+dK3ZiDaeetXk7pcWj5CX1L+mxgL8HsE06kP1V1aWhzaSFrOW4p03Z9zAg+Pr6kgZnuXS59N0rm2cS5vsCqips+gZu8xKSNIhbSP2WQLsXb7ffQkIyo6uH8Ncs7RFwzKh6ANVR2CZrrjcJuJ2tXa+OidKD8D2E/smFGE8r5lLQe48ZMb9+CTgoM8V14FkHn0334nEgzgfw8fa7t4eQUc0F4KdUyFVfXYTsu4sUIZOGUjVE2wk1EwHvDSRrB+7jLLXdBI7D2eo3a7HtjabPTSQAB0Fnxrg+iO5gHTPTNR8XIgECRxwKDhyRAIEjEiBwRAIEjkiAwDF7BEhny1u26DAJ4OfLllw25CW1hUhxeCxP4tPeB2Fm0Gy7eJ/tpBOsdMjPIQqSpGK4tlvWV1igN4B3gU4AeZRaHu0uWnWKQ5YCVA6U8mv3sq5/pQxxaIlffGu3qbra+/i9an7BURFA3+69jsofbtsyPUGSm/8DNi25a8+6/g+wIqydLVLn09dnFJha/LaPCA7FULDf6nYJxVwbm/nNuThmL+L6LZ2tS8xw5vYR0lvOg4I6JSxB3Uwm7FMZ/CZE2CeVmQSyTcngc+jaPkEn+IK9Ar4LqhdGqFVm32DE/dYL39dK2OQZBah2H1E4gvld+fX8+Lw2IgIAtz+A38r1ul/evUONJM1uHuUQurbE61wB9w5CgcL/hRH6rNjq+7hhv4voBv/tI4LCrM0HmJT5IyyYNQJEHDNmzxcQcayIBAgckQCBIxIgcCwSAfqlJ6A/Ef0nsZQfzd63OtPICDDMK24Xw9aaXnZ4+l0g3NBmCzQ1Yh975fc9Nna/Ez1O4ld4FEc4wqP4FUuBvjP3a7l0zZKGXe6KCTxnHHIKxtwOoqs0oAENSUUVtjo/JFgOKj+3tbhqCF57doyor8lHmrRPJvqN5HoOudytGfHXDPkSrRPREi0R0TotCTXAp1GHVEP+EjXEtncZyxAFk+8BAO5YJnPcxpdxD0CK2+W5O7hgZeMXLCOKy+W3o5rsJr4htL89ZBtLZNgHYU9LYQ9bSg8AbBlyN95Xcpfl0Ix/H8t4EEAf942wej6BLUbim5suL5+XsYb3y++lpoIA9/NPdRqGmuV7AH6EI3G2z1L+ecMa4qNC7Ct4D9uC/JLmSr6kUDHD2woFtvC2ISWoizP5FYYfxS/K759g8/AgPoEEp4RcXhRkpkeSl/MvoE4YLc0IXpj/D/DP6unqWnboUPAjHNXC6FnICLAiaLO1G8DVAwBvlRQgXMJbTIiCAnXzZ0iNz3rufl3M6Qb+G38I4B+xwcZ/GygpxOdgK++p9N7qOFCY/4+wrFPA936WM3+9AgG5o8razk9ZmasHKCgAi/mRpw7rTd5549PEEn6efzvLSB/Eu9jAfQAbeBcP4f8MuTkLqe0yU3dH7wrxOfxN7Vxm/i/gQQD/AADFBdz/MbBufrOAp3AKp7CMU9ZO8gE8gAcAcC3spsP8QA9v4RIu4S3LdM4+DjDEEAct7/OX8Vv5sVzLXw9nQPgFNrCBEyCcEaeUblmMf075s2EJLrhCfIs5l5H+Bj6G7wAALuBOJmj/RFsv4rIzzg+FkK4eoIcDIG/7B0z19zU5R4HfMD7NKspayQayOyK9n3gY9wH8pPx9HxvCjKIuHfxRxxD8hNmf5OXL7s9K86N8DEwdj1HuR5iXNfnL1scV+2PMjQk+BhYPSdWnLRd95hGQe4hzPeg1fQwGjayl9wmhlpDXXzwEDtSzs+MO7gP4HeX3e5YbqcmCAJxXWvr4tWeYztSUNbyvtX7E+QDBY5F8AREtEAkQOCIBAkckQOCIBFgsvIJXmkXQCZCC4FqYbQeVjoyujxZ9cB71LeXxte5vGxqPvUNDvm3IuUEn1Vu+NgE5APylo34GGLSut9P4Cr6C045QI4wwKn8pdZISUZ/6RJTWBhF2aSkfRrhG6zRkh0Fu5AMR23TDkMuebPPos+G3FE82EdEWOxBSHPX47oGcLMw6rdP6hORFmGxQx5QMqBiQS83hmtw6RNuEvHQpo/suERHdFWu3GEwa0TkCQU+gn4+h1dUT9RqNg3FyENGf5X9XrRXUp2wCSt+iH5YUXAYmAv07ge4R6N+InzJBtJ5L1gU5RPlpWqLTFnlR/SMaNa7BAtusfLsWe5tNf0hEI0qrkUTVHVw4Kfew1WqjFnWuAO85fAL7+DF+gJ/jPYtPsI89XMIbVpduF/wTfhffwwa+hyfwL9ZQ2Vj6hijXxyx1/LLmJ6wwwk0AyP/X6+9Q+8WDn21x1uMMAHwJwEp+eUzxAcoe4IYxmt6nG417ALWDs/UAV4noL4joFbaF9InY1j+uHuBvCfRdAn2Llpj0H3X0AIUcotzeA4y03JmXgIGS6wyDRuX7qib7KlOD5+hcPXUziX5OhHr1j4MAn6HfpM/R+fyvifn1WXE2AqRElFKaXy9N+XeI6Nv539/V5EX5bNfwSv64Q87Hr6692XG+IQFMd10q1JDsatLOmwrUT122RENCyaEBE0ImQN1f18T8ZvFkAvDys/Rdeph26WH6e/q0IV+t5W5trPLK/LAeuolTUW6T3s1vBE35iIpr/25bAsBxUJ6N1DM8b+C+Vb5lVDD3FJCWRecJYidghsccuesih8P8Pi73ggIpI3uKPsxv/LbpQ3qKIcBVGtXj+ibvNqh+H8rfg0qTlmXzmxTYqkld07plORFRz2GcLvKR0/yux8CKAqkl9nPl9+dqsa09kK87eB3v+gWM6IgBoHvsx4QRAOCWeTrOBwgc0RcQOCIBAkckQOCIBAgc4REgcxsPGMmgfDZ61EOPbTfFOburVgmwXlbAemt9NLUqSEHYyb/vwDar4Vq+qHS3RoHfxy4u4zI+hU/hh/h0LWZWO1fzX9mepeq+55v4LAhP4AkQPovNWnx5+4ph7cF+6JC7QgxraRgjQObZdSLapSEN6ZAqpwc34CENZpAzRPtjlOdrnR1UybBDoB1rLorhkHPsUNep8vgYOxa6Q8M8B5meAZO+fRyv8FKklmEw+UwVO7XoycYa+7k3B0z51BjrxXc1QDZKvENEh1YjTpMAxVgWn0Zh9uqzruGaONZ5gj5CCSX0ETrBGmRIIKJB6dPncicTQPWHmCuXMm9Iv6zjOgGgzaKoEyDTul2OyXIEOEOr+cEQYJhX4w4748dFAHJWgdu4cvx1Rcb1UDuKnDN/KuonSspjjUn9eh5rlx9SpWz3kOLgCWBPn8oZV7wGKn2cQwKdYwkAhQB8n7JOm7RZ+isZAuzkVcdP+XIxXA7RTMoTyOVTk1p/NeMpw8CQf5uI1vKD6DqjYVC6bLn0iU53IsBD+dmHyv9m7KL/GhLROUsPYK+/PhGdoTO0Smdok4iuZefV9wV8gBQ38fn8FknecR9OubSbuFvKpbBe7mOSrdE38U38cfn9+/g9TZYqM56AK/UxcazjS8qvl/EzIfWslszyrwD4EADwS2aDGcKKNs/KfMHFI9p5ws8MuT5f6Ca+bMzayrbwzybL7jHb+RMeB/BfAID/VGpX62APaUhD2qXZvAksWh+fxjfL1p/hrhG3n7f71Kp/s2w759jUd+gqUd4Odxh59vmQ5UbPnGhjtt/H6DHjv9x/NL8HGFKfNmmTNolos34JUK+xNvPP/lPAXSrmxnLVM3CksEPbtM1Op0IeO6MQRwESfpln12ohhrUOfGjEPFc7mt0DEA3Lw0IA31Y4LQLIR6q0+rtkes2z1uFTOlv+s57lkFIqbieTWtzP02eoJ9QSEZT7DF22lD8FZP/NbejqBDEpMhSlaum0MkZ3sIqH8BKAF/E/rHSEFdzM32aQ4n/xa9qbDVz3SIC+meUk5j23QCRA4AjPFxChIRIgcEQCBA6TAEPrfuEXcau8obwlbokaMU/QHhRuExHRbeYB5ou1h5AvTuVhLx5jPtQfz5TGfcYIdlF7eixwkVG4R0R71uR+6jkgA48Qx3/sKfTfm3puJkCA21T4nMw+4DWWAK8xCuWBoNowhNX8HEncy6tcIVxyor1yuGiPlfvlf46O6uszmoH1PsCGpgQAgV24WTd/vZ9Q19byBnSFGBHR07RET1s1+JVuQQmQXf8Lr7PeB+gFl6phm2zLwlTz7zKSQfnJXyZcxkFu+DQnAid/Ov/2tKBhT0hjgQkwIBOqAfwJwHfeuqZ7jEeuiGczvy8BUrL3MVSOsNf99RXsBOgT0R7t0R75+BXm5DArwPzelACuozBS3fyZ2W3mn4UeYIFvAqv2nyp+58oMX2cJ8HVGoasHsB1qD8THn/49gJuCc3hwRasX8ilW+hSj0FU5dqnU+nUDj1qH6PoUkIWZutHGT4A91sBqFTxfkz5vNeNASFCiR9ve43iPBSOAvzv4SQzx5/n3r+EN/Ou0xzCnhLbvAppRxPkAgSN6AwNHJEDgiAQIHJEAgSMSIHBEApgYgFpL5xAqAYjZNkEHYVyvhJgWbgjvNgeAAXZbS+cTxigd0a4wGqd6A0xJES+1ahjQbu4IGtCuoAGEfHmTLt/WNLVx1w4cg80Dj9hFDdi1zNXBV5/NhBIB1Hj1ah6UcQb5CntZg50Atvg+BJCksqOnLl2QIWFbIflpHS4CZCasfutSEErjuTTYCGCP7yZAUxPbpfwGDHN58DeBd3AB32hxPbmDC7iAbJ3cBWXMPFHOXhB3wi002OCKfzxYJG9AjeWLfA/gOgK8B1CdQYQ7eElsX5Szv/icL6hPLrbcZ/f57aRziegNNDHArmBiWTqHiAQIHHEkMHBEAgSOSIDAEQkQOCIBAodJAFJeLB4RACoCpPlWqWdx1rLXfjZ0dM0ijZhLFARIcVhuDvMIDlkjb+ACvoYXcejxQglzeGHbGIHcPmZ5hA15je0Q0V8RiOhFyvbFtY0ep+JewtWovOt3/1jl8bAchVGJ7hEI9CINCHSPbG+n3qFzlDllU6tSfqfapXw79dP5n7nT7WmSNlwv5CTKl8q/pdYOocCOkwCA8wDeBAC8BAB4Exs4X9vKdAObuIkreASXcIgruN6oq/mk0ukkqI9Afzz/S8Avvzqd/30S/ObyHwewkstXFmu8fpLIfAEpDnFfedHRPWxgRdsJt0CKQ9zBBezgClvJlO9UX9+t/re13/9h7JU7aXmEDXlXsEvVoukR8Zu4ZL7w7H0VtpfK2ObL6O8Wr883mrQ8Hpaj8AZm78O4jzfxLDbAv5Gjmg1wAWDcomrrX7A1tIuLyh28jmv5g+AbuBZfFh8K4nyAwBF9AYEjEiBwRAIEjkiAwFERwPU+gK7yJ3G9lF/Hk8cun3T5pi1vi1yn630AXeWubeYmLZ90+aYtb31kHxeJQ/U+gK5y10aTk5ZPunzTlnc4skvA5bJDSJQRvMvMNxWm/IU8boIXDPmzin4wZ5/l1FvkSYv4l9n4XPlc5Vfz3zz+20iUELb4klzNBW+VhsgGgqrRoKT2S5dzGSnkCYDnAbyunRmffp/4bv1qiKbxE/ALzKjBb1K01OV/AgD4a2v9FWc38Q7GskhNJYD+Lup6Blxy4AW8DuB5vCZWsK2C3PoTVpuvAdz6ZQJ0r5+kPN9O/jjeUcw/FgKc7K5CwYfK/+YgZ48gQ12O3kZDony2iU8ecV1usj8VZI/jnmb+sWDcl4ARgFtofwno3sXb81fX0K4Ll/T79SCuHsqW/uO4p5l/DD1AdhP4Kit7lfkmyZ8HcBM382+q/HUlFjFnX1ekLjlEOVi5nn+qnX1Vk7jkbeunKB+1lr+jmZ9PtSmCeAyb9mPopOWdxwEWfyBm2gNRk5Z3JgDoSbpeKr9OT9aCdpVfpFul/BYziDFp+aTLN215yyNOCAkc0RsYOCIBAkckQOCIBAgckQCBIxIgcKjOoLrTUcesyyNaQPcGLpffjtjQXeURM4f6JaCb6Y6cGrq13KSzhggNJgFcBjzCkShfxpHSD9ThMqA6JYoDtfT1R1hgEmAZEA24jGVRfoRlkSAEecJE7qGwIq47HjPql4DlFlr02LKGbu3XRaCIhtDfF6BJamFnXR7RAtEbGDjiQFDgiAQIHJEAgSMSIHBEAgSOSIDAMb8E6MUBoXFAJ0D3cTZCH4T+xPPdwz5WJ55KANAJsJr/TRuu1p2Z/2Da2VwE6ATYz/+mC1frjuYfI3x7AEKv9tcMzKokFpl57TQszB/vAcYCfUbQPhLss26WhPlrhi2vUIX5V0X5QbwHGBd0Akg9wGppmuKvWSe8VztTJ1FP0c9RTDd/vAiMAbPUA0TzTwG+PUB3uN/f0cz8PUu4iEbw7QGOA1Lvwpk/3gOMAfqEkB4O0JvJzpXyTt/8jOiIOCMocMyvLyBiLPh/gj9Qphd3t8gAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTMtMDItMDFUMDU6MzM6MTAtMDg6MDApYMCSAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDEzLTAyLTAxVDA1OjMzOjEwLTA4OjAwWD14LgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=');
|
77 |
+
background-position: -32px 0;
|
78 |
+
margin-top: 0;
|
79 |
+
top: 0;
|
80 |
+
font-weight: normal;
|
81 |
+
}
|
82 |
+
.ui-datepicker .ui-datepicker-prev span {
|
83 |
+
background-position: -96px 0;
|
84 |
+
}
|
85 |
+
.ui-datepicker th {
|
86 |
+
padding: 0.75em 0;
|
87 |
+
color: #fff;
|
88 |
+
font-weight: normal;
|
89 |
+
border: none;
|
90 |
+
border-top: 1px solid #32373c;
|
91 |
+
}
|
92 |
+
.ui-datepicker td {
|
93 |
+
background: #f1f1f1;
|
94 |
+
border: none;
|
95 |
+
padding: 0;
|
96 |
+
}
|
97 |
+
.ui-datepicker td .ui-state-default {
|
98 |
+
background: transparent;
|
99 |
+
border: none;
|
100 |
+
text-align: center;
|
101 |
+
padding: .5em;
|
102 |
+
margin: 0;
|
103 |
+
font-weight: normal;
|
104 |
+
color: #32373c;
|
105 |
+
}
|
106 |
+
.ui-datepicker td .ui-state-active,
|
107 |
+
.ui-datepicker td .ui-state-hover {
|
108 |
+
background: #0073aa;
|
109 |
+
color: #fff;
|
110 |
+
}
|
111 |
+
.ui-datepicker td.ui-state-disabled,
|
112 |
+
.ui-datepicker td.ui-state-disabled .ui-state-default {
|
113 |
+
opacity: 1;
|
114 |
+
color: #999;
|
115 |
+
}
|
116 |
+
/* Other Datepicker Color Schemes */
|
117 |
+
/* Blue */
|
118 |
+
.admin-color-blue .ui-datepicker .ui-datepicker-header,
|
119 |
+
.admin-color-blue .ui-timepicker-div .ui-widget-header,
|
120 |
+
.admin-color-blue .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
121 |
+
.admin-color-blue .ui-datepicker thead {
|
122 |
+
background: #4796b3;
|
123 |
+
}
|
124 |
+
.admin-color-blue .ui-datepicker th {
|
125 |
+
border-color: #52accc;
|
126 |
+
}
|
127 |
+
.admin-color-blue .ui-datepicker td .ui-state-active,
|
128 |
+
.admin-color-blue .ui-datepicker td .ui-state-hover {
|
129 |
+
background: #096484;
|
130 |
+
}
|
131 |
+
/* Coffee */
|
132 |
+
.admin-color-coffee .ui-datepicker .ui-datepicker-header,
|
133 |
+
.admin-color-cofee .ui-timepicker-div .ui-widget-header,
|
134 |
+
.admin-color-coffee .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
135 |
+
.admin-color-coffee .ui-datepicker thead {
|
136 |
+
background: #46403c;
|
137 |
+
}
|
138 |
+
.admin-color-coffee .ui-datepicker th {
|
139 |
+
border-color: #59524c;
|
140 |
+
}
|
141 |
+
.admin-color-coffee .ui-datepicker td .ui-state-active,
|
142 |
+
.admin-color-coffee .ui-datepicker td .ui-state-hover {
|
143 |
+
background: #c7a589;
|
144 |
+
}
|
145 |
+
/* Ectoplasm */
|
146 |
+
.admin-color-ectoplasm .ui-datepicker .ui-datepicker-header,
|
147 |
+
.admin-color-ectoplasm .ui-timepicker-div .ui-widget-header,
|
148 |
+
.admin-color-ectoplasm .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
149 |
+
.admin-color-ectoplasm .ui-datepicker thead {
|
150 |
+
background: #413256;
|
151 |
+
}
|
152 |
+
.admin-color-ectoplasm .ui-datepicker th {
|
153 |
+
border-color: #523f6d;
|
154 |
+
}
|
155 |
+
.admin-color-ectoplasm .ui-datepicker td .ui-state-active,
|
156 |
+
.admin-color-ectoplasm .ui-datepicker td .ui-state-hover {
|
157 |
+
background: #a3b745;
|
158 |
+
}
|
159 |
+
/* Midnight */
|
160 |
+
.admin-color-midnight .ui-datepicker .ui-datepicker-header,
|
161 |
+
.admin-color-midnight .ui-timepicker-div .ui-widget-header,
|
162 |
+
.admin-color-midnight .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
163 |
+
.admin-color-midnight .ui-datepicker thead {
|
164 |
+
background: #26292c;
|
165 |
+
}
|
166 |
+
.admin-color-midnight .ui-datepicker th {
|
167 |
+
border-color: #363b3f;
|
168 |
+
}
|
169 |
+
.admin-color-midnight .ui-datepicker td .ui-state-active,
|
170 |
+
.admin-color-midnight .ui-datepicker td .ui-state-hover {
|
171 |
+
background: #e14d43;
|
172 |
+
}
|
173 |
+
/* Ocean */
|
174 |
+
.admin-color-ocean .ui-datepicker .ui-datepicker-header,
|
175 |
+
.admin-color-ocean .ui-timepicker-div .ui-widget-header,
|
176 |
+
.admin-color-ocean .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
177 |
+
.admin-color-ocean .ui-datepicker thead {
|
178 |
+
background: #627c83;
|
179 |
+
}
|
180 |
+
.admin-color-ocean .ui-datepicker th {
|
181 |
+
border-color: #738e96;
|
182 |
+
}
|
183 |
+
.admin-color-ocean .ui-datepicker td .ui-state-active,
|
184 |
+
.admin-color-ocean .ui-datepicker td .ui-state-hover {
|
185 |
+
background: #9ebaa0;
|
186 |
+
}
|
187 |
+
/* Sunrise */
|
188 |
+
.admin-color-sunrise .ui-datepicker .ui-datepicker-header,
|
189 |
+
.admin-color-sunrise .ui-timepicker-div .ui-widget-header,
|
190 |
+
.admin-color-sunrise .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
191 |
+
.admin-color-sunrise .ui-datepicker thead {
|
192 |
+
background: #be3631;
|
193 |
+
}
|
194 |
+
.admin-color-sunrise .ui-datepicker th {
|
195 |
+
border-color: #cf4944;
|
196 |
+
}
|
197 |
+
.admin-color-sunrise .ui-datepicker td .ui-state-active,
|
198 |
+
.admin-color-sunrise .ui-datepicker td .ui-state-hover {
|
199 |
+
background: #dd823b;
|
200 |
+
}
|
201 |
+
/* Light */
|
202 |
+
.admin-color-light .ui-datepicker .ui-datepicker-header,
|
203 |
+
.admin-color-light .ui-timepicker-div .ui-widget-header,
|
204 |
+
.admin-color-light .ui-datepicker .ui-datepicker-header .ui-state-hover,
|
205 |
+
.admin-color-light .ui-datepicker thead {
|
206 |
+
background: #e5e5e5;
|
207 |
+
}
|
208 |
+
.admin-color-light .ui-datepicker td {
|
209 |
+
background: #fff;
|
210 |
+
}
|
211 |
+
.admin-color-light .ui-datepicker .ui-datepicker-next span,
|
212 |
+
.admin-color-light .ui-datepicker .ui-datepicker-prev span {
|
213 |
+
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAYAAADvl7rLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMUIxRjI2RjhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMUIxRjI3MDhCODYxMUUzQTEyNERCMDU1QzdBQ0EyMCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjExQjFGMjZEOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjExQjFGMjZFOEI4NjExRTNBMTI0REIwNTVDN0FDQTIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kKfR4AAAHcRJREFUeNrsXWuMXsdZnuMu4CUN2S0t0a6o4sQqAaooTncrKGrUNbe2qSC2uQqpqtexbCqI0xaQEBclKUL8qts6stqNkuwWiYqbajtqS9oAuyEISrubrLmUFnBSfmRXFa12KT+cKk2GM9mZ7ng858w7l3PmnO88jzQ633e+8565vs+8M9+8MwXnnAEAMEzsQREAAAgAAIABYkx9OHXqFEoDMDFVho0yTJdhE8UxOjhz5gwsAICk/Exep1AkGAK0DY6G93L+eUblnw4gATPNqMceEsBURMVxSwhFbO8TEj838j4V8B6eQHF1RWyzDnTl3zRIIDTNsCJ6RABdMf+mM6XBjNfsDXP1wm2hkEGN+ze1eyFpngYJ9IcAYs0/vQEVkenz7X1SwRZv2xNhqeJNVRcxac5Vj0AAAcSYf13pBVMMPfS8xyhhaFpy9pqhQ6CqNOe0ZgBPAgg1/7rcC8aQQJEx7lzkGzoEqkpz7noEPOcAmhhPxjTGzcA42zR/m0jDZkSPGZPvmCFQVZqh/B3EWMfTV6CKvm2F5LJAQhYCmWlGPYIAAJAPMMQhAAAAIAAAAEAAAACAAAAAAAEAAAACAAAABAAAAAhAA/zI8+wHoMcL772BEkBsA0i1J0CsM0yIAvGa0CZ55doPIIU7uF7uIJKeEUCKBpDS6yumEW4kTPt0S+mOVf7YtG84voekHXsB9IQAUlXeZgMk0JYC2dIe6swS2vBTK79P2mMdmTZayBPQEAGkrLyUJDDdkvLb0h7ryRZCAtOZlD/F8G264TwBDRJAURNYJhLwbcSpepqU+wFs9KDcqhR1OkHa4Q7cQbTlDRjjVRa6H0BuFInKbTqQ0IpE8YYqrl7n8CgcOAHkVKK+I+d+ACj/AQ4BAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAeg1sCw64IJYBFwPNt4li1Mp/DJUPBSAoQUwZ8AwKlCLOQdT5HmLlh1ZCikM6eUsyOXqUJvMRW/660hcRaUlBHDyjEqdsuzxTW+O+BJCi8lOdyRcSf5GoAaWqhJAelCcsvyKB8sQocmzeU7SBWAuorbabmjxqy3+spcrnERkPbUhFR8z3UAVIMQ7NVQbcEneRIO/UvBSW/PuWAw+U54naQJFgCFZVlgV1DiDH2LlI/K5UzNlmL55ScYtEaQ9VoFTpbbsNhHaCqdKdoh045fe0pPxFBiKJnXtIwcAx6SgSpD+VCR3bA8XmPdUkZB+sv9TzGLV135QFUHTgXTl7z5Tx5yzH0PynznvRkTJscx4lZvhHjnesw4XXFRTIP/I/qvFiJSAADBggAAAAAQAAAAIAAAAEAAAACAAAABAAAABDIwB1suvQT3WNXU3YZ6RqA6m8QtuML/Zk6N60P8rhoBs9bABdJZO2G05omadsA0Vg/DZvuKkW4lZyKY7GM9Ocwx14inm6A28Q7zVdCSGVzztKAr7pmkqYh5DyT9kGeIDy1x1QO9Vg3E1YQDmPRXceklt3OGjV91w9H6Ugiw5aAr6706Q42Ti2/FO1gZCdeTYqLBkfIoptBzEWUGia60z/UEvOVZaNTwKGNIC6sVdo5fNMSp9SAXwbQS4yrMt7G+vbiwTtILUV7Itp4r1G5gCaVP62HCtiG38KBs6xFx5FCbpo9VQ1dNv4e7qFdhBjAcWmWcA8Xj3FMe/WuYw9HWwAdZMvoZWfk4FTKUCKrb24R/2lMEFD0rtZU9Z9PCo+9nj1IlDeVZaNEkATPb5vQcb0eKkYOCQdmyy9uedbH6kIkEeUv82nfbPFNKQq981Ew+DQ4V/tMe9jDTJnFzazYJEkkGszkk2WvucqPOOf1sa9PgTYtf0D+riZSGvx4mAQoE0SAjoGLAUGABAAAAAgAAAAQAAAAIAAAAAAAQBAVnAUQfsEkMobLdSjKlWl6/GjIYUpX+6yCz0hCfUeSACpvNFCPapSnYmnxy/eN83SHFLat14s9njwgsUf8JpCgXlLaR88AVR5o/n6NKf2KQ+NX5GJz8KWlCfqhnok8kRxhypwEdgTV3kDxigwi6w7kECCOQDfjQ1iPKpsCt/WxgrcQn4pThj2aYS2k3lTmNJNPEvNrw+BxJ7KDEQQQJ0LYRs+0dNaXLEbK8QoSpHAjCwSKVauHoxnym/Kd6QYjgyKAKq80dpi4VhvuBSurLlNxqLCAuEtNvqu9cQ8sO5SHfM+qCGAbbzssyXSlFFpIRsihO4HkMqVNbbx8wQkEDoOjm30tmGQ7xCCB86rxMjWkQCD8l8NH2/AjcAKjPGlZwHviXFlTWmG6uWQwowtAuOPSXusK23oxjAxsk0ORwZNAG1MIqV6X1dcWYvM70mhwLn86aGwGYcAAAAlBAEAAAACAAAABAAAAAgAAAAQAAAAIIDRxwTD8lFgoASQ0g871LGGJ5T1fYdQ/i02On+HxZ50CwyIAGIP1kzpCDOZqXy2LEQyEamAOWR1bIAEAAoBxKyfjlnPbfbUqhee9FAUcxmpz9l6usk/aXnHlmf85r0YQk1lPW2g6QNVBMAjeyCbPzj3JBSlbLryb0dYH769vpLflnGHnCxr5t0n/3V7ErjSkmo7N2AAGCOY/TygF09hRTCL8ucYi2+zdA41VOWvKjdX+ZvbsBUV9TuNpg/YCMBstFWffUzQWK+0WMSOu32tj7q8u8qhqpenluFGTb4LTfk30fQBGwHUKV0R0fCLSDLIRSCFQQKcMBfBa4ZCrrzUlU8XdtcBBjAH4OqNQhXWd0+8mP34YuQnLbJbWh62CUpW1NwriKQTgqrt3KD4gDcBxI7fQ7elKioCi5APGfPrsqn+hiwSP2cidjs1AEOA6IZYJG7UOREzB5ALmww9PpCIAIYOKBIw2CEAAAAgAAAAQAAAAIAAAAAAAQDNYoZdvZZhpkfpF5PLe42ACeeOE8Aho8Ety3tt4/0szoc/FiKuBVa9l8BMC8q/arm/6hH3TEbyEIr+rTLcXIbLMtws740Fpj8kHzcZsjd55iNEPjZOgV9whJg8XKVLeoWcK8P7yvC0/D4h79lg+3vskOX5w2U475no32dXH8t1kvktB64jDNc75svwL2U4UfH7LWVY81ReHbMR8qsOef250KPNRKO5VPP7/jI84yCA15dhvQzj8p4ggQNl+LIkAuaZfp98VNX9JY82wCxlcIkgFyJj4s/l9aTsiFLWY1FHAExTfoEV5rcCjkog4r0HA5jRlwTGLfcuE+QWy/BgYO+3qhW0uSJPnXa8WpMHpeCrNeSxyppdn3Cpouz0MnTFr5T/Go3Y1h3vrStPlXcKmjiVqm+Hy1aROLextVlxOrY8C1kp/5dlQwldQrvX+L4Q8I7vCIzbZQG4cLiCqLj87ZxDfq2CBCg9P69ogL7nFIqy+4bl/vd4lMM18nkR33cHluUdEcO4GIIIdYcviGkpWlT+nyjD39SZa4yo9FQo5Xe9pyASwGRg2sYD0x9jAQh83kICSvk/T3yHSQIU5dcx4fhOKbvrI8pUmPtfK8Pb5fe/kveYR/6ZhYR8ymDWsKhmCcOzvsNU/l+UdVZJAqlnZqnK76O8oeaU3us826IFYJIA81R+G0n6TuLtd3ynWGD/bdy7waPnvygVfl0jBHHve8vwPLH3rduZqs0l2inM+dh3/EoZPu45b3FSG4J9Urt/xfC7ib8Btzwadp3yqjCuffbBd2nBpwdbjFR+gSmNBJTy+2zEKRReOPUckmGTtTuTL8rpB40wTig/kcfvl439G1LxD8h2xuVvoRuSznoq/r6Ka+xwNMc7/iSA+MWw+TvZ7qSiUv6VJi2AVJM04wni+VLgO2MtgCm2u+OO3utvEhv/TI08lQRe6/juakSXDHNenx+qsya+T3vO9k/BunxfyI5Eucz3y5nf4bMvxzNG/S3UKX8oAcxGmDkU5f8DqYBVv6UimSbmACjjzNkG5XVFrPvuakT63MWYTJPr7z+dJFzPuCbSeIK6/cuKK7UTWKy43+Y7QvCMhcStyv9yYXK+U9anTp1iwBXj7VsqfhfktDaQsuBar/9MT9OeqmPoG9SEoFX5z5w5k20I0HWsGdcho0Dae4tnKGUAXwAAGDBAAAAAAgAAAAQAAAAIAACATuAPZchCAOqU3NgjsUNg+i23vSeADcpHnbIYZ5bZ/bAp/+EfYtV7EXDm3qPhhEOeusCpypf8pp7IK/xRZPuZk6FtXFuG35Hh2sh3HdXCFRirUf4trcFST+gVm4gIBxB95dP9bMcD7kZ5pfhzi4U4a1qlndQUsKiRUygaUH61QMfljivK7AtGWlTaxP03svrFPue0PJtYIJShy3NygdEWOqmFJLoTzzqj+7jnllf4baNNCCVYIij9smzzy/LepNSDykU1hu6oOnxQku6C9h7KOROfNj7fHqH85oIkkf6vvFwoloVAuvLr3mirhMSLlwk/+Lrz50M3dPCRV0r3a2U4q13FfgWnPRvQjCQjteGJyzOv6mBPah4oPVVByP/nyvCjbMdF+7Yy/EMZfozRnWk423XiUTK3MvdKPpu8Qoi8+D/7BbbjonyTh7zZ+NUKvMWG26Ape9JCykWN9eYi8JOMvlJVtVmR9/NSr8XnpbqFQKbyq15vVv7WxgKLqn0EfLwM3ySJ6D/L8O9sx7tNrOJ71lP5Rd7Vzka+brm58Ndl+JEyPCaV6DFZHn8bOBzTFTJUXuCWAHmh/M8HyJk936Jn+9vybJuhFpmOGxI9o3CPluZDhpWybZsDWGDV69EVCSy00IC3ZdiSYZv5H8/1j2X4uTJ8VjaGT0r2PBeg/Oc0S6AP+Em2s/b9bdJ8FFfhTkrdYONmS2/lQ/ymvAqvCJAXPf9e5rfBy9EahXetxZ8zlN88X3KrwTmB3y3DB2p+/4B8xoV9Mqh0npblMS+HP9tVcwAnLeNZphHCWsXYtItQFsBXy/BP0pQU138LUP6Ynp+zMH/wSW3uxdcCEi6gP1+GP5VKL66/xGhuqcJj8UvamFu59CrzPUReKP6LEfL6HICv8psK/2QL1utWgHWr8Jtl+I2a30LIr5K8Xb4AIY1+SzOZ9xkm98EWFH+WoGwfb0n5Y0nAtIqo+C22sxmEmNi5Xl7Ffgq/V4YjNXJi/uY5456pdPs7LG9T/iXPcl4xlJhbFHjbUU9VJECZANT/cft7eX2zabo78q+P+VfqImvCGeh5trsT8Fci5wxC9hRci4xTWTuhyi9m+b9QMxZ+Y8PKr8qdSetHv/6MQ+45Y7z+r57x5pZf1Ig2RPkplhZlHsxGAtTZf9E+XirDu9nuZJ+YHPyI/O1xot6oMf9hXwKo2hBR78maxMmantJn+GGm1TftoT3/ag0JuP4CVD3cJa3xbHn0gLp83e8uiJ54M6IOc8nPJ1B+ZakuG0qs/w1IJW19GEclcTHp+ctl+Avt3oPyPS8Q33FaK4/aeFPvByDGiRcZAIwO5rShQR9wVPtcSYJN7QcA5QdGDSs9S6+X5QNfAAAYMEAAAAACAAAABAAAAAgAGCno7sVzRJk5drUb7s2J0uPzV2wX3MAHSQC3WhrArRnSxwfYCNQ+DI8Y9x9h/nsz3Meu9H1YJpDAj8vnjsjwOhnE8twfIsSpt533Vih/YQQdwnPxHVL+TTJwee82QvwzlrZLPVDFtReDaz8GinzsOw556g2v0yPbOgC15nulDB+W9xZlwzPdOykJ8WV9m3zMO3LgqCwzVV6qTCkLVPQ8i3cck8o/71kWKg0KYj+GZwnyIv5rLPe/VYZvMporrYj3UUk+qgz09NT51KdwBzdXkFK9WDmju5tT47Zhy/EOtZpR30BmVbtfEPJvi+Pb7thqHYDNAlDKLypJLOn9Wba7BnmdARQsamV5VCu3RQ9ZJpXeVH6qW+s+47uPG/TzUtkvy/BNSQBUPMp2l4NPsqv98ldaqIP9bNeblHlaA+buT75W6LbMp+7J6uPRyo20zBDJ0YQ4i3FaC/9DHQJ8WDM71RFH8y0pT5W50sZwgBODCwcqFJbiT3+MVXuzKYuAMoy4N7IcXtK+v8Toh2t+SPb8qpzuNZR/ifCO8Yrgg1XP+wp72ZW7P+3V4qce8inK/7Rm0jPmdzhpETF/UkjiEW3tNWzHGew1WrgCdSsBdeU/Rhx7VLFUm6Z8ivMJY3GRXX023LzH8OlYpPLbNnVhmvldhz+TCm/6DFySyu2CGPdfsMw5+KzPF77/L7A8uMby/Wvy86uJ73iP9lmQofIsvZFoBfAKsqJ0Pspa+LpG3nuk8j/Fdrboq50D4DKRE0ajU5XZxpZeLOIdvEFZah6qfOepcyh/XIZ3Wu4L99DbA5WfqoAi7fdU/PZ+tutp6Jt3KoHp4+gXtfsvyOEIdQ6gapztGsPfWPM8Z/UernrcVcO797UwB/AG+fmr2v3n9LZbNwdwQBvzPyp7fqX8B4jKYc7uVs34UuV93lE4QowsNQ/rFSb8eoDy61aE8At/0jG5pCv/QdkgC4/eVxDUAzLdeqAov8qjauhM63HUfAZ1DC3C/7GdM+5f4WF+zzK/reNMvFKGZ+X1WuNzDKjD6Ng5gBukbl+vBSaJgbuGABeloq+zK/9C8v0HYMhQ5r8qs6fZ7r8ALrzT6PFFr/k6trspxJuJY1/X7rV1eFqm/3Py+w8QlV8nsRU5Dl6RQ4ctLf/HPN71dc+0rzH75itiQ1HXCcfCVNePprd9PkwYgt3o+J3SCXKP+za8lmTKNnw8+FD/BoyBMuNNc/9Jqfx1vuVc6wXXEtWdb/nr/1psa+NefbvsPTUNWd2/qwxfZDubuW4GtCVlKt9kmcsoHJOAr2e7e2Ay7bPYTq5ug9JDjLbnpNoxK+QddbKUoewVQ4CmjwcvMsv3EdsV+b695fJ6tWa++/yjIHr3v5NEtaiRldog43/LcB1hMuzhyPRXbQ3nOpzleXb1rlLUcj2foA7Ot6k3YwwAqk3vXw+UXaohN+ZQ/lQktsaG2YF4Ab4AAAACAAAABAAAAAhAwyFGXwGocIccA5rLZ5cY/WQaAAAyE8A5I1Bwdxk+VYZ3WX57l/ztbhQ7AHSbAN5m9PyH5D1Xz3/GuGdbOXfGwxJYldbDakDenjUskLkE5TWHJuNVb2ZYRdH0gwDUARyTbHddtutQjiMe8VKfnTGuPthnfF9OoPzLRBI4ajT8owHxxb4jVl4p7IxFuV2Y9bwPdIgA9N5f92F2WQF3VTQiTnw2NZT1MZngXXMagbhIQCia6bO/6KmAse9Q8qK+xuV1MYAEZiy9+QzUZrQJQO/pJ9iVa5dPBiphKE4GxqunXy0/XQk08+cM68G1xn7R837ds/OSwOY936GU/zNsZ2XbZzQS8MUa1GQ4BDBnjP31HVWUFdDmOPg/jKsvVNqFI85hovLrPbyv8qfGeWmBnQ+QfcLxndVYbLGbrsxo5LGmkQish44TwDKhB19uMX0rMv5YpTvI3GvPbWZ+TuVXhDvB/P+KFXiL43udxRa7hHZBU3jdnXUBKtddApirMKEnCGaywFmPeKnPzrG4GXzVmCm7sKywK3fLCVX+ec/7dc8uSitm0fMd4rnHyvBWtuPd9lb5PWRbt5mEMrAAOkwAyxUmtG1zBduzF2pMSsqzrCaeUKvD15w1SSCk51+yKJrvcdWx71jSSOCypvxLnuUnTPdZwzKgzAmYlkQqywJokADWPBuGicfLcJwge1w+SzXdGaOfyZ5q2HEw0uxfMhr9UoZ3xMoXzL6vAP7KGyGMJa5Y4cP9X3LM+h7jN7ErjJjMesJTGWN6jSKCBNBbAYMigFR4Qob3ongBEGl/hgAAAIAAAAAAAQAAAAIAAAAEAAAACAAYIOZYuG9AjCyQkQBEpVF931nNO3jNd6B5LLC49fdzLHwVZows0AELQFVgLBH4koYZ30RAGlTaJyz3eEAaFE4Q5U/UpIl7lIXvseRmfCdkmOuI8nOGXZV6NwRomwjM+IQjz0FNeeYIJucy2/UADEl/yjznIFJmKKCPInOtDEOtvirZAlZBf+cAVEM+0eLYc1lrMIXWmHlNz20+G6N4ZhpClLBtxWc15ZMTGP71nABWZK/6YEtpU/EdNBrQQWZfXlpUPBvjx2+mwRex8Y8SsCS4pwSw0nJDNuOb0Ex61+YgKxoRqDmAkPSnzPNKBiIoKoKP7MGIeA/WWAEHoXYdYuWK48G5bKz3RzRa8zjn2KPCgXhz27fs5yzDqjZkgYbhOh48RYUVMAF7b26vaNZUm7JAB+cAgGFihWFfBRAAAAAgAAAAQAAAAIAAAAAAAQAAMJoEEHqyLQAAPSUAsXruHu37DTJMeLxX92C7z1MWAIBMBKBO0zXPortR3qcq8gG2swhEnAVwr5S9NUF6XQ4lJ5jdjVaFEyMuDwBeMFcCnpbXfzbur2i/HyO896ImJ5YTn2M7J/Qe0H5rAmLzi8JBIPpptaMmDwDBFoDo3eeloqohgDDf1Uk+6/J3ihWgeqxH5PPKEWY9cDjg40oqDsO8Vl71z+I6XoZVh/y1Mj79HSr4yvMI+b2WK0UeAIIsgP3yqh/ceb/2+YLswfcTeiDx3G1s51TbeTmEOCyHAuL7BxvM06sqCKQgEskrjWthvIMRFFi/vsqTxFS8k4b8JMOyWqBBC+CSvN5Z8eydxnOuIcCS1ogFEWzL6+mGen6F6yxhQl43mPsMRPHsD7Pdo9H1dzxHkL9OyutXJe8bv/4eavwAEGQBbEszfY7t/PW3pP12VPbqK/I5quIWsucXcwD7yvAoCzujnoqTZfii4/e1EZYHAC+Y+wHcKsfpasx/Qfb8BzTT/qInAajvaiOIZYIpq5vstisAABGo2g/golTy+9jOX4FK8c/Le9QZ/Lq9AAoP+aorAACJhwA6CRxG0QDA6AO+AAAAAgAAAAQAAAAIAACA4RLAHWxnDYDpiLIkf3Mht/xb2M5KQ1P+g/K3UZfve/0NXb5VmOsA7i7DGYeMePCBit9yy99Vhocc8sfL8PCIyve9/oYu3xrUOgCdAAQ7fYoo/44yfNrCfDnlf6oMnyXK/3QZHh8x+b7X39DlsxCAPgQ4YrMQmH3xzRHivSq45I+zqxcPHXfI31mRfkZ89k6P9PvIFy3Ff8Qjfmr9FQnkWab411j1sWi+8RcJ2n8RqCutDQF4TaI5oXJ9HXfq5AvNJGaaycs948+V/lTxp0h/1Tuajr8gposFps8n/iKg/Yjff1X7/tGA9mc+Kzxkn3KQY6sWAPVosMJTSaoyR5XnxliXMjZ2pYdHKHcIScRWcJE4/b7vSJl2lqD9hKSfW0jABx8xCMAHb5DKblP+zmCMdRcvVnxuAzyBhZBKgXIrcEgHkKL8U8Qb60D27kA5ofxPd1356wggtgJ4ogZ4VF6X2O5fKzENKpQEeCISaav8eKTyxhIgz0AaLgskxIL6aGD+n9JIoLPKL6BPAp71kDtLvBcqr8b+izLo96rkH/ZQpoeJ93gCeRYhzzzkz3oQCqX+eEL5ttuPWX88g/xTNcp/tosEcMFDAS4Q71XBJf+QpQE+5JD/hIcCfoJ4jyWQ5y3Ff8Ejfmr98QTyLEP83EFATcvrJMAidaU1AhD/Kx8nyBxnV/8H3QV58b/qKYL8KWb/D7bv8n2vv6HLZycAZVrOsZ39/E18SP72sMM0zSkvVliJRRYfs/z2MfnbAyMs3/f6G7p8+5MlxlJgAAAGANtKQAAABgYQAACAAAAAAAEAAAACAAAABAAAwIjD5QtgA2V9O+Tj5AEgKwEIjFvuXfZ4d255AAASDAFyKt3lBGnI2ePiSDOg1wQQq4CXtRCCcSk7nkkBq7aEokI/1BQAekcA4zXmOFWBxyPkL2skEKqAjMXtI8BZvg0pACD7EGA8Y/rGE6QhZ+/LO5AGAKjEWINj/9zyAAAEEkDKDS0hDwA9HgIAAAACAAAABAAAAAgAAAAQAAAAIAAAAEAAAAVTDAuDgB4QQBdWsYm4Z7TrKCj/Rhmm0fSArhPAtHFFzx1Hhrryb6I4ga4TwIZxHbryx/TcUH5gEBYA13rKumvTwwZXCFXejQTKjzkAoDMYc1gAhXaloCBem8RsQz1/iAVgU37MAQC9IIBQC2DaojTmtUkzeNWDqHyV34cM65QfwwAAFkCHLQAoPwALIMAC6ALWEryjSeWf8nwfAPTGAhgVhFouVOXHHAAACyBAEbsO08x3fQeAvD0d5/hHCgCGCvgCAMCA8f8CDABatG6NN+gY2wAAAABJRU5ErkJggg==');
|
214 |
+
}
|
215 |
+
.admin-color-light .ui-datepicker th {
|
216 |
+
border-color: #fff;
|
217 |
+
}
|
218 |
+
.admin-color-light .ui-datepicker .ui-datepicker-title,
|
219 |
+
.admin-color-light .ui-datepicker td .ui-state-default,
|
220 |
+
.admin-color-light .ui-datepicker th {
|
221 |
+
color: #555;
|
222 |
+
}
|
223 |
+
.admin-color-light .ui-datepicker td .ui-state-active,
|
224 |
+
.admin-color-light .ui-datepicker td .ui-state-hover {
|
225 |
+
color: #fff;
|
226 |
+
background: #888;
|
227 |
+
}
|
228 |
+
.admin-color-light .ui-datepicker td.ui-state-disabled,
|
229 |
+
.admin-color-light .ui-datepicker td.ui-state-disabled .ui-state-default {
|
230 |
+
color: #ccc;
|
231 |
+
}
|
inc/libraries/meta-box/css/divider.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
/* =Styles for 'divider' field
|
2 |
-
-------------------------------------------------------------- */
|
3 |
-
|
4 |
-
.rwmb-divider-wrapper hr {
|
5 |
-
border: none;
|
6 |
-
border-top: 1px solid #e6e6e6;
|
7 |
-
}
|
1 |
+
/* =Styles for 'divider' field
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-divider-wrapper hr {
|
5 |
+
border: none;
|
6 |
+
border-top: 1px solid #e6e6e6;
|
7 |
+
}
|
inc/libraries/meta-box/css/fieldset-text.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.rwmb-fieldset_text-wrapper fieldset label {
|
2 |
-
width: 20%;
|
3 |
-
display: inline-block;
|
4 |
-
}
|
1 |
+
.rwmb-fieldset_text-wrapper fieldset label {
|
2 |
+
width: 20%;
|
3 |
+
display: inline-block;
|
4 |
+
}
|
inc/libraries/meta-box/css/file-input.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
.rwmb-file_input.rwmb-file_input {
|
2 |
-
line-height: 18px;
|
3 |
-
margin: 0;
|
4 |
-
padding: 4px;
|
5 |
-
width: 300px;
|
6 |
-
}
|
1 |
+
.rwmb-file_input.rwmb-file_input {
|
2 |
+
line-height: 18px;
|
3 |
+
margin: 0;
|
4 |
+
padding: 4px;
|
5 |
+
width: 300px;
|
6 |
+
}
|
inc/libraries/meta-box/css/file.css
CHANGED
@@ -1,51 +1,51 @@
|
|
1 |
-
.rwmb-uploaded {
|
2 |
-
margin: 0;
|
3 |
-
overflow: hidden;
|
4 |
-
}
|
5 |
-
.rwmb-file {
|
6 |
-
display: flex;
|
7 |
-
margin-bottom: 10px;
|
8 |
-
background: #fff;
|
9 |
-
cursor: move;
|
10 |
-
}
|
11 |
-
.rwmb-file-icon {
|
12 |
-
min-width: 60px;
|
13 |
-
flex-basis: 60px;
|
14 |
-
margin-right: 5px;
|
15 |
-
}
|
16 |
-
.rwmb-file-icon img {
|
17 |
-
max-height: 60px;
|
18 |
-
max-width: 60px;
|
19 |
-
}
|
20 |
-
.rwmb-file-info {
|
21 |
-
flex: 1;
|
22 |
-
}
|
23 |
-
.rwmb-file-title {
|
24 |
-
font-weight: bold;
|
25 |
-
text-decoration: none;
|
26 |
-
}
|
27 |
-
.rwmb-file-name {
|
28 |
-
margin: 0 0 4px;
|
29 |
-
white-space: nowrap;
|
30 |
-
}
|
31 |
-
.rwmb-file-actions {
|
32 |
-
margin: 0;
|
33 |
-
font-size: 11px;
|
34 |
-
}
|
35 |
-
.rwmb-file-edit,
|
36 |
-
.rwmb-file-delete {
|
37 |
-
color: inherit;
|
38 |
-
text-decoration: none;
|
39 |
-
}
|
40 |
-
.rwmb-file-edit {
|
41 |
-
margin-right: 6px;
|
42 |
-
}
|
43 |
-
.rwmb-file-actions .dashicons {
|
44 |
-
font-size: 1em;
|
45 |
-
width: 1em;
|
46 |
-
height: 1em;
|
47 |
-
vertical-align: middle;
|
48 |
-
}
|
49 |
-
.rwmb-file-input {
|
50 |
-
width: 100%;
|
51 |
-
}
|
1 |
+
.rwmb-uploaded {
|
2 |
+
margin: 0;
|
3 |
+
overflow: hidden;
|
4 |
+
}
|
5 |
+
.rwmb-file {
|
6 |
+
display: flex;
|
7 |
+
margin-bottom: 10px;
|
8 |
+
background: #fff;
|
9 |
+
cursor: move;
|
10 |
+
}
|
11 |
+
.rwmb-file-icon {
|
12 |
+
min-width: 60px;
|
13 |
+
flex-basis: 60px;
|
14 |
+
margin-right: 5px;
|
15 |
+
}
|
16 |
+
.rwmb-file-icon img {
|
17 |
+
max-height: 60px;
|
18 |
+
max-width: 60px;
|
19 |
+
}
|
20 |
+
.rwmb-file-info {
|
21 |
+
flex: 1;
|
22 |
+
}
|
23 |
+
.rwmb-file-title {
|
24 |
+
font-weight: bold;
|
25 |
+
text-decoration: none;
|
26 |
+
}
|
27 |
+
.rwmb-file-name {
|
28 |
+
margin: 0 0 4px;
|
29 |
+
white-space: nowrap;
|
30 |
+
}
|
31 |
+
.rwmb-file-actions {
|
32 |
+
margin: 0;
|
33 |
+
font-size: 11px;
|
34 |
+
}
|
35 |
+
.rwmb-file-edit,
|
36 |
+
.rwmb-file-delete {
|
37 |
+
color: inherit;
|
38 |
+
text-decoration: none;
|
39 |
+
}
|
40 |
+
.rwmb-file-edit {
|
41 |
+
margin-right: 6px;
|
42 |
+
}
|
43 |
+
.rwmb-file-actions .dashicons {
|
44 |
+
font-size: 1em;
|
45 |
+
width: 1em;
|
46 |
+
height: 1em;
|
47 |
+
vertical-align: middle;
|
48 |
+
}
|
49 |
+
.rwmb-file-input {
|
50 |
+
width: 100%;
|
51 |
+
}
|
inc/libraries/meta-box/css/heading.css
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
/* =Styles for 'heading' field
|
2 |
-
-------------------------------------------------------------- */
|
3 |
-
|
4 |
-
.rwmb-heading-wrapper h4 {
|
5 |
-
display: block;
|
6 |
-
font-size: .75rem;
|
7 |
-
line-height: 1.4;
|
8 |
-
border-bottom: 1px solid rgb(230, 230, 230);
|
9 |
-
text-transform: uppercase;
|
10 |
-
padding: .75rem 0 .375rem;
|
11 |
-
margin: 0 0 6px;
|
12 |
-
}
|
1 |
+
/* =Styles for 'heading' field
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-heading-wrapper h4 {
|
5 |
+
display: block;
|
6 |
+
font-size: .75rem;
|
7 |
+
line-height: 1.4;
|
8 |
+
border-bottom: 1px solid rgb(230, 230, 230);
|
9 |
+
text-transform: uppercase;
|
10 |
+
padding: .75rem 0 .375rem;
|
11 |
+
margin: 0 0 6px;
|
12 |
+
}
|
inc/libraries/meta-box/css/image-advanced.css
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
/* Image */
|
2 |
-
.rwmb-image-item {
|
3 |
-
position: relative;
|
4 |
-
float: left;
|
5 |
-
padding: 0;
|
6 |
-
margin: 0 5px 5px 0;
|
7 |
-
box-sizing: border-box;
|
8 |
-
}
|
9 |
-
.rwmb-image-item.thumbnail .rwmb-media-preview,
|
10 |
-
.rwmb-image-item.thumbnail{
|
11 |
-
width: 150px;
|
12 |
-
}
|
13 |
-
.rwmb-image-item.medium .rwmb-media-preview,
|
14 |
-
.rwmb-image-item.medium {
|
15 |
-
width: 300px;
|
16 |
-
}
|
17 |
-
.rwmb-image-item.large .rwmb-media-preview,
|
18 |
-
.rwmb-image-item.large {
|
19 |
-
width: 1024px;
|
20 |
-
}
|
21 |
-
|
22 |
-
.rwmb-image-item .dashicons {
|
23 |
-
font-size: 20px;
|
24 |
-
width: 20px;
|
25 |
-
height: 20px;
|
26 |
-
}
|
27 |
-
.rwmb-media-bar {
|
28 |
-
position: absolute;
|
29 |
-
z-index: 10;
|
30 |
-
display: none;
|
31 |
-
right: 5px;
|
32 |
-
top: 5px;
|
33 |
-
color: #fff;
|
34 |
-
}
|
35 |
-
.rwmb-media-bar a {
|
36 |
-
text-decoration: none;
|
37 |
-
color: inherit;
|
38 |
-
}
|
39 |
-
.rwmb-overlay {
|
40 |
-
position: absolute;
|
41 |
-
top: 0;
|
42 |
-
bottom: 0;
|
43 |
-
left: 0;
|
44 |
-
right: 0;
|
45 |
-
background: rgba(0, 0, 0, .6);
|
46 |
-
display: none;
|
47 |
-
}
|
48 |
-
.rwmb-image-item:hover .rwmb-media-bar,
|
49 |
-
.rwmb-image-item:hover .rwmb-overlay {
|
50 |
-
display: block;
|
51 |
-
cursor: move;
|
52 |
-
}
|
1 |
+
/* Image */
|
2 |
+
.rwmb-image-item {
|
3 |
+
position: relative;
|
4 |
+
float: left;
|
5 |
+
padding: 0;
|
6 |
+
margin: 0 5px 5px 0;
|
7 |
+
box-sizing: border-box;
|
8 |
+
}
|
9 |
+
.rwmb-image-item.thumbnail .rwmb-media-preview,
|
10 |
+
.rwmb-image-item.thumbnail{
|
11 |
+
width: 150px;
|
12 |
+
}
|
13 |
+
.rwmb-image-item.medium .rwmb-media-preview,
|
14 |
+
.rwmb-image-item.medium {
|
15 |
+
width: 300px;
|
16 |
+
}
|
17 |
+
.rwmb-image-item.large .rwmb-media-preview,
|
18 |
+
.rwmb-image-item.large {
|
19 |
+
width: 1024px;
|
20 |
+
}
|
21 |
+
|
22 |
+
.rwmb-image-item .dashicons {
|
23 |
+
font-size: 20px;
|
24 |
+
width: 20px;
|
25 |
+
height: 20px;
|
26 |
+
}
|
27 |
+
.rwmb-media-bar {
|
28 |
+
position: absolute;
|
29 |
+
z-index: 10;
|
30 |
+
display: none;
|
31 |
+
right: 5px;
|
32 |
+
top: 5px;
|
33 |
+
color: #fff;
|
34 |
+
}
|
35 |
+
.rwmb-media-bar a {
|
36 |
+
text-decoration: none;
|
37 |
+
color: inherit;
|
38 |
+
}
|
39 |
+
.rwmb-overlay {
|
40 |
+
position: absolute;
|
41 |
+
top: 0;
|
42 |
+
bottom: 0;
|
43 |
+
left: 0;
|
44 |
+
right: 0;
|
45 |
+
background: rgba(0, 0, 0, .6);
|
46 |
+
display: none;
|
47 |
+
}
|
48 |
+
.rwmb-image-item:hover .rwmb-media-bar,
|
49 |
+
.rwmb-image-item:hover .rwmb-overlay {
|
50 |
+
display: block;
|
51 |
+
cursor: move;
|
52 |
+
}
|
inc/libraries/meta-box/css/image-select.css
CHANGED
@@ -1,21 +1,21 @@
|
|
1 |
-
.rwmb-image-select {
|
2 |
-
display: inline-block;
|
3 |
-
width: 80px;
|
4 |
-
height: 80px;
|
5 |
-
float: left;
|
6 |
-
margin: 0 10px 10px 0;
|
7 |
-
border: 3px solid #d8d8d8;
|
8 |
-
border-radius: 3px;
|
9 |
-
padding: 1px;
|
10 |
-
}
|
11 |
-
.rwmb-image-select img {
|
12 |
-
width: 100%;
|
13 |
-
height: 100%;
|
14 |
-
}
|
15 |
-
.rwmb-image-select:hover,
|
16 |
-
.rwmb-image-select.rwmb-active {
|
17 |
-
border-color: #0074a2;
|
18 |
-
}
|
19 |
-
.rwmb-image_select.rwmb-image_select {
|
20 |
-
display: none;
|
21 |
-
}
|
1 |
+
.rwmb-image-select {
|
2 |
+
display: inline-block;
|
3 |
+
width: 80px;
|
4 |
+
height: 80px;
|
5 |
+
float: left;
|
6 |
+
margin: 0 10px 10px 0;
|
7 |
+
border: 3px solid #d8d8d8;
|
8 |
+
border-radius: 3px;
|
9 |
+
padding: 1px;
|
10 |
+
}
|
11 |
+
.rwmb-image-select img {
|
12 |
+
width: 100%;
|
13 |
+
height: 100%;
|
14 |
+
}
|
15 |
+
.rwmb-image-select:hover,
|
16 |
+
.rwmb-image-select.rwmb-active {
|
17 |
+
border-color: #0074a2;
|
18 |
+
}
|
19 |
+
.rwmb-image_select.rwmb-image_select {
|
20 |
+
display: none;
|
21 |
+
}
|
inc/libraries/meta-box/css/image.css
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
.rwmb-image-wrapper .rwmb-uploaded:empty {
|
2 |
-
display: none;
|
3 |
-
}
|
4 |
-
.rwmb-uploaded:not(:empty) {
|
5 |
-
display: block;
|
6 |
-
margin: -8px 0 0 -8px;
|
7 |
-
overflow: hidden;
|
8 |
-
}
|
9 |
-
/* Re-add WP core UI style to make sure frontend works */
|
10 |
-
.rwmb-image-item {
|
11 |
-
position: relative;
|
12 |
-
float: left;
|
13 |
-
padding: 8px;
|
14 |
-
margin: 0;
|
15 |
-
color: #444;
|
16 |
-
cursor: pointer;
|
17 |
-
list-style: none;
|
18 |
-
text-align: center;
|
19 |
-
-webkit-user-select: none;
|
20 |
-
-moz-user-select: none;
|
21 |
-
-ms-user-select: none;
|
22 |
-
user-select: none;
|
23 |
-
width: 25%;
|
24 |
-
box-sizing: border-box;
|
25 |
-
}
|
26 |
-
.rwmb-image-item.thumbnail {
|
27 |
-
width: 150px;
|
28 |
-
}
|
29 |
-
.rwmb-image-item.medium {
|
30 |
-
width: 300px;
|
31 |
-
}
|
32 |
-
.rwmb-image-item.large {
|
33 |
-
width: 1024px;
|
34 |
-
}
|
35 |
-
|
36 |
-
.rwmb-image-actions {
|
37 |
-
position: absolute;
|
38 |
-
z-index: 2;
|
39 |
-
right: 12px;
|
40 |
-
top: 12px;
|
41 |
-
opacity: 0;
|
42 |
-
transition: opacity .2s;
|
43 |
-
color: #fff;
|
44 |
-
}
|
45 |
-
.rwmb-image-edit,
|
46 |
-
.rwmb-image-delete {
|
47 |
-
color: inherit;
|
48 |
-
text-decoration: none;
|
49 |
-
}
|
50 |
-
.rwmb-image-overlay {
|
51 |
-
position: absolute;
|
52 |
-
z-index: 1;
|
53 |
-
top: 8px;
|
54 |
-
bottom: 8px;
|
55 |
-
left: 8px;
|
56 |
-
right: 8px;
|
57 |
-
background: #000;
|
58 |
-
opacity: 0;
|
59 |
-
transition: opacity .2s;
|
60 |
-
}
|
61 |
-
.rwmb-image-item:hover .rwmb-image-actions {
|
62 |
-
opacity: 1;
|
63 |
-
}
|
64 |
-
.rwmb-image-item:hover .rwmb-image-overlay {
|
65 |
-
opacity: .6;
|
66 |
-
}
|
1 |
+
.rwmb-image-wrapper .rwmb-uploaded:empty {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
.rwmb-uploaded:not(:empty) {
|
5 |
+
display: block;
|
6 |
+
margin: -8px 0 0 -8px;
|
7 |
+
overflow: hidden;
|
8 |
+
}
|
9 |
+
/* Re-add WP core UI style to make sure frontend works */
|
10 |
+
.rwmb-image-item {
|
11 |
+
position: relative;
|
12 |
+
float: left;
|
13 |
+
padding: 8px;
|
14 |
+
margin: 0;
|
15 |
+
color: #444;
|
16 |
+
cursor: pointer;
|
17 |
+
list-style: none;
|
18 |
+
text-align: center;
|
19 |
+
-webkit-user-select: none;
|
20 |
+
-moz-user-select: none;
|
21 |
+
-ms-user-select: none;
|
22 |
+
user-select: none;
|
23 |
+
width: 25%;
|
24 |
+
box-sizing: border-box;
|
25 |
+
}
|
26 |
+
.rwmb-image-item.thumbnail {
|
27 |
+
width: 150px;
|
28 |
+
}
|
29 |
+
.rwmb-image-item.medium {
|
30 |
+
width: 300px;
|
31 |
+
}
|
32 |
+
.rwmb-image-item.large {
|
33 |
+
width: 1024px;
|
34 |
+
}
|
35 |
+
|
36 |
+
.rwmb-image-actions {
|
37 |
+
position: absolute;
|
38 |
+
z-index: 2;
|
39 |
+
right: 12px;
|
40 |
+
top: 12px;
|
41 |
+
opacity: 0;
|
42 |
+
transition: opacity .2s;
|
43 |
+
color: #fff;
|
44 |
+
}
|
45 |
+
.rwmb-image-edit,
|
46 |
+
.rwmb-image-delete {
|
47 |
+
color: inherit;
|
48 |
+
text-decoration: none;
|
49 |
+
}
|
50 |
+
.rwmb-image-overlay {
|
51 |
+
position: absolute;
|
52 |
+
z-index: 1;
|
53 |
+
top: 8px;
|
54 |
+
bottom: 8px;
|
55 |
+
left: 8px;
|
56 |
+
right: 8px;
|
57 |
+
background: #000;
|
58 |
+
opacity: 0;
|
59 |
+
transition: opacity .2s;
|
60 |
+
}
|
61 |
+
.rwmb-image-item:hover .rwmb-image-actions {
|
62 |
+
opacity: 1;
|
63 |
+
}
|
64 |
+
.rwmb-image-item:hover .rwmb-image-overlay {
|
65 |
+
opacity: .6;
|
66 |
+
}
|
inc/libraries/meta-box/css/input-list.css
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
.rwmb-input-list {
|
2 |
-
margin: 0;
|
3 |
-
line-height: 1.8;
|
4 |
-
}
|
5 |
-
.rwmb-input-list .rwmb-input-list {
|
6 |
-
margin-left: 20px;
|
7 |
-
}
|
8 |
-
.rwmb-input-list li {
|
9 |
-
list-style: none;
|
10 |
-
margin-bottom: 0;
|
11 |
-
}
|
12 |
-
.rwmb-input-list.rwmb-inline {
|
13 |
-
line-height: inherit;
|
14 |
-
}
|
15 |
-
.rwmb-input-list.rwmb-inline li {
|
16 |
-
display: inline-block;
|
17 |
-
}
|
18 |
-
.rwmb-input-list.rwmb-inline li:not(:last-child) {
|
19 |
-
margin-right: 20px;
|
20 |
-
}
|
1 |
+
.rwmb-input-list {
|
2 |
+
margin: 0;
|
3 |
+
line-height: 1.8;
|
4 |
+
}
|
5 |
+
.rwmb-input-list .rwmb-input-list {
|
6 |
+
margin-left: 20px;
|
7 |
+
}
|
8 |
+
.rwmb-input-list li {
|
9 |
+
list-style: none;
|
10 |
+
margin-bottom: 0;
|
11 |
+
}
|
12 |
+
.rwmb-input-list.rwmb-inline {
|
13 |
+
line-height: inherit;
|
14 |
+
}
|
15 |
+
.rwmb-input-list.rwmb-inline li {
|
16 |
+
display: inline-block;
|
17 |
+
}
|
18 |
+
.rwmb-input-list.rwmb-inline li:not(:last-child) {
|
19 |
+
margin-right: 20px;
|
20 |
+
}
|
inc/libraries/meta-box/css/jqueryui/jquery-ui-timepicker-addon.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
|
2 |
-
* http://trentrichardson.com/examples/timepicker
|
3 |
-
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
|
4 |
-
|
5 |
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:0 0;color:inherit;border:0;outline:0;border-bottom:solid 1px #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
|
1 |
+
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
|
2 |
+
* http://trentrichardson.com/examples/timepicker
|
3 |
+
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
|
4 |
+
|
5 |
.ui-timepicker-div .ui-widget-header{margin-bottom:8px}.ui-timepicker-div dl{text-align:left}.ui-timepicker-div dl dt{float:left;clear:left;padding:0 0 0 5px}.ui-timepicker-div dl dd{margin:0 10px 10px 40%}.ui-timepicker-div td{font-size:90%}.ui-tpicker-grid-label{background:0 0;border:0;margin:0;padding:0}.ui-timepicker-div .ui_tpicker_unit_hide{display:none}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input{background:0 0;color:inherit;border:0;outline:0;border-bottom:solid 1px #555;width:95%}.ui-timepicker-div .ui_tpicker_time .ui_tpicker_time_input:focus{border-bottom-color:#aaa}.ui-timepicker-rtl{direction:rtl}.ui-timepicker-rtl dl{text-align:right;padding:0 5px 0 0}.ui-timepicker-rtl dl dt{float:right;clear:right}.ui-timepicker-rtl dl dd{margin:0 40% 10px 10px}.ui-timepicker-div.ui-timepicker-oneLine{padding-right:2px}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,.ui-timepicker-div.ui-timepicker-oneLine dt{display:none}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label{display:block;padding-top:2px}.ui-timepicker-div.ui-timepicker-oneLine dl{text-align:right}.ui-timepicker-div.ui-timepicker-oneLine dl dd,.ui-timepicker-div.ui-timepicker-oneLine dl dd>div{display:inline-block;margin:0}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before{content:':';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before{content:'.';display:inline-block}.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before{display:none}
|
inc/libraries/meta-box/css/jqueryui/jquery.ui.core.css
CHANGED
@@ -1,38 +1,38 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI CSS Framework 1.8.17
|
3 |
-
*
|
4 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Theming/API
|
9 |
-
*/
|
10 |
-
|
11 |
-
/* Layout helpers
|
12 |
-
----------------------------------*/
|
13 |
-
.ui-helper-hidden { display: none; }
|
14 |
-
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
-
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
-
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
17 |
-
.ui-helper-clearfix:after { clear: both; }
|
18 |
-
.ui-helper-clearfix { zoom: 1; }
|
19 |
-
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
20 |
-
|
21 |
-
|
22 |
-
/* Interaction Cues
|
23 |
-
----------------------------------*/
|
24 |
-
.ui-state-disabled { cursor: default !important; }
|
25 |
-
|
26 |
-
|
27 |
-
/* Icons
|
28 |
-
----------------------------------*/
|
29 |
-
|
30 |
-
/* states and images */
|
31 |
-
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
32 |
-
|
33 |
-
|
34 |
-
/* Misc visuals
|
35 |
-
----------------------------------*/
|
36 |
-
|
37 |
-
/* Overlays */
|
38 |
-
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
1 |
+
/*
|
2 |
+
* jQuery UI CSS Framework 1.8.17
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Theming/API
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Layout helpers
|
12 |
+
----------------------------------*/
|
13 |
+
.ui-helper-hidden { display: none; }
|
14 |
+
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
+
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
+
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
17 |
+
.ui-helper-clearfix:after { clear: both; }
|
18 |
+
.ui-helper-clearfix { zoom: 1; }
|
19 |
+
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
20 |
+
|
21 |
+
|
22 |
+
/* Interaction Cues
|
23 |
+
----------------------------------*/
|
24 |
+
.ui-state-disabled { cursor: default !important; }
|
25 |
+
|
26 |
+
|
27 |
+
/* Icons
|
28 |
+
----------------------------------*/
|
29 |
+
|
30 |
+
/* states and images */
|
31 |
+
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
32 |
+
|
33 |
+
|
34 |
+
/* Misc visuals
|
35 |
+
----------------------------------*/
|
36 |
+
|
37 |
+
/* Overlays */
|
38 |
+
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
inc/libraries/meta-box/css/jqueryui/jquery.ui.datepicker.css
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI Datepicker 1.8.17
|
3 |
-
*
|
4 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Datepicker#theming
|
9 |
-
*/
|
10 |
-
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
11 |
-
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
12 |
-
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
13 |
-
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
14 |
-
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
15 |
-
.ui-datepicker .ui-datepicker-next { right:2px; }
|
16 |
-
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
17 |
-
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
18 |
-
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
19 |
-
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
20 |
-
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
21 |
-
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
22 |
-
.ui-datepicker select.ui-datepicker-month,
|
23 |
-
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
24 |
-
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
25 |
-
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
26 |
-
.ui-datepicker td { border: 0; padding: 1px; }
|
27 |
-
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
28 |
-
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
29 |
-
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
30 |
-
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
31 |
-
|
32 |
-
/* with multiple calendars */
|
33 |
-
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
34 |
-
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
35 |
-
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
36 |
-
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
37 |
-
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
38 |
-
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
39 |
-
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
40 |
-
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
41 |
-
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
42 |
-
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
43 |
-
|
44 |
-
/* RTL support */
|
45 |
-
.ui-datepicker-rtl { direction: rtl; }
|
46 |
-
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
47 |
-
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
48 |
-
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
49 |
-
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
50 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
51 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
52 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
53 |
-
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
54 |
-
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
55 |
-
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
56 |
-
|
57 |
-
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
58 |
-
.ui-datepicker-cover {
|
59 |
-
display: none; /*sorry for IE5*/
|
60 |
-
display/**/: block; /*sorry for IE5*/
|
61 |
-
position: absolute; /*must have*/
|
62 |
-
z-index: -1; /*must have*/
|
63 |
-
filter: mask(); /*must have*/
|
64 |
-
top: -4px; /*must have*/
|
65 |
-
left: -4px; /*must have*/
|
66 |
-
width: 200px; /*must have*/
|
67 |
-
height: 200px; /*must have*/
|
68 |
}
|
1 |
+
/*
|
2 |
+
* jQuery UI Datepicker 1.8.17
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Datepicker#theming
|
9 |
+
*/
|
10 |
+
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
11 |
+
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
12 |
+
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
13 |
+
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
14 |
+
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
15 |
+
.ui-datepicker .ui-datepicker-next { right:2px; }
|
16 |
+
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
17 |
+
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
18 |
+
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
19 |
+
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
20 |
+
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
21 |
+
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
22 |
+
.ui-datepicker select.ui-datepicker-month,
|
23 |
+
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
24 |
+
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
25 |
+
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
26 |
+
.ui-datepicker td { border: 0; padding: 1px; }
|
27 |
+
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
28 |
+
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
29 |
+
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
30 |
+
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
31 |
+
|
32 |
+
/* with multiple calendars */
|
33 |
+
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
34 |
+
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
35 |
+
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
36 |
+
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
37 |
+
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
38 |
+
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
39 |
+
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
40 |
+
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
41 |
+
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
42 |
+
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
43 |
+
|
44 |
+
/* RTL support */
|
45 |
+
.ui-datepicker-rtl { direction: rtl; }
|
46 |
+
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
47 |
+
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
48 |
+
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
49 |
+
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
50 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
51 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
52 |
+
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
53 |
+
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
54 |
+
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
55 |
+
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
56 |
+
|
57 |
+
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
58 |
+
.ui-datepicker-cover {
|
59 |
+
display: none; /*sorry for IE5*/
|
60 |
+
display/**/: block; /*sorry for IE5*/
|
61 |
+
position: absolute; /*must have*/
|
62 |
+
z-index: -1; /*must have*/
|
63 |
+
filter: mask(); /*must have*/
|
64 |
+
top: -4px; /*must have*/
|
65 |
+
left: -4px; /*must have*/
|
66 |
+
width: 200px; /*must have*/
|
67 |
+
height: 200px; /*must have*/
|
68 |
}
|
inc/libraries/meta-box/css/jqueryui/jquery.ui.slider.css
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI Slider 1.8.17
|
3 |
-
*
|
4 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Slider#theming
|
9 |
-
*/
|
10 |
-
.ui-slider { position: relative; text-align: left; }
|
11 |
-
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
12 |
-
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
13 |
-
|
14 |
-
.ui-slider-horizontal { height: .8em; }
|
15 |
-
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
16 |
-
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
17 |
-
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
18 |
-
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
19 |
-
|
20 |
-
.ui-slider-vertical { width: .8em; height: 100px; }
|
21 |
-
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
22 |
-
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
23 |
-
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
24 |
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
1 |
+
/*
|
2 |
+
* jQuery UI Slider 1.8.17
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Slider#theming
|
9 |
+
*/
|
10 |
+
.ui-slider { position: relative; text-align: left; }
|
11 |
+
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
12 |
+
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
13 |
+
|
14 |
+
.ui-slider-horizontal { height: .8em; }
|
15 |
+
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
16 |
+
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
17 |
+
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
18 |
+
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
19 |
+
|
20 |
+
.ui-slider-vertical { width: .8em; height: 100px; }
|
21 |
+
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
22 |
+
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
23 |
+
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
24 |
.ui-slider-vertical .ui-slider-range-max { top: 0; }
|
inc/libraries/meta-box/css/jqueryui/jquery.ui.theme.css
CHANGED
@@ -1,249 +1,249 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
/*
|
4 |
-
* jQuery UI CSS Framework 1.8.17
|
5 |
-
*
|
6 |
-
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
7 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
8 |
-
* http://jquery.org/license
|
9 |
-
*
|
10 |
-
* http://docs.jquery.com/UI/Theming/API
|
11 |
-
*
|
12 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
13 |
-
*/
|
14 |
-
|
15 |
-
|
16 |
-
/* Component containers
|
17 |
-
----------------------------------*/
|
18 |
-
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
19 |
-
.ui-widget .ui-widget { font-size: 1em; }
|
20 |
-
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
21 |
-
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
22 |
-
.ui-widget-content a { color: #222222; }
|
23 |
-
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
24 |
-
.ui-widget-header a { color: #222222; }
|
25 |
-
|
26 |
-
/* Interaction states
|
27 |
-
----------------------------------*/
|
28 |
-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
29 |
-
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
30 |
-
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../../img/jqueryui/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
31 |
-
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
32 |
-
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
33 |
-
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
34 |
-
.ui-widget :active { outline: none; }
|
35 |
-
|
36 |
-
/* Interaction Cues
|
37 |
-
----------------------------------*/
|
38 |
-
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
39 |
-
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
40 |
-
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
41 |
-
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
42 |
-
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
43 |
-
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
44 |
-
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
45 |
-
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
46 |
-
|
47 |
-
/* Icons
|
48 |
-
----------------------------------*/
|
49 |
-
|
50 |
-
/* states and images */
|
51 |
-
.ui-icon { width: 16px; height: 16px; background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
52 |
-
.ui-widget-content .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
53 |
-
.ui-widget-header .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
54 |
-
.ui-state-default .ui-icon { background-image: url(../../img/jqueryui/ui-icons_888888_256x240.png); }
|
55 |
-
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
|
56 |
-
.ui-state-active .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
|
57 |
-
.ui-state-highlight .ui-icon {background-image: url(../../img/jqueryui/ui-icons_2e83ff_256x240.png); }
|
58 |
-
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../../img/jqueryui/ui-icons_cd0a0a_256x240.png); }
|
59 |
-
|
60 |
-
/* positioning */
|
61 |
-
.ui-icon-carat-1-n { background-position: 0 0; }
|
62 |
-
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
63 |
-
.ui-icon-carat-1-e { background-position: -32px 0; }
|
64 |
-
.ui-icon-carat-1-se { background-position: -48px 0; }
|
65 |
-
.ui-icon-carat-1-s { background-position: -64px 0; }
|
66 |
-
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
67 |
-
.ui-icon-carat-1-w { background-position: -96px 0; }
|
68 |
-
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
69 |
-
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
70 |
-
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
71 |
-
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
72 |
-
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
73 |
-
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
74 |
-
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
75 |
-
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
76 |
-
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
77 |
-
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
78 |
-
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
79 |
-
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
80 |
-
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
81 |
-
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
82 |
-
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
83 |
-
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
84 |
-
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
85 |
-
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
86 |
-
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
87 |
-
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
88 |
-
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
89 |
-
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
90 |
-
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
91 |
-
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
92 |
-
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
93 |
-
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
94 |
-
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
95 |
-
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
96 |
-
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
97 |
-
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
98 |
-
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
99 |
-
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
100 |
-
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
101 |
-
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
102 |
-
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
103 |
-
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
104 |
-
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
105 |
-
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
106 |
-
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
107 |
-
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
108 |
-
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
109 |
-
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
110 |
-
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
111 |
-
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
112 |
-
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
113 |
-
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
114 |
-
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
115 |
-
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
116 |
-
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
117 |
-
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
118 |
-
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
119 |
-
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
120 |
-
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
121 |
-
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
122 |
-
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
123 |
-
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
124 |
-
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
125 |
-
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
126 |
-
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
127 |
-
.ui-icon-extlink { background-position: -32px -80px; }
|
128 |
-
.ui-icon-newwin { background-position: -48px -80px; }
|
129 |
-
.ui-icon-refresh { background-position: -64px -80px; }
|
130 |
-
.ui-icon-shuffle { background-position: -80px -80px; }
|
131 |
-
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
132 |
-
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
133 |
-
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
134 |
-
.ui-icon-folder-open { background-position: -16px -96px; }
|
135 |
-
.ui-icon-document { background-position: -32px -96px; }
|
136 |
-
.ui-icon-document-b { background-position: -48px -96px; }
|
137 |
-
.ui-icon-note { background-position: -64px -96px; }
|
138 |
-
.ui-icon-mail-closed { background-position: -80px -96px; }
|
139 |
-
.ui-icon-mail-open { background-position: -96px -96px; }
|
140 |
-
.ui-icon-suitcase { background-position: -112px -96px; }
|
141 |
-
.ui-icon-comment { background-position: -128px -96px; }
|
142 |
-
.ui-icon-person { background-position: -144px -96px; }
|
143 |
-
.ui-icon-print { background-position: -160px -96px; }
|
144 |
-
.ui-icon-trash { background-position: -176px -96px; }
|
145 |
-
.ui-icon-locked { background-position: -192px -96px; }
|
146 |
-
.ui-icon-unlocked { background-position: -208px -96px; }
|
147 |
-
.ui-icon-bookmark { background-position: -224px -96px; }
|
148 |
-
.ui-icon-tag { background-position: -240px -96px; }
|
149 |
-
.ui-icon-home { background-position: 0 -112px; }
|
150 |
-
.ui-icon-flag { background-position: -16px -112px; }
|
151 |
-
.ui-icon-calendar { background-position: -32px -112px; }
|
152 |
-
.ui-icon-cart { background-position: -48px -112px; }
|
153 |
-
.ui-icon-pencil { background-position: -64px -112px; }
|
154 |
-
.ui-icon-clock { background-position: -80px -112px; }
|
155 |
-
.ui-icon-disk { background-position: -96px -112px; }
|
156 |
-
.ui-icon-calculator { background-position: -112px -112px; }
|
157 |
-
.ui-icon-zoomin { background-position: -128px -112px; }
|
158 |
-
.ui-icon-zoomout { background-position: -144px -112px; }
|
159 |
-
.ui-icon-search { background-position: -160px -112px; }
|
160 |
-
.ui-icon-wrench { background-position: -176px -112px; }
|
161 |
-
.ui-icon-gear { background-position: -192px -112px; }
|
162 |
-
.ui-icon-heart { background-position: -208px -112px; }
|
163 |
-
.ui-icon-star { background-position: -224px -112px; }
|
164 |
-
.ui-icon-link { background-position: -240px -112px; }
|
165 |
-
.ui-icon-cancel { background-position: 0 -128px; }
|
166 |
-
.ui-icon-plus { background-position: -16px -128px; }
|
167 |
-
.ui-icon-plusthick { background-position: -32px -128px; }
|
168 |
-
.ui-icon-minus { background-position: -48px -128px; }
|
169 |
-
.ui-icon-minusthick { background-position: -64px -128px; }
|
170 |
-
.ui-icon-close { background-position: -80px -128px; }
|
171 |
-
.ui-icon-closethick { background-position: -96px -128px; }
|
172 |
-
.ui-icon-key { background-position: -112px -128px; }
|
173 |
-
.ui-icon-lightbulb { background-position: -128px -128px; }
|
174 |
-
.ui-icon-scissors { background-position: -144px -128px; }
|
175 |
-
.ui-icon-clipboard { background-position: -160px -128px; }
|
176 |
-
.ui-icon-copy { background-position: -176px -128px; }
|
177 |
-
.ui-icon-contact { background-position: -192px -128px; }
|
178 |
-
.ui-icon-image { background-position: -208px -128px; }
|
179 |
-
.ui-icon-video { background-position: -224px -128px; }
|
180 |
-
.ui-icon-script { background-position: -240px -128px; }
|
181 |
-
.ui-icon-alert { background-position: 0 -144px; }
|
182 |
-
.ui-icon-info { background-position: -16px -144px; }
|
183 |
-
.ui-icon-notice { background-position: -32px -144px; }
|
184 |
-
.ui-icon-help { background-position: -48px -144px; }
|
185 |
-
.ui-icon-check { background-position: -64px -144px; }
|
186 |
-
.ui-icon-bullet { background-position: -80px -144px; }
|
187 |
-
.ui-icon-radio-off { background-position: -96px -144px; }
|
188 |
-
.ui-icon-radio-on { background-position: -112px -144px; }
|
189 |
-
.ui-icon-pin-w { background-position: -128px -144px; }
|
190 |
-
.ui-icon-pin-s { background-position: -144px -144px; }
|
191 |
-
.ui-icon-play { background-position: 0 -160px; }
|
192 |
-
.ui-icon-pause { background-position: -16px -160px; }
|
193 |
-
.ui-icon-seek-next { background-position: -32px -160px; }
|
194 |
-
.ui-icon-seek-prev { background-position: -48px -160px; }
|
195 |
-
.ui-icon-seek-end { background-position: -64px -160px; }
|
196 |
-
.ui-icon-seek-start { background-position: -80px -160px; }
|
197 |
-
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
198 |
-
.ui-icon-seek-first { background-position: -80px -160px; }
|
199 |
-
.ui-icon-stop { background-position: -96px -160px; }
|
200 |
-
.ui-icon-eject { background-position: -112px -160px; }
|
201 |
-
.ui-icon-volume-off { background-position: -128px -160px; }
|
202 |
-
.ui-icon-volume-on { background-position: -144px -160px; }
|
203 |
-
.ui-icon-power { background-position: 0 -176px; }
|
204 |
-
.ui-icon-signal-diag { background-position: -16px -176px; }
|
205 |
-
.ui-icon-signal { background-position: -32px -176px; }
|
206 |
-
.ui-icon-battery-0 { background-position: -48px -176px; }
|
207 |
-
.ui-icon-battery-1 { background-position: -64px -176px; }
|
208 |
-
.ui-icon-battery-2 { background-position: -80px -176px; }
|
209 |
-
.ui-icon-battery-3 { background-position: -96px -176px; }
|
210 |
-
.ui-icon-circle-plus { background-position: 0 -192px; }
|
211 |
-
.ui-icon-circle-minus { background-position: -16px -192px; }
|
212 |
-
.ui-icon-circle-close { background-position: -32px -192px; }
|
213 |
-
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
214 |
-
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
215 |
-
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
216 |
-
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
217 |
-
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
218 |
-
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
219 |
-
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
220 |
-
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
221 |
-
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
222 |
-
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
223 |
-
.ui-icon-circle-check { background-position: -208px -192px; }
|
224 |
-
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
225 |
-
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
226 |
-
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
227 |
-
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
228 |
-
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
229 |
-
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
230 |
-
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
231 |
-
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
232 |
-
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
233 |
-
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
234 |
-
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
235 |
-
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
236 |
-
|
237 |
-
|
238 |
-
/* Misc visuals
|
239 |
-
----------------------------------*/
|
240 |
-
|
241 |
-
/* Corner radius */
|
242 |
-
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
243 |
-
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
244 |
-
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
245 |
-
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
246 |
-
|
247 |
-
/* Overlays */
|
248 |
-
.ui-widget-overlay { background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
249 |
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
1 |
+
|
2 |
+
|
3 |
+
/*
|
4 |
+
* jQuery UI CSS Framework 1.8.17
|
5 |
+
*
|
6 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
7 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
8 |
+
* http://jquery.org/license
|
9 |
+
*
|
10 |
+
* http://docs.jquery.com/UI/Theming/API
|
11 |
+
*
|
12 |
+
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
|
13 |
+
*/
|
14 |
+
|
15 |
+
|
16 |
+
/* Component containers
|
17 |
+
----------------------------------*/
|
18 |
+
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
|
19 |
+
.ui-widget .ui-widget { font-size: 1em; }
|
20 |
+
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
|
21 |
+
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
|
22 |
+
.ui-widget-content a { color: #222222; }
|
23 |
+
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../../img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
24 |
+
.ui-widget-header a { color: #222222; }
|
25 |
+
|
26 |
+
/* Interaction states
|
27 |
+
----------------------------------*/
|
28 |
+
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../../img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
|
29 |
+
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
|
30 |
+
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../../img/jqueryui/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
31 |
+
.ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
|
32 |
+
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../../img/jqueryui/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
|
33 |
+
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
|
34 |
+
.ui-widget :active { outline: none; }
|
35 |
+
|
36 |
+
/* Interaction Cues
|
37 |
+
----------------------------------*/
|
38 |
+
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../../img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
|
39 |
+
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
40 |
+
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../../img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
|
41 |
+
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
|
42 |
+
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
|
43 |
+
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
44 |
+
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
45 |
+
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
46 |
+
|
47 |
+
/* Icons
|
48 |
+
----------------------------------*/
|
49 |
+
|
50 |
+
/* states and images */
|
51 |
+
.ui-icon { width: 16px; height: 16px; background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
52 |
+
.ui-widget-content .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
53 |
+
.ui-widget-header .ui-icon {background-image: url(../../img/jqueryui/ui-icons_222222_256x240.png); }
|
54 |
+
.ui-state-default .ui-icon { background-image: url(../../img/jqueryui/ui-icons_888888_256x240.png); }
|
55 |
+
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
|
56 |
+
.ui-state-active .ui-icon {background-image: url(../../img/jqueryui/ui-icons_454545_256x240.png); }
|
57 |
+
.ui-state-highlight .ui-icon {background-image: url(../../img/jqueryui/ui-icons_2e83ff_256x240.png); }
|
58 |
+
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../../img/jqueryui/ui-icons_cd0a0a_256x240.png); }
|
59 |
+
|
60 |
+
/* positioning */
|
61 |
+
.ui-icon-carat-1-n { background-position: 0 0; }
|
62 |
+
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
63 |
+
.ui-icon-carat-1-e { background-position: -32px 0; }
|
64 |
+
.ui-icon-carat-1-se { background-position: -48px 0; }
|
65 |
+
.ui-icon-carat-1-s { background-position: -64px 0; }
|
66 |
+
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
67 |
+
.ui-icon-carat-1-w { background-position: -96px 0; }
|
68 |
+
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
69 |
+
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
70 |
+
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
71 |
+
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
72 |
+
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
73 |
+
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
74 |
+
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
75 |
+
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
76 |
+
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
77 |
+
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
78 |
+
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
79 |
+
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
80 |
+
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
81 |
+
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
82 |
+
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
83 |
+
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
84 |
+
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
85 |
+
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
86 |
+
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
87 |
+
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
88 |
+
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
89 |
+
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
90 |
+
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
91 |
+
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
92 |
+
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
93 |
+
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
94 |
+
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
95 |
+
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
96 |
+
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
97 |
+
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
98 |
+
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
99 |
+
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
100 |
+
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
101 |
+
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
102 |
+
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
103 |
+
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
104 |
+
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
105 |
+
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
106 |
+
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
107 |
+
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
108 |
+
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
109 |
+
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
110 |
+
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
111 |
+
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
112 |
+
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
113 |
+
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
114 |
+
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
115 |
+
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
116 |
+
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
117 |
+
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
118 |
+
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
119 |
+
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
120 |
+
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
121 |
+
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
122 |
+
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
123 |
+
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
124 |
+
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
125 |
+
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
126 |
+
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
127 |
+
.ui-icon-extlink { background-position: -32px -80px; }
|
128 |
+
.ui-icon-newwin { background-position: -48px -80px; }
|
129 |
+
.ui-icon-refresh { background-position: -64px -80px; }
|
130 |
+
.ui-icon-shuffle { background-position: -80px -80px; }
|
131 |
+
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
132 |
+
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
133 |
+
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
134 |
+
.ui-icon-folder-open { background-position: -16px -96px; }
|
135 |
+
.ui-icon-document { background-position: -32px -96px; }
|
136 |
+
.ui-icon-document-b { background-position: -48px -96px; }
|
137 |
+
.ui-icon-note { background-position: -64px -96px; }
|
138 |
+
.ui-icon-mail-closed { background-position: -80px -96px; }
|
139 |
+
.ui-icon-mail-open { background-position: -96px -96px; }
|
140 |
+
.ui-icon-suitcase { background-position: -112px -96px; }
|
141 |
+
.ui-icon-comment { background-position: -128px -96px; }
|
142 |
+
.ui-icon-person { background-position: -144px -96px; }
|
143 |
+
.ui-icon-print { background-position: -160px -96px; }
|
144 |
+
.ui-icon-trash { background-position: -176px -96px; }
|
145 |
+
.ui-icon-locked { background-position: -192px -96px; }
|
146 |
+
.ui-icon-unlocked { background-position: -208px -96px; }
|
147 |
+
.ui-icon-bookmark { background-position: -224px -96px; }
|
148 |
+
.ui-icon-tag { background-position: -240px -96px; }
|
149 |
+
.ui-icon-home { background-position: 0 -112px; }
|
150 |
+
.ui-icon-flag { background-position: -16px -112px; }
|
151 |
+
.ui-icon-calendar { background-position: -32px -112px; }
|
152 |
+
.ui-icon-cart { background-position: -48px -112px; }
|
153 |
+
.ui-icon-pencil { background-position: -64px -112px; }
|
154 |
+
.ui-icon-clock { background-position: -80px -112px; }
|
155 |
+
.ui-icon-disk { background-position: -96px -112px; }
|
156 |
+
.ui-icon-calculator { background-position: -112px -112px; }
|
157 |
+
.ui-icon-zoomin { background-position: -128px -112px; }
|
158 |
+
.ui-icon-zoomout { background-position: -144px -112px; }
|
159 |
+
.ui-icon-search { background-position: -160px -112px; }
|
160 |
+
.ui-icon-wrench { background-position: -176px -112px; }
|
161 |
+
.ui-icon-gear { background-position: -192px -112px; }
|
162 |
+
.ui-icon-heart { background-position: -208px -112px; }
|
163 |
+
.ui-icon-star { background-position: -224px -112px; }
|
164 |
+
.ui-icon-link { background-position: -240px -112px; }
|
165 |
+
.ui-icon-cancel { background-position: 0 -128px; }
|
166 |
+
.ui-icon-plus { background-position: -16px -128px; }
|
167 |
+
.ui-icon-plusthick { background-position: -32px -128px; }
|
168 |
+
.ui-icon-minus { background-position: -48px -128px; }
|
169 |
+
.ui-icon-minusthick { background-position: -64px -128px; }
|
170 |
+
.ui-icon-close { background-position: -80px -128px; }
|
171 |
+
.ui-icon-closethick { background-position: -96px -128px; }
|
172 |
+
.ui-icon-key { background-position: -112px -128px; }
|
173 |
+
.ui-icon-lightbulb { background-position: -128px -128px; }
|
174 |
+
.ui-icon-scissors { background-position: -144px -128px; }
|
175 |
+
.ui-icon-clipboard { background-position: -160px -128px; }
|
176 |
+
.ui-icon-copy { background-position: -176px -128px; }
|
177 |
+
.ui-icon-contact { background-position: -192px -128px; }
|
178 |
+
.ui-icon-image { background-position: -208px -128px; }
|
179 |
+
.ui-icon-video { background-position: -224px -128px; }
|
180 |
+
.ui-icon-script { background-position: -240px -128px; }
|
181 |
+
.ui-icon-alert { background-position: 0 -144px; }
|
182 |
+
.ui-icon-info { background-position: -16px -144px; }
|
183 |
+
.ui-icon-notice { background-position: -32px -144px; }
|
184 |
+
.ui-icon-help { background-position: -48px -144px; }
|
185 |
+
.ui-icon-check { background-position: -64px -144px; }
|
186 |
+
.ui-icon-bullet { background-position: -80px -144px; }
|
187 |
+
.ui-icon-radio-off { background-position: -96px -144px; }
|
188 |
+
.ui-icon-radio-on { background-position: -112px -144px; }
|
189 |
+
.ui-icon-pin-w { background-position: -128px -144px; }
|
190 |
+
.ui-icon-pin-s { background-position: -144px -144px; }
|
191 |
+
.ui-icon-play { background-position: 0 -160px; }
|
192 |
+
.ui-icon-pause { background-position: -16px -160px; }
|
193 |
+
.ui-icon-seek-next { background-position: -32px -160px; }
|
194 |
+
.ui-icon-seek-prev { background-position: -48px -160px; }
|
195 |
+
.ui-icon-seek-end { background-position: -64px -160px; }
|
196 |
+
.ui-icon-seek-start { background-position: -80px -160px; }
|
197 |
+
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
198 |
+
.ui-icon-seek-first { background-position: -80px -160px; }
|
199 |
+
.ui-icon-stop { background-position: -96px -160px; }
|
200 |
+
.ui-icon-eject { background-position: -112px -160px; }
|
201 |
+
.ui-icon-volume-off { background-position: -128px -160px; }
|
202 |
+
.ui-icon-volume-on { background-position: -144px -160px; }
|
203 |
+
.ui-icon-power { background-position: 0 -176px; }
|
204 |
+
.ui-icon-signal-diag { background-position: -16px -176px; }
|
205 |
+
.ui-icon-signal { background-position: -32px -176px; }
|
206 |
+
.ui-icon-battery-0 { background-position: -48px -176px; }
|
207 |
+
.ui-icon-battery-1 { background-position: -64px -176px; }
|
208 |
+
.ui-icon-battery-2 { background-position: -80px -176px; }
|
209 |
+
.ui-icon-battery-3 { background-position: -96px -176px; }
|
210 |
+
.ui-icon-circle-plus { background-position: 0 -192px; }
|
211 |
+
.ui-icon-circle-minus { background-position: -16px -192px; }
|
212 |
+
.ui-icon-circle-close { background-position: -32px -192px; }
|
213 |
+
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
214 |
+
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
215 |
+
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
216 |
+
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
217 |
+
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
218 |
+
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
219 |
+
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
220 |
+
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
221 |
+
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
222 |
+
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
223 |
+
.ui-icon-circle-check { background-position: -208px -192px; }
|
224 |
+
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
225 |
+
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
226 |
+
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
227 |
+
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
228 |
+
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
229 |
+
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
230 |
+
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
231 |
+
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
232 |
+
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
233 |
+
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
234 |
+
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
235 |
+
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
236 |
+
|
237 |
+
|
238 |
+
/* Misc visuals
|
239 |
+
----------------------------------*/
|
240 |
+
|
241 |
+
/* Corner radius */
|
242 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
243 |
+
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
244 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
245 |
+
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
246 |
+
|
247 |
+
/* Overlays */
|
248 |
+
.ui-widget-overlay { background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
249 |
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../../img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
|
inc/libraries/meta-box/css/map.css
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
.rwmb-map-canvas {
|
2 |
-
width: 100%;
|
3 |
-
height: 400px;
|
4 |
-
margin-bottom: 10px;
|
5 |
-
}
|
6 |
-
|
7 |
-
/* Autocomplete style, copy from WordPress's common.css and forms.css */
|
8 |
-
|
9 |
-
input.ui-autocomplete-input.open {
|
10 |
-
border-bottom-color: transparent;
|
11 |
-
}
|
12 |
-
|
13 |
-
.ui-autocomplete {
|
14 |
-
padding: 0;
|
15 |
-
margin: 0;
|
16 |
-
list-style: none;
|
17 |
-
position: absolute;
|
18 |
-
z-index: 10000;
|
19 |
-
border: 1px solid #5b9dd9;
|
20 |
-
box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
|
21 |
-
background-color: #fff;
|
22 |
-
}
|
23 |
-
|
24 |
-
.ui-autocomplete li {
|
25 |
-
margin-bottom: 0;
|
26 |
-
padding: 4px 10px;
|
27 |
-
white-space: nowrap;
|
28 |
-
text-align: left;
|
29 |
-
cursor: pointer;
|
30 |
-
}
|
31 |
-
|
32 |
-
/* Colors for the wplink toolbar autocomplete. */
|
33 |
-
.ui-autocomplete .ui-state-focus {
|
34 |
-
background-color: #ddd;
|
35 |
-
}
|
36 |
-
|
37 |
-
.ui-helper-hidden-accessible {
|
38 |
-
border: 0;
|
39 |
-
clip: rect(1px, 1px, 1px, 1px);
|
40 |
-
-webkit-clip-path: inset(50%);
|
41 |
-
clip-path: inset(50%);
|
42 |
-
height: 1px;
|
43 |
-
margin: -1px;
|
44 |
-
overflow: hidden;
|
45 |
-
padding: 0;
|
46 |
-
position: absolute;
|
47 |
-
width: 1px;
|
48 |
-
word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
|
49 |
-
}
|
1 |
+
.rwmb-map-canvas {
|
2 |
+
width: 100%;
|
3 |
+
height: 400px;
|
4 |
+
margin-bottom: 10px;
|
5 |
+
}
|
6 |
+
|
7 |
+
/* Autocomplete style, copy from WordPress's common.css and forms.css */
|
8 |
+
|
9 |
+
input.ui-autocomplete-input.open {
|
10 |
+
border-bottom-color: transparent;
|
11 |
+
}
|
12 |
+
|
13 |
+
.ui-autocomplete {
|
14 |
+
padding: 0;
|
15 |
+
margin: 0;
|
16 |
+
list-style: none;
|
17 |
+
position: absolute;
|
18 |
+
z-index: 10000;
|
19 |
+
border: 1px solid #5b9dd9;
|
20 |
+
box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
|
21 |
+
background-color: #fff;
|
22 |
+
}
|
23 |
+
|
24 |
+
.ui-autocomplete li {
|
25 |
+
margin-bottom: 0;
|
26 |
+
padding: 4px 10px;
|
27 |
+
white-space: nowrap;
|
28 |
+
text-align: left;
|
29 |
+
cursor: pointer;
|
30 |
+
}
|
31 |
+
|
32 |
+
/* Colors for the wplink toolbar autocomplete. */
|
33 |
+
.ui-autocomplete .ui-state-focus {
|
34 |
+
background-color: #ddd;
|
35 |
+
}
|
36 |
+
|
37 |
+
.ui-helper-hidden-accessible {
|
38 |
+
border: 0;
|
39 |
+
clip: rect(1px, 1px, 1px, 1px);
|
40 |
+
-webkit-clip-path: inset(50%);
|
41 |
+
clip-path: inset(50%);
|
42 |
+
height: 1px;
|
43 |
+
margin: -1px;
|
44 |
+
overflow: hidden;
|
45 |
+
padding: 0;
|
46 |
+
position: absolute;
|
47 |
+
width: 1px;
|
48 |
+
word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
|
49 |
+
}
|
inc/libraries/meta-box/css/media.css
CHANGED
@@ -1,50 +1,50 @@
|
|
1 |
-
.rwmb-media-list:empty {
|
2 |
-
display: none;
|
3 |
-
}
|
4 |
-
.rwmb-media-list:not(:empty) {
|
5 |
-
display: block;
|
6 |
-
margin: -8px 0 0 -8px;
|
7 |
-
overflow: hidden;
|
8 |
-
}
|
9 |
-
.rwmb-media-item.attachment {
|
10 |
-
float: none;
|
11 |
-
text-align: left;
|
12 |
-
width: auto;
|
13 |
-
overflow: hidden;
|
14 |
-
}
|
15 |
-
.rwmb-media-preview {
|
16 |
-
width: 60px;
|
17 |
-
float: left;
|
18 |
-
position: relative;
|
19 |
-
}
|
20 |
-
.rwmb-media-info {
|
21 |
-
margin-left: 65px;
|
22 |
-
}
|
23 |
-
.rwmb-media-title {
|
24 |
-
font-weight: bold;
|
25 |
-
text-decoration: none;
|
26 |
-
}
|
27 |
-
.rwmb-media-name {
|
28 |
-
margin: 0 0 4px;
|
29 |
-
}
|
30 |
-
.rwmb-media-actions {
|
31 |
-
margin: 0;
|
32 |
-
}
|
33 |
-
.rwmb-edit-media,
|
34 |
-
.rwmb-remove-media {
|
35 |
-
font-size: 11px;
|
36 |
-
color: inherit;
|
37 |
-
text-decoration: none;
|
38 |
-
}
|
39 |
-
.rwmb-media-actions .dashicons {
|
40 |
-
font-size: 1em;
|
41 |
-
width: 1em;
|
42 |
-
height: 1em;
|
43 |
-
vertical-align: middle;
|
44 |
-
}
|
45 |
-
|
46 |
-
/* Add more button */
|
47 |
-
.rwmb-media-view .rwmb-add-media {
|
48 |
-
padding-left: 5px;
|
49 |
-
margin-right: 5px;
|
50 |
-
}
|
1 |
+
.rwmb-media-list:empty {
|
2 |
+
display: none;
|
3 |
+
}
|
4 |
+
.rwmb-media-list:not(:empty) {
|
5 |
+
display: block;
|
6 |
+
margin: -8px 0 0 -8px;
|
7 |
+
overflow: hidden;
|
8 |
+
}
|
9 |
+
.rwmb-media-item.attachment {
|
10 |
+
float: none;
|
11 |
+
text-align: left;
|
12 |
+
width: auto;
|
13 |
+
overflow: hidden;
|
14 |
+
}
|
15 |
+
.rwmb-media-preview {
|
16 |
+
width: 60px;
|
17 |
+
float: left;
|
18 |
+
position: relative;
|
19 |
+
}
|
20 |
+
.rwmb-media-info {
|
21 |
+
margin-left: 65px;
|
22 |
+
}
|
23 |
+
.rwmb-media-title {
|
24 |
+
font-weight: bold;
|
25 |
+
text-decoration: none;
|
26 |
+
}
|
27 |
+
.rwmb-media-name {
|
28 |
+
margin: 0 0 4px;
|
29 |
+
}
|
30 |
+
.rwmb-media-actions {
|
31 |
+
margin: 0;
|
32 |
+
}
|
33 |
+
.rwmb-edit-media,
|
34 |
+
.rwmb-remove-media {
|
35 |
+
font-size: 11px;
|
36 |
+
color: inherit;
|
37 |
+
text-decoration: none;
|
38 |
+
}
|
39 |
+
.rwmb-media-actions .dashicons {
|
40 |
+
font-size: 1em;
|
41 |
+
width: 1em;
|
42 |
+
height: 1em;
|
43 |
+
vertical-align: middle;
|
44 |
+
}
|
45 |
+
|
46 |
+
/* Add more button */
|
47 |
+
.rwmb-media-view .rwmb-add-media {
|
48 |
+
padding-left: 5px;
|
49 |
+
margin-right: 5px;
|
50 |
+
}
|
inc/libraries/meta-box/css/oembed.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
.rwmb-oembed-wrapper .spinner {
|
2 |
-
float: none;
|
3 |
-
vertical-align: top;
|
4 |
-
display: inline-block;
|
5 |
-
}
|
6 |
-
.rwmb-embed-media {
|
7 |
-
margin-top: 1em;
|
8 |
-
}
|
9 |
-
.rwmb-embed-media iframe {
|
10 |
-
max-width: 100%;
|
11 |
-
}
|
1 |
+
.rwmb-oembed-wrapper .spinner {
|
2 |
+
float: none;
|
3 |
+
vertical-align: top;
|
4 |
+
display: inline-block;
|
5 |
+
}
|
6 |
+
.rwmb-embed-media {
|
7 |
+
margin-top: 1em;
|
8 |
+
}
|
9 |
+
.rwmb-embed-media iframe {
|
10 |
+
max-width: 100%;
|
11 |
+
}
|
inc/libraries/meta-box/css/osm.css
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
.rwmb-osm-canvas {
|
2 |
-
width: 100%;
|
3 |
-
height: 400px;
|
4 |
-
margin-bottom: 10px;
|
5 |
-
}
|
6 |
-
|
7 |
-
/* Autocomplete style, copy from WordPress's common.css and forms.css */
|
8 |
-
|
9 |
-
input.ui-autocomplete-input.open {
|
10 |
-
border-bottom-color: transparent;
|
11 |
-
}
|
12 |
-
|
13 |
-
.ui-autocomplete {
|
14 |
-
padding: 0;
|
15 |
-
margin: 0;
|
16 |
-
list-style: none;
|
17 |
-
position: absolute;
|
18 |
-
z-index: 10000;
|
19 |
-
border: 1px solid #5b9dd9;
|
20 |
-
box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
|
21 |
-
background-color: #fff;
|
22 |
-
}
|
23 |
-
|
24 |
-
.ui-autocomplete li {
|
25 |
-
margin-bottom: 0;
|
26 |
-
padding: 4px 10px;
|
27 |
-
white-space: nowrap;
|
28 |
-
text-align: left;
|
29 |
-
cursor: pointer;
|
30 |
-
}
|
31 |
-
|
32 |
-
/* Colors for the wplink toolbar autocomplete. */
|
33 |
-
.ui-autocomplete .ui-state-focus {
|
34 |
-
background-color: #ddd;
|
35 |
-
}
|
36 |
-
|
37 |
-
.ui-helper-hidden-accessible {
|
38 |
-
border: 0;
|
39 |
-
clip: rect(1px, 1px, 1px, 1px);
|
40 |
-
-webkit-clip-path: inset(50%);
|
41 |
-
clip-path: inset(50%);
|
42 |
-
height: 1px;
|
43 |
-
margin: -1px;
|
44 |
-
overflow: hidden;
|
45 |
-
padding: 0;
|
46 |
-
position: absolute;
|
47 |
-
width: 1px;
|
48 |
-
word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
|
49 |
-
}
|
1 |
+
.rwmb-osm-canvas {
|
2 |
+
width: 100%;
|
3 |
+
height: 400px;
|
4 |
+
margin-bottom: 10px;
|
5 |
+
}
|
6 |
+
|
7 |
+
/* Autocomplete style, copy from WordPress's common.css and forms.css */
|
8 |
+
|
9 |
+
input.ui-autocomplete-input.open {
|
10 |
+
border-bottom-color: transparent;
|
11 |
+
}
|
12 |
+
|
13 |
+
.ui-autocomplete {
|
14 |
+
padding: 0;
|
15 |
+
margin: 0;
|
16 |
+
list-style: none;
|
17 |
+
position: absolute;
|
18 |
+
z-index: 10000;
|
19 |
+
border: 1px solid #5b9dd9;
|
20 |
+
box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
|
21 |
+
background-color: #fff;
|
22 |
+
}
|
23 |
+
|
24 |
+
.ui-autocomplete li {
|
25 |
+
margin-bottom: 0;
|
26 |
+
padding: 4px 10px;
|
27 |
+
white-space: nowrap;
|
28 |
+
text-align: left;
|
29 |
+
cursor: pointer;
|
30 |
+
}
|
31 |
+
|
32 |
+
/* Colors for the wplink toolbar autocomplete. */
|
33 |
+
.ui-autocomplete .ui-state-focus {
|
34 |
+
background-color: #ddd;
|
35 |
+
}
|
36 |
+
|
37 |
+
.ui-helper-hidden-accessible {
|
38 |
+
border: 0;
|
39 |
+
clip: rect(1px, 1px, 1px, 1px);
|
40 |
+
-webkit-clip-path: inset(50%);
|
41 |
+
clip-path: inset(50%);
|
42 |
+
height: 1px;
|
43 |
+
margin: -1px;
|
44 |
+
overflow: hidden;
|
45 |
+
padding: 0;
|
46 |
+
position: absolute;
|
47 |
+
width: 1px;
|
48 |
+
word-wrap: normal !important; /* many screen reader and browser combinations announce broken words as they would appear visually */
|
49 |
+
}
|
inc/libraries/meta-box/css/range.css
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
.rwmb-range.rwmb-range,
|
2 |
-
.rwmb-range.rwmb-range:hover {
|
3 |
-
vertical-align: middle;
|
4 |
-
padding: 0;
|
5 |
-
border: none;
|
6 |
-
}
|
7 |
-
.rwmb-output {
|
8 |
-
margin-left: 8px;
|
9 |
-
}
|
1 |
+
.rwmb-range.rwmb-range,
|
2 |
+
.rwmb-range.rwmb-range:hover {
|
3 |
+
vertical-align: middle;
|
4 |
+
padding: 0;
|
5 |
+
border: none;
|
6 |
+
}
|
7 |
+
.rwmb-output {
|
8 |
+
margin-left: 8px;
|
9 |
+
}
|
inc/libraries/meta-box/css/select-advanced.css
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
.rwmb-field .select2-container {
|
2 |
-
height: auto;
|
3 |
-
min-width: 200px;
|
4 |
-
}
|
5 |
-
#wpbody .rwmb-select-all {
|
6 |
-
display: block;
|
7 |
-
margin-top: 5px;
|
8 |
-
}
|
9 |
-
#wpbody .select2-selection--single,
|
10 |
-
#wpbody .select2-selection--multiple,
|
11 |
-
.select2-dropdown {
|
12 |
-
border-color: #ddd;
|
13 |
-
}
|
14 |
-
.select2-results__option {
|
15 |
-
margin-bottom: 0;
|
16 |
-
}
|
17 |
-
.select2-container .select2-search--inline {
|
18 |
-
margin-bottom: 0;
|
19 |
-
}
|
1 |
+
.rwmb-field .select2-container {
|
2 |
+
height: auto;
|
3 |
+
min-width: 200px;
|
4 |
+
}
|
5 |
+
#wpbody .rwmb-select-all {
|
6 |
+
display: block;
|
7 |
+
margin-top: 5px;
|
8 |
+
}
|
9 |
+
#wpbody .select2-selection--single,
|
10 |
+
#wpbody .select2-selection--multiple,
|
11 |
+
.select2-dropdown {
|
12 |
+
border-color: #ddd;
|
13 |
+
}
|
14 |
+
.select2-results__option {
|
15 |
+
margin-bottom: 0;
|
16 |
+
}
|
17 |
+
.select2-container .select2-search--inline {
|
18 |
+
margin-bottom: 0;
|
19 |
+
}
|
inc/libraries/meta-box/css/select-tree.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
-
.rwmb-select-tree {
|
2 |
-
display: inline-block;
|
3 |
-
}
|
4 |
-
|
5 |
-
.rwmb-select-tree.hidden {
|
6 |
-
display: none;
|
7 |
-
}
|
1 |
+
.rwmb-select-tree {
|
2 |
+
display: inline-block;
|
3 |
+
}
|
4 |
+
|
5 |
+
.rwmb-select-tree.hidden {
|
6 |
+
display: none;
|
7 |
+
}
|
inc/libraries/meta-box/css/select.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
.rwmb-select.rwmb-select {
|
2 |
-
min-width: 160px;
|
3 |
-
padding: 0;
|
4 |
-
}
|
5 |
-
.rwmb-select option {
|
6 |
-
padding: 4px 8px;
|
7 |
-
}
|
8 |
-
.rwmb-select-all-none {
|
9 |
-
display: block;
|
10 |
-
margin-top: 5px;
|
11 |
-
}
|
1 |
+
.rwmb-select.rwmb-select {
|
2 |
+
min-width: 160px;
|
3 |
+
padding: 0;
|
4 |
+
}
|
5 |
+
.rwmb-select option {
|
6 |
+
padding: 4px 8px;
|
7 |
+
}
|
8 |
+
.rwmb-select-all-none {
|
9 |
+
display: block;
|
10 |
+
margin-top: 5px;
|
11 |
+
}
|
inc/libraries/meta-box/css/select2/select2.css
CHANGED
@@ -1,484 +1,484 @@
|
|
1 |
-
.select2-container {
|
2 |
-
box-sizing: border-box;
|
3 |
-
display: inline-block;
|
4 |
-
margin: 0;
|
5 |
-
position: relative;
|
6 |
-
vertical-align: middle; }
|
7 |
-
.select2-container .select2-selection--single {
|
8 |
-
box-sizing: border-box;
|
9 |
-
cursor: pointer;
|
10 |
-
display: block;
|
11 |
-
height: 28px;
|
12 |
-
user-select: none;
|
13 |
-
-webkit-user-select: none; }
|
14 |
-
.select2-container .select2-selection--single .select2-selection__rendered {
|
15 |
-
display: block;
|
16 |
-
padding-left: 8px;
|
17 |
-
padding-right: 20px;
|
18 |
-
overflow: hidden;
|
19 |
-
text-overflow: ellipsis;
|
20 |
-
white-space: nowrap; }
|
21 |
-
.select2-container .select2-selection--single .select2-selection__clear {
|
22 |
-
position: relative; }
|
23 |
-
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
24 |
-
padding-right: 8px;
|
25 |
-
padding-left: 20px; }
|
26 |
-
.select2-container .select2-selection--multiple {
|
27 |
-
box-sizing: border-box;
|
28 |
-
cursor: pointer;
|
29 |
-
display: block;
|
30 |
-
min-height: 32px;
|
31 |
-
user-select: none;
|
32 |
-
-webkit-user-select: none; }
|
33 |
-
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
34 |
-
display: inline-block;
|
35 |
-
overflow: hidden;
|
36 |
-
padding-left: 8px;
|
37 |
-
text-overflow: ellipsis;
|
38 |
-
white-space: nowrap; }
|
39 |
-
.select2-container .select2-search--inline {
|
40 |
-
float: left; }
|
41 |
-
.select2-container .select2-search--inline .select2-search__field {
|
42 |
-
box-sizing: border-box;
|
43 |
-
border: none;
|
44 |
-
font-size: 100%;
|
45 |
-
margin-top: 5px;
|
46 |
-
padding: 0; }
|
47 |
-
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
48 |
-
-webkit-appearance: none; }
|
49 |
-
|
50 |
-
.select2-dropdown {
|
51 |
-
background-color: white;
|
52 |
-
border: 1px solid #aaa;
|
53 |
-
border-radius: 4px;
|
54 |
-
box-sizing: border-box;
|
55 |
-
display: block;
|
56 |
-
position: absolute;
|
57 |
-
left: -100000px;
|
58 |
-
width: 100%;
|
59 |
-
z-index: 1051; }
|
60 |
-
|
61 |
-
.select2-results {
|
62 |
-
display: block; }
|
63 |
-
|
64 |
-
.select2-results__options {
|
65 |
-
list-style: none;
|
66 |
-
margin: 0;
|
67 |
-
padding: 0; }
|
68 |
-
|
69 |
-
.select2-results__option {
|
70 |
-
padding: 6px;
|
71 |
-
user-select: none;
|
72 |
-
-webkit-user-select: none; }
|
73 |
-
.select2-results__option[aria-selected] {
|
74 |
-
cursor: pointer; }
|
75 |
-
|
76 |
-
.select2-container--open .select2-dropdown {
|
77 |
-
left: 0; }
|
78 |
-
|
79 |
-
.select2-container--open .select2-dropdown--above {
|
80 |
-
border-bottom: none;
|
81 |
-
border-bottom-left-radius: 0;
|
82 |
-
border-bottom-right-radius: 0; }
|
83 |
-
|
84 |
-
.select2-container--open .select2-dropdown--below {
|
85 |
-
border-top: none;
|
86 |
-
border-top-left-radius: 0;
|
87 |
-
border-top-right-radius: 0; }
|
88 |
-
|
89 |
-
.select2-search--dropdown {
|
90 |
-
display: block;
|
91 |
-
padding: 4px; }
|
92 |
-
.select2-search--dropdown .select2-search__field {
|
93 |
-
padding: 4px;
|
94 |
-
width: 100%;
|
95 |
-
box-sizing: border-box; }
|
96 |
-
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
97 |
-
-webkit-appearance: none; }
|
98 |
-
.select2-search--dropdown.select2-search--hide {
|
99 |
-
display: none; }
|
100 |
-
|
101 |
-
.select2-close-mask {
|
102 |
-
border: 0;
|
103 |
-
margin: 0;
|
104 |
-
padding: 0;
|
105 |
-
display: block;
|
106 |
-
position: fixed;
|
107 |
-
left: 0;
|
108 |
-
top: 0;
|
109 |
-
min-height: 100%;
|
110 |
-
min-width: 100%;
|
111 |
-
height: auto;
|
112 |
-
width: auto;
|
113 |
-
opacity: 0;
|
114 |
-
z-index: 99;
|
115 |
-
background-color: #fff;
|
116 |
-
filter: alpha(opacity=0); }
|
117 |
-
|
118 |
-
.select2-hidden-accessible {
|
119 |
-
border: 0 !important;
|
120 |
-
clip: rect(0 0 0 0) !important;
|
121 |
-
height: 1px !important;
|
122 |
-
margin: -1px !important;
|
123 |
-
overflow: hidden !important;
|
124 |
-
padding: 0 !important;
|
125 |
-
position: absolute !important;
|
126 |
-
width: 1px !important; }
|
127 |
-
|
128 |
-
.select2-container--default .select2-selection--single {
|
129 |
-
background-color: #fff;
|
130 |
-
border: 1px solid #aaa;
|
131 |
-
border-radius: 4px; }
|
132 |
-
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
133 |
-
color: #444;
|
134 |
-
line-height: 28px; }
|
135 |
-
.select2-container--default .select2-selection--single .select2-selection__clear {
|
136 |
-
cursor: pointer;
|
137 |
-
float: right;
|
138 |
-
font-weight: bold; }
|
139 |
-
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
140 |
-
color: #999; }
|
141 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
142 |
-
height: 26px;
|
143 |
-
position: absolute;
|
144 |
-
top: 1px;
|
145 |
-
right: 1px;
|
146 |
-
width: 20px; }
|
147 |
-
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
148 |
-
border-color: #888 transparent transparent transparent;
|
149 |
-
border-style: solid;
|
150 |
-
border-width: 5px 4px 0 4px;
|
151 |
-
height: 0;
|
152 |
-
left: 50%;
|
153 |
-
margin-left: -4px;
|
154 |
-
margin-top: -2px;
|
155 |
-
position: absolute;
|
156 |
-
top: 50%;
|
157 |
-
width: 0; }
|
158 |
-
|
159 |
-
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
160 |
-
float: left; }
|
161 |
-
|
162 |
-
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
163 |
-
left: 1px;
|
164 |
-
right: auto; }
|
165 |
-
|
166 |
-
.select2-container--default.select2-container--disabled .select2-selection--single {
|
167 |
-
background-color: #eee;
|
168 |
-
cursor: default; }
|
169 |
-
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
170 |
-
display: none; }
|
171 |
-
|
172 |
-
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
173 |
-
border-color: transparent transparent #888 transparent;
|
174 |
-
border-width: 0 4px 5px 4px; }
|
175 |
-
|
176 |
-
.select2-container--default .select2-selection--multiple {
|
177 |
-
background-color: white;
|
178 |
-
border: 1px solid #aaa;
|
179 |
-
border-radius: 4px;
|
180 |
-
cursor: text; }
|
181 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
182 |
-
box-sizing: border-box;
|
183 |
-
list-style: none;
|
184 |
-
margin: 0;
|
185 |
-
padding: 0 5px;
|
186 |
-
width: 100%; }
|
187 |
-
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
188 |
-
list-style: none; }
|
189 |
-
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
190 |
-
color: #999;
|
191 |
-
margin-top: 5px;
|
192 |
-
float: left; }
|
193 |
-
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
194 |
-
cursor: pointer;
|
195 |
-
float: right;
|
196 |
-
font-weight: bold;
|
197 |
-
margin-top: 5px;
|
198 |
-
margin-right: 10px; }
|
199 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
200 |
-
background-color: #e4e4e4;
|
201 |
-
border: 1px solid #aaa;
|
202 |
-
border-radius: 4px;
|
203 |
-
cursor: default;
|
204 |
-
float: left;
|
205 |
-
margin-right: 5px;
|
206 |
-
margin-top: 5px;
|
207 |
-
padding: 0 5px; }
|
208 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
209 |
-
color: #999;
|
210 |
-
cursor: pointer;
|
211 |
-
display: inline-block;
|
212 |
-
font-weight: bold;
|
213 |
-
margin-right: 2px; }
|
214 |
-
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
215 |
-
color: #333; }
|
216 |
-
|
217 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
218 |
-
float: right; }
|
219 |
-
|
220 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
221 |
-
margin-left: 5px;
|
222 |
-
margin-right: auto; }
|
223 |
-
|
224 |
-
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
225 |
-
margin-left: 2px;
|
226 |
-
margin-right: auto; }
|
227 |
-
|
228 |
-
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
229 |
-
border: solid black 1px;
|
230 |
-
outline: 0; }
|
231 |
-
|
232 |
-
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
233 |
-
background-color: #eee;
|
234 |
-
cursor: default; }
|
235 |
-
|
236 |
-
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
237 |
-
display: none; }
|
238 |
-
|
239 |
-
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
240 |
-
border-top-left-radius: 0;
|
241 |
-
border-top-right-radius: 0; }
|
242 |
-
|
243 |
-
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
244 |
-
border-bottom-left-radius: 0;
|
245 |
-
border-bottom-right-radius: 0; }
|
246 |
-
|
247 |
-
.select2-container--default .select2-search--dropdown .select2-search__field {
|
248 |
-
border: 1px solid #aaa; }
|
249 |
-
|
250 |
-
.select2-container--default .select2-search--inline .select2-search__field {
|
251 |
-
background: transparent;
|
252 |
-
border: none;
|
253 |
-
outline: 0;
|
254 |
-
box-shadow: none;
|
255 |
-
-webkit-appearance: textfield; }
|
256 |
-
|
257 |
-
.select2-container--default .select2-results > .select2-results__options {
|
258 |
-
max-height: 200px;
|
259 |
-
overflow-y: auto; }
|
260 |
-
|
261 |
-
.select2-container--default .select2-results__option[role=group] {
|
262 |
-
padding: 0; }
|
263 |
-
|
264 |
-
.select2-container--default .select2-results__option[aria-disabled=true] {
|
265 |
-
color: #999; }
|
266 |
-
|
267 |
-
.select2-container--default .select2-results__option[aria-selected=true] {
|
268 |
-
background-color: #ddd; }
|
269 |
-
|
270 |
-
.select2-container--default .select2-results__option .select2-results__option {
|
271 |
-
padding-left: 1em; }
|
272 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
273 |
-
padding-left: 0; }
|
274 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
275 |
-
margin-left: -1em;
|
276 |
-
padding-left: 2em; }
|
277 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
278 |
-
margin-left: -2em;
|
279 |
-
padding-left: 3em; }
|
280 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
281 |
-
margin-left: -3em;
|
282 |
-
padding-left: 4em; }
|
283 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
284 |
-
margin-left: -4em;
|
285 |
-
padding-left: 5em; }
|
286 |
-
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
287 |
-
margin-left: -5em;
|
288 |
-
padding-left: 6em; }
|
289 |
-
|
290 |
-
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
291 |
-
background-color: #5897fb;
|
292 |
-
color: white; }
|
293 |
-
|
294 |
-
.select2-container--default .select2-results__group {
|
295 |
-
cursor: default;
|
296 |
-
display: block;
|
297 |
-
padding: 6px; }
|
298 |
-
|
299 |
-
.select2-container--classic .select2-selection--single {
|
300 |
-
background-color: #f7f7f7;
|
301 |
-
border: 1px solid #aaa;
|
302 |
-
border-radius: 4px;
|
303 |
-
outline: 0;
|
304 |
-
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
305 |
-
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
306 |
-
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
307 |
-
background-repeat: repeat-x;
|
308 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
309 |
-
.select2-container--classic .select2-selection--single:focus {
|
310 |
-
border: 1px solid #5897fb; }
|
311 |
-
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
312 |
-
color: #444;
|
313 |
-
line-height: 28px; }
|
314 |
-
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
315 |
-
cursor: pointer;
|
316 |
-
float: right;
|
317 |
-
font-weight: bold;
|
318 |
-
margin-right: 10px; }
|
319 |
-
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
320 |
-
color: #999; }
|
321 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
322 |
-
background-color: #ddd;
|
323 |
-
border: none;
|
324 |
-
border-left: 1px solid #aaa;
|
325 |
-
border-top-right-radius: 4px;
|
326 |
-
border-bottom-right-radius: 4px;
|
327 |
-
height: 26px;
|
328 |
-
position: absolute;
|
329 |
-
top: 1px;
|
330 |
-
right: 1px;
|
331 |
-
width: 20px;
|
332 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
333 |
-
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
334 |
-
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
335 |
-
background-repeat: repeat-x;
|
336 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
337 |
-
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
338 |
-
border-color: #888 transparent transparent transparent;
|
339 |
-
border-style: solid;
|
340 |
-
border-width: 5px 4px 0 4px;
|
341 |
-
height: 0;
|
342 |
-
left: 50%;
|
343 |
-
margin-left: -4px;
|
344 |
-
margin-top: -2px;
|
345 |
-
position: absolute;
|
346 |
-
top: 50%;
|
347 |
-
width: 0; }
|
348 |
-
|
349 |
-
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
350 |
-
float: left; }
|
351 |
-
|
352 |
-
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
353 |
-
border: none;
|
354 |
-
border-right: 1px solid #aaa;
|
355 |
-
border-radius: 0;
|
356 |
-
border-top-left-radius: 4px;
|
357 |
-
border-bottom-left-radius: 4px;
|
358 |
-
left: 1px;
|
359 |
-
right: auto; }
|
360 |
-
|
361 |
-
.select2-container--classic.select2-container--open .select2-selection--single {
|
362 |
-
border: 1px solid #5897fb; }
|
363 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
364 |
-
background: transparent;
|
365 |
-
border: none; }
|
366 |
-
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
367 |
-
border-color: transparent transparent #888 transparent;
|
368 |
-
border-width: 0 4px 5px 4px; }
|
369 |
-
|
370 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
371 |
-
border-top: none;
|
372 |
-
border-top-left-radius: 0;
|
373 |
-
border-top-right-radius: 0;
|
374 |
-
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
375 |
-
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
376 |
-
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
377 |
-
background-repeat: repeat-x;
|
378 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
379 |
-
|
380 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
381 |
-
border-bottom: none;
|
382 |
-
border-bottom-left-radius: 0;
|
383 |
-
border-bottom-right-radius: 0;
|
384 |
-
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
385 |
-
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
386 |
-
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
387 |
-
background-repeat: repeat-x;
|
388 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
389 |
-
|
390 |
-
.select2-container--classic .select2-selection--multiple {
|
391 |
-
background-color: white;
|
392 |
-
border: 1px solid #aaa;
|
393 |
-
border-radius: 4px;
|
394 |
-
cursor: text;
|
395 |
-
outline: 0; }
|
396 |
-
.select2-container--classic .select2-selection--multiple:focus {
|
397 |
-
border: 1px solid #5897fb; }
|
398 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
399 |
-
list-style: none;
|
400 |
-
margin: 0;
|
401 |
-
padding: 0 5px; }
|
402 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
403 |
-
display: none; }
|
404 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
405 |
-
background-color: #e4e4e4;
|
406 |
-
border: 1px solid #aaa;
|
407 |
-
border-radius: 4px;
|
408 |
-
cursor: default;
|
409 |
-
float: left;
|
410 |
-
margin-right: 5px;
|
411 |
-
margin-top: 5px;
|
412 |
-
padding: 0 5px; }
|
413 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
414 |
-
color: #888;
|
415 |
-
cursor: pointer;
|
416 |
-
display: inline-block;
|
417 |
-
font-weight: bold;
|
418 |
-
margin-right: 2px; }
|
419 |
-
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
420 |
-
color: #555; }
|
421 |
-
|
422 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
423 |
-
float: right; }
|
424 |
-
|
425 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
426 |
-
margin-left: 5px;
|
427 |
-
margin-right: auto; }
|
428 |
-
|
429 |
-
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
430 |
-
margin-left: 2px;
|
431 |
-
margin-right: auto; }
|
432 |
-
|
433 |
-
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
434 |
-
border: 1px solid #5897fb; }
|
435 |
-
|
436 |
-
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
437 |
-
border-top: none;
|
438 |
-
border-top-left-radius: 0;
|
439 |
-
border-top-right-radius: 0; }
|
440 |
-
|
441 |
-
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
442 |
-
border-bottom: none;
|
443 |
-
border-bottom-left-radius: 0;
|
444 |
-
border-bottom-right-radius: 0; }
|
445 |
-
|
446 |
-
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
447 |
-
border: 1px solid #aaa;
|
448 |
-
outline: 0; }
|
449 |
-
|
450 |
-
.select2-container--classic .select2-search--inline .select2-search__field {
|
451 |
-
outline: 0;
|
452 |
-
box-shadow: none; }
|
453 |
-
|
454 |
-
.select2-container--classic .select2-dropdown {
|
455 |
-
background-color: white;
|
456 |
-
border: 1px solid transparent; }
|
457 |
-
|
458 |
-
.select2-container--classic .select2-dropdown--above {
|
459 |
-
border-bottom: none; }
|
460 |
-
|
461 |
-
.select2-container--classic .select2-dropdown--below {
|
462 |
-
border-top: none; }
|
463 |
-
|
464 |
-
.select2-container--classic .select2-results > .select2-results__options {
|
465 |
-
max-height: 200px;
|
466 |
-
overflow-y: auto; }
|
467 |
-
|
468 |
-
.select2-container--classic .select2-results__option[role=group] {
|
469 |
-
padding: 0; }
|
470 |
-
|
471 |
-
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
472 |
-
color: grey; }
|
473 |
-
|
474 |
-
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
475 |
-
background-color: #3875d7;
|
476 |
-
color: white; }
|
477 |
-
|
478 |
-
.select2-container--classic .select2-results__group {
|
479 |
-
cursor: default;
|
480 |
-
display: block;
|
481 |
-
padding: 6px; }
|
482 |
-
|
483 |
-
.select2-container--classic.select2-container--open .select2-dropdown {
|
484 |
-
border-color: #5897fb; }
|
1 |
+
.select2-container {
|
2 |
+
box-sizing: border-box;
|
3 |
+
display: inline-block;
|
4 |
+
margin: 0;
|
5 |
+
position: relative;
|
6 |
+
vertical-align: middle; }
|
7 |
+
.select2-container .select2-selection--single {
|
8 |
+
box-sizing: border-box;
|
9 |
+
cursor: pointer;
|
10 |
+
display: block;
|
11 |
+
height: 28px;
|
12 |
+
user-select: none;
|
13 |
+
-webkit-user-select: none; }
|
14 |
+
.select2-container .select2-selection--single .select2-selection__rendered {
|
15 |
+
display: block;
|
16 |
+
padding-left: 8px;
|
17 |
+
padding-right: 20px;
|
18 |
+
overflow: hidden;
|
19 |
+
text-overflow: ellipsis;
|
20 |
+
white-space: nowrap; }
|
21 |
+
.select2-container .select2-selection--single .select2-selection__clear {
|
22 |
+
position: relative; }
|
23 |
+
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
24 |
+
padding-right: 8px;
|
25 |
+
padding-left: 20px; }
|
26 |
+
.select2-container .select2-selection--multiple {
|
27 |
+
box-sizing: border-box;
|
28 |
+
cursor: pointer;
|
29 |
+
display: block;
|
30 |
+
min-height: 32px;
|
31 |
+
user-select: none;
|
32 |
+
-webkit-user-select: none; }
|
33 |
+
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
34 |
+
display: inline-block;
|
35 |
+
overflow: hidden;
|
36 |
+
padding-left: 8px;
|
37 |
+
text-overflow: ellipsis;
|
38 |
+
white-space: nowrap; }
|
39 |
+
.select2-container .select2-search--inline {
|
40 |
+
float: left; }
|
41 |
+
.select2-container .select2-search--inline .select2-search__field {
|
42 |
+
box-sizing: border-box;
|
43 |
+
border: none;
|
44 |
+
font-size: 100%;
|
45 |
+
margin-top: 5px;
|
46 |
+
padding: 0; }
|
47 |
+
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
48 |
+
-webkit-appearance: none; }
|
49 |
+
|
50 |
+
.select2-dropdown {
|
51 |
+
background-color: white;
|
52 |
+
border: 1px solid #aaa;
|
53 |
+
border-radius: 4px;
|
54 |
+
box-sizing: border-box;
|
55 |
+
display: block;
|
56 |
+
position: absolute;
|
57 |
+
left: -100000px;
|
58 |
+
width: 100%;
|
59 |
+
z-index: 1051; }
|
60 |
+
|
61 |
+
.select2-results {
|
62 |
+
display: block; }
|
63 |
+
|
64 |
+
.select2-results__options {
|
65 |
+
list-style: none;
|
66 |
+
margin: 0;
|
67 |
+
padding: 0; }
|
68 |
+
|
69 |
+
.select2-results__option {
|
70 |
+
padding: 6px;
|
71 |
+
user-select: none;
|
72 |
+
-webkit-user-select: none; }
|
73 |
+
.select2-results__option[aria-selected] {
|
74 |
+
cursor: pointer; }
|
75 |
+
|
76 |
+
.select2-container--open .select2-dropdown {
|
77 |
+
left: 0; }
|
78 |
+
|
79 |
+
.select2-container--open .select2-dropdown--above {
|
80 |
+
border-bottom: none;
|
81 |
+
border-bottom-left-radius: 0;
|
82 |
+
border-bottom-right-radius: 0; }
|
83 |
+
|
84 |
+
.select2-container--open .select2-dropdown--below {
|
85 |
+
border-top: none;
|
86 |
+
border-top-left-radius: 0;
|
87 |
+
border-top-right-radius: 0; }
|
88 |
+
|
89 |
+
.select2-search--dropdown {
|
90 |
+
display: block;
|
91 |
+
padding: 4px; }
|
92 |
+
.select2-search--dropdown .select2-search__field {
|
93 |
+
padding: 4px;
|
94 |
+
width: 100%;
|
95 |
+
box-sizing: border-box; }
|
96 |
+
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
97 |
+
-webkit-appearance: none; }
|
98 |
+
.select2-search--dropdown.select2-search--hide {
|
99 |
+
display: none; }
|
100 |
+
|
101 |
+
.select2-close-mask {
|
102 |
+
border: 0;
|
103 |
+
margin: 0;
|
104 |
+
padding: 0;
|
105 |
+
display: block;
|
106 |
+
position: fixed;
|
107 |
+
left: 0;
|
108 |
+
top: 0;
|
109 |
+
min-height: 100%;
|
110 |
+
min-width: 100%;
|
111 |
+
height: auto;
|
112 |
+
width: auto;
|
113 |
+
opacity: 0;
|
114 |
+
z-index: 99;
|
115 |
+
background-color: #fff;
|
116 |
+
filter: alpha(opacity=0); }
|
117 |
+
|
118 |
+
.select2-hidden-accessible {
|
119 |
+
border: 0 !important;
|
120 |
+
clip: rect(0 0 0 0) !important;
|
121 |
+
height: 1px !important;
|
122 |
+
margin: -1px !important;
|
123 |
+
overflow: hidden !important;
|
124 |
+
padding: 0 !important;
|
125 |
+
position: absolute !important;
|
126 |
+
width: 1px !important; }
|
127 |
+
|
128 |
+
.select2-container--default .select2-selection--single {
|
129 |
+
background-color: #fff;
|
130 |
+
border: 1px solid #aaa;
|
131 |
+
border-radius: 4px; }
|
132 |
+
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
133 |
+
color: #444;
|
134 |
+
line-height: 28px; }
|
135 |
+
.select2-container--default .select2-selection--single .select2-selection__clear {
|
136 |
+
cursor: pointer;
|
137 |
+
float: right;
|
138 |
+
font-weight: bold; }
|
139 |
+
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
140 |
+
color: #999; }
|
141 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
142 |
+
height: 26px;
|
143 |
+
position: absolute;
|
144 |
+
top: 1px;
|
145 |
+
right: 1px;
|
146 |
+
width: 20px; }
|
147 |
+
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
148 |
+
border-color: #888 transparent transparent transparent;
|
149 |
+
border-style: solid;
|
150 |
+
border-width: 5px 4px 0 4px;
|
151 |
+
height: 0;
|
152 |
+
left: 50%;
|
153 |
+
margin-left: -4px;
|
154 |
+
margin-top: -2px;
|
155 |
+
position: absolute;
|
156 |
+
top: 50%;
|
157 |
+
width: 0; }
|
158 |
+
|
159 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
160 |
+
float: left; }
|
161 |
+
|
162 |
+
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
163 |
+
left: 1px;
|
164 |
+
right: auto; }
|
165 |
+
|
166 |
+
.select2-container--default.select2-container--disabled .select2-selection--single {
|
167 |
+
background-color: #eee;
|
168 |
+
cursor: default; }
|
169 |
+
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
170 |
+
display: none; }
|
171 |
+
|
172 |
+
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
173 |
+
border-color: transparent transparent #888 transparent;
|
174 |
+
border-width: 0 4px 5px 4px; }
|
175 |
+
|
176 |
+
.select2-container--default .select2-selection--multiple {
|
177 |
+
background-color: white;
|
178 |
+
border: 1px solid #aaa;
|
179 |
+
border-radius: 4px;
|
180 |
+
cursor: text; }
|
181 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
182 |
+
box-sizing: border-box;
|
183 |
+
list-style: none;
|
184 |
+
margin: 0;
|
185 |
+
padding: 0 5px;
|
186 |
+
width: 100%; }
|
187 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
188 |
+
list-style: none; }
|
189 |
+
.select2-container--default .select2-selection--multiple .select2-selection__placeholder {
|
190 |
+
color: #999;
|
191 |
+
margin-top: 5px;
|
192 |
+
float: left; }
|
193 |
+
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
194 |
+
cursor: pointer;
|
195 |
+
float: right;
|
196 |
+
font-weight: bold;
|
197 |
+
margin-top: 5px;
|
198 |
+
margin-right: 10px; }
|
199 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
200 |
+
background-color: #e4e4e4;
|
201 |
+
border: 1px solid #aaa;
|
202 |
+
border-radius: 4px;
|
203 |
+
cursor: default;
|
204 |
+
float: left;
|
205 |
+
margin-right: 5px;
|
206 |
+
margin-top: 5px;
|
207 |
+
padding: 0 5px; }
|
208 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
209 |
+
color: #999;
|
210 |
+
cursor: pointer;
|
211 |
+
display: inline-block;
|
212 |
+
font-weight: bold;
|
213 |
+
margin-right: 2px; }
|
214 |
+
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
215 |
+
color: #333; }
|
216 |
+
|
217 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
218 |
+
float: right; }
|
219 |
+
|
220 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
221 |
+
margin-left: 5px;
|
222 |
+
margin-right: auto; }
|
223 |
+
|
224 |
+
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
225 |
+
margin-left: 2px;
|
226 |
+
margin-right: auto; }
|
227 |
+
|
228 |
+
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
229 |
+
border: solid black 1px;
|
230 |
+
outline: 0; }
|
231 |
+
|
232 |
+
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
233 |
+
background-color: #eee;
|
234 |
+
cursor: default; }
|
235 |
+
|
236 |
+
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
237 |
+
display: none; }
|
238 |
+
|
239 |
+
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
240 |
+
border-top-left-radius: 0;
|
241 |
+
border-top-right-radius: 0; }
|
242 |
+
|
243 |
+
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
244 |
+
border-bottom-left-radius: 0;
|
245 |
+
border-bottom-right-radius: 0; }
|
246 |
+
|
247 |
+
.select2-container--default .select2-search--dropdown .select2-search__field {
|
248 |
+
border: 1px solid #aaa; }
|
249 |
+
|
250 |
+
.select2-container--default .select2-search--inline .select2-search__field {
|
251 |
+
background: transparent;
|
252 |
+
border: none;
|
253 |
+
outline: 0;
|
254 |
+
box-shadow: none;
|
255 |
+
-webkit-appearance: textfield; }
|
256 |
+
|
257 |
+
.select2-container--default .select2-results > .select2-results__options {
|
258 |
+
max-height: 200px;
|
259 |
+
overflow-y: auto; }
|
260 |
+
|
261 |
+
.select2-container--default .select2-results__option[role=group] {
|
262 |
+
padding: 0; }
|
263 |
+
|
264 |
+
.select2-container--default .select2-results__option[aria-disabled=true] {
|
265 |
+
color: #999; }
|
266 |
+
|
267 |
+
.select2-container--default .select2-results__option[aria-selected=true] {
|
268 |
+
background-color: #ddd; }
|
269 |
+
|
270 |
+
.select2-container--default .select2-results__option .select2-results__option {
|
271 |
+
padding-left: 1em; }
|
272 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
273 |
+
padding-left: 0; }
|
274 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
275 |
+
margin-left: -1em;
|
276 |
+
padding-left: 2em; }
|
277 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
278 |
+
margin-left: -2em;
|
279 |
+
padding-left: 3em; }
|
280 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
281 |
+
margin-left: -3em;
|
282 |
+
padding-left: 4em; }
|
283 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
284 |
+
margin-left: -4em;
|
285 |
+
padding-left: 5em; }
|
286 |
+
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
287 |
+
margin-left: -5em;
|
288 |
+
padding-left: 6em; }
|
289 |
+
|
290 |
+
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
291 |
+
background-color: #5897fb;
|
292 |
+
color: white; }
|
293 |
+
|
294 |
+
.select2-container--default .select2-results__group {
|
295 |
+
cursor: default;
|
296 |
+
display: block;
|
297 |
+
padding: 6px; }
|
298 |
+
|
299 |
+
.select2-container--classic .select2-selection--single {
|
300 |
+
background-color: #f7f7f7;
|
301 |
+
border: 1px solid #aaa;
|
302 |
+
border-radius: 4px;
|
303 |
+
outline: 0;
|
304 |
+
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
305 |
+
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
306 |
+
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
307 |
+
background-repeat: repeat-x;
|
308 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
309 |
+
.select2-container--classic .select2-selection--single:focus {
|
310 |
+
border: 1px solid #5897fb; }
|
311 |
+
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
312 |
+
color: #444;
|
313 |
+
line-height: 28px; }
|
314 |
+
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
315 |
+
cursor: pointer;
|
316 |
+
float: right;
|
317 |
+
font-weight: bold;
|
318 |
+
margin-right: 10px; }
|
319 |
+
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
320 |
+
color: #999; }
|
321 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
322 |
+
background-color: #ddd;
|
323 |
+
border: none;
|
324 |
+
border-left: 1px solid #aaa;
|
325 |
+
border-top-right-radius: 4px;
|
326 |
+
border-bottom-right-radius: 4px;
|
327 |
+
height: 26px;
|
328 |
+
position: absolute;
|
329 |
+
top: 1px;
|
330 |
+
right: 1px;
|
331 |
+
width: 20px;
|
332 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
333 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
334 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
335 |
+
background-repeat: repeat-x;
|
336 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
337 |
+
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
338 |
+
border-color: #888 transparent transparent transparent;
|
339 |
+
border-style: solid;
|
340 |
+
border-width: 5px 4px 0 4px;
|
341 |
+
height: 0;
|
342 |
+
left: 50%;
|
343 |
+
margin-left: -4px;
|
344 |
+
margin-top: -2px;
|
345 |
+
position: absolute;
|
346 |
+
top: 50%;
|
347 |
+
width: 0; }
|
348 |
+
|
349 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
350 |
+
float: left; }
|
351 |
+
|
352 |
+
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
353 |
+
border: none;
|
354 |
+
border-right: 1px solid #aaa;
|
355 |
+
border-radius: 0;
|
356 |
+
border-top-left-radius: 4px;
|
357 |
+
border-bottom-left-radius: 4px;
|
358 |
+
left: 1px;
|
359 |
+
right: auto; }
|
360 |
+
|
361 |
+
.select2-container--classic.select2-container--open .select2-selection--single {
|
362 |
+
border: 1px solid #5897fb; }
|
363 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
364 |
+
background: transparent;
|
365 |
+
border: none; }
|
366 |
+
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
367 |
+
border-color: transparent transparent #888 transparent;
|
368 |
+
border-width: 0 4px 5px 4px; }
|
369 |
+
|
370 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
371 |
+
border-top: none;
|
372 |
+
border-top-left-radius: 0;
|
373 |
+
border-top-right-radius: 0;
|
374 |
+
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
375 |
+
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
376 |
+
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
377 |
+
background-repeat: repeat-x;
|
378 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
379 |
+
|
380 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
381 |
+
border-bottom: none;
|
382 |
+
border-bottom-left-radius: 0;
|
383 |
+
border-bottom-right-radius: 0;
|
384 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
385 |
+
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
386 |
+
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
387 |
+
background-repeat: repeat-x;
|
388 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
389 |
+
|
390 |
+
.select2-container--classic .select2-selection--multiple {
|
391 |
+
background-color: white;
|
392 |
+
border: 1px solid #aaa;
|
393 |
+
border-radius: 4px;
|
394 |
+
cursor: text;
|
395 |
+
outline: 0; }
|
396 |
+
.select2-container--classic .select2-selection--multiple:focus {
|
397 |
+
border: 1px solid #5897fb; }
|
398 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
399 |
+
list-style: none;
|
400 |
+
margin: 0;
|
401 |
+
padding: 0 5px; }
|
402 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
403 |
+
display: none; }
|
404 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
405 |
+
background-color: #e4e4e4;
|
406 |
+
border: 1px solid #aaa;
|
407 |
+
border-radius: 4px;
|
408 |
+
cursor: default;
|
409 |
+
float: left;
|
410 |
+
margin-right: 5px;
|
411 |
+
margin-top: 5px;
|
412 |
+
padding: 0 5px; }
|
413 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
414 |
+
color: #888;
|
415 |
+
cursor: pointer;
|
416 |
+
display: inline-block;
|
417 |
+
font-weight: bold;
|
418 |
+
margin-right: 2px; }
|
419 |
+
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
420 |
+
color: #555; }
|
421 |
+
|
422 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
423 |
+
float: right; }
|
424 |
+
|
425 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
426 |
+
margin-left: 5px;
|
427 |
+
margin-right: auto; }
|
428 |
+
|
429 |
+
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
430 |
+
margin-left: 2px;
|
431 |
+
margin-right: auto; }
|
432 |
+
|
433 |
+
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
434 |
+
border: 1px solid #5897fb; }
|
435 |
+
|
436 |
+
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
437 |
+
border-top: none;
|
438 |
+
border-top-left-radius: 0;
|
439 |
+
border-top-right-radius: 0; }
|
440 |
+
|
441 |
+
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
442 |
+
border-bottom: none;
|
443 |
+
border-bottom-left-radius: 0;
|
444 |
+
border-bottom-right-radius: 0; }
|
445 |
+
|
446 |
+
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
447 |
+
border: 1px solid #aaa;
|
448 |
+
outline: 0; }
|
449 |
+
|
450 |
+
.select2-container--classic .select2-search--inline .select2-search__field {
|
451 |
+
outline: 0;
|
452 |
+
box-shadow: none; }
|
453 |
+
|
454 |
+
.select2-container--classic .select2-dropdown {
|
455 |
+
background-color: white;
|
456 |
+
border: 1px solid transparent; }
|
457 |
+
|
458 |
+
.select2-container--classic .select2-dropdown--above {
|
459 |
+
border-bottom: none; }
|
460 |
+
|
461 |
+
.select2-container--classic .select2-dropdown--below {
|
462 |
+
border-top: none; }
|
463 |
+
|
464 |
+
.select2-container--classic .select2-results > .select2-results__options {
|
465 |
+
max-height: 200px;
|
466 |
+
overflow-y: auto; }
|
467 |
+
|
468 |
+
.select2-container--classic .select2-results__option[role=group] {
|
469 |
+
padding: 0; }
|
470 |
+
|
471 |
+
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
472 |
+
color: grey; }
|
473 |
+
|
474 |
+
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
475 |
+
background-color: #3875d7;
|
476 |
+
color: white; }
|
477 |
+
|
478 |
+
.select2-container--classic .select2-results__group {
|
479 |
+
cursor: default;
|
480 |
+
display: block;
|
481 |
+
padding: 6px; }
|
482 |
+
|
483 |
+
.select2-container--classic.select2-container--open .select2-dropdown {
|
484 |
+
border-color: #5897fb; }
|
inc/libraries/meta-box/css/slider.css
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
-
.rwmb-slider {
|
2 |
-
display: inline-block;
|
3 |
-
vertical-align: middle;
|
4 |
-
width: 50%;
|
5 |
-
}
|
6 |
-
.rwmb-slider-value-label {
|
7 |
-
margin-left: 10px;
|
8 |
-
vertical-align: middle;
|
9 |
-
}
|
10 |
-
/* Fix slider handle being visible through jQuery panel */
|
11 |
-
.ui-slider .ui-slider-handle {
|
12 |
-
z-index: 1;
|
13 |
-
}
|
1 |
+
.rwmb-slider {
|
2 |
+
display: inline-block;
|
3 |
+
vertical-align: middle;
|
4 |
+
width: 50%;
|
5 |
+
}
|
6 |
+
.rwmb-slider-value-label {
|
7 |
+
margin-left: 10px;
|
8 |
+
vertical-align: middle;
|
9 |
+
}
|
10 |
+
/* Fix slider handle being visible through jQuery panel */
|
11 |
+
.ui-slider .ui-slider-handle {
|
12 |
+
z-index: 1;
|
13 |
+
}
|
inc/libraries/meta-box/css/style-rtl.css
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
.rwmb-label, .rwmb-input{
|
2 |
-
float: right;
|
3 |
-
}
|
4 |
-
label.error{
|
5 |
-
padding-left: auto;
|
6 |
-
padding-right: 3px;
|
7 |
-
}
|
8 |
-
.rwmb-button.remove-clone {
|
9 |
-
right: auto;
|
10 |
-
left: 0;
|
11 |
-
}
|
1 |
+
.rwmb-label, .rwmb-input{
|
2 |
+
float: right;
|
3 |
+
}
|
4 |
+
label.error{
|
5 |
+
padding-left: auto;
|
6 |
+
padding-right: 3px;
|
7 |
+
}
|
8 |
+
.rwmb-button.remove-clone {
|
9 |
+
right: auto;
|
10 |
+
left: 0;
|
11 |
+
}
|
inc/libraries/meta-box/css/style.css
CHANGED
@@ -1,143 +1,143 @@
|
|
1 |
-
/* Styles for 'normal' meta boxes
|
2 |
-
-------------------------------------------------------------- */
|
3 |
-
|
4 |
-
/* Clearfix for field */
|
5 |
-
.rwmb-field:before,
|
6 |
-
.rwmb-field:after {
|
7 |
-
content: " ";
|
8 |
-
display: table;
|
9 |
-
}
|
10 |
-
.rwmb-field:after {
|
11 |
-
clear: both;
|
12 |
-
}
|
13 |
-
.rwmb-field:not(:last-of-type) {
|
14 |
-
*zoom: 1;
|
15 |
-
|
16 |
-
margin: 0 0 12px;
|
17 |
-
}
|
18 |
-
.rwmb-label,
|
19 |
-
.rwmb-input {
|
20 |
-
vertical-align: top;
|
21 |
-
float: left;
|
22 |
-
}
|
23 |
-
.rwmb-label {
|
24 |
-
width: 25%;
|
25 |
-
}
|
26 |
-
.rwmb-label > label {
|
27 |
-
font-weight: 600;
|
28 |
-
}
|
29 |
-
.rwmb-required {
|
30 |
-
color: #dc3232;
|
31 |
-
font-weight: bold;
|
32 |
-
margin-left: 3px;
|
33 |
-
}
|
34 |
-
|
35 |
-
/* 75% if field has label, 100% if no label */
|
36 |
-
.rwmb-input {
|
37 |
-
width: 100%;
|
38 |
-
}
|
39 |
-
.rwmb-label ~ .rwmb-input {
|
40 |
-
width: 75%;
|
41 |
-
}
|
42 |
-
.rwmb-input h4 {
|
43 |
-
margin: 0;
|
44 |
-
}
|
45 |
-
.rwmb-textarea {
|
46 |
-
resize: vertical;
|
47 |
-
}
|
48 |
-
|
49 |
-
/* Clone */
|
50 |
-
.rwmb-clone {
|
51 |
-
min-height: 24px;
|
52 |
-
margin-bottom: 12px;
|
53 |
-
position: relative;
|
54 |
-
clear: both;
|
55 |
-
background: #fff;
|
56 |
-
}
|
57 |
-
.rwmb-clone > input[type='radio'],
|
58 |
-
.rwmb-clone > input[type='checkbox'] {
|
59 |
-
margin: 6px 0 0 4px;
|
60 |
-
}
|
61 |
-
.rwmb-button.remove-clone {
|
62 |
-
text-decoration: none;
|
63 |
-
color: #fff;
|
64 |
-
background: #e74c3c;
|
65 |
-
border-radius: 50%;
|
66 |
-
display: inline-block;
|
67 |
-
position: absolute;
|
68 |
-
top: 0;
|
69 |
-
right: 0;
|
70 |
-
}
|
71 |
-
.rwmb-button.remove-clone .dashicons {
|
72 |
-
font-size: 14px;
|
73 |
-
line-height: 20px;
|
74 |
-
}
|
75 |
-
.remove-clone:focus {
|
76 |
-
outline: 0;
|
77 |
-
box-shadow: none;
|
78 |
-
}
|
79 |
-
.rwmb-button.add-clone {
|
80 |
-
margin-top: 5px;
|
81 |
-
}
|
82 |
-
.rwmb-clone-icon {
|
83 |
-
cursor: move;
|
84 |
-
background: url(../img/drag_icon.gif) no-repeat;
|
85 |
-
height: 23px;
|
86 |
-
width: 15px;
|
87 |
-
vertical-align: top;
|
88 |
-
display: inline-block;
|
89 |
-
position: absolute;
|
90 |
-
left: 0;
|
91 |
-
top: 0;
|
92 |
-
}
|
93 |
-
.rwmb-sort-clone {
|
94 |
-
padding-left: 15px;
|
95 |
-
}
|
96 |
-
|
97 |
-
/* jQuery validation */
|
98 |
-
p.rwmb-error {
|
99 |
-
color: #dc3232;
|
100 |
-
margin: 2px 0 5px;
|
101 |
-
}
|
102 |
-
input.rwmb-error.rwmb-error,
|
103 |
-
textarea.rwmb-error,
|
104 |
-
select.rwmb-error {
|
105 |
-
border-color: #dc3232;
|
106 |
-
background: #ffebe8;
|
107 |
-
}
|
108 |
-
|
109 |
-
/* Utilities
|
110 |
-
-------------------------------------------------------------- */
|
111 |
-
.rwmb-sortable-placeholder {
|
112 |
-
background: #fcf8e3;
|
113 |
-
border: 1px solid #faebcc;
|
114 |
-
display: block;
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
/* Styles for 'side' meta boxes
|
119 |
-
-------------------------------------------------------------- */
|
120 |
-
|
121 |
-
#side-sortables .rwmb-label,
|
122 |
-
#side-sortables .rwmb-input {
|
123 |
-
width: 100%;
|
124 |
-
}
|
125 |
-
|
126 |
-
/* Seamless style
|
127 |
-
--------------------------------------------------------------*/
|
128 |
-
.rwmb-seamless {
|
129 |
-
background: none;
|
130 |
-
border: none;
|
131 |
-
box-shadow: none;
|
132 |
-
}
|
133 |
-
.rwmb-seamless .inside {
|
134 |
-
padding-left: 0;
|
135 |
-
padding-right: 0;
|
136 |
-
}
|
137 |
-
.postbox.rwmb-seamless .hndle,
|
138 |
-
.postbox.rwmb-seamless .handlediv {
|
139 |
-
display: none;
|
140 |
-
}
|
141 |
-
.rwmb-seamless .rwmb-clone {
|
142 |
-
background: none;
|
143 |
-
}
|
1 |
+
/* Styles for 'normal' meta boxes
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
/* Clearfix for field */
|
5 |
+
.rwmb-field:before,
|
6 |
+
.rwmb-field:after {
|
7 |
+
content: " ";
|
8 |
+
display: table;
|
9 |
+
}
|
10 |
+
.rwmb-field:after {
|
11 |
+
clear: both;
|
12 |
+
}
|
13 |
+
.rwmb-field:not(:last-of-type) {
|
14 |
+
*zoom: 1;
|
15 |
+
|
16 |
+
margin: 0 0 12px;
|
17 |
+
}
|
18 |
+
.rwmb-label,
|
19 |
+
.rwmb-input {
|
20 |
+
vertical-align: top;
|
21 |
+
float: left;
|
22 |
+
}
|
23 |
+
.rwmb-label {
|
24 |
+
width: 25%;
|
25 |
+
}
|
26 |
+
.rwmb-label > label {
|
27 |
+
font-weight: 600;
|
28 |
+
}
|
29 |
+
.rwmb-required {
|
30 |
+
color: #dc3232;
|
31 |
+
font-weight: bold;
|
32 |
+
margin-left: 3px;
|
33 |
+
}
|
34 |
+
|
35 |
+
/* 75% if field has label, 100% if no label */
|
36 |
+
.rwmb-input {
|
37 |
+
width: 100%;
|
38 |
+
}
|
39 |
+
.rwmb-label ~ .rwmb-input {
|
40 |
+
width: 75%;
|
41 |
+
}
|
42 |
+
.rwmb-input h4 {
|
43 |
+
margin: 0;
|
44 |
+
}
|
45 |
+
.rwmb-textarea {
|
46 |
+
resize: vertical;
|
47 |
+
}
|
48 |
+
|
49 |
+
/* Clone */
|
50 |
+
.rwmb-clone {
|
51 |
+
min-height: 24px;
|
52 |
+
margin-bottom: 12px;
|
53 |
+
position: relative;
|
54 |
+
clear: both;
|
55 |
+
background: #fff;
|
56 |
+
}
|
57 |
+
.rwmb-clone > input[type='radio'],
|
58 |
+
.rwmb-clone > input[type='checkbox'] {
|
59 |
+
margin: 6px 0 0 4px;
|
60 |
+
}
|
61 |
+
.rwmb-button.remove-clone {
|
62 |
+
text-decoration: none;
|
63 |
+
color: #fff;
|
64 |
+
background: #e74c3c;
|
65 |
+
border-radius: 50%;
|
66 |
+
display: inline-block;
|
67 |
+
position: absolute;
|
68 |
+
top: 0;
|
69 |
+
right: 0;
|
70 |
+
}
|
71 |
+
.rwmb-button.remove-clone .dashicons {
|
72 |
+
font-size: 14px;
|
73 |
+
line-height: 20px;
|
74 |
+
}
|
75 |
+
.remove-clone:focus {
|
76 |
+
outline: 0;
|
77 |
+
box-shadow: none;
|
78 |
+
}
|
79 |
+
.rwmb-button.add-clone {
|
80 |
+
margin-top: 5px;
|
81 |
+
}
|
82 |
+
.rwmb-clone-icon {
|
83 |
+
cursor: move;
|
84 |
+
background: url(../img/drag_icon.gif) no-repeat;
|
85 |
+
height: 23px;
|
86 |
+
width: 15px;
|
87 |
+
vertical-align: top;
|
88 |
+
display: inline-block;
|
89 |
+
position: absolute;
|
90 |
+
left: 0;
|
91 |
+
top: 0;
|
92 |
+
}
|
93 |
+
.rwmb-sort-clone {
|
94 |
+
padding-left: 15px;
|
95 |
+
}
|
96 |
+
|
97 |
+
/* jQuery validation */
|
98 |
+
p.rwmb-error {
|
99 |
+
color: #dc3232;
|
100 |
+
margin: 2px 0 5px;
|
101 |
+
}
|
102 |
+
input.rwmb-error.rwmb-error,
|
103 |
+
textarea.rwmb-error,
|
104 |
+
select.rwmb-error {
|
105 |
+
border-color: #dc3232;
|
106 |
+
background: #ffebe8;
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Utilities
|
110 |
+
-------------------------------------------------------------- */
|
111 |
+
.rwmb-sortable-placeholder {
|
112 |
+
background: #fcf8e3;
|
113 |
+
border: 1px solid #faebcc;
|
114 |
+
display: block;
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
/* Styles for 'side' meta boxes
|
119 |
+
-------------------------------------------------------------- */
|
120 |
+
|
121 |
+
#side-sortables .rwmb-label,
|
122 |
+
#side-sortables .rwmb-input {
|
123 |
+
width: 100%;
|
124 |
+
}
|
125 |
+
|
126 |
+
/* Seamless style
|
127 |
+
--------------------------------------------------------------*/
|
128 |
+
.rwmb-seamless {
|
129 |
+
background: none;
|
130 |
+
border: none;
|
131 |
+
box-shadow: none;
|
132 |
+
}
|
133 |
+
.rwmb-seamless .inside {
|
134 |
+
padding-left: 0;
|
135 |
+
padding-right: 0;
|
136 |
+
}
|
137 |
+
.postbox.rwmb-seamless .hndle,
|
138 |
+
.postbox.rwmb-seamless .handlediv {
|
139 |
+
display: none;
|
140 |
+
}
|
141 |
+
.rwmb-seamless .rwmb-clone {
|
142 |
+
background: none;
|
143 |
+
}
|
inc/libraries/meta-box/css/switch.css
CHANGED
@@ -1,94 +1,94 @@
|
|
1 |
-
/* style switch
|
2 |
-
-----------------------------*/
|
3 |
-
.rwmb-switch-label {
|
4 |
-
position: relative;
|
5 |
-
display: inline-block;
|
6 |
-
background-color: #ccc;
|
7 |
-
padding: 2px;
|
8 |
-
border-radius: 3px;
|
9 |
-
min-width: 40px;
|
10 |
-
height: 22px;
|
11 |
-
box-sizing: border-box;
|
12 |
-
}
|
13 |
-
|
14 |
-
.rwmb-switch.rwmb-switch {
|
15 |
-
display: none;
|
16 |
-
}
|
17 |
-
|
18 |
-
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-slider {
|
19 |
-
background-color: #0073aa;
|
20 |
-
box-shadow: 0 0 1px #0073aa;
|
21 |
-
}
|
22 |
-
|
23 |
-
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-slider:before {
|
24 |
-
left: calc(100% - 20px);
|
25 |
-
}
|
26 |
-
|
27 |
-
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-off {
|
28 |
-
visibility: hidden;
|
29 |
-
display: none;
|
30 |
-
}
|
31 |
-
|
32 |
-
.rwmb-switch:not(:checked) + .rwmb-switch-status .rwmb-switch-on {
|
33 |
-
visibility: hidden;
|
34 |
-
display: none;
|
35 |
-
}
|
36 |
-
|
37 |
-
.rwmb-switch-slider {
|
38 |
-
position: absolute;
|
39 |
-
cursor: pointer;
|
40 |
-
top: 0;
|
41 |
-
left: 0;
|
42 |
-
right: 0;
|
43 |
-
bottom: 0;
|
44 |
-
z-index: 15;
|
45 |
-
-webkit-transition: .4s;
|
46 |
-
transition: .4s;
|
47 |
-
}
|
48 |
-
|
49 |
-
.rwmb-switch-slider:before {
|
50 |
-
position: absolute;
|
51 |
-
content: attr(title-before) "";
|
52 |
-
height: 18px;
|
53 |
-
width: 18px;
|
54 |
-
left: 2px;
|
55 |
-
bottom: 2px;
|
56 |
-
z-index: 99;
|
57 |
-
background-color: white;
|
58 |
-
-webkit-transition: .4s;
|
59 |
-
transition: .4s;
|
60 |
-
border-radius: 2px;
|
61 |
-
}
|
62 |
-
|
63 |
-
.rwmb-switch-label--square .rwmb-switch-slider {
|
64 |
-
border-radius: 3px;
|
65 |
-
}
|
66 |
-
|
67 |
-
.rwmb-switch-label--rounded,
|
68 |
-
.rwmb-switch-label--rounded .rwmb-switch-slider {
|
69 |
-
border-radius: 34px;
|
70 |
-
}
|
71 |
-
|
72 |
-
.rwmb-switch-label--rounded .rwmb-switch-slider:before {
|
73 |
-
border-radius: 50%;
|
74 |
-
}
|
75 |
-
|
76 |
-
.rwmb-switch-on,
|
77 |
-
.rwmb-switch-off {
|
78 |
-
display: inline-block;
|
79 |
-
float: left;
|
80 |
-
margin: 0 4px;
|
81 |
-
color: #fff;
|
82 |
-
text-transform: uppercase;
|
83 |
-
font-size: 11px;
|
84 |
-
position: relative;
|
85 |
-
z-index: 20;
|
86 |
-
}
|
87 |
-
|
88 |
-
.rwmb-switch-on {
|
89 |
-
padding-right: 20px;
|
90 |
-
}
|
91 |
-
|
92 |
-
.rwmb-switch-off {
|
93 |
-
padding-left: 20px;
|
94 |
-
}
|
1 |
+
/* style switch
|
2 |
+
-----------------------------*/
|
3 |
+
.rwmb-switch-label {
|
4 |
+
position: relative;
|
5 |
+
display: inline-block;
|
6 |
+
background-color: #ccc;
|
7 |
+
padding: 2px;
|
8 |
+
border-radius: 3px;
|
9 |
+
min-width: 40px;
|
10 |
+
height: 22px;
|
11 |
+
box-sizing: border-box;
|
12 |
+
}
|
13 |
+
|
14 |
+
.rwmb-switch.rwmb-switch {
|
15 |
+
display: none;
|
16 |
+
}
|
17 |
+
|
18 |
+
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-slider {
|
19 |
+
background-color: #0073aa;
|
20 |
+
box-shadow: 0 0 1px #0073aa;
|
21 |
+
}
|
22 |
+
|
23 |
+
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-slider:before {
|
24 |
+
left: calc(100% - 20px);
|
25 |
+
}
|
26 |
+
|
27 |
+
.rwmb-switch:checked + .rwmb-switch-status .rwmb-switch-off {
|
28 |
+
visibility: hidden;
|
29 |
+
display: none;
|
30 |
+
}
|
31 |
+
|
32 |
+
.rwmb-switch:not(:checked) + .rwmb-switch-status .rwmb-switch-on {
|
33 |
+
visibility: hidden;
|
34 |
+
display: none;
|
35 |
+
}
|
36 |
+
|
37 |
+
.rwmb-switch-slider {
|
38 |
+
position: absolute;
|
39 |
+
cursor: pointer;
|
40 |
+
top: 0;
|
41 |
+
left: 0;
|
42 |
+
right: 0;
|
43 |
+
bottom: 0;
|
44 |
+
z-index: 15;
|
45 |
+
-webkit-transition: .4s;
|
46 |
+
transition: .4s;
|
47 |
+
}
|
48 |
+
|
49 |
+
.rwmb-switch-slider:before {
|
50 |
+
position: absolute;
|
51 |
+
content: attr(title-before) "";
|
52 |
+
height: 18px;
|
53 |
+
width: 18px;
|
54 |
+
left: 2px;
|
55 |
+
bottom: 2px;
|
56 |
+
z-index: 99;
|
57 |
+
background-color: white;
|
58 |
+
-webkit-transition: .4s;
|
59 |
+
transition: .4s;
|
60 |
+
border-radius: 2px;
|
61 |
+
}
|
62 |
+
|
63 |
+
.rwmb-switch-label--square .rwmb-switch-slider {
|
64 |
+
border-radius: 3px;
|
65 |
+
}
|
66 |
+
|
67 |
+
.rwmb-switch-label--rounded,
|
68 |
+
.rwmb-switch-label--rounded .rwmb-switch-slider {
|
69 |
+
border-radius: 34px;
|
70 |
+
}
|
71 |
+
|
72 |
+
.rwmb-switch-label--rounded .rwmb-switch-slider:before {
|
73 |
+
border-radius: 50%;
|
74 |
+
}
|
75 |
+
|
76 |
+
.rwmb-switch-on,
|
77 |
+
.rwmb-switch-off {
|
78 |
+
display: inline-block;
|
79 |
+
float: left;
|
80 |
+
margin: 0 4px;
|
81 |
+
color: #fff;
|
82 |
+
text-transform: uppercase;
|
83 |
+
font-size: 11px;
|
84 |
+
position: relative;
|
85 |
+
z-index: 20;
|
86 |
+
}
|
87 |
+
|
88 |
+
.rwmb-switch-on {
|
89 |
+
padding-right: 20px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.rwmb-switch-off {
|
93 |
+
padding-left: 20px;
|
94 |
+
}
|
inc/libraries/meta-box/css/text-list.css
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
.rwmb-text_list-non-cloneable > .rwmb-input,
|
2 |
-
.rwmb-text_list-clone {
|
3 |
-
display: flex;
|
4 |
-
flex-wrap: wrap;
|
5 |
-
}
|
6 |
-
.rwmb-text_list-non-cloneable > .rwmb-input > label,
|
7 |
-
.rwmb-text_list-clone > label {
|
8 |
-
margin: 0 10px 10px 0;
|
9 |
-
}
|
10 |
-
.rwmb-text_list-non-cloneable > .rwmb-input > label:last-child,
|
11 |
-
.rwmb-text_list-clone > label:last-child {
|
12 |
-
margin-right: 0;
|
13 |
-
}
|
14 |
-
|
15 |
-
.rwmb-text-list-label {
|
16 |
-
font-weight: 600;
|
17 |
-
display: block;
|
18 |
-
margin-bottom: 5px;
|
19 |
-
}
|
1 |
+
.rwmb-text_list-non-cloneable > .rwmb-input,
|
2 |
+
.rwmb-text_list-clone {
|
3 |
+
display: flex;
|
4 |
+
flex-wrap: wrap;
|
5 |
+
}
|
6 |
+
.rwmb-text_list-non-cloneable > .rwmb-input > label,
|
7 |
+
.rwmb-text_list-clone > label {
|
8 |
+
margin: 0 10px 10px 0;
|
9 |
+
}
|
10 |
+
.rwmb-text_list-non-cloneable > .rwmb-input > label:last-child,
|
11 |
+
.rwmb-text_list-clone > label:last-child {
|
12 |
+
margin-right: 0;
|
13 |
+
}
|
14 |
+
|
15 |
+
.rwmb-text-list-label {
|
16 |
+
font-weight: 600;
|
17 |
+
display: block;
|
18 |
+
margin-bottom: 5px;
|
19 |
+
}
|
inc/libraries/meta-box/css/upload.css
CHANGED
@@ -1,28 +1,28 @@
|
|
1 |
-
.rwmb-upload-area {
|
2 |
-
position: relative;
|
3 |
-
padding-top: 0;
|
4 |
-
margin-top: 0;
|
5 |
-
height: 200px;
|
6 |
-
border: 4px dashed #ddd;
|
7 |
-
}
|
8 |
-
.rwmb-upload-inside {
|
9 |
-
text-align: center;
|
10 |
-
position: absolute;
|
11 |
-
left: 0;
|
12 |
-
right: 0;
|
13 |
-
top: 50%;
|
14 |
-
transform: translateY(-50%);
|
15 |
-
-webkit-transform: translateY(-50%);
|
16 |
-
-moz-transform: translateY(-50%);
|
17 |
-
-ms-transform: translateY(-50%);
|
18 |
-
margin-top: 10px;
|
19 |
-
}
|
20 |
-
.rwmb-upload-inside p, .rwmb-upload-inside h3 {
|
21 |
-
text-align: center;
|
22 |
-
}
|
23 |
-
.rwmb-upload-inside h3 {
|
24 |
-
font-size: 20px;
|
25 |
-
line-height: 28px;
|
26 |
-
font-weight: 400;
|
27 |
-
margin: 0;
|
28 |
-
}
|
1 |
+
.rwmb-upload-area {
|
2 |
+
position: relative;
|
3 |
+
padding-top: 0;
|
4 |
+
margin-top: 0;
|
5 |
+
height: 200px;
|
6 |
+
border: 4px dashed #ddd;
|
7 |
+
}
|
8 |
+
.rwmb-upload-inside {
|
9 |
+
text-align: center;
|
10 |
+
position: absolute;
|
11 |
+
left: 0;
|
12 |
+
right: 0;
|
13 |
+
top: 50%;
|
14 |
+
transform: translateY(-50%);
|
15 |
+
-webkit-transform: translateY(-50%);
|
16 |
+
-moz-transform: translateY(-50%);
|
17 |
+
-ms-transform: translateY(-50%);
|
18 |
+
margin-top: 10px;
|
19 |
+
}
|
20 |
+
.rwmb-upload-inside p, .rwmb-upload-inside h3 {
|
21 |
+
text-align: center;
|
22 |
+
}
|
23 |
+
.rwmb-upload-inside h3 {
|
24 |
+
font-size: 20px;
|
25 |
+
line-height: 28px;
|
26 |
+
font-weight: 400;
|
27 |
+
margin: 0;
|
28 |
+
}
|
inc/libraries/meta-box/css/video.css
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
/* Video */
|
2 |
-
.rwmb-video-item {
|
3 |
-
position: relative;
|
4 |
-
float: left;
|
5 |
-
padding: 0;
|
6 |
-
margin: 0 5px 5px 0;
|
7 |
-
box-sizing: border-box;
|
8 |
-
width: 300px;
|
9 |
-
}
|
10 |
-
|
11 |
-
.rwmb-video-item .rwmb-media-preview {
|
12 |
-
width: 100%;
|
13 |
-
float: none;
|
14 |
-
background: #EEE;
|
15 |
-
}
|
16 |
-
|
17 |
-
.rwmb-video-item video {
|
18 |
-
width: auto;
|
19 |
-
height: 100%;
|
20 |
-
}
|
21 |
-
|
22 |
-
.rwmb-video-item .rwmb-media-info {
|
23 |
-
margin-left: 0;
|
24 |
-
padding: 10px;
|
25 |
-
}
|
1 |
+
/* Video */
|
2 |
+
.rwmb-video-item {
|
3 |
+
position: relative;
|
4 |
+
float: left;
|
5 |
+
padding: 0;
|
6 |
+
margin: 0 5px 5px 0;
|
7 |
+
box-sizing: border-box;
|
8 |
+
width: 300px;
|
9 |
+
}
|
10 |
+
|
11 |
+
.rwmb-video-item .rwmb-media-preview {
|
12 |
+
width: 100%;
|
13 |
+
float: none;
|
14 |
+
background: #EEE;
|
15 |
+
}
|
16 |
+
|
17 |
+
.rwmb-video-item video {
|
18 |
+
width: auto;
|
19 |
+
height: 100%;
|
20 |
+
}
|
21 |
+
|
22 |
+
.rwmb-video-item .rwmb-media-info {
|
23 |
+
margin-left: 0;
|
24 |
+
padding: 10px;
|
25 |
+
}
|
inc/libraries/meta-box/css/wysiwyg.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
.rwmb-field .mceIframeContainer {
|
2 |
-
background: #fff;
|
3 |
-
}
|
4 |
-
.rwmb-wysiwyg-clone {
|
5 |
-
padding-top: 20px;
|
6 |
-
}
|
1 |
+
.rwmb-field .mceIframeContainer {
|
2 |
+
background: #fff;
|
3 |
+
}
|
4 |
+
.rwmb-wysiwyg-clone {
|
5 |
+
padding-top: 20px;
|
6 |
+
}
|
inc/libraries/meta-box/inc/about/about.php
CHANGED
@@ -1,230 +1,230 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Add about page for the Meta Box plugin.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* About page class.
|
10 |
-
*/
|
11 |
-
class RWMB_About {
|
12 |
-
/**
|
13 |
-
* Plugin data.
|
14 |
-
*
|
15 |
-
* @var array
|
16 |
-
*/
|
17 |
-
protected $plugin;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Init hooks.
|
21 |
-
*/
|
22 |
-
public function init() {
|
23 |
-
if ( ! function_exists( 'get_plugin_data' ) ) {
|
24 |
-
include ABSPATH . 'wp-admin/includes/plugin.php';
|
25 |
-
}
|
26 |
-
$this->plugin = get_plugin_data( RWMB_DIR . 'meta-box.php' );
|
27 |
-
|
28 |
-
// Add links to about page in the plugin action links.
|
29 |
-
add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ) );
|
30 |
-
|
31 |
-
// Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.
|
32 |
-
add_action( 'admin_menu', array( $this, 'add_menu' ), 5 );
|
33 |
-
add_action( 'admin_menu', array( $this, 'add_submenu' ), 5 );
|
34 |
-
|
35 |
-
// If no admin menu, then hide the About page.
|
36 |
-
add_action( 'admin_head', array( $this, 'hide_page' ) );
|
37 |
-
|
38 |
-
// Redirect to about page after activation.
|
39 |
-
add_action( 'activated_plugin', array( $this, 'redirect' ), 10, 2 );
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Add links to About page.
|
44 |
-
*
|
45 |
-
* @param array $links Array of plugin links.
|
46 |
-
*
|
47 |
-
* @return array
|
48 |
-
*/
|
49 |
-
public function plugin_links( $links ) {
|
50 |
-
$links[] = '<a href="' . esc_url( $this->get_menu_link() ) . '">' . esc_html__( 'About', 'meta-box' ) . '</a>';
|
51 |
-
return $links;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Register admin page.
|
56 |
-
*/
|
57 |
-
public function add_menu() {
|
58 |
-
if ( ! $this->has_menu() ) {
|
59 |
-
return;
|
60 |
-
}
|
61 |
-
add_menu_page(
|
62 |
-
__( 'Meta Box', 'meta-box' ),
|
63 |
-
__( 'Meta Box', 'meta-box' ),
|
64 |
-
'activate_plugins',
|
65 |
-
'meta-box',
|
66 |
-
'__return_null',
|
67 |
-
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIxNjQuMzI4IDE0OS40NDEgNTMuNDcgNDIuNjYiIHdpZHRoPSI1My40NyIgaGVpZ2h0PSI0Mi42NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNIDIwNC42NjggMTc5LjM5MSBMIDIwNS40ODggMTYwLjU1MSBMIDIwNS4zMTggMTYwLjUyMSBMIDE5My44ODggMTkyLjEwMSBMIDE4OC4xNDggMTkyLjEwMSBMIDE3Ni43NzggMTYwLjY0MSBMIDE3Ni42MDggMTYwLjY2MSBMIDE3Ny40MjggMTc5LjM5MSBMIDE3Ny40MjggMTg2LjA5MSBMIDE4MS45OTggMTg2Ljk3MSBMIDE4MS45OTggMTkyLjEwMSBMIDE2NC4zMjggMTkyLjEwMSBMIDE2NC4zMjggMTg2Ljk3MSBMIDE2OC44NjggMTg2LjA5MSBMIDE2OC44NjggMTU1LjQ4MSBMIDE2NC4zMjggMTU0LjYwMSBMIDE2NC4zMjggMTQ5LjQ0MSBMIDE2OC44NjggMTQ5LjQ0MSBMIDE4MC4wMjggMTQ5LjQ0MSBMIDE5MC44OTggMTgwLjg4MSBMIDE5MS4wNzggMTgwLjg4MSBMIDIwMi4wMzggMTQ5LjQ0MSBMIDIxNy43OTggMTQ5LjQ0MSBMIDIxNy43OTggMTU0LjYwMSBMIDIxMy4yMjggMTU1LjQ4MSBMIDIxMy4yMjggMTg2LjA5MSBMIDIxNy43OTggMTg2Ljk3MSBMIDIxNy43OTggMTkyLjEwMSBMIDIwMC4xMjggMTkyLjEwMSBMIDIwMC4xMjggMTg2Ljk3MSBMIDIwNC42NjggMTg2LjA5MSBMIDIwNC42NjggMTc5LjM5MSBaIiBzdHlsZT0iZmlsbDogcmdiKDE1OCwgMTYzLCAxNjgpOyB3aGl0ZS1zcGFjZTogcHJlOyIvPgo8L3N2Zz4='
|
68 |
-
);
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Add submenu for the About page.
|
73 |
-
*/
|
74 |
-
public function add_submenu() {
|
75 |
-
$parent_menu = $this->has_menu() ? 'meta-box' : $this->get_parent_menu();
|
76 |
-
$about = add_submenu_page(
|
77 |
-
$parent_menu,
|
78 |
-
__( 'Welcome to Meta Box', 'meta-box' ),
|
79 |
-
__( 'Dashboard', 'meta-box' ),
|
80 |
-
'activate_plugins',
|
81 |
-
'meta-box',
|
82 |
-
array( $this, 'render' )
|
83 |
-
);
|
84 |
-
add_action( "load-$about", array( $this, 'load_about' ) );
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Functions and hooks for about page.
|
89 |
-
*/
|
90 |
-
public function load_about() {
|
91 |
-
$this->enqueue();
|
92 |
-
add_filter( 'admin_footer_text', array( $this, 'change_footer_text' ) );
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Hide about page from the admin menu.
|
97 |
-
*/
|
98 |
-
public function hide_page() {
|
99 |
-
remove_submenu_page( $this->get_parent_menu(), 'meta-box' );
|
100 |
-
}
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Render admin page.
|
104 |
-
*/
|
105 |
-
public function render() {
|
106 |
-
?>
|
107 |
-
<div class="wrap">
|
108 |
-
<div id="poststuff">
|
109 |
-
<div id="post-body" class="metabox-holder columns-2">
|
110 |
-
<div id="post-body-content">
|
111 |
-
<div class="about-wrap">
|
112 |
-
<?php
|
113 |
-
include dirname( __FILE__ ) . '/sections/welcome.php';
|
114 |
-
include dirname( __FILE__ ) . '/sections/tabs.php';
|
115 |
-
include dirname( __FILE__ ) . '/sections/getting-started.php';
|
116 |
-
include dirname( __FILE__ ) . '/sections/extensions.php';
|
117 |
-
include dirname( __FILE__ ) . '/sections/support.php';
|
118 |
-
do_action( 'rwmb_about_tabs_content' );
|
119 |
-
?>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
<div id="postbox-container-1" class="postbox-container">
|
123 |
-
<?php
|
124 |
-
include dirname( __FILE__ ) . '/sections/newsletter.php';
|
125 |
-
if ( ! $this->is_premium_user() ) {
|
126 |
-
include dirname( __FILE__ ) . '/sections/upgrade.php';
|
127 |
-
}
|
128 |
-
?>
|
129 |
-
</div>
|
130 |
-
</div>
|
131 |
-
</div>
|
132 |
-
</div>
|
133 |
-
<?php
|
134 |
-
}
|
135 |
-
|
136 |
-
/**
|
137 |
-
* Enqueue CSS and JS.
|
138 |
-
*/
|
139 |
-
public function enqueue() {
|
140 |
-
wp_enqueue_style( 'meta-box-about', RWMB_URL . 'inc/about/css/about.css', array(), RWMB_VER );
|
141 |
-
wp_enqueue_script( 'meta-box-about', RWMB_URL . 'inc/about/js/about.js', array( 'jquery' ), RWMB_VER, true );
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Change WordPress footer text on about page.
|
146 |
-
*/
|
147 |
-
public function change_footer_text() {
|
148 |
-
$allowed_html = array(
|
149 |
-
'a' => array(
|
150 |
-
'href' => array(),
|
151 |
-
'target' => array(),
|
152 |
-
),
|
153 |
-
'strong' => array(),
|
154 |
-
);
|
155 |
-
|
156 |
-
// Translators: %1$s - link to review form.
|
157 |
-
echo wp_kses( sprintf( __( 'Please rate <strong>Meta Box</strong> <a href="%1$s" target="_blank">★★★★★</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Meta Box team!', 'meta-box' ), 'https://wordpress.org/support/view/plugin-reviews/meta-box?filter=5#new-post' ), $allowed_html );
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Redirect to about page after Meta Box has been activated.
|
162 |
-
*
|
163 |
-
* @param string $plugin Path to the main plugin file from plugins directory.
|
164 |
-
* @param bool $network_wide Whether to enable the plugin for all sites in the network
|
165 |
-
* or just the current site. Multisite only. Default is false.
|
166 |
-
*/
|
167 |
-
public function redirect( $plugin, $network_wide ) {
|
168 |
-
if ( 'cli' !== php_sapi_name() && ! $network_wide && 'meta-box/meta-box.php' === $plugin && ! $this->is_bundled() ) {
|
169 |
-
wp_safe_redirect( $this->get_menu_link() );
|
170 |
-
die;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
/**
|
175 |
-
* Get link to the plugin admin menu.
|
176 |
-
*
|
177 |
-
* @return string
|
178 |
-
*/
|
179 |
-
protected function get_menu_link() {
|
180 |
-
$menu = $this->has_menu() ? 'admin.php?page=meta-box' : $this->get_parent_menu() . '?page=meta-box';
|
181 |
-
return admin_url( $menu );
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Get default parent menu, which is Plugins.
|
186 |
-
*
|
187 |
-
* @return string
|
188 |
-
*/
|
189 |
-
protected function get_parent_menu() {
|
190 |
-
return 'plugins.php';
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Check if the plugin has a top-level admin menu.
|
195 |
-
*
|
196 |
-
* @return bool
|
197 |
-
*/
|
198 |
-
protected function has_menu() {
|
199 |
-
return apply_filters( 'rwmb_admin_menu', false );
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Check if Meta Box is bundled by TGM Activation Class.
|
204 |
-
*/
|
205 |
-
protected function is_bundled() {
|
206 |
-
// @codingStandardsIgnoreLine
|
207 |
-
foreach ( $_REQUEST as $key => $value ) {
|
208 |
-
if ( false !== strpos( $key, 'tgmpa' ) || false !== strpos( $value, 'tgmpa' ) ) {
|
209 |
-
return true;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
return false;
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* Check if current user is a premium user.
|
217 |
-
*
|
218 |
-
* @return bool
|
219 |
-
*/
|
220 |
-
protected function is_premium_user() {
|
221 |
-
$option = is_multisite() ? get_site_option( 'meta_box_updater' ) : get_option( 'meta_box_updater' );
|
222 |
-
if ( empty( $option['api_key'] ) ) {
|
223 |
-
return false;
|
224 |
-
}
|
225 |
-
if ( isset( $option['status'] ) && 'success' !== $option['status'] ) {
|
226 |
-
return false;
|
227 |
-
}
|
228 |
-
return true;
|
229 |
-
}
|
230 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Add about page for the Meta Box plugin.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* About page class.
|
10 |
+
*/
|
11 |
+
class RWMB_About {
|
12 |
+
/**
|
13 |
+
* Plugin data.
|
14 |
+
*
|
15 |
+
* @var array
|
16 |
+
*/
|
17 |
+
protected $plugin;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Init hooks.
|
21 |
+
*/
|
22 |
+
public function init() {
|
23 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
24 |
+
include ABSPATH . 'wp-admin/includes/plugin.php';
|
25 |
+
}
|
26 |
+
$this->plugin = get_plugin_data( RWMB_DIR . 'meta-box.php' );
|
27 |
+
|
28 |
+
// Add links to about page in the plugin action links.
|
29 |
+
add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ) );
|
30 |
+
|
31 |
+
// Add a shared top-level admin menu and Dashboard page. Use priority 5 to show Dashboard at the top.
|
32 |
+
add_action( 'admin_menu', array( $this, 'add_menu' ), 5 );
|
33 |
+
add_action( 'admin_menu', array( $this, 'add_submenu' ), 5 );
|
34 |
+
|
35 |
+
// If no admin menu, then hide the About page.
|
36 |
+
add_action( 'admin_head', array( $this, 'hide_page' ) );
|
37 |
+
|
38 |
+
// Redirect to about page after activation.
|
39 |
+
add_action( 'activated_plugin', array( $this, 'redirect' ), 10, 2 );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add links to About page.
|
44 |
+
*
|
45 |
+
* @param array $links Array of plugin links.
|
46 |
+
*
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
public function plugin_links( $links ) {
|
50 |
+
$links[] = '<a href="' . esc_url( $this->get_menu_link() ) . '">' . esc_html__( 'About', 'meta-box' ) . '</a>';
|
51 |
+
return $links;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Register admin page.
|
56 |
+
*/
|
57 |
+
public function add_menu() {
|
58 |
+
if ( ! $this->has_menu() ) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
add_menu_page(
|
62 |
+
__( 'Meta Box', 'meta-box' ),
|
63 |
+
__( 'Meta Box', 'meta-box' ),
|
64 |
+
'activate_plugins',
|
65 |
+
'meta-box',
|
66 |
+
'__return_null',
|
67 |
+
'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIxNjQuMzI4IDE0OS40NDEgNTMuNDcgNDIuNjYiIHdpZHRoPSI1My40NyIgaGVpZ2h0PSI0Mi42NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNIDIwNC42NjggMTc5LjM5MSBMIDIwNS40ODggMTYwLjU1MSBMIDIwNS4zMTggMTYwLjUyMSBMIDE5My44ODggMTkyLjEwMSBMIDE4OC4xNDggMTkyLjEwMSBMIDE3Ni43NzggMTYwLjY0MSBMIDE3Ni42MDggMTYwLjY2MSBMIDE3Ny40MjggMTc5LjM5MSBMIDE3Ny40MjggMTg2LjA5MSBMIDE4MS45OTggMTg2Ljk3MSBMIDE4MS45OTggMTkyLjEwMSBMIDE2NC4zMjggMTkyLjEwMSBMIDE2NC4zMjggMTg2Ljk3MSBMIDE2OC44NjggMTg2LjA5MSBMIDE2OC44NjggMTU1LjQ4MSBMIDE2NC4zMjggMTU0LjYwMSBMIDE2NC4zMjggMTQ5LjQ0MSBMIDE2OC44NjggMTQ5LjQ0MSBMIDE4MC4wMjggMTQ5LjQ0MSBMIDE5MC44OTggMTgwLjg4MSBMIDE5MS4wNzggMTgwLjg4MSBMIDIwMi4wMzggMTQ5LjQ0MSBMIDIxNy43OTggMTQ5LjQ0MSBMIDIxNy43OTggMTU0LjYwMSBMIDIxMy4yMjggMTU1LjQ4MSBMIDIxMy4yMjggMTg2LjA5MSBMIDIxNy43OTggMTg2Ljk3MSBMIDIxNy43OTggMTkyLjEwMSBMIDIwMC4xMjggMTkyLjEwMSBMIDIwMC4xMjggMTg2Ljk3MSBMIDIwNC42NjggMTg2LjA5MSBMIDIwNC42NjggMTc5LjM5MSBaIiBzdHlsZT0iZmlsbDogcmdiKDE1OCwgMTYzLCAxNjgpOyB3aGl0ZS1zcGFjZTogcHJlOyIvPgo8L3N2Zz4='
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Add submenu for the About page.
|
73 |
+
*/
|
74 |
+
public function add_submenu() {
|
75 |
+
$parent_menu = $this->has_menu() ? 'meta-box' : $this->get_parent_menu();
|
76 |
+
$about = add_submenu_page(
|
77 |
+
$parent_menu,
|
78 |
+
__( 'Welcome to Meta Box', 'meta-box' ),
|
79 |
+
__( 'Dashboard', 'meta-box' ),
|
80 |
+
'activate_plugins',
|
81 |
+
'meta-box',
|
82 |
+
array( $this, 'render' )
|
83 |
+
);
|
84 |
+
add_action( "load-$about", array( $this, 'load_about' ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Functions and hooks for about page.
|
89 |
+
*/
|
90 |
+
public function load_about() {
|
91 |
+
$this->enqueue();
|
92 |
+
add_filter( 'admin_footer_text', array( $this, 'change_footer_text' ) );
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Hide about page from the admin menu.
|
97 |
+
*/
|
98 |
+
public function hide_page() {
|
99 |
+
remove_submenu_page( $this->get_parent_menu(), 'meta-box' );
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Render admin page.
|
104 |
+
*/
|
105 |
+
public function render() {
|
106 |
+
?>
|
107 |
+
<div class="wrap">
|
108 |
+
<div id="poststuff">
|
109 |
+
<div id="post-body" class="metabox-holder columns-2">
|
110 |
+
<div id="post-body-content">
|
111 |
+
<div class="about-wrap">
|
112 |
+
<?php
|
113 |
+
include dirname( __FILE__ ) . '/sections/welcome.php';
|
114 |
+
include dirname( __FILE__ ) . '/sections/tabs.php';
|
115 |
+
include dirname( __FILE__ ) . '/sections/getting-started.php';
|
116 |
+
include dirname( __FILE__ ) . '/sections/extensions.php';
|
117 |
+
include dirname( __FILE__ ) . '/sections/support.php';
|
118 |
+
do_action( 'rwmb_about_tabs_content' );
|
119 |
+
?>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
<div id="postbox-container-1" class="postbox-container">
|
123 |
+
<?php
|
124 |
+
include dirname( __FILE__ ) . '/sections/newsletter.php';
|
125 |
+
if ( ! $this->is_premium_user() ) {
|
126 |
+
include dirname( __FILE__ ) . '/sections/upgrade.php';
|
127 |
+
}
|
128 |
+
?>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
<?php
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Enqueue CSS and JS.
|
138 |
+
*/
|
139 |
+
public function enqueue() {
|
140 |
+
wp_enqueue_style( 'meta-box-about', RWMB_URL . 'inc/about/css/about.css', array(), RWMB_VER );
|
141 |
+
wp_enqueue_script( 'meta-box-about', RWMB_URL . 'inc/about/js/about.js', array( 'jquery' ), RWMB_VER, true );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Change WordPress footer text on about page.
|
146 |
+
*/
|
147 |
+
public function change_footer_text() {
|
148 |
+
$allowed_html = array(
|
149 |
+
'a' => array(
|
150 |
+
'href' => array(),
|
151 |
+
'target' => array(),
|
152 |
+
),
|
153 |
+
'strong' => array(),
|
154 |
+
);
|
155 |
+
|
156 |
+
// Translators: %1$s - link to review form.
|
157 |
+
echo wp_kses( sprintf( __( 'Please rate <strong>Meta Box</strong> <a href="%1$s" target="_blank">★★★★★</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the Meta Box team!', 'meta-box' ), 'https://wordpress.org/support/view/plugin-reviews/meta-box?filter=5#new-post' ), $allowed_html );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Redirect to about page after Meta Box has been activated.
|
162 |
+
*
|
163 |
+
* @param string $plugin Path to the main plugin file from plugins directory.
|
164 |
+
* @param bool $network_wide Whether to enable the plugin for all sites in the network
|
165 |
+
* or just the current site. Multisite only. Default is false.
|
166 |
+
*/
|
167 |
+
public function redirect( $plugin, $network_wide ) {
|
168 |
+
if ( 'cli' !== php_sapi_name() && ! $network_wide && 'meta-box/meta-box.php' === $plugin && ! $this->is_bundled() ) {
|
169 |
+
wp_safe_redirect( $this->get_menu_link() );
|
170 |
+
die;
|
171 |
+
}
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Get link to the plugin admin menu.
|
176 |
+
*
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
protected function get_menu_link() {
|
180 |
+
$menu = $this->has_menu() ? 'admin.php?page=meta-box' : $this->get_parent_menu() . '?page=meta-box';
|
181 |
+
return admin_url( $menu );
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Get default parent menu, which is Plugins.
|
186 |
+
*
|
187 |
+
* @return string
|
188 |
+
*/
|
189 |
+
protected function get_parent_menu() {
|
190 |
+
return 'plugins.php';
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Check if the plugin has a top-level admin menu.
|
195 |
+
*
|
196 |
+
* @return bool
|
197 |
+
*/
|
198 |
+
protected function has_menu() {
|
199 |
+
return apply_filters( 'rwmb_admin_menu', false );
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Check if Meta Box is bundled by TGM Activation Class.
|
204 |
+
*/
|
205 |
+
protected function is_bundled() {
|
206 |
+
// @codingStandardsIgnoreLine
|
207 |
+
foreach ( $_REQUEST as $key => $value ) {
|
208 |
+
if ( false !== strpos( $key, 'tgmpa' ) || false !== strpos( $value, 'tgmpa' ) ) {
|
209 |
+
return true;
|
210 |
+
}
|
211 |
+
}
|
212 |
+
return false;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Check if current user is a premium user.
|
217 |
+
*
|
218 |
+
* @return bool
|
219 |
+
*/
|
220 |
+
protected function is_premium_user() {
|
221 |
+
$option = is_multisite() ? get_site_option( 'meta_box_updater' ) : get_option( 'meta_box_updater' );
|
222 |
+
if ( empty( $option['api_key'] ) ) {
|
223 |
+
return false;
|
224 |
+
}
|
225 |
+
if ( isset( $option['status'] ) && 'success' !== $option['status'] ) {
|
226 |
+
return false;
|
227 |
+
}
|
228 |
+
return true;
|
229 |
+
}
|
230 |
+
}
|
inc/libraries/meta-box/inc/about/css/about.css
CHANGED
@@ -1,219 +1,219 @@
|
|
1 |
-
.about-wrap.about-wrap .wp-badge {
|
2 |
-
background-image: url(../images/meta-box.svg);
|
3 |
-
background-color: #fff;
|
4 |
-
color: #222;
|
5 |
-
text-transform: uppercase;
|
6 |
-
font-weight: bold;
|
7 |
-
text-decoration: none;
|
8 |
-
}
|
9 |
-
|
10 |
-
.wp-badge:hover {
|
11 |
-
text-decoration: none;
|
12 |
-
}
|
13 |
-
|
14 |
-
.about-buttons .dashicons {
|
15 |
-
position: relative;
|
16 |
-
top: 5px;
|
17 |
-
width: 16px;
|
18 |
-
height: 16px;
|
19 |
-
font-size: 16px;
|
20 |
-
}
|
21 |
-
|
22 |
-
#poststuff .nav-tab-wrapper {
|
23 |
-
padding: 0;
|
24 |
-
margin-top: 60px;
|
25 |
-
}
|
26 |
-
|
27 |
-
.feature-section.two-col {
|
28 |
-
align-items: flex-start;
|
29 |
-
}
|
30 |
-
|
31 |
-
.feature-section.two-col h3:not(:first-child) {
|
32 |
-
margin-top: 3em;
|
33 |
-
}
|
34 |
-
|
35 |
-
.feature-section img {
|
36 |
-
display: block;
|
37 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, .1);
|
38 |
-
}
|
39 |
-
|
40 |
-
.nav-tab-active:focus {
|
41 |
-
box-shadow: none;
|
42 |
-
}
|
43 |
-
|
44 |
-
.gt-tab-pane {
|
45 |
-
display: none;
|
46 |
-
}
|
47 |
-
|
48 |
-
.gt-is-active {
|
49 |
-
display: block;
|
50 |
-
}
|
51 |
-
|
52 |
-
.screenshot {
|
53 |
-
display: block;
|
54 |
-
margin: 3em auto;
|
55 |
-
}
|
56 |
-
.col ul {
|
57 |
-
font-size: 14px;
|
58 |
-
margin: 2em 0;
|
59 |
-
}
|
60 |
-
|
61 |
-
.col li a {
|
62 |
-
text-decoration: none;
|
63 |
-
}
|
64 |
-
|
65 |
-
.col .dashicons {
|
66 |
-
color: #82878c;
|
67 |
-
padding-right: 5px;
|
68 |
-
font-size: 16px;
|
69 |
-
vertical-align: middle;
|
70 |
-
}
|
71 |
-
|
72 |
-
/* Extensions tab */
|
73 |
-
.theme-browser {
|
74 |
-
margin-top: 40px;
|
75 |
-
}
|
76 |
-
.theme-browser .theme:hover {
|
77 |
-
cursor: initial;
|
78 |
-
}
|
79 |
-
.extension-inner {
|
80 |
-
display: flex;
|
81 |
-
background: #fff;
|
82 |
-
padding: 25px 20px;
|
83 |
-
}
|
84 |
-
.extension-inner svg {
|
85 |
-
width: 36px;
|
86 |
-
height: 36px;
|
87 |
-
margin: 8px 15px 0 0;
|
88 |
-
fill: #b4b9be;
|
89 |
-
}
|
90 |
-
.extension-info {
|
91 |
-
flex: 1;
|
92 |
-
}
|
93 |
-
.extension-info.extension-info h3 {
|
94 |
-
margin: 0 0 5px;
|
95 |
-
font-size: 1.2em;
|
96 |
-
}
|
97 |
-
.extension-info p {
|
98 |
-
margin: 0;
|
99 |
-
}
|
100 |
-
.extension-action {
|
101 |
-
border-top: 1px solid #ddd;
|
102 |
-
text-align: center;
|
103 |
-
padding: 20px;
|
104 |
-
background: #f7f7f7;
|
105 |
-
}
|
106 |
-
|
107 |
-
/* Extensions tab: 2 columns */
|
108 |
-
.extension {
|
109 |
-
margin-bottom: 4%;
|
110 |
-
}
|
111 |
-
@media (min-width: 768px) {
|
112 |
-
.extension {
|
113 |
-
float: left;
|
114 |
-
width: 47.5%;
|
115 |
-
margin: 0 4% 4% 0;
|
116 |
-
}
|
117 |
-
.extension:nth-child(2n) {
|
118 |
-
margin-right: 0;
|
119 |
-
}
|
120 |
-
.extension:nth-child(2n+1) {
|
121 |
-
clear: left;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
/* For large screen: 2 columns */
|
125 |
-
@media (min-width: 1640px) {
|
126 |
-
.extension {
|
127 |
-
width: 30.6%;
|
128 |
-
}
|
129 |
-
.extension:nth-child(2n) {
|
130 |
-
margin-right: 4%;
|
131 |
-
}
|
132 |
-
.extension:nth-child(2n+1) {
|
133 |
-
clear: none;
|
134 |
-
}
|
135 |
-
.extension:nth-child(3n) {
|
136 |
-
margin-right: 0;
|
137 |
-
}
|
138 |
-
.extension:nth-child(3n+1) {
|
139 |
-
clear: left;
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
/* Right column */
|
144 |
-
#post-body.columns-2 #postbox-container-1 {
|
145 |
-
position: fixed;
|
146 |
-
right: 320px;
|
147 |
-
top: 40px;
|
148 |
-
}
|
149 |
-
|
150 |
-
@media (max-width: 1279px) {
|
151 |
-
#postbox-container-1 {
|
152 |
-
display: none;
|
153 |
-
}
|
154 |
-
#poststuff #post-body.columns-2 {
|
155 |
-
margin-right: 0;
|
156 |
-
}
|
157 |
-
}
|
158 |
-
|
159 |
-
/* Newsletter */
|
160 |
-
.newsletter {
|
161 |
-
margin: 40px 0;
|
162 |
-
border: 3px dashed #82878c;
|
163 |
-
padding: 15px;
|
164 |
-
background: #fff;
|
165 |
-
}
|
166 |
-
.newsletter .dashicons {
|
167 |
-
color: #00b9eb;
|
168 |
-
width: 30px;
|
169 |
-
height: 30px;
|
170 |
-
font-size: 30px;
|
171 |
-
position: relative;
|
172 |
-
top: -5px;
|
173 |
-
left: -2px;
|
174 |
-
}
|
175 |
-
.newsletter h3 {
|
176 |
-
margin: 0 0 5px;
|
177 |
-
}
|
178 |
-
.newsletter p {
|
179 |
-
margin-top: 0;
|
180 |
-
}
|
181 |
-
.newsletter.newsletter input,
|
182 |
-
.newsletter.newsletter button {
|
183 |
-
margin-top: 5px;
|
184 |
-
}
|
185 |
-
.newsletter.newsletter input {
|
186 |
-
width: 145px;
|
187 |
-
padding: 5px;
|
188 |
-
}
|
189 |
-
|
190 |
-
/* Upgrade */
|
191 |
-
.upgrade {
|
192 |
-
border: 3px dashed #82878c;
|
193 |
-
background: #fff;
|
194 |
-
padding: 15px;
|
195 |
-
}
|
196 |
-
.upgrade .dashicons {
|
197 |
-
color: #ef4836;
|
198 |
-
width: 26px;
|
199 |
-
height: 26px;
|
200 |
-
font-size: 30px;
|
201 |
-
position: relative;
|
202 |
-
top: -4px;
|
203 |
-
left: -5px;
|
204 |
-
}
|
205 |
-
.upgrade h3 {
|
206 |
-
margin: 0;
|
207 |
-
}
|
208 |
-
.upgrade li {
|
209 |
-
padding-left: 20px;
|
210 |
-
position: relative;
|
211 |
-
}
|
212 |
-
.upgrade svg {
|
213 |
-
width: 1em;
|
214 |
-
height: 1em;
|
215 |
-
fill: #0073aa;
|
216 |
-
position: absolute;
|
217 |
-
top: 4px;
|
218 |
-
left: 0;
|
219 |
-
}
|
1 |
+
.about-wrap.about-wrap .wp-badge {
|
2 |
+
background-image: url(../images/meta-box.svg);
|
3 |
+
background-color: #fff;
|
4 |
+
color: #222;
|
5 |
+
text-transform: uppercase;
|
6 |
+
font-weight: bold;
|
7 |
+
text-decoration: none;
|
8 |
+
}
|
9 |
+
|
10 |
+
.wp-badge:hover {
|
11 |
+
text-decoration: none;
|
12 |
+
}
|
13 |
+
|
14 |
+
.about-buttons .dashicons {
|
15 |
+
position: relative;
|
16 |
+
top: 5px;
|
17 |
+
width: 16px;
|
18 |
+
height: 16px;
|
19 |
+
font-size: 16px;
|
20 |
+
}
|
21 |
+
|
22 |
+
#poststuff .nav-tab-wrapper {
|
23 |
+
padding: 0;
|
24 |
+
margin-top: 60px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.feature-section.two-col {
|
28 |
+
align-items: flex-start;
|
29 |
+
}
|
30 |
+
|
31 |
+
.feature-section.two-col h3:not(:first-child) {
|
32 |
+
margin-top: 3em;
|
33 |
+
}
|
34 |
+
|
35 |
+
.feature-section img {
|
36 |
+
display: block;
|
37 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, .1);
|
38 |
+
}
|
39 |
+
|
40 |
+
.nav-tab-active:focus {
|
41 |
+
box-shadow: none;
|
42 |
+
}
|
43 |
+
|
44 |
+
.gt-tab-pane {
|
45 |
+
display: none;
|
46 |
+
}
|
47 |
+
|
48 |
+
.gt-is-active {
|
49 |
+
display: block;
|
50 |
+
}
|
51 |
+
|
52 |
+
.screenshot {
|
53 |
+
display: block;
|
54 |
+
margin: 3em auto;
|
55 |
+
}
|
56 |
+
.col ul {
|
57 |
+
font-size: 14px;
|
58 |
+
margin: 2em 0;
|
59 |
+
}
|
60 |
+
|
61 |
+
.col li a {
|
62 |
+
text-decoration: none;
|
63 |
+
}
|
64 |
+
|
65 |
+
.col .dashicons {
|
66 |
+
color: #82878c;
|
67 |
+
padding-right: 5px;
|
68 |
+
font-size: 16px;
|
69 |
+
vertical-align: middle;
|
70 |
+
}
|
71 |
+
|
72 |
+
/* Extensions tab */
|
73 |
+
.theme-browser {
|
74 |
+
margin-top: 40px;
|
75 |
+
}
|
76 |
+
.theme-browser .theme:hover {
|
77 |
+
cursor: initial;
|
78 |
+
}
|
79 |
+
.extension-inner {
|
80 |
+
display: flex;
|
81 |
+
background: #fff;
|
82 |
+
padding: 25px 20px;
|
83 |
+
}
|
84 |
+
.extension-inner svg {
|
85 |
+
width: 36px;
|
86 |
+
height: 36px;
|
87 |
+
margin: 8px 15px 0 0;
|
88 |
+
fill: #b4b9be;
|
89 |
+
}
|
90 |
+
.extension-info {
|
91 |
+
flex: 1;
|
92 |
+
}
|
93 |
+
.extension-info.extension-info h3 {
|
94 |
+
margin: 0 0 5px;
|
95 |
+
font-size: 1.2em;
|
96 |
+
}
|
97 |
+
.extension-info p {
|
98 |
+
margin: 0;
|
99 |
+
}
|
100 |
+
.extension-action {
|
101 |
+
border-top: 1px solid #ddd;
|
102 |
+
text-align: center;
|
103 |
+
padding: 20px;
|
104 |
+
background: #f7f7f7;
|
105 |
+
}
|
106 |
+
|
107 |
+
/* Extensions tab: 2 columns */
|
108 |
+
.extension {
|
109 |
+
margin-bottom: 4%;
|
110 |
+
}
|
111 |
+
@media (min-width: 768px) {
|
112 |
+
.extension {
|
113 |
+
float: left;
|
114 |
+
width: 47.5%;
|
115 |
+
margin: 0 4% 4% 0;
|
116 |
+
}
|
117 |
+
.extension:nth-child(2n) {
|
118 |
+
margin-right: 0;
|
119 |
+
}
|
120 |
+
.extension:nth-child(2n+1) {
|
121 |
+
clear: left;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
/* For large screen: 2 columns */
|
125 |
+
@media (min-width: 1640px) {
|
126 |
+
.extension {
|
127 |
+
width: 30.6%;
|
128 |
+
}
|
129 |
+
.extension:nth-child(2n) {
|
130 |
+
margin-right: 4%;
|
131 |
+
}
|
132 |
+
.extension:nth-child(2n+1) {
|
133 |
+
clear: none;
|
134 |
+
}
|
135 |
+
.extension:nth-child(3n) {
|
136 |
+
margin-right: 0;
|
137 |
+
}
|
138 |
+
.extension:nth-child(3n+1) {
|
139 |
+
clear: left;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Right column */
|
144 |
+
#post-body.columns-2 #postbox-container-1 {
|
145 |
+
position: fixed;
|
146 |
+
right: 320px;
|
147 |
+
top: 40px;
|
148 |
+
}
|
149 |
+
|
150 |
+
@media (max-width: 1279px) {
|
151 |
+
#postbox-container-1 {
|
152 |
+
display: none;
|
153 |
+
}
|
154 |
+
#poststuff #post-body.columns-2 {
|
155 |
+
margin-right: 0;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
/* Newsletter */
|
160 |
+
.newsletter {
|
161 |
+
margin: 40px 0;
|
162 |
+
border: 3px dashed #82878c;
|
163 |
+
padding: 15px;
|
164 |
+
background: #fff;
|
165 |
+
}
|
166 |
+
.newsletter .dashicons {
|
167 |
+
color: #00b9eb;
|
168 |
+
width: 30px;
|
169 |
+
height: 30px;
|
170 |
+
font-size: 30px;
|
171 |
+
position: relative;
|
172 |
+
top: -5px;
|
173 |
+
left: -2px;
|
174 |
+
}
|
175 |
+
.newsletter h3 {
|
176 |
+
margin: 0 0 5px;
|
177 |
+
}
|
178 |
+
.newsletter p {
|
179 |
+
margin-top: 0;
|
180 |
+
}
|
181 |
+
.newsletter.newsletter input,
|
182 |
+
.newsletter.newsletter button {
|
183 |
+
margin-top: 5px;
|
184 |
+
}
|
185 |
+
.newsletter.newsletter input {
|
186 |
+
width: 145px;
|
187 |
+
padding: 5px;
|
188 |
+
}
|
189 |
+
|
190 |
+
/* Upgrade */
|
191 |
+
.upgrade {
|
192 |
+
border: 3px dashed #82878c;
|
193 |
+
background: #fff;
|
194 |
+
padding: 15px;
|
195 |
+
}
|
196 |
+
.upgrade .dashicons {
|
197 |
+
color: #ef4836;
|
198 |
+
width: 26px;
|
199 |
+
height: 26px;
|
200 |
+
font-size: 30px;
|
201 |
+
position: relative;
|
202 |
+
top: -4px;
|
203 |
+
left: -5px;
|
204 |
+
}
|
205 |
+
.upgrade h3 {
|
206 |
+
margin: 0;
|
207 |
+
}
|
208 |
+
.upgrade li {
|
209 |
+
padding-left: 20px;
|
210 |
+
position: relative;
|
211 |
+
}
|
212 |
+
.upgrade svg {
|
213 |
+
width: 1em;
|
214 |
+
height: 1em;
|
215 |
+
fill: #0073aa;
|
216 |
+
position: absolute;
|
217 |
+
top: 4px;
|
218 |
+
left: 0;
|
219 |
+
}
|
inc/libraries/meta-box/inc/about/css/style.css
CHANGED
@@ -1,57 +1,57 @@
|
|
1 |
-
.about-wrap .wp-badge {
|
2 |
-
background-image: url(../images/meta-box.png);
|
3 |
-
background-color: #fff;
|
4 |
-
color: #222;
|
5 |
-
text-transform: uppercase;
|
6 |
-
font-weight: bold;
|
7 |
-
text-decoration: none;
|
8 |
-
}
|
9 |
-
|
10 |
-
.wp-badge:hover {
|
11 |
-
text-decoration: none;
|
12 |
-
}
|
13 |
-
|
14 |
-
.feature-section.two-col {
|
15 |
-
align-items: flex-start;
|
16 |
-
}
|
17 |
-
|
18 |
-
.feature-section.two-col h3:not(:first-child) {
|
19 |
-
margin-top: 3em;
|
20 |
-
}
|
21 |
-
|
22 |
-
.feature-section img {
|
23 |
-
display: block;
|
24 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, .1);
|
25 |
-
}
|
26 |
-
|
27 |
-
.nav-tab-active:focus {
|
28 |
-
box-shadow: none;
|
29 |
-
}
|
30 |
-
|
31 |
-
.gt-tab-pane {
|
32 |
-
display: none;
|
33 |
-
}
|
34 |
-
|
35 |
-
.gt-is-active {
|
36 |
-
display: block;
|
37 |
-
}
|
38 |
-
|
39 |
-
.screenshot {
|
40 |
-
display: block;
|
41 |
-
margin: 3em auto;
|
42 |
-
}
|
43 |
-
.col ul {
|
44 |
-
font-size: 14px;
|
45 |
-
margin: 2em 0;
|
46 |
-
}
|
47 |
-
|
48 |
-
.col li a {
|
49 |
-
text-decoration: none;
|
50 |
-
}
|
51 |
-
|
52 |
-
.col .dashicons {
|
53 |
-
color: #82878c;
|
54 |
-
padding-right: 5px;
|
55 |
-
font-size: 16px;
|
56 |
-
vertical-align: middle;
|
57 |
-
}
|
1 |
+
.about-wrap .wp-badge {
|
2 |
+
background-image: url(../images/meta-box.png);
|
3 |
+
background-color: #fff;
|
4 |
+
color: #222;
|
5 |
+
text-transform: uppercase;
|
6 |
+
font-weight: bold;
|
7 |
+
text-decoration: none;
|
8 |
+
}
|
9 |
+
|
10 |
+
.wp-badge:hover {
|
11 |
+
text-decoration: none;
|
12 |
+
}
|
13 |
+
|
14 |
+
.feature-section.two-col {
|
15 |
+
align-items: flex-start;
|
16 |
+
}
|
17 |
+
|
18 |
+
.feature-section.two-col h3:not(:first-child) {
|
19 |
+
margin-top: 3em;
|
20 |
+
}
|
21 |
+
|
22 |
+
.feature-section img {
|
23 |
+
display: block;
|
24 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, .1);
|
25 |
+
}
|
26 |
+
|
27 |
+
.nav-tab-active:focus {
|
28 |
+
box-shadow: none;
|
29 |
+
}
|
30 |
+
|
31 |
+
.gt-tab-pane {
|
32 |
+
display: none;
|
33 |
+
}
|
34 |
+
|
35 |
+
.gt-is-active {
|
36 |
+
display: block;
|
37 |
+
}
|
38 |
+
|
39 |
+
.screenshot {
|
40 |
+
display: block;
|
41 |
+
margin: 3em auto;
|
42 |
+
}
|
43 |
+
.col ul {
|
44 |
+
font-size: 14px;
|
45 |
+
margin: 2em 0;
|
46 |
+
}
|
47 |
+
|
48 |
+
.col li a {
|
49 |
+
text-decoration: none;
|
50 |
+
}
|
51 |
+
|
52 |
+
.col .dashicons {
|
53 |
+
color: #82878c;
|
54 |
+
padding-right: 5px;
|
55 |
+
font-size: 16px;
|
56 |
+
vertical-align: middle;
|
57 |
+
}
|
inc/libraries/meta-box/inc/about/images/meta-box.svg
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
<?xml version="1.0" encoding="utf-8"?>
|
2 |
-
<svg viewBox="227 227 46 46" width="46" height="46" xmlns="http://www.w3.org/2000/svg">
|
3 |
-
<rect style="" x="227" y="227" width="46" height="46" rx="4" ry="4"/>
|
4 |
-
<path d="M 256.873 255.508 L 257.283 246.088 L 257.193 246.078 L 251.483 261.868 L 248.613 261.868 L 242.933 246.138 L 242.843 246.148 L 243.253 255.508 L 243.253 258.868 L 245.533 259.308 L 245.533 261.868 L 236.703 261.868 L 236.703 259.308 L 238.973 258.868 L 238.973 243.558 L 236.703 243.118 L 236.703 240.538 L 238.973 240.538 L 244.553 240.538 L 249.993 256.258 L 250.073 256.258 L 255.553 240.538 L 263.433 240.538 L 263.433 243.118 L 261.153 243.558 L 261.153 258.868 L 263.433 259.308 L 263.433 261.868 L 254.603 261.868 L 254.603 259.308 L 256.873 258.868 L 256.873 255.508 Z" style="fill:#fff"/>
|
5 |
-
</svg>
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<svg viewBox="227 227 46 46" width="46" height="46" xmlns="http://www.w3.org/2000/svg">
|
3 |
+
<rect style="" x="227" y="227" width="46" height="46" rx="4" ry="4"/>
|
4 |
+
<path d="M 256.873 255.508 L 257.283 246.088 L 257.193 246.078 L 251.483 261.868 L 248.613 261.868 L 242.933 246.138 L 242.843 246.148 L 243.253 255.508 L 243.253 258.868 L 245.533 259.308 L 245.533 261.868 L 236.703 261.868 L 236.703 259.308 L 238.973 258.868 L 238.973 243.558 L 236.703 243.118 L 236.703 240.538 L 238.973 240.538 L 244.553 240.538 L 249.993 256.258 L 250.073 256.258 L 255.553 240.538 L 263.433 240.538 L 263.433 243.118 L 261.153 243.558 L 261.153 258.868 L 263.433 259.308 L 263.433 261.868 L 254.603 261.868 L 254.603 259.308 L 256.873 258.868 L 256.873 255.508 Z" style="fill:#fff"/>
|
5 |
+
</svg>
|
inc/libraries/meta-box/inc/about/js/about.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
( function ( $ ) {
|
2 |
-
'use strict';
|
3 |
-
|
4 |
-
function tabs() {
|
5 |
-
var $container = $( '.nav-tab-wrapper' ),
|
6 |
-
$tabs = $container.find( '.nav-tab' ),
|
7 |
-
$panes = $( '.gt-tab-pane' );
|
8 |
-
|
9 |
-
$container.on(
|
10 |
-
'click',
|
11 |
-
'.nav-tab',
|
12 |
-
function ( e ) {
|
13 |
-
e.preventDefault();
|
14 |
-
|
15 |
-
$tabs.removeClass( 'nav-tab-active' );
|
16 |
-
$( this ).addClass( 'nav-tab-active' );
|
17 |
-
|
18 |
-
$panes.removeClass( 'gt-is-active' );
|
19 |
-
$panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
|
20 |
-
}
|
21 |
-
);
|
22 |
-
}
|
23 |
-
|
24 |
-
// Auto activate tabs when DOM ready.
|
25 |
-
$( tabs );
|
26 |
-
} ( jQuery ) );
|
1 |
+
( function ( $ ) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
function tabs() {
|
5 |
+
var $container = $( '.nav-tab-wrapper' ),
|
6 |
+
$tabs = $container.find( '.nav-tab' ),
|
7 |
+
$panes = $( '.gt-tab-pane' );
|
8 |
+
|
9 |
+
$container.on(
|
10 |
+
'click',
|
11 |
+
'.nav-tab',
|
12 |
+
function ( e ) {
|
13 |
+
e.preventDefault();
|
14 |
+
|
15 |
+
$tabs.removeClass( 'nav-tab-active' );
|
16 |
+
$( this ).addClass( 'nav-tab-active' );
|
17 |
+
|
18 |
+
$panes.removeClass( 'gt-is-active' );
|
19 |
+
$panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
|
20 |
+
}
|
21 |
+
);
|
22 |
+
}
|
23 |
+
|
24 |
+
// Auto activate tabs when DOM ready.
|
25 |
+
$( tabs );
|
26 |
+
} ( jQuery ) );
|
inc/libraries/meta-box/inc/about/js/script.js
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
( function ( $ ) {
|
2 |
-
'use strict';
|
3 |
-
|
4 |
-
function tabs() {
|
5 |
-
var $container = $( '.nav-tab-wrapper' ),
|
6 |
-
$tabs = $container.find( '.nav-tab' ),
|
7 |
-
$panes = $( '.gt-tab-pane' );
|
8 |
-
|
9 |
-
$container.on( 'click', '.nav-tab', function ( e ) {
|
10 |
-
e.preventDefault();
|
11 |
-
|
12 |
-
$tabs.removeClass( 'nav-tab-active' );
|
13 |
-
$( this ).addClass( 'nav-tab-active' );
|
14 |
-
|
15 |
-
$panes.removeClass( 'gt-is-active' );
|
16 |
-
$panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
|
17 |
-
} );
|
18 |
-
}
|
19 |
-
|
20 |
-
// Auto activate tabs when DOM ready.
|
21 |
-
$( tabs );
|
22 |
-
} ( jQuery ) );
|
1 |
+
( function ( $ ) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
function tabs() {
|
5 |
+
var $container = $( '.nav-tab-wrapper' ),
|
6 |
+
$tabs = $container.find( '.nav-tab' ),
|
7 |
+
$panes = $( '.gt-tab-pane' );
|
8 |
+
|
9 |
+
$container.on( 'click', '.nav-tab', function ( e ) {
|
10 |
+
e.preventDefault();
|
11 |
+
|
12 |
+
$tabs.removeClass( 'nav-tab-active' );
|
13 |
+
$( this ).addClass( 'nav-tab-active' );
|
14 |
+
|
15 |
+
$panes.removeClass( 'gt-is-active' );
|
16 |
+
$panes.filter( $( this ).attr( 'href' ) ).addClass( 'gt-is-active' );
|
17 |
+
} );
|
18 |
+
}
|
19 |
+
|
20 |
+
// Auto activate tabs when DOM ready.
|
21 |
+
$( tabs );
|
22 |
+
} ( jQuery ) );
|
inc/libraries/meta-box/inc/about/sections/extensions.php
CHANGED
@@ -1,351 +1,351 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Extensions section.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<div id="extensions" class="gt-tab-pane">
|
10 |
-
<p class="about-description">
|
11 |
-
<?php esc_html_e( 'Extend custom fields in WordPress well beyond what others would ever consider ordinary! Save over 70% with our extensions bundles.', 'meta-box' ); ?> <a target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'View Bundles', 'meta-box' ); ?> →</a>
|
12 |
-
</p>
|
13 |
-
<div class="extensions wp-clearfix">
|
14 |
-
<div class="extension">
|
15 |
-
<div class="extension-inner">
|
16 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M736 1440q0 12-10 24l-319 319q-10 9-23 9-12 0-23-9l-320-320q-15-16-7-35 8-20 30-20h192v-1376q0-14 9-23t23-9h192q14 0 23 9t9 23v1376h192q14 0 23 9t9 23zm1056 128v192q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h832q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-640q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h640q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-448q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h448q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-256q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h256q14 0 23 9t9 23z"/></svg>
|
17 |
-
<div class="extension-info">
|
18 |
-
<h3>Meta Box Builder</h3>
|
19 |
-
<p><?php esc_html_e( 'Drag and drop your custom fields into place without a single line of code.', 'meta-box' ); ?></p>
|
20 |
-
</div>
|
21 |
-
</div>
|
22 |
-
<div class="extension-action">
|
23 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-builder/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
24 |
-
</div>
|
25 |
-
</div>
|
26 |
-
<div class="extension">
|
27 |
-
<div class="extension-inner">
|
28 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
|
29 |
-
<div class="extension-info">
|
30 |
-
<h3>MB Custom Post Type</h3>
|
31 |
-
<p><?php esc_html_e( 'Create and manage custom post types easily in WordPress with an easy-to-use interface.', 'meta-box' ); ?></p>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
<div class="extension-action">
|
35 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/custom-post-type/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
36 |
-
</div>
|
37 |
-
</div>
|
38 |
-
<div class="extension">
|
39 |
-
<div class="extension-inner">
|
40 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z" /></svg>
|
41 |
-
<div class="extension-info">
|
42 |
-
<h3>Meta Box Group</h3>
|
43 |
-
<p><?php esc_html_e( 'Create repeatable groups of custom fields for better appearance and structure.', 'meta-box' ); ?></p>
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
-
<div class="extension-action">
|
47 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
<div class="extension">
|
51 |
-
<div class="extension-inner">
|
52 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 896q0-106-75-181t-181-75-181 75-75 181 75 181 181 75 181-75 75-181zm512-109v222q0 12-8 23t-20 13l-185 28q-19 54-39 91 35 50 107 138 10 12 10 25t-9 23q-27 37-99 108t-94 71q-12 0-26-9l-138-108q-44 23-91 38-16 136-29 186-7 28-36 28h-222q-14 0-24.5-8.5t-11.5-21.5l-28-184q-49-16-90-37l-141 107q-10 9-25 9-14 0-25-11-126-114-165-168-7-10-7-23 0-12 8-23 15-21 51-66.5t54-70.5q-27-50-41-99l-183-27q-13-2-21-12.5t-8-23.5v-222q0-12 8-23t19-13l186-28q14-46 39-92-40-57-107-138-10-12-10-24 0-10 9-23 26-36 98.5-107.5t94.5-71.5q13 0 26 10l138 107q44-23 91-38 16-136 29-186 7-28 36-28h222q14 0 24.5 8.5t11.5 21.5l28 184q49 16 90 37l142-107q9-9 24-9 13 0 25 10 129 119 165 170 7 8 7 22 0 12-8 23-15 21-51 66.5t-54 70.5q26 50 41 98l183 28q13 2 21 12.5t8 23.5z" /></svg>
|
53 |
-
<div class="extension-info">
|
54 |
-
<h3>MB Settings Page</h3>
|
55 |
-
<p><?php esc_html_e( 'Create a powerful settings page for your theme, plugin or website.', 'meta-box' ); ?></p>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
<div class="extension-action">
|
59 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
60 |
-
</div>
|
61 |
-
</div>
|
62 |
-
<div class="extension">
|
63 |
-
<div class="extension-inner">
|
64 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
|
65 |
-
<div class="extension-info">
|
66 |
-
<h3>Meta Box Conditional Logic</h3>
|
67 |
-
<p><?php esc_html_e( 'Control the visibility of meta boxes and fields or even HTML elements with ease.', 'meta-box' ); ?></p>
|
68 |
-
</div>
|
69 |
-
</div>
|
70 |
-
<div class="extension-action">
|
71 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
72 |
-
</div>
|
73 |
-
</div>
|
74 |
-
<div class="extension">
|
75 |
-
<div class="extension-inner">
|
76 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1703 478q40 57 18 129l-275 906q-19 64-76.5 107.5t-122.5 43.5h-923q-77 0-148.5-53.5t-99.5-131.5q-24-67-2-127 0-4 3-27t4-37q1-8-3-21.5t-3-19.5q2-11 8-21t16.5-23.5 16.5-23.5q23-38 45-91.5t30-91.5q3-10 .5-30t-.5-28q3-11 17-28t17-23q21-36 42-92t25-90q1-9-2.5-32t.5-28q4-13 22-30.5t22-22.5q19-26 42.5-84.5t27.5-96.5q1-8-3-25.5t-2-26.5q2-8 9-18t18-23 17-21q8-12 16.5-30.5t15-35 16-36 19.5-32 26.5-23.5 36-11.5 47.5 5.5l-1 3q38-9 51-9h761q74 0 114 56t18 130l-274 906q-36 119-71.5 153.5t-128.5 34.5h-869q-27 0-38 15-11 16-1 43 24 70 144 70h923q29 0 56-15.5t35-41.5l300-987q7-22 5-57 38 15 59 43zm-1064 2q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5zm-83 256q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5z" /></svg>
|
77 |
-
<div class="extension-info">
|
78 |
-
<h3>MB Term Meta</h3>
|
79 |
-
<p><?php esc_html_e( 'Easily add custom fields to categories, tags or any custom taxonomy.', 'meta-box' ); ?></p>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
<div class="extension-action">
|
83 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
<div class="extension">
|
87 |
-
<div class="extension-inner">
|
88 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1536 1399q0 109-62.5 187t-150.5 78h-854q-88 0-150.5-78t-62.5-187q0-85 8.5-160.5t31.5-152 58.5-131 94-89 134.5-34.5q131 128 313 128t313-128q76 0 134.5 34.5t94 89 58.5 131 31.5 152 8.5 160.5zm-256-887q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5z" /></svg>
|
89 |
-
<div class="extension-info">
|
90 |
-
<h3>MB User Meta</h3>
|
91 |
-
<p><?php esc_html_e( 'Add custom fields to user profile (user meta) quickly with simple syntax.', 'meta-box' ); ?></p>
|
92 |
-
</div>
|
93 |
-
</div>
|
94 |
-
<div class="extension-action">
|
95 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
96 |
-
</div>
|
97 |
-
</div>
|
98 |
-
<div class="extension">
|
99 |
-
<div class="extension-inner">
|
100 |
-
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M657 896q-162 5-265 128h-134q-82 0-138-40.5t-56-118.5q0-353 124-353 6 0 43.5 21t97.5 42.5 119 21.5q67 0 133-23-5 37-5 66 0 139 81 256zm1071 637q0 120-73 189.5t-194 69.5h-874q-121 0-194-69.5t-73-189.5q0-53 3.5-103.5t14-109 26.5-108.5 43-97.5 62-81 85.5-53.5 111.5-20q10 0 43 21.5t73 48 107 48 135 21.5 135-21.5 107-48 73-48 43-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-1024-1277q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181zm704 384q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5zm576 225q0 78-56 118.5t-138 40.5h-134q-103-123-265-128 81-117 81-256 0-29-5-66 66 23 133 23 59 0 119-21.5t97.5-42.5 43.5-21q124 0 124 353zm-128-609q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181z" /></svg>
|
101 |
-
<div class="extension-info">
|
102 |
-
<h3>MB User Profile</h3>
|
103 |
-
<p><?php esc_html_e( 'Create register, login and edit user profile forms in the frontend. Embed everywhere with shortcodes.', 'meta-box' ); ?></p>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
<div class="extension-action">
|
107 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-profile/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
108 |
-
</div>
|
109 |
-
</div>
|
110 |
-
<div class="extension">
|
111 |
-
<div class="extension-inner">
|
112 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-121.5t.5-121.5v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z" /></svg>
|
113 |
-
<div class="extension-info">
|
114 |
-
<h3>MB Frontend Submission</h3>
|
115 |
-
<p><?php esc_html_e( 'Create frontend forms for users to submit custom content. Embed everywhere with shortcode.', 'meta-box' ); ?></p>
|
116 |
-
</div>
|
117 |
-
</div>
|
118 |
-
<div class="extension-action">
|
119 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-frontend-submission/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
<div class="extension">
|
123 |
-
<div class="extension-inner">
|
124 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 1312v-704q0-40-28-68t-68-28h-704q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z" /></svg>
|
125 |
-
<div class="extension-info">
|
126 |
-
<h3>Meta Box Tabs</h3>
|
127 |
-
<p><?php esc_html_e( 'Add as many custom fields as you want and organize them into tabs.', 'meta-box' ); ?></p>
|
128 |
-
</div>
|
129 |
-
</div>
|
130 |
-
<div class="extension-action">
|
131 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tabs/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
132 |
-
</div>
|
133 |
-
</div>
|
134 |
-
<div class="extension">
|
135 |
-
<div class="extension-inner">
|
136 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
137 |
-
<div class="extension-info">
|
138 |
-
<h3>MB Custom Table</h3>
|
139 |
-
<p><?php esc_html_e( 'Save custom fields data to custom table instead of the default meta tables. Reduce database size and increase performance.', 'meta-box' ); ?></p>
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
<div class="extension-action">
|
143 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-custom-table/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
144 |
-
</div>
|
145 |
-
</div>
|
146 |
-
<div class="extension">
|
147 |
-
<div class="extension-inner">
|
148 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M672 1472q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm0-1152q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm640 128q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm96 0q0 52-26 96.5t-70 69.5q-2 287-226 414-67 38-203 81-128 40-169.5 71t-41.5 100v26q44 25 70 69.5t26 96.5q0 80-56 136t-136 56-136-56-56-136q0-52 26-96.5t70-69.5v-820q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136q0 52-26 96.5t-70 69.5v497q54-26 154-57 55-17 87.5-29.5t70.5-31 59-39.5 40.5-51 28-69.5 8.5-91.5q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136z" /></svg>
|
149 |
-
<div class="extension-info">
|
150 |
-
<h3>MB Rest API</h3>
|
151 |
-
<p><?php esc_html_e( 'Pull all meta value from posts, terms into the WP REST API responses.', 'meta-box' ); ?></p>
|
152 |
-
</div>
|
153 |
-
</div>
|
154 |
-
<div class="extension-action">
|
155 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-rest-api/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
156 |
-
</div>
|
157 |
-
</div>
|
158 |
-
<div class="extension">
|
159 |
-
<div class="extension-inner">
|
160 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
|
161 |
-
<div class="extension-info">
|
162 |
-
<h3>MB Relationships</h3>
|
163 |
-
<p><?php esc_html_e( 'A lightweight WordPress plugin for creating many-to-many relationships between posts, terms and users.', 'meta-box' ); ?></p>
|
164 |
-
</div>
|
165 |
-
</div>
|
166 |
-
<div class="extension-action">
|
167 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-relationships/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
168 |
-
</div>
|
169 |
-
</div>
|
170 |
-
<div class="extension">
|
171 |
-
<div class="extension-inner">
|
172 |
-
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M212 768l623 665-300-665h-323zm812 772l349-772h-698zm-486-900l204-384h-262l-288 384h346zm675 793l623-665h-323zm-530-793h682l-204-384h-274zm827 0h346l-288-384h-262zm141-486l384 512q14 18 13 41.5t-17 40.5l-960 1024q-18 20-47 20t-47-20l-960-1024q-16-17-17-40.5t13-41.5l384-512q18-26 51-26h1152q33 0 51 26z" /></svg>
|
173 |
-
<div class="extension-info">
|
174 |
-
<h3>Meta Box – FacetWP Integrator</h3>
|
175 |
-
<p><?php esc_html_e( 'Integrates Meta Box and FacetWP, makes custom fields searchable and filterable in the frontend.', 'meta-box' ); ?></p>
|
176 |
-
</div>
|
177 |
-
</div>
|
178 |
-
<div class="extension-action">
|
179 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-facetwp-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
180 |
-
</div>
|
181 |
-
</div>
|
182 |
-
<div class="extension">
|
183 |
-
<div class="extension-inner">
|
184 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1755 453q37 38 37 90.5t-37 90.5l-401 400 150 150-160 160q-163 163-389.5 186.5t-411.5-100.5l-362 362h-181v-181l362-362q-124-185-100.5-411.5t186.5-389.5l160-160 150 150 400-401q38-37 91-37t90 37 37 90.5-37 90.5l-400 401 234 234 401-400q38-37 91-37t90 37z" /></svg>
|
185 |
-
<div class="extension-info">
|
186 |
-
<h3>Meta Box – Beaver Themer Integrator</h3>
|
187 |
-
<p><?php esc_html_e( 'Select and show custom fields created by the Meta Box plugin in the Beaver Themer field connection.', 'meta-box' ); ?></p>
|
188 |
-
</div>
|
189 |
-
</div>
|
190 |
-
<div class="extension-action">
|
191 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-beaver-themer-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
192 |
-
</div>
|
193 |
-
</div>
|
194 |
-
<div class="extension">
|
195 |
-
<div class="extension-inner">
|
196 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 896q0 174-120 321.5t-326 233-450 85.5q-70 0-145-8-198 175-460 242-49 14-114 22-17 2-30.5-9t-17.5-29v-1q-3-4-.5-12t2-10 4.5-9.5l6-9 7-8.5 8-9q7-8 31-34.5t34.5-38 31-39.5 32.5-51 27-59 26-76q-157-89-247.5-220t-90.5-281q0-130 71-248.5t191-204.5 286-136.5 348-50.5q244 0 450 85.5t326 233 120 321.5z" /></svg>
|
197 |
-
<div class="extension-info">
|
198 |
-
<h3>MB Comment Meta</h3>
|
199 |
-
<p><?php esc_html_e( 'Add custom fields to comments in WordPress. Support all field types and options.', 'meta-box' ); ?></p>
|
200 |
-
</div>
|
201 |
-
</div>
|
202 |
-
<div class="extension-action">
|
203 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-comment-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
204 |
-
</div>
|
205 |
-
</div>
|
206 |
-
<div class="extension">
|
207 |
-
<div class="extension-inner">
|
208 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 15 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z" /></svg>
|
209 |
-
<div class="extension-info">
|
210 |
-
<h3>MB Revision</h3>
|
211 |
-
<p><?php esc_html_e( 'Track changes of custom fields with WordPress revision. Save, compare, restore the changes easily.', 'meta-box' ); ?></p>
|
212 |
-
</div>
|
213 |
-
</div>
|
214 |
-
<div class="extension-action">
|
215 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-revision/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
216 |
-
</div>
|
217 |
-
</div>
|
218 |
-
<div class="extension">
|
219 |
-
<div class="extension-inner">
|
220 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1593 349l-640 1280q-17 35-57 35-5 0-15-2-22-5-35.5-22.5t-13.5-39.5v-576h-576q-22 0-39.5-13.5t-22.5-35.5 4-42 29-30l1280-640q13-7 29-7 27 0 45 19 15 14 18.5 34.5t-6.5 39.5z" /></svg>
|
221 |
-
<div class="extension-info">
|
222 |
-
<h3>Meta Box Geolocation</h3>
|
223 |
-
<p><?php esc_html_e( 'Automatically and instantly populate location data with the power of Google Maps Geolocation API.', 'meta-box' ); ?></p>
|
224 |
-
</div>
|
225 |
-
</div>
|
226 |
-
<div class="extension-action">
|
227 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-geolocation/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
228 |
-
</div>
|
229 |
-
</div>
|
230 |
-
<div class="extension">
|
231 |
-
<div class="extension-inner">
|
232 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
233 |
-
<div class="extension-info">
|
234 |
-
<h3>MB Admin Columns</h3>
|
235 |
-
<p><?php esc_html_e( 'Display custom fields in table columns in admin screens for All Posts (types).', 'meta-box' ); ?></p>
|
236 |
-
</div>
|
237 |
-
</div>
|
238 |
-
<div class="extension-action">
|
239 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-admin-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
240 |
-
</div>
|
241 |
-
</div>
|
242 |
-
<div class="extension">
|
243 |
-
<div class="extension-inner">
|
244 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M888 1184l116-116-152-152-116 116v56h96v96h56zm440-720q-16-16-33 1l-350 350q-17 17-1 33t33-1l350-350q17-17 1-33zm80 594v190q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-14 14-32 8-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-126q0-13 9-22l64-64q15-15 35-7t20 29zm-96-738l288 288-672 672h-288v-288zm444 132l-92 92-288-288 92-92q28-28 68-28t68 28l152 152q28 28 28 68t-28 68z" /></svg>
|
245 |
-
<div class="extension-info">
|
246 |
-
<h3>Meta Box for Yoast SEO</h3>
|
247 |
-
<p><?php esc_html_e( 'Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.', 'meta-box' ); ?></p>
|
248 |
-
</div>
|
249 |
-
</div>
|
250 |
-
<div class="extension-action">
|
251 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-yoast-seo/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
252 |
-
</div>
|
253 |
-
</div>
|
254 |
-
<div class="extension">
|
255 |
-
<div class="extension-inner">
|
256 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z" /></svg>
|
257 |
-
<div class="extension-info">
|
258 |
-
<h3>Meta Box Text Limiter</h3>
|
259 |
-
<p><?php esc_html_e( 'Limit the number of characters or words entered for text and textarea fields.', 'meta-box' ); ?></p>
|
260 |
-
</div>
|
261 |
-
</div>
|
262 |
-
<div class="extension-action">
|
263 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-text-limiter/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
264 |
-
</div>
|
265 |
-
</div>
|
266 |
-
<div class="extension">
|
267 |
-
<div class="extension-inner">
|
268 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z" /></svg>
|
269 |
-
<div class="extension-info">
|
270 |
-
<h3>Meta Box Updater</h3>
|
271 |
-
<p><?php esc_html_e( 'Automatically updates all Meta Box extensions within the WordPress Admin area.', 'meta-box' ); ?></p>
|
272 |
-
</div>
|
273 |
-
</div>
|
274 |
-
<div class="extension-action">
|
275 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-updater/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
276 |
-
</div>
|
277 |
-
</div>
|
278 |
-
<div class="extension">
|
279 |
-
<div class="extension-inner">
|
280 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
|
281 |
-
<div class="extension-info">
|
282 |
-
<h3>Meta Box Template</h3>
|
283 |
-
<p><?php esc_html_e( 'Define custom meta boxes and custom fields easier with templates.', 'meta-box' ); ?></p>
|
284 |
-
</div>
|
285 |
-
</div>
|
286 |
-
<div class="extension-action">
|
287 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-template/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
288 |
-
</div>
|
289 |
-
</div>
|
290 |
-
<div class="extension">
|
291 |
-
<div class="extension-inner">
|
292 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" /></svg>
|
293 |
-
<div class="extension-info">
|
294 |
-
<h3>Meta Box Tooltip</h3>
|
295 |
-
<p><?php esc_html_e( 'Display help information for fields using beautiful tooltips.', 'meta-box' ); ?></p>
|
296 |
-
</div>
|
297 |
-
</div>
|
298 |
-
<div class="extension-action">
|
299 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tooltip/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
300 |
-
</div>
|
301 |
-
</div>
|
302 |
-
<div class="extension">
|
303 |
-
<div class="extension-inner">
|
304 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z" /></svg>
|
305 |
-
<div class="extension-info">
|
306 |
-
<h3>Meta Box Show Hide</h3>
|
307 |
-
<p><?php esc_html_e( 'Toggle meta boxes by page template, post format or taxonomy using JS.', 'meta-box' ); ?></p>
|
308 |
-
</div>
|
309 |
-
</div>
|
310 |
-
<div class="extension-action">
|
311 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-show-hide/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
312 |
-
</div>
|
313 |
-
</div>
|
314 |
-
<div class="extension">
|
315 |
-
<div class="extension-inner">
|
316 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M224 1536h608v-1152h-640v1120q0 13 9.5 22.5t22.5 9.5zm1376-32v-1120h-640v1152h608q13 0 22.5-9.5t9.5-22.5zm128-1216v1216q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
317 |
-
<div class="extension-info">
|
318 |
-
<h3>Meta Box Columns</h3>
|
319 |
-
<p><?php esc_html_e( 'Display fields more beautiful by putting them into 12-columns grid.', 'meta-box' ); ?></p>
|
320 |
-
</div>
|
321 |
-
</div>
|
322 |
-
<div class="extension-action">
|
323 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
324 |
-
</div>
|
325 |
-
</div>
|
326 |
-
<div class="extension">
|
327 |
-
<div class="extension-inner">
|
328 |
-
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M681 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z" /></svg>
|
329 |
-
<div class="extension-info">
|
330 |
-
<h3>Meta Box Include Exclude</h3>
|
331 |
-
<p><?php esc_html_e( 'Show or hide meta boxes whenever and for whomever you choose.', 'meta-box' ); ?></p>
|
332 |
-
</div>
|
333 |
-
</div>
|
334 |
-
<div class="extension-action">
|
335 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-include-exclude/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
336 |
-
</div>
|
337 |
-
</div>
|
338 |
-
<div class="extension">
|
339 |
-
<div class="extension-inner">
|
340 |
-
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M384 1184v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm1152 512v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm128 704v-832q0-13-9.5-22.5t-22.5-9.5h-1472q-13 0-22.5 9.5t-9.5 22.5v832q0 13 9.5 22.5t22.5 9.5h1472q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1472q66 0 113 47t47 113z" /></svg>
|
341 |
-
<div class="extension-info">
|
342 |
-
<h3>MB Custom Taxonomy</h3>
|
343 |
-
<p><?php esc_html_e( 'Create and manage custom taxonomies with an easy-to-use interface in WordPress.', 'meta-box' ); ?></p>
|
344 |
-
</div>
|
345 |
-
</div>
|
346 |
-
<div class="extension-action">
|
347 |
-
<a class="button" target="_blank" href="https://metabox.io/plugins/custom-taxonomy/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
348 |
-
</div>
|
349 |
-
</div>
|
350 |
-
</div>
|
351 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Extensions section.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div id="extensions" class="gt-tab-pane">
|
10 |
+
<p class="about-description">
|
11 |
+
<?php esc_html_e( 'Extend custom fields in WordPress well beyond what others would ever consider ordinary! Save over 70% with our extensions bundles.', 'meta-box' ); ?> <a target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'View Bundles', 'meta-box' ); ?> →</a>
|
12 |
+
</p>
|
13 |
+
<div class="extensions wp-clearfix">
|
14 |
+
<div class="extension">
|
15 |
+
<div class="extension-inner">
|
16 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M736 1440q0 12-10 24l-319 319q-10 9-23 9-12 0-23-9l-320-320q-15-16-7-35 8-20 30-20h192v-1376q0-14 9-23t23-9h192q14 0 23 9t9 23v1376h192q14 0 23 9t9 23zm1056 128v192q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h832q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-640q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h640q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-448q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h448q14 0 23 9t9 23zm-192-512v192q0 14-9 23t-23 9h-256q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h256q14 0 23 9t9 23z"/></svg>
|
17 |
+
<div class="extension-info">
|
18 |
+
<h3>Meta Box Builder</h3>
|
19 |
+
<p><?php esc_html_e( 'Drag and drop your custom fields into place without a single line of code.', 'meta-box' ); ?></p>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<div class="extension-action">
|
23 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-builder/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
<div class="extension">
|
27 |
+
<div class="extension-inner">
|
28 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
|
29 |
+
<div class="extension-info">
|
30 |
+
<h3>MB Custom Post Type</h3>
|
31 |
+
<p><?php esc_html_e( 'Create and manage custom post types easily in WordPress with an easy-to-use interface.', 'meta-box' ); ?></p>
|
32 |
+
</div>
|
33 |
+
</div>
|
34 |
+
<div class="extension-action">
|
35 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/custom-post-type/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
36 |
+
</div>
|
37 |
+
</div>
|
38 |
+
<div class="extension">
|
39 |
+
<div class="extension-inner">
|
40 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z" /></svg>
|
41 |
+
<div class="extension-info">
|
42 |
+
<h3>Meta Box Group</h3>
|
43 |
+
<p><?php esc_html_e( 'Create repeatable groups of custom fields for better appearance and structure.', 'meta-box' ); ?></p>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<div class="extension-action">
|
47 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<div class="extension">
|
51 |
+
<div class="extension-inner">
|
52 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 896q0-106-75-181t-181-75-181 75-75 181 75 181 181 75 181-75 75-181zm512-109v222q0 12-8 23t-20 13l-185 28q-19 54-39 91 35 50 107 138 10 12 10 25t-9 23q-27 37-99 108t-94 71q-12 0-26-9l-138-108q-44 23-91 38-16 136-29 186-7 28-36 28h-222q-14 0-24.5-8.5t-11.5-21.5l-28-184q-49-16-90-37l-141 107q-10 9-25 9-14 0-25-11-126-114-165-168-7-10-7-23 0-12 8-23 15-21 51-66.5t54-70.5q-27-50-41-99l-183-27q-13-2-21-12.5t-8-23.5v-222q0-12 8-23t19-13l186-28q14-46 39-92-40-57-107-138-10-12-10-24 0-10 9-23 26-36 98.5-107.5t94.5-71.5q13 0 26 10l138 107q44-23 91-38 16-136 29-186 7-28 36-28h222q14 0 24.5 8.5t11.5 21.5l28 184q49 16 90 37l142-107q9-9 24-9 13 0 25 10 129 119 165 170 7 8 7 22 0 12-8 23-15 21-51 66.5t-54 70.5q26 50 41 98l183 28q13 2 21 12.5t8 23.5z" /></svg>
|
53 |
+
<div class="extension-info">
|
54 |
+
<h3>MB Settings Page</h3>
|
55 |
+
<p><?php esc_html_e( 'Create a powerful settings page for your theme, plugin or website.', 'meta-box' ); ?></p>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
<div class="extension-action">
|
59 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<div class="extension">
|
63 |
+
<div class="extension-inner">
|
64 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
|
65 |
+
<div class="extension-info">
|
66 |
+
<h3>Meta Box Conditional Logic</h3>
|
67 |
+
<p><?php esc_html_e( 'Control the visibility of meta boxes and fields or even HTML elements with ease.', 'meta-box' ); ?></p>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
<div class="extension-action">
|
71 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
<div class="extension">
|
75 |
+
<div class="extension-inner">
|
76 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1703 478q40 57 18 129l-275 906q-19 64-76.5 107.5t-122.5 43.5h-923q-77 0-148.5-53.5t-99.5-131.5q-24-67-2-127 0-4 3-27t4-37q1-8-3-21.5t-3-19.5q2-11 8-21t16.5-23.5 16.5-23.5q23-38 45-91.5t30-91.5q3-10 .5-30t-.5-28q3-11 17-28t17-23q21-36 42-92t25-90q1-9-2.5-32t.5-28q4-13 22-30.5t22-22.5q19-26 42.5-84.5t27.5-96.5q1-8-3-25.5t-2-26.5q2-8 9-18t18-23 17-21q8-12 16.5-30.5t15-35 16-36 19.5-32 26.5-23.5 36-11.5 47.5 5.5l-1 3q38-9 51-9h761q74 0 114 56t18 130l-274 906q-36 119-71.5 153.5t-128.5 34.5h-869q-27 0-38 15-11 16-1 43 24 70 144 70h923q29 0 56-15.5t35-41.5l300-987q7-22 5-57 38 15 59 43zm-1064 2q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5zm-83 256q-4 13 2 22.5t20 9.5h608q13 0 25.5-9.5t16.5-22.5l21-64q4-13-2-22.5t-20-9.5h-608q-13 0-25.5 9.5t-16.5 22.5z" /></svg>
|
77 |
+
<div class="extension-info">
|
78 |
+
<h3>MB Term Meta</h3>
|
79 |
+
<p><?php esc_html_e( 'Easily add custom fields to categories, tags or any custom taxonomy.', 'meta-box' ); ?></p>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
<div class="extension-action">
|
83 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
<div class="extension">
|
87 |
+
<div class="extension-inner">
|
88 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1536 1399q0 109-62.5 187t-150.5 78h-854q-88 0-150.5-78t-62.5-187q0-85 8.5-160.5t31.5-152 58.5-131 94-89 134.5-34.5q131 128 313 128t313-128q76 0 134.5 34.5t94 89 58.5 131 31.5 152 8.5 160.5zm-256-887q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5z" /></svg>
|
89 |
+
<div class="extension-info">
|
90 |
+
<h3>MB User Meta</h3>
|
91 |
+
<p><?php esc_html_e( 'Add custom fields to user profile (user meta) quickly with simple syntax.', 'meta-box' ); ?></p>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
<div class="extension-action">
|
95 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<div class="extension">
|
99 |
+
<div class="extension-inner">
|
100 |
+
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M657 896q-162 5-265 128h-134q-82 0-138-40.5t-56-118.5q0-353 124-353 6 0 43.5 21t97.5 42.5 119 21.5q67 0 133-23-5 37-5 66 0 139 81 256zm1071 637q0 120-73 189.5t-194 69.5h-874q-121 0-194-69.5t-73-189.5q0-53 3.5-103.5t14-109 26.5-108.5 43-97.5 62-81 85.5-53.5 111.5-20q10 0 43 21.5t73 48 107 48 135 21.5 135-21.5 107-48 73-48 43-21.5q61 0 111.5 20t85.5 53.5 62 81 43 97.5 26.5 108.5 14 109 3.5 103.5zm-1024-1277q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181zm704 384q0 159-112.5 271.5t-271.5 112.5-271.5-112.5-112.5-271.5 112.5-271.5 271.5-112.5 271.5 112.5 112.5 271.5zm576 225q0 78-56 118.5t-138 40.5h-134q-103-123-265-128 81-117 81-256 0-29-5-66 66 23 133 23 59 0 119-21.5t97.5-42.5 43.5-21q124 0 124 353zm-128-609q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75 75 181z" /></svg>
|
101 |
+
<div class="extension-info">
|
102 |
+
<h3>MB User Profile</h3>
|
103 |
+
<p><?php esc_html_e( 'Create register, login and edit user profile forms in the frontend. Embed everywhere with shortcodes.', 'meta-box' ); ?></p>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
<div class="extension-action">
|
107 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-user-profile/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
<div class="extension">
|
111 |
+
<div class="extension-inner">
|
112 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-121.5t.5-121.5v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z" /></svg>
|
113 |
+
<div class="extension-info">
|
114 |
+
<h3>MB Frontend Submission</h3>
|
115 |
+
<p><?php esc_html_e( 'Create frontend forms for users to submit custom content. Embed everywhere with shortcode.', 'meta-box' ); ?></p>
|
116 |
+
</div>
|
117 |
+
</div>
|
118 |
+
<div class="extension-action">
|
119 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-frontend-submission/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
<div class="extension">
|
123 |
+
<div class="extension-inner">
|
124 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1600 1312v-704q0-40-28-68t-68-28h-704q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z" /></svg>
|
125 |
+
<div class="extension-info">
|
126 |
+
<h3>Meta Box Tabs</h3>
|
127 |
+
<p><?php esc_html_e( 'Add as many custom fields as you want and organize them into tabs.', 'meta-box' ); ?></p>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
<div class="extension-action">
|
131 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tabs/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
<div class="extension">
|
135 |
+
<div class="extension-inner">
|
136 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
137 |
+
<div class="extension-info">
|
138 |
+
<h3>MB Custom Table</h3>
|
139 |
+
<p><?php esc_html_e( 'Save custom fields data to custom table instead of the default meta tables. Reduce database size and increase performance.', 'meta-box' ); ?></p>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
<div class="extension-action">
|
143 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-custom-table/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
144 |
+
</div>
|
145 |
+
</div>
|
146 |
+
<div class="extension">
|
147 |
+
<div class="extension-inner">
|
148 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M672 1472q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm0-1152q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm640 128q0-40-28-68t-68-28-68 28-28 68 28 68 68 28 68-28 28-68zm96 0q0 52-26 96.5t-70 69.5q-2 287-226 414-67 38-203 81-128 40-169.5 71t-41.5 100v26q44 25 70 69.5t26 96.5q0 80-56 136t-136 56-136-56-56-136q0-52 26-96.5t70-69.5v-820q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136q0 52-26 96.5t-70 69.5v497q54-26 154-57 55-17 87.5-29.5t70.5-31 59-39.5 40.5-51 28-69.5 8.5-91.5q-44-25-70-69.5t-26-96.5q0-80 56-136t136-56 136 56 56 136z" /></svg>
|
149 |
+
<div class="extension-info">
|
150 |
+
<h3>MB Rest API</h3>
|
151 |
+
<p><?php esc_html_e( 'Pull all meta value from posts, terms into the WP REST API responses.', 'meta-box' ); ?></p>
|
152 |
+
</div>
|
153 |
+
</div>
|
154 |
+
<div class="extension-action">
|
155 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-rest-api/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
<div class="extension">
|
159 |
+
<div class="extension-inner">
|
160 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 1184v192q0 13-9.5 22.5t-22.5 9.5h-1376v192q0 13-9.5 22.5t-22.5 9.5q-12 0-24-10l-319-320q-9-9-9-22 0-14 9-23l320-320q9-9 23-9 13 0 22.5 9.5t9.5 22.5v192h1376q13 0 22.5 9.5t9.5 22.5zm0-544q0 14-9 23l-320 320q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-192h-1376q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1376v-192q0-14 9-23t23-9q12 0 24 10l319 319q9 9 9 23z" /></svg>
|
161 |
+
<div class="extension-info">
|
162 |
+
<h3>MB Relationships</h3>
|
163 |
+
<p><?php esc_html_e( 'A lightweight WordPress plugin for creating many-to-many relationships between posts, terms and users.', 'meta-box' ); ?></p>
|
164 |
+
</div>
|
165 |
+
</div>
|
166 |
+
<div class="extension-action">
|
167 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-relationships/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
<div class="extension">
|
171 |
+
<div class="extension-inner">
|
172 |
+
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M212 768l623 665-300-665h-323zm812 772l349-772h-698zm-486-900l204-384h-262l-288 384h346zm675 793l623-665h-323zm-530-793h682l-204-384h-274zm827 0h346l-288-384h-262zm141-486l384 512q14 18 13 41.5t-17 40.5l-960 1024q-18 20-47 20t-47-20l-960-1024q-16-17-17-40.5t13-41.5l384-512q18-26 51-26h1152q33 0 51 26z" /></svg>
|
173 |
+
<div class="extension-info">
|
174 |
+
<h3>Meta Box – FacetWP Integrator</h3>
|
175 |
+
<p><?php esc_html_e( 'Integrates Meta Box and FacetWP, makes custom fields searchable and filterable in the frontend.', 'meta-box' ); ?></p>
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
<div class="extension-action">
|
179 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-facetwp-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
<div class="extension">
|
183 |
+
<div class="extension-inner">
|
184 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1755 453q37 38 37 90.5t-37 90.5l-401 400 150 150-160 160q-163 163-389.5 186.5t-411.5-100.5l-362 362h-181v-181l362-362q-124-185-100.5-411.5t186.5-389.5l160-160 150 150 400-401q38-37 91-37t90 37 37 90.5-37 90.5l-400 401 234 234 401-400q38-37 91-37t90 37z" /></svg>
|
185 |
+
<div class="extension-info">
|
186 |
+
<h3>Meta Box – Beaver Themer Integrator</h3>
|
187 |
+
<p><?php esc_html_e( 'Select and show custom fields created by the Meta Box plugin in the Beaver Themer field connection.', 'meta-box' ); ?></p>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
<div class="extension-action">
|
191 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-beaver-themer-integrator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
192 |
+
</div>
|
193 |
+
</div>
|
194 |
+
<div class="extension">
|
195 |
+
<div class="extension-inner">
|
196 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1792 896q0 174-120 321.5t-326 233-450 85.5q-70 0-145-8-198 175-460 242-49 14-114 22-17 2-30.5-9t-17.5-29v-1q-3-4-.5-12t2-10 4.5-9.5l6-9 7-8.5 8-9q7-8 31-34.5t34.5-38 31-39.5 32.5-51 27-59 26-76q-157-89-247.5-220t-90.5-281q0-130 71-248.5t191-204.5 286-136.5 348-50.5q244 0 450 85.5t326 233 120 321.5z" /></svg>
|
197 |
+
<div class="extension-info">
|
198 |
+
<h3>MB Comment Meta</h3>
|
199 |
+
<p><?php esc_html_e( 'Add custom fields to comments in WordPress. Support all field types and options.', 'meta-box' ); ?></p>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<div class="extension-action">
|
203 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-comment-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
<div class="extension">
|
207 |
+
<div class="extension-inner">
|
208 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 15 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z" /></svg>
|
209 |
+
<div class="extension-info">
|
210 |
+
<h3>MB Revision</h3>
|
211 |
+
<p><?php esc_html_e( 'Track changes of custom fields with WordPress revision. Save, compare, restore the changes easily.', 'meta-box' ); ?></p>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
<div class="extension-action">
|
215 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-revision/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
<div class="extension">
|
219 |
+
<div class="extension-inner">
|
220 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1593 349l-640 1280q-17 35-57 35-5 0-15-2-22-5-35.5-22.5t-13.5-39.5v-576h-576q-22 0-39.5-13.5t-22.5-35.5 4-42 29-30l1280-640q13-7 29-7 27 0 45 19 15 14 18.5 34.5t-6.5 39.5z" /></svg>
|
221 |
+
<div class="extension-info">
|
222 |
+
<h3>Meta Box Geolocation</h3>
|
223 |
+
<p><?php esc_html_e( 'Automatically and instantly populate location data with the power of Google Maps Geolocation API.', 'meta-box' ); ?></p>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
<div class="extension-action">
|
227 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-geolocation/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
228 |
+
</div>
|
229 |
+
</div>
|
230 |
+
<div class="extension">
|
231 |
+
<div class="extension-inner">
|
232 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
233 |
+
<div class="extension-info">
|
234 |
+
<h3>MB Admin Columns</h3>
|
235 |
+
<p><?php esc_html_e( 'Display custom fields in table columns in admin screens for All Posts (types).', 'meta-box' ); ?></p>
|
236 |
+
</div>
|
237 |
+
</div>
|
238 |
+
<div class="extension-action">
|
239 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/mb-admin-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
240 |
+
</div>
|
241 |
+
</div>
|
242 |
+
<div class="extension">
|
243 |
+
<div class="extension-inner">
|
244 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M888 1184l116-116-152-152-116 116v56h96v96h56zm440-720q-16-16-33 1l-350 350q-17 17-1 33t33-1l350-350q17-17 1-33zm80 594v190q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-14 14-32 8-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-126q0-13 9-22l64-64q15-15 35-7t20 29zm-96-738l288 288-672 672h-288v-288zm444 132l-92 92-288-288 92-92q28-28 68-28t68 28l152 152q28 28 28 68t-28 68z" /></svg>
|
245 |
+
<div class="extension-info">
|
246 |
+
<h3>Meta Box for Yoast SEO</h3>
|
247 |
+
<p><?php esc_html_e( 'Add content of custom fields to Yoast SEO Content Analysis to have better/correct SEO score.', 'meta-box' ); ?></p>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
<div class="extension-action">
|
251 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-yoast-seo/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
<div class="extension">
|
255 |
+
<div class="extension-inner">
|
256 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z" /></svg>
|
257 |
+
<div class="extension-info">
|
258 |
+
<h3>Meta Box Text Limiter</h3>
|
259 |
+
<p><?php esc_html_e( 'Limit the number of characters or words entered for text and textarea fields.', 'meta-box' ); ?></p>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
+
<div class="extension-action">
|
263 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-text-limiter/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
<div class="extension">
|
267 |
+
<div class="extension-inner">
|
268 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z" /></svg>
|
269 |
+
<div class="extension-info">
|
270 |
+
<h3>Meta Box Updater</h3>
|
271 |
+
<p><?php esc_html_e( 'Automatically updates all Meta Box extensions within the WordPress Admin area.', 'meta-box' ); ?></p>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
<div class="extension-action">
|
275 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-updater/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
276 |
+
</div>
|
277 |
+
</div>
|
278 |
+
<div class="extension">
|
279 |
+
<div class="extension-inner">
|
280 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 476q14 14 28 36h-472v-472q22 14 36 28zm-476 164h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544q0 40 28 68t68 28zm160 736v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23zm0-256v-64q0-14-9-23t-23-9h-704q-14 0-23 9t-9 23v64q0 14 9 23t23 9h704q14 0 23-9t9-23z" /></svg>
|
281 |
+
<div class="extension-info">
|
282 |
+
<h3>Meta Box Template</h3>
|
283 |
+
<p><?php esc_html_e( 'Define custom meta boxes and custom fields easier with templates.', 'meta-box' ); ?></p>
|
284 |
+
</div>
|
285 |
+
</div>
|
286 |
+
<div class="extension-action">
|
287 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-template/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
288 |
+
</div>
|
289 |
+
</div>
|
290 |
+
<div class="extension">
|
291 |
+
<div class="extension-inner">
|
292 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" /></svg>
|
293 |
+
<div class="extension-info">
|
294 |
+
<h3>Meta Box Tooltip</h3>
|
295 |
+
<p><?php esc_html_e( 'Display help information for fields using beautiful tooltips.', 'meta-box' ); ?></p>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
<div class="extension-action">
|
299 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-tooltip/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
300 |
+
</div>
|
301 |
+
</div>
|
302 |
+
<div class="extension">
|
303 |
+
<div class="extension-inner">
|
304 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z" /></svg>
|
305 |
+
<div class="extension-info">
|
306 |
+
<h3>Meta Box Show Hide</h3>
|
307 |
+
<p><?php esc_html_e( 'Toggle meta boxes by page template, post format or taxonomy using JS.', 'meta-box' ); ?></p>
|
308 |
+
</div>
|
309 |
+
</div>
|
310 |
+
<div class="extension-action">
|
311 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-show-hide/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
<div class="extension">
|
315 |
+
<div class="extension-inner">
|
316 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M224 1536h608v-1152h-640v1120q0 13 9.5 22.5t22.5 9.5zm1376-32v-1120h-640v1152h608q13 0 22.5-9.5t9.5-22.5zm128-1216v1216q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1344q66 0 113 47t47 113z" /></svg>
|
317 |
+
<div class="extension-info">
|
318 |
+
<h3>Meta Box Columns</h3>
|
319 |
+
<p><?php esc_html_e( 'Display fields more beautiful by putting them into 12-columns grid.', 'meta-box' ); ?></p>
|
320 |
+
</div>
|
321 |
+
</div>
|
322 |
+
<div class="extension-action">
|
323 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-columns/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
<div class="extension">
|
327 |
+
<div class="extension-inner">
|
328 |
+
<svg viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M681 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z" /></svg>
|
329 |
+
<div class="extension-info">
|
330 |
+
<h3>Meta Box Include Exclude</h3>
|
331 |
+
<p><?php esc_html_e( 'Show or hide meta boxes whenever and for whomever you choose.', 'meta-box' ); ?></p>
|
332 |
+
</div>
|
333 |
+
</div>
|
334 |
+
<div class="extension-action">
|
335 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/meta-box-include-exclude/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a>
|
336 |
+
</div>
|
337 |
+
</div>
|
338 |
+
<div class="extension">
|
339 |
+
<div class="extension-inner">
|
340 |
+
<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M384 1184v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-64q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h64q13 0 22.5 9.5t9.5 22.5zm1152 512v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm0-256v64q0 13-9.5 22.5t-22.5 9.5h-960q-13 0-22.5-9.5t-9.5-22.5v-64q0-13 9.5-22.5t22.5-9.5h960q13 0 22.5 9.5t9.5 22.5zm128 704v-832q0-13-9.5-22.5t-22.5-9.5h-1472q-13 0-22.5 9.5t-9.5 22.5v832q0 13 9.5 22.5t22.5 9.5h1472q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1472q66 0 113 47t47 113z" /></svg>
|
341 |
+
<div class="extension-info">
|
342 |
+
<h3>MB Custom Taxonomy</h3>
|
343 |
+
<p><?php esc_html_e( 'Create and manage custom taxonomies with an easy-to-use interface in WordPress.', 'meta-box' ); ?></p>
|
344 |
+
</div>
|
345 |
+
</div>
|
346 |
+
<div class="extension-action">
|
347 |
+
<a class="button" target="_blank" href="https://metabox.io/plugins/custom-taxonomy/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Free Download', 'meta-box' ); ?></a>
|
348 |
+
</div>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
</div>
|
inc/libraries/meta-box/inc/about/sections/getting-started.php
CHANGED
@@ -1,36 +1,36 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Getting started section.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<div id="getting-started" class="gt-tab-pane gt-is-active">
|
10 |
-
<div class="feature-section two-col">
|
11 |
-
<div class="col">
|
12 |
-
<h3><?php esc_html_e( 'Getting Started With Online Generator', 'meta-box' ); ?></h3>
|
13 |
-
<p><?php esc_html_e( 'The fastest way to getting started with Meta Box is use our online generator to generate meta boxes with custom fields. It provides a friendly UI for you to create meta boxes and custom fields just by drag and drop fields.', 'meta-box' ); ?><p>
|
14 |
-
|
15 |
-
<a target="_blank" class="screenshot" href="https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><img src="<?php echo esc_url( RWMB_URL . 'inc/about/images/online-generator.png' ); ?>" alt="<?php esc_attr_e( 'online generator', 'meta-box' ); ?>"></a>
|
16 |
-
|
17 |
-
<p><a class="button" target="_blank" href="<?php echo esc_url( 'https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Go to Online Generator', 'meta-box' ); ?></a></p>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div class="col">
|
21 |
-
<h3><?php esc_html_e( 'Understand The Basics', 'meta-box' ); ?></h3>
|
22 |
-
<p><?php esc_html_e( 'Meta Box doesn\'t have any admin page for configuration or settings. Instead of that, it provides a very powerful API to speed up the process of creating meta boxes and custom fields. It might take you a little time at first, but then you\'ll love the way it work because it helps you do and customize almost everything.', 'meta-box' ); ?><p>
|
23 |
-
<p><a class="button" target="_blank" href="<?php echo esc_url( 'https://docs.metabox.io/quick-start/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a></p>
|
24 |
-
|
25 |
-
<h3><?php esc_html_e( 'Extensions', 'meta-box' ); ?></h3>
|
26 |
-
<p><?php esc_html_e( 'Wanna see more features that transform your WordPress website into a powerful CMS? Check out some extensions below:', 'meta-box' ); ?><p>
|
27 |
-
<ul>
|
28 |
-
<li><a target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-welcome-widgets-menus"></span> <?php esc_html_e( 'Meta Box Group', 'meta-box' ); ?></a></li>
|
29 |
-
<li><a target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Meta Box Conditional Logic', 'meta-box' ); ?></a></li>
|
30 |
-
<li><a target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'MB Settings Page', 'meta-box' ); ?></a></li>
|
31 |
-
<li><a target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-image-filter"></span> <?php esc_html_e( 'MB Term Meta', 'meta-box' ); ?></a></li>
|
32 |
-
</ul>
|
33 |
-
<p><a class="button" target="_blank" href="https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'More Extensions', 'meta-box' ); ?></a>
|
34 |
-
</div>
|
35 |
-
</div>
|
36 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Getting started section.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div id="getting-started" class="gt-tab-pane gt-is-active">
|
10 |
+
<div class="feature-section two-col">
|
11 |
+
<div class="col">
|
12 |
+
<h3><?php esc_html_e( 'Getting Started With Online Generator', 'meta-box' ); ?></h3>
|
13 |
+
<p><?php esc_html_e( 'The fastest way to getting started with Meta Box is use our online generator to generate meta boxes with custom fields. It provides a friendly UI for you to create meta boxes and custom fields just by drag and drop fields.', 'meta-box' ); ?><p>
|
14 |
+
|
15 |
+
<a target="_blank" class="screenshot" href="https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><img src="<?php echo esc_url( RWMB_URL . 'inc/about/images/online-generator.png' ); ?>" alt="<?php esc_attr_e( 'online generator', 'meta-box' ); ?>"></a>
|
16 |
+
|
17 |
+
<p><a class="button" target="_blank" href="<?php echo esc_url( 'https://metabox.io/online-generator/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Go to Online Generator', 'meta-box' ); ?></a></p>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="col">
|
21 |
+
<h3><?php esc_html_e( 'Understand The Basics', 'meta-box' ); ?></h3>
|
22 |
+
<p><?php esc_html_e( 'Meta Box doesn\'t have any admin page for configuration or settings. Instead of that, it provides a very powerful API to speed up the process of creating meta boxes and custom fields. It might take you a little time at first, but then you\'ll love the way it work because it helps you do and customize almost everything.', 'meta-box' ); ?><p>
|
23 |
+
<p><a class="button" target="_blank" href="<?php echo esc_url( 'https://docs.metabox.io/quick-start/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Learn More', 'meta-box' ); ?></a></p>
|
24 |
+
|
25 |
+
<h3><?php esc_html_e( 'Extensions', 'meta-box' ); ?></h3>
|
26 |
+
<p><?php esc_html_e( 'Wanna see more features that transform your WordPress website into a powerful CMS? Check out some extensions below:', 'meta-box' ); ?><p>
|
27 |
+
<ul>
|
28 |
+
<li><a target="_blank" href="https://metabox.io/plugins/meta-box-group/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-welcome-widgets-menus"></span> <?php esc_html_e( 'Meta Box Group', 'meta-box' ); ?></a></li>
|
29 |
+
<li><a target="_blank" href="https://metabox.io/plugins/meta-box-conditional-logic/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-yes"></span> <?php esc_html_e( 'Meta Box Conditional Logic', 'meta-box' ); ?></a></li>
|
30 |
+
<li><a target="_blank" href="https://metabox.io/plugins/mb-settings-page/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'MB Settings Page', 'meta-box' ); ?></a></li>
|
31 |
+
<li><a target="_blank" href="https://metabox.io/plugins/mb-term-meta/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><span class="dashicons dashicons-image-filter"></span> <?php esc_html_e( 'MB Term Meta', 'meta-box' ); ?></a></li>
|
32 |
+
</ul>
|
33 |
+
<p><a class="button" target="_blank" href="https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'More Extensions', 'meta-box' ); ?></a>
|
34 |
+
</div>
|
35 |
+
</div>
|
36 |
+
</div>
|
inc/libraries/meta-box/inc/about/sections/newsletter.php
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Newsletter form
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
|
10 |
-
<form method="post" action="https://app.zetamail.vn/form.php?form=77" target="_blank" class="newsletter">
|
11 |
-
<h3><span class="dashicons dashicons-email-alt"></span> <?php esc_html_e( 'Meta Box Newsletter', 'meta-box' ); ?></h3>
|
12 |
-
<input name="format" value="h" type="hidden">
|
13 |
-
<p><?php esc_html_e( 'Want to learn how to use Meta Box to its full potential? Sign up to get valuable tips and resources. We will never spam you.', 'meta-box' ); ?></p>
|
14 |
-
<input name="email" value="" placeholder="joe@gmail.com" required type="email">
|
15 |
-
<button class="button button-primary"><?php esc_html_e( 'Subscribe', 'meta-box' ); ?></button>
|
16 |
-
</form>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Newsletter form
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
|
10 |
+
<form method="post" action="https://app.zetamail.vn/form.php?form=77" target="_blank" class="newsletter">
|
11 |
+
<h3><span class="dashicons dashicons-email-alt"></span> <?php esc_html_e( 'Meta Box Newsletter', 'meta-box' ); ?></h3>
|
12 |
+
<input name="format" value="h" type="hidden">
|
13 |
+
<p><?php esc_html_e( 'Want to learn how to use Meta Box to its full potential? Sign up to get valuable tips and resources. We will never spam you.', 'meta-box' ); ?></p>
|
14 |
+
<input name="email" value="" placeholder="joe@gmail.com" required type="email">
|
15 |
+
<button class="button button-primary"><?php esc_html_e( 'Subscribe', 'meta-box' ); ?></button>
|
16 |
+
</form>
|
inc/libraries/meta-box/inc/about/sections/support.php
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Support section.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<div id="support" class="gt-tab-pane">
|
10 |
-
<p class="about-description">
|
11 |
-
<?php
|
12 |
-
$allowed_html = array(
|
13 |
-
'a' => array(
|
14 |
-
'href' => array(),
|
15 |
-
),
|
16 |
-
);
|
17 |
-
// Translators: %s - link to documentation.
|
18 |
-
echo wp_kses( sprintf( __( 'Still need help with Meta Box? We offer excellent support for you. But don\'t forget to check our <a href="%s">documentation</a> first.', 'meta-box' ), 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ), $allowed_html );
|
19 |
-
?>
|
20 |
-
</p>
|
21 |
-
<div class="feature-section two-col">
|
22 |
-
<div class="col">
|
23 |
-
<h3><?php esc_html_e( 'Free Support', 'meta-box' ); ?></h3>
|
24 |
-
<p><?php esc_html_e( 'If you have any question about how to use the plugin, please open a new topic on WordPress.org support forum or open a new issue on Github (preferable). We will try to answer as soon as we can.', 'meta-box' ); ?><p>
|
25 |
-
<p><a class="button" target="_blank" href="https://github.com/wpmetabox/meta-box/issues"><?php esc_html_e( 'Go to Github', 'meta-box' ); ?> →</a></p>
|
26 |
-
<p><a class="button" target="_blank" href="https://wordpress.org/support/plugin/meta-box"><?php esc_html_e( 'Go to WordPress.org', 'meta-box' ); ?> →</a></p>
|
27 |
-
</div>
|
28 |
-
|
29 |
-
<div class="col">
|
30 |
-
<h3><?php esc_html_e( 'Premium Support', 'meta-box' ); ?></h3>
|
31 |
-
<p><?php esc_html_e( 'For users that have bought premium extensions, the support is provided in the Meta Box Support forum. Any question will be answered with technical details within 24 hours.', 'meta-box' ); ?><p>
|
32 |
-
<p><a class="button" target="_blank" href="https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Go to support forum', 'meta-box' ); ?> →</a></p>
|
33 |
-
</div>
|
34 |
-
</div>
|
35 |
-
</div>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Support section.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div id="support" class="gt-tab-pane">
|
10 |
+
<p class="about-description">
|
11 |
+
<?php
|
12 |
+
$allowed_html = array(
|
13 |
+
'a' => array(
|
14 |
+
'href' => array(),
|
15 |
+
),
|
16 |
+
);
|
17 |
+
// Translators: %s - link to documentation.
|
18 |
+
echo wp_kses( sprintf( __( 'Still need help with Meta Box? We offer excellent support for you. But don\'t forget to check our <a href="%s">documentation</a> first.', 'meta-box' ), 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ), $allowed_html );
|
19 |
+
?>
|
20 |
+
</p>
|
21 |
+
<div class="feature-section two-col">
|
22 |
+
<div class="col">
|
23 |
+
<h3><?php esc_html_e( 'Free Support', 'meta-box' ); ?></h3>
|
24 |
+
<p><?php esc_html_e( 'If you have any question about how to use the plugin, please open a new topic on WordPress.org support forum or open a new issue on Github (preferable). We will try to answer as soon as we can.', 'meta-box' ); ?><p>
|
25 |
+
<p><a class="button" target="_blank" href="https://github.com/wpmetabox/meta-box/issues"><?php esc_html_e( 'Go to Github', 'meta-box' ); ?> →</a></p>
|
26 |
+
<p><a class="button" target="_blank" href="https://wordpress.org/support/plugin/meta-box"><?php esc_html_e( 'Go to WordPress.org', 'meta-box' ); ?> →</a></p>
|
27 |
+
</div>
|
28 |
+
|
29 |
+
<div class="col">
|
30 |
+
<h3><?php esc_html_e( 'Premium Support', 'meta-box' ); ?></h3>
|
31 |
+
<p><?php esc_html_e( 'For users that have bought premium extensions, the support is provided in the Meta Box Support forum. Any question will be answered with technical details within 24 hours.', 'meta-box' ); ?><p>
|
32 |
+
<p><a class="button" target="_blank" href="https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Go to support forum', 'meta-box' ); ?> →</a></p>
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
</div>
|
inc/libraries/meta-box/inc/about/sections/tabs.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Tabs navigation.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<h2 class="nav-tab-wrapper">
|
10 |
-
<a href="#getting-started" class="nav-tab nav-tab-active"><?php esc_html_e( 'Getting Started', 'meta-box' ); ?></a>
|
11 |
-
<?php do_action( 'rwmb_about_tabs' ); ?>
|
12 |
-
<a href="#extensions" class="nav-tab"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
|
13 |
-
<a href="#support" class="nav-tab"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
|
14 |
-
</h2>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tabs navigation.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<h2 class="nav-tab-wrapper">
|
10 |
+
<a href="#getting-started" class="nav-tab nav-tab-active"><?php esc_html_e( 'Getting Started', 'meta-box' ); ?></a>
|
11 |
+
<?php do_action( 'rwmb_about_tabs' ); ?>
|
12 |
+
<a href="#extensions" class="nav-tab"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
|
13 |
+
<a href="#support" class="nav-tab"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
|
14 |
+
</h2>
|
inc/libraries/meta-box/inc/about/sections/upgrade.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Upgrade notice
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
?>
|
9 |
-
<div class="upgrade">
|
10 |
-
<h3><span class="dashicons dashicons-awards"></span> <?php esc_html_e( 'Upgrade to Meta Box PRO', 'meta-box' ); ?></h3>
|
11 |
-
<p><?php esc_html_e( 'Please upgrade to the PRO plan to unlock more awesome features.', 'meta-box' ); ?></p>
|
12 |
-
<ul>
|
13 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom fields with drag-n-drop interface - no coding knowledge required!', 'meta-box' ); ?></li>
|
14 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Add custom fields to taxonomies or user profile.', 'meta-box' ); ?></li>
|
15 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom settings pages.', 'meta-box' ); ?></li>
|
16 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create frontend submission forms.', 'meta-box' ); ?></li>
|
17 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Save custom fields in custom tables.', 'meta-box' ); ?></li>
|
18 |
-
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'And much more!', 'meta-box' ); ?></li>
|
19 |
-
</ul>
|
20 |
-
<a class="button button-primary" target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Get Meta Box PRO now', 'meta-box' ); ?></a>
|
21 |
-
</div>
|
22 |
-
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
23 |
-
<symbol id="checkmark-outline" viewBox="0 0 20 20">
|
24 |
-
<path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM6.7 9.29L9 11.6l4.3-4.3 1.4 1.42L9 14.4l-3.7-3.7 1.4-1.42z"/>
|
25 |
-
</symbol>
|
26 |
-
</svg>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Upgrade notice
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
?>
|
9 |
+
<div class="upgrade">
|
10 |
+
<h3><span class="dashicons dashicons-awards"></span> <?php esc_html_e( 'Upgrade to Meta Box PRO', 'meta-box' ); ?></h3>
|
11 |
+
<p><?php esc_html_e( 'Please upgrade to the PRO plan to unlock more awesome features.', 'meta-box' ); ?></p>
|
12 |
+
<ul>
|
13 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom fields with drag-n-drop interface - no coding knowledge required!', 'meta-box' ); ?></li>
|
14 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Add custom fields to taxonomies or user profile.', 'meta-box' ); ?></li>
|
15 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create custom settings pages.', 'meta-box' ); ?></li>
|
16 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Create frontend submission forms.', 'meta-box' ); ?></li>
|
17 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'Save custom fields in custom tables.', 'meta-box' ); ?></li>
|
18 |
+
<li><svg class="icon"><use xlink:href="#checkmark-outline"></use></svg><?php esc_html_e( 'And much more!', 'meta-box' ); ?></li>
|
19 |
+
</ul>
|
20 |
+
<a class="button button-primary" target="_blank" href="https://metabox.io/pricing/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin"><?php esc_html_e( 'Get Meta Box PRO now', 'meta-box' ); ?></a>
|
21 |
+
</div>
|
22 |
+
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
23 |
+
<symbol id="checkmark-outline" viewBox="0 0 20 20">
|
24 |
+
<path d="M2.93 17.07A10 10 0 1 1 17.07 2.93 10 10 0 0 1 2.93 17.07zm12.73-1.41A8 8 0 1 0 4.34 4.34a8 8 0 0 0 11.32 11.32zM6.7 9.29L9 11.6l4.3-4.3 1.4 1.42L9 14.4l-3.7-3.7 1.4-1.42z"/>
|
25 |
+
</symbol>
|
26 |
+
</svg>
|
inc/libraries/meta-box/inc/about/sections/welcome.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Welcome section.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
* @subpackage MB Custom Post Type
|
7 |
-
*/
|
8 |
-
|
9 |
-
?>
|
10 |
-
<h1>
|
11 |
-
<?php
|
12 |
-
// Translators: %s - Plugin name.
|
13 |
-
echo esc_html( sprintf( __( 'Welcome to %s', 'meta-box' ), $this->plugin['Name'] ) );
|
14 |
-
?>
|
15 |
-
</h1>
|
16 |
-
<div class="about-text"><?php esc_html_e( 'Meta Box is a free Gutenberg and GDPR-compatible WordPress custom fields plugin and framework that makes quick work of customizing a website with—you guessed it—meta boxes and custom fields in WordPress. Follow the instruction below to get started!', 'meta-box' ); ?></div>
|
17 |
-
<a target="_blank" class="wp-badge" href="<?php echo esc_url( 'https://metabox.io/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php echo esc_html( $this->plugin['Name'] ); ?></a>
|
18 |
-
<p class="about-buttons">
|
19 |
-
<a target="_blank" class="button" href="<?php echo esc_url( 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Documentation', 'meta-box' ); ?></a>
|
20 |
-
<a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
|
21 |
-
<a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
|
22 |
-
<a target="_blank" class="button" href="https://www.facebook.com/sharer/sharer.php?u=https%3A//metabox.io"><span class="dashicons dashicons-facebook-alt"></span> Share</a>
|
23 |
-
<a target="_blank" class="button" href="https://twitter.com/home?status=Reduce%20your%20dev%20time!%20Meta%20Box%20is%20the%20most%20powerful%20custom%20fields%20plugin%20for%20WordPress%20on%20the%20web%20https%3A//metabox.io%20via%20%40wpmetabox"><span class="dashicons dashicons-twitter"></span> Tweet</a>
|
24 |
-
</p>
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Welcome section.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
* @subpackage MB Custom Post Type
|
7 |
+
*/
|
8 |
+
|
9 |
+
?>
|
10 |
+
<h1>
|
11 |
+
<?php
|
12 |
+
// Translators: %s - Plugin name.
|
13 |
+
echo esc_html( sprintf( __( 'Welcome to %s', 'meta-box' ), $this->plugin['Name'] ) );
|
14 |
+
?>
|
15 |
+
</h1>
|
16 |
+
<div class="about-text"><?php esc_html_e( 'Meta Box is a free Gutenberg and GDPR-compatible WordPress custom fields plugin and framework that makes quick work of customizing a website with—you guessed it—meta boxes and custom fields in WordPress. Follow the instruction below to get started!', 'meta-box' ); ?></div>
|
17 |
+
<a target="_blank" class="wp-badge" href="<?php echo esc_url( 'https://metabox.io/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php echo esc_html( $this->plugin['Name'] ); ?></a>
|
18 |
+
<p class="about-buttons">
|
19 |
+
<a target="_blank" class="button" href="<?php echo esc_url( 'https://docs.metabox.io?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Documentation', 'meta-box' ); ?></a>
|
20 |
+
<a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/plugins/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Extensions', 'meta-box' ); ?></a>
|
21 |
+
<a target="_blank" class="button" href="<?php echo esc_url( 'https://metabox.io/support/?utm_source=WordPress&utm_medium=link&utm_campaign=plugin' ); ?>"><?php esc_html_e( 'Support', 'meta-box' ); ?></a>
|
22 |
+
<a target="_blank" class="button" href="https://www.facebook.com/sharer/sharer.php?u=https%3A//metabox.io"><span class="dashicons dashicons-facebook-alt"></span> Share</a>
|
23 |
+
<a target="_blank" class="button" href="https://twitter.com/home?status=Reduce%20your%20dev%20time!%20Meta%20Box%20is%20the%20most%20powerful%20custom%20fields%20plugin%20for%20WordPress%20on%20the%20web%20https%3A//metabox.io%20via%20%40wpmetabox"><span class="dashicons dashicons-twitter"></span> Tweet</a>
|
24 |
+
</p>
|
inc/libraries/meta-box/inc/autoloader.php
CHANGED
@@ -1,180 +1,180 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Autoload plugin classes.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Autoload class
|
10 |
-
*/
|
11 |
-
class RWMB_Autoloader {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* List of directories to load classes.
|
15 |
-
*
|
16 |
-
* @var array
|
17 |
-
*/
|
18 |
-
protected $dirs = array();
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Adds a base directory for a class name prefix and/or suffix.
|
22 |
-
*
|
23 |
-
* @param string $base_dir A base directory for class files.
|
24 |
-
* @param string $prefix The class name prefix.
|
25 |
-
* @param string $suffix The class name suffix.
|
26 |
-
*/
|
27 |
-
public function add( $base_dir, $prefix, $suffix = '' ) {
|
28 |
-
$this->dirs[] = array(
|
29 |
-
'dir' => trailingslashit( $base_dir ),
|
30 |
-
'prefix' => $prefix,
|
31 |
-
'suffix' => $suffix,
|
32 |
-
);
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Register autoloader for plugin classes.
|
37 |
-
* In PHP 5.3, SPL extension cannot be disabled and it's safe to use autoload.
|
38 |
-
* However, hosting providers can disable it in PHP 5.2. In that case, we provide a fallback for autoload.
|
39 |
-
*
|
40 |
-
* @link http://php.net/manual/en/spl.installation.php
|
41 |
-
* @link https://github.com/rilwis/meta-box/issues/810
|
42 |
-
*/
|
43 |
-
public function register() {
|
44 |
-
spl_autoload_register( array( $this, 'autoload' ) );
|
45 |
-
if ( ! class_exists( 'RWMB_Core' ) ) {
|
46 |
-
$this->fallback();
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Autoload fields' classes.
|
52 |
-
*
|
53 |
-
* @param string $class Class name.
|
54 |
-
* @return mixed Boolean false if no mapped file can be loaded, or the name of the mapped file that was loaded.
|
55 |
-
*/
|
56 |
-
public function autoload( $class ) {
|
57 |
-
foreach ( $this->dirs as $dir ) {
|
58 |
-
if (
|
59 |
-
( $dir['prefix'] && 0 !== strpos( $class, $dir['prefix'] ) )
|
60 |
-
&& ( $dir['suffix'] && substr( $class, - strlen( $dir['suffix'] ) ) !== $dir['suffix'] )
|
61 |
-
) {
|
62 |
-
continue;
|
63 |
-
}
|
64 |
-
$file = substr( $class, strlen( $dir['prefix'] ) );
|
65 |
-
if ( $dir['suffix'] && strlen( $file ) > strlen( $dir['suffix'] ) ) {
|
66 |
-
$file = substr( $file, 0, - strlen( $dir['suffix'] ) );
|
67 |
-
}
|
68 |
-
$file = strtolower( str_replace( '_', '-', $file ) ) . '.php';
|
69 |
-
$file = $dir['dir'] . $file;
|
70 |
-
if ( $this->require_file( $file ) ) {
|
71 |
-
return $file;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
return false;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Fallback for autoload in PHP 5.2.
|
79 |
-
*/
|
80 |
-
protected function fallback() {
|
81 |
-
$files = array(
|
82 |
-
// Core.
|
83 |
-
'core',
|
84 |
-
'clone',
|
85 |
-
'meta-box',
|
86 |
-
'meta-box-registry',
|
87 |
-
'storage-registry',
|
88 |
-
'interfaces/storage.php',
|
89 |
-
'storages/base.php',
|
90 |
-
'storages/post.php',
|
91 |
-
'validation',
|
92 |
-
'sanitizer',
|
93 |
-
'media-modal',
|
94 |
-
'wpml',
|
95 |
-
'about/about.php',
|
96 |
-
|
97 |
-
// Walkers.
|
98 |
-
'walkers/walker',
|
99 |
-
'walkers/select',
|
100 |
-
'walkers/select-tree',
|
101 |
-
'walkers/input-list',
|
102 |
-
|
103 |
-
// Fields.
|
104 |
-
'field',
|
105 |
-
'field-registry',
|
106 |
-
|
107 |
-
'fields/multiple-values',
|
108 |
-
'fields/autocomplete',
|
109 |
-
'fields/text-list',
|
110 |
-
|
111 |
-
'fields/choice',
|
112 |
-
|
113 |
-
'fields/select',
|
114 |
-
'fields/select-advanced',
|
115 |
-
'fields/select-tree',
|
116 |
-
|
117 |
-
'fields/input-list',
|
118 |
-
'fields/radio',
|
119 |
-
'fields/checkbox-list',
|
120 |
-
|
121 |
-
'fields/object-choice',
|
122 |
-
'fields/post',
|
123 |
-
'fields/taxonomy',
|
124 |
-
'fields/taxonomy-advanced',
|
125 |
-
'fields/user',
|
126 |
-
|
127 |
-
'fields/input',
|
128 |
-
|
129 |
-
'fields/checkbox',
|
130 |
-
'fields/number',
|
131 |
-
'fields/range',
|
132 |
-
|
133 |
-
'fields/text',
|
134 |
-
'fields/color',
|
135 |
-
'fields/datetime',
|
136 |
-
'fields/date',
|
137 |
-
'fields/time',
|
138 |
-
'fields/fieldset-text',
|
139 |
-
'fields/key-value',
|
140 |
-
'fields/oembed',
|
141 |
-
'fields/password',
|
142 |
-
|
143 |
-
'fields/file-input',
|
144 |
-
'fields/file',
|
145 |
-
'fields/image',
|
146 |
-
'fields/image-select',
|
147 |
-
|
148 |
-
'fields/media',
|
149 |
-
'fields/file-upload',
|
150 |
-
'fields/image-advanced',
|
151 |
-
'fields/image-upload',
|
152 |
-
|
153 |
-
'fields/button',
|
154 |
-
'fields/custom-html',
|
155 |
-
'fields/divider',
|
156 |
-
'fields/heading',
|
157 |
-
'fields/map',
|
158 |
-
'fields/slider',
|
159 |
-
'fields/textarea',
|
160 |
-
'fields/wysiwyg',
|
161 |
-
);
|
162 |
-
foreach ( $files as $file ) {
|
163 |
-
$this->require_file( RWMB_INC_DIR . "$file.php" );
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* If a file exists, require it from the file system.
|
169 |
-
*
|
170 |
-
* @param string $file The file to require.
|
171 |
-
* @return bool True if the file exists, false if not.
|
172 |
-
*/
|
173 |
-
protected function require_file( $file ) {
|
174 |
-
if ( file_exists( $file ) ) {
|
175 |
-
require_once $file;
|
176 |
-
return true;
|
177 |
-
}
|
178 |
-
return false;
|
179 |
-
}
|
180 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Autoload plugin classes.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Autoload class
|
10 |
+
*/
|
11 |
+
class RWMB_Autoloader {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* List of directories to load classes.
|
15 |
+
*
|
16 |
+
* @var array
|
17 |
+
*/
|
18 |
+
protected $dirs = array();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Adds a base directory for a class name prefix and/or suffix.
|
22 |
+
*
|
23 |
+
* @param string $base_dir A base directory for class files.
|
24 |
+
* @param string $prefix The class name prefix.
|
25 |
+
* @param string $suffix The class name suffix.
|
26 |
+
*/
|
27 |
+
public function add( $base_dir, $prefix, $suffix = '' ) {
|
28 |
+
$this->dirs[] = array(
|
29 |
+
'dir' => trailingslashit( $base_dir ),
|
30 |
+
'prefix' => $prefix,
|
31 |
+
'suffix' => $suffix,
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Register autoloader for plugin classes.
|
37 |
+
* In PHP 5.3, SPL extension cannot be disabled and it's safe to use autoload.
|
38 |
+
* However, hosting providers can disable it in PHP 5.2. In that case, we provide a fallback for autoload.
|
39 |
+
*
|
40 |
+
* @link http://php.net/manual/en/spl.installation.php
|
41 |
+
* @link https://github.com/rilwis/meta-box/issues/810
|
42 |
+
*/
|
43 |
+
public function register() {
|
44 |
+
spl_autoload_register( array( $this, 'autoload' ) );
|
45 |
+
if ( ! class_exists( 'RWMB_Core' ) ) {
|
46 |
+
$this->fallback();
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Autoload fields' classes.
|
52 |
+
*
|
53 |
+
* @param string $class Class name.
|
54 |
+
* @return mixed Boolean false if no mapped file can be loaded, or the name of the mapped file that was loaded.
|
55 |
+
*/
|
56 |
+
public function autoload( $class ) {
|
57 |
+
foreach ( $this->dirs as $dir ) {
|
58 |
+
if (
|
59 |
+
( $dir['prefix'] && 0 !== strpos( $class, $dir['prefix'] ) )
|
60 |
+
&& ( $dir['suffix'] && substr( $class, - strlen( $dir['suffix'] ) ) !== $dir['suffix'] )
|
61 |
+
) {
|
62 |
+
continue;
|
63 |
+
}
|
64 |
+
$file = substr( $class, strlen( $dir['prefix'] ) );
|
65 |
+
if ( $dir['suffix'] && strlen( $file ) > strlen( $dir['suffix'] ) ) {
|
66 |
+
$file = substr( $file, 0, - strlen( $dir['suffix'] ) );
|
67 |
+
}
|
68 |
+
$file = strtolower( str_replace( '_', '-', $file ) ) . '.php';
|
69 |
+
$file = $dir['dir'] . $file;
|
70 |
+
if ( $this->require_file( $file ) ) {
|
71 |
+
return $file;
|
72 |
+
}
|
73 |
+
}
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Fallback for autoload in PHP 5.2.
|
79 |
+
*/
|
80 |
+
protected function fallback() {
|
81 |
+
$files = array(
|
82 |
+
// Core.
|
83 |
+
'core',
|
84 |
+
'clone',
|
85 |
+
'meta-box',
|
86 |
+
'meta-box-registry',
|
87 |
+
'storage-registry',
|
88 |
+
'interfaces/storage.php',
|
89 |
+
'storages/base.php',
|
90 |
+
'storages/post.php',
|
91 |
+
'validation',
|
92 |
+
'sanitizer',
|
93 |
+
'media-modal',
|
94 |
+
'wpml',
|
95 |
+
'about/about.php',
|
96 |
+
|
97 |
+
// Walkers.
|
98 |
+
'walkers/walker',
|
99 |
+
'walkers/select',
|
100 |
+
'walkers/select-tree',
|
101 |
+
'walkers/input-list',
|
102 |
+
|
103 |
+
// Fields.
|
104 |
+
'field',
|
105 |
+
'field-registry',
|
106 |
+
|
107 |
+
'fields/multiple-values',
|
108 |
+
'fields/autocomplete',
|
109 |
+
'fields/text-list',
|
110 |
+
|
111 |
+
'fields/choice',
|
112 |
+
|
113 |
+
'fields/select',
|
114 |
+
'fields/select-advanced',
|
115 |
+
'fields/select-tree',
|
116 |
+
|
117 |
+
'fields/input-list',
|
118 |
+
'fields/radio',
|
119 |
+
'fields/checkbox-list',
|
120 |
+
|
121 |
+
'fields/object-choice',
|
122 |
+
'fields/post',
|
123 |
+
'fields/taxonomy',
|
124 |
+
'fields/taxonomy-advanced',
|
125 |
+
'fields/user',
|
126 |
+
|
127 |
+
'fields/input',
|
128 |
+
|
129 |
+
'fields/checkbox',
|
130 |
+
'fields/number',
|
131 |
+
'fields/range',
|
132 |
+
|
133 |
+
'fields/text',
|
134 |
+
'fields/color',
|
135 |
+
'fields/datetime',
|
136 |
+
'fields/date',
|
137 |
+
'fields/time',
|
138 |
+
'fields/fieldset-text',
|
139 |
+
'fields/key-value',
|
140 |
+
'fields/oembed',
|
141 |
+
'fields/password',
|
142 |
+
|
143 |
+
'fields/file-input',
|
144 |
+
'fields/file',
|
145 |
+
'fields/image',
|
146 |
+
'fields/image-select',
|
147 |
+
|
148 |
+
'fields/media',
|
149 |
+
'fields/file-upload',
|
150 |
+
'fields/image-advanced',
|
151 |
+
'fields/image-upload',
|
152 |
+
|
153 |
+
'fields/button',
|
154 |
+
'fields/custom-html',
|
155 |
+
'fields/divider',
|
156 |
+
'fields/heading',
|
157 |
+
'fields/map',
|
158 |
+
'fields/slider',
|
159 |
+
'fields/textarea',
|
160 |
+
'fields/wysiwyg',
|
161 |
+
);
|
162 |
+
foreach ( $files as $file ) {
|
163 |
+
$this->require_file( RWMB_INC_DIR . "$file.php" );
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* If a file exists, require it from the file system.
|
169 |
+
*
|
170 |
+
* @param string $file The file to require.
|
171 |
+
* @return bool True if the file exists, false if not.
|
172 |
+
*/
|
173 |
+
protected function require_file( $file ) {
|
174 |
+
if ( file_exists( $file ) ) {
|
175 |
+
require_once $file;
|
176 |
+
return true;
|
177 |
+
}
|
178 |
+
return false;
|
179 |
+
}
|
180 |
+
}
|
inc/libraries/meta-box/inc/clone.php
CHANGED
@@ -1,123 +1,123 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The clone module, allowing users to clone (duplicate) fields.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The clone class.
|
10 |
-
*/
|
11 |
-
class RWMB_Clone {
|
12 |
-
/**
|
13 |
-
* Get clone field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta The meta value.
|
16 |
-
* @param array $field The field parameters.
|
17 |
-
*
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
public static function html( $meta, $field ) {
|
21 |
-
$field_html = '';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Note: $meta must contain value so that the foreach loop runs!
|
25 |
-
*
|
26 |
-
* @see meta()
|
27 |
-
*/
|
28 |
-
foreach ( $meta as $index => $sub_meta ) {
|
29 |
-
$sub_field = $field;
|
30 |
-
$sub_field['field_name'] = $field['field_name'] . "[{$index}]";
|
31 |
-
if ( $index > 0 ) {
|
32 |
-
if ( isset( $sub_field['address_field'] ) ) {
|
33 |
-
$sub_field['address_field'] = $field['address_field'] . "_{$index}";
|
34 |
-
}
|
35 |
-
$sub_field['id'] = $field['id'] . "_{$index}";
|
36 |
-
|
37 |
-
if ( ! empty( $sub_field['attributes']['id'] ) ) {
|
38 |
-
$sub_field['attributes']['id'] = $sub_field['attributes']['id'] . "_{$index}";
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
if ( in_array( $sub_field['type'], array( 'file', 'image' ), true ) ) {
|
43 |
-
$sub_field['file_input_name'] = $field['file_input_name'] . "[{$index}]";
|
44 |
-
} elseif ( $field['multiple'] ) {
|
45 |
-
$sub_field['field_name'] .= '[]';
|
46 |
-
}
|
47 |
-
|
48 |
-
// Wrap field HTML in a div with class="rwmb-clone" if needed.
|
49 |
-
$class = "rwmb-clone rwmb-{$field['type']}-clone";
|
50 |
-
$sort_icon = '';
|
51 |
-
if ( $field['sort_clone'] ) {
|
52 |
-
$class .= ' rwmb-sort-clone';
|
53 |
-
$sort_icon = "<a href='javascript:;' class='rwmb-clone-icon'></a>";
|
54 |
-
}
|
55 |
-
$input_html = "<div class='$class'>" . $sort_icon;
|
56 |
-
|
57 |
-
// Call separated methods for displaying each type of field.
|
58 |
-
$input_html .= RWMB_Field::call( $sub_field, 'html', $sub_meta );
|
59 |
-
$input_html = RWMB_Field::filter( 'html', $input_html, $sub_field, $sub_meta );
|
60 |
-
|
61 |
-
// Remove clone button.
|
62 |
-
$input_html .= self::remove_clone_button( $sub_field );
|
63 |
-
$input_html .= '</div>';
|
64 |
-
|
65 |
-
$field_html .= $input_html;
|
66 |
-
} // End foreach().
|
67 |
-
|
68 |
-
return $field_html;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Set value of meta before saving into database
|
73 |
-
*
|
74 |
-
* @param mixed $new The submitted meta value.
|
75 |
-
* @param mixed $old The existing meta value.
|
76 |
-
* @param int $post_id The post ID.
|
77 |
-
* @param array $field The field parameters.
|
78 |
-
*
|
79 |
-
* @return mixed
|
80 |
-
*/
|
81 |
-
public static function value( $new, $old, $post_id, $field ) {
|
82 |
-
if ( ! is_array( $new ) ) {
|
83 |
-
$new = array();
|
84 |
-
}
|
85 |
-
|
86 |
-
if ( in_array( $field['type'], array( 'file', 'image' ), true ) ) {
|
87 |
-
return RWMB_Field::call( $field, 'value', $new, '', $post_id );
|
88 |
-
}
|
89 |
-
|
90 |
-
foreach ( $new as $key => $value ) {
|
91 |
-
$old_value = isset( $old[ $key ] ) ? $old[ $key ] : null;
|
92 |
-
$value = RWMB_Field::call( $field, 'value', $value, $old_value, $post_id );
|
93 |
-
$new[ $key ] = RWMB_Field::filter( 'sanitize', $value, $field );
|
94 |
-
}
|
95 |
-
|
96 |
-
return $new;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Add clone button.
|
101 |
-
*
|
102 |
-
* @param array $field Field parameters.
|
103 |
-
* @return string $html
|
104 |
-
*/
|
105 |
-
public static function add_clone_button( $field ) {
|
106 |
-
if ( ! $field['clone'] ) {
|
107 |
-
return '';
|
108 |
-
}
|
109 |
-
$text = RWMB_Field::filter( 'add_clone_button_text', $field['add_button'], $field );
|
110 |
-
return '<a href="#" class="rwmb-button button-primary add-clone">' . esc_html( $text ) . '</a>';
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Remove clone button.
|
115 |
-
*
|
116 |
-
* @param array $field Field parameters.
|
117 |
-
* @return string $html
|
118 |
-
*/
|
119 |
-
public static function remove_clone_button( $field ) {
|
120 |
-
$text = RWMB_Field::filter( 'remove_clone_button_text', '<i class="dashicons dashicons-minus"></i>', $field );
|
121 |
-
return '<a href="#" class="rwmb-button remove-clone">' . $text . '</a>';
|
122 |
-
}
|
123 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The clone module, allowing users to clone (duplicate) fields.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The clone class.
|
10 |
+
*/
|
11 |
+
class RWMB_Clone {
|
12 |
+
/**
|
13 |
+
* Get clone field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta The meta value.
|
16 |
+
* @param array $field The field parameters.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public static function html( $meta, $field ) {
|
21 |
+
$field_html = '';
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Note: $meta must contain value so that the foreach loop runs!
|
25 |
+
*
|
26 |
+
* @see meta()
|
27 |
+
*/
|
28 |
+
foreach ( $meta as $index => $sub_meta ) {
|
29 |
+
$sub_field = $field;
|
30 |
+
$sub_field['field_name'] = $field['field_name'] . "[{$index}]";
|
31 |
+
if ( $index > 0 ) {
|
32 |
+
if ( isset( $sub_field['address_field'] ) ) {
|
33 |
+
$sub_field['address_field'] = $field['address_field'] . "_{$index}";
|
34 |
+
}
|
35 |
+
$sub_field['id'] = $field['id'] . "_{$index}";
|
36 |
+
|
37 |
+
if ( ! empty( $sub_field['attributes']['id'] ) ) {
|
38 |
+
$sub_field['attributes']['id'] = $sub_field['attributes']['id'] . "_{$index}";
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
if ( in_array( $sub_field['type'], array( 'file', 'image' ), true ) ) {
|
43 |
+
$sub_field['file_input_name'] = $field['file_input_name'] . "[{$index}]";
|
44 |
+
} elseif ( $field['multiple'] ) {
|
45 |
+
$sub_field['field_name'] .= '[]';
|
46 |
+
}
|
47 |
+
|
48 |
+
// Wrap field HTML in a div with class="rwmb-clone" if needed.
|
49 |
+
$class = "rwmb-clone rwmb-{$field['type']}-clone";
|
50 |
+
$sort_icon = '';
|
51 |
+
if ( $field['sort_clone'] ) {
|
52 |
+
$class .= ' rwmb-sort-clone';
|
53 |
+
$sort_icon = "<a href='javascript:;' class='rwmb-clone-icon'></a>";
|
54 |
+
}
|
55 |
+
$input_html = "<div class='$class'>" . $sort_icon;
|
56 |
+
|
57 |
+
// Call separated methods for displaying each type of field.
|
58 |
+
$input_html .= RWMB_Field::call( $sub_field, 'html', $sub_meta );
|
59 |
+
$input_html = RWMB_Field::filter( 'html', $input_html, $sub_field, $sub_meta );
|
60 |
+
|
61 |
+
// Remove clone button.
|
62 |
+
$input_html .= self::remove_clone_button( $sub_field );
|
63 |
+
$input_html .= '</div>';
|
64 |
+
|
65 |
+
$field_html .= $input_html;
|
66 |
+
} // End foreach().
|
67 |
+
|
68 |
+
return $field_html;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Set value of meta before saving into database
|
73 |
+
*
|
74 |
+
* @param mixed $new The submitted meta value.
|
75 |
+
* @param mixed $old The existing meta value.
|
76 |
+
* @param int $post_id The post ID.
|
77 |
+
* @param array $field The field parameters.
|
78 |
+
*
|
79 |
+
* @return mixed
|
80 |
+
*/
|
81 |
+
public static function value( $new, $old, $post_id, $field ) {
|
82 |
+
if ( ! is_array( $new ) ) {
|
83 |
+
$new = array();
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( in_array( $field['type'], array( 'file', 'image' ), true ) ) {
|
87 |
+
return RWMB_Field::call( $field, 'value', $new, '', $post_id );
|
88 |
+
}
|
89 |
+
|
90 |
+
foreach ( $new as $key => $value ) {
|
91 |
+
$old_value = isset( $old[ $key ] ) ? $old[ $key ] : null;
|
92 |
+
$value = RWMB_Field::call( $field, 'value', $value, $old_value, $post_id );
|
93 |
+
$new[ $key ] = RWMB_Field::filter( 'sanitize', $value, $field );
|
94 |
+
}
|
95 |
+
|
96 |
+
return $new;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Add clone button.
|
101 |
+
*
|
102 |
+
* @param array $field Field parameters.
|
103 |
+
* @return string $html
|
104 |
+
*/
|
105 |
+
public static function add_clone_button( $field ) {
|
106 |
+
if ( ! $field['clone'] ) {
|
107 |
+
return '';
|
108 |
+
}
|
109 |
+
$text = RWMB_Field::filter( 'add_clone_button_text', $field['add_button'], $field );
|
110 |
+
return '<a href="#" class="rwmb-button button-primary add-clone">' . esc_html( $text ) . '</a>';
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Remove clone button.
|
115 |
+
*
|
116 |
+
* @param array $field Field parameters.
|
117 |
+
* @return string $html
|
118 |
+
*/
|
119 |
+
public static function remove_clone_button( $field ) {
|
120 |
+
$text = RWMB_Field::filter( 'remove_clone_button_text', '<i class="dashicons dashicons-minus"></i>', $field );
|
121 |
+
return '<a href="#" class="rwmb-button remove-clone">' . $text . '</a>';
|
122 |
+
}
|
123 |
+
}
|
inc/libraries/meta-box/inc/core.php
CHANGED
@@ -1,117 +1,117 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The plugin core class which initialize plugin's code.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The Meta Box core class.
|
10 |
-
*
|
11 |
-
* @package Meta Box
|
12 |
-
*/
|
13 |
-
class RWMB_Core {
|
14 |
-
/**
|
15 |
-
* Initialization.
|
16 |
-
*/
|
17 |
-
public function init() {
|
18 |
-
load_plugin_textdomain( 'meta-box', false, plugin_basename( RWMB_DIR ) . '/languages/' );
|
19 |
-
|
20 |
-
add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ), 20 );
|
21 |
-
|
22 |
-
// Uses priority 20 to support custom port types registered using the default priority.
|
23 |
-
add_action( 'init', array( $this, 'register_meta_boxes' ), 20 );
|
24 |
-
add_action( 'edit_page_form', array( $this, 'fix_page_template' ) );
|
25 |
-
$this->add_context_hooks();
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Add links to Documentation and Extensions in plugin's list of action links.
|
30 |
-
*
|
31 |
-
* @since 4.3.11
|
32 |
-
*
|
33 |
-
* @param array $links Array of plugin links.
|
34 |
-
*
|
35 |
-
* @return array
|
36 |
-
*/
|
37 |
-
public function plugin_links( $links ) {
|
38 |
-
$links[] = '<a href="https://docs.metabox.io">' . esc_html__( 'Documentation', 'meta-box' ) . '</a>';
|
39 |
-
$links[] = '<a href="https://metabox.io/plugins/" style="color: #39b54a; font-weight: bold">' . esc_html__( 'Extensions', 'meta-box' ) . '</a>';
|
40 |
-
return $links;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Register meta boxes.
|
45 |
-
* Advantages:
|
46 |
-
* - prevents incorrect hook.
|
47 |
-
* - no need to check for class existences.
|
48 |
-
*/
|
49 |
-
public function register_meta_boxes() {
|
50 |
-
$configs = apply_filters( 'rwmb_meta_boxes', array() );
|
51 |
-
$meta_boxes = rwmb_get_registry( 'meta_box' );
|
52 |
-
|
53 |
-
foreach ( $configs as $config ) {
|
54 |
-
$meta_box = rwmb_get_meta_box( $config );
|
55 |
-
$meta_boxes->add( $meta_box );
|
56 |
-
$meta_box->register_fields();
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* WordPress will prevent post data saving if a page template has been selected that does not exist.
|
62 |
-
* This is especially a problem when switching to our theme, and old page templates are in the post data.
|
63 |
-
* Unset the page template if the page does not exist to allow the post to save.
|
64 |
-
*
|
65 |
-
* @param WP_Post $post Post object.
|
66 |
-
*
|
67 |
-
* @since 4.3.10
|
68 |
-
*/
|
69 |
-
public function fix_page_template( WP_Post $post ) {
|
70 |
-
$template = get_post_meta( $post->ID, '_wp_page_template', true );
|
71 |
-
$page_templates = wp_get_theme()->get_page_templates();
|
72 |
-
|
73 |
-
// If the template doesn't exists, remove the data to allow WordPress to save.
|
74 |
-
if ( ! isset( $page_templates[ $template ] ) ) {
|
75 |
-
delete_post_meta( $post->ID, '_wp_page_template' );
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Get registered meta boxes via a filter.
|
81 |
-
*
|
82 |
-
* @deprecated No longer used. Keep for backward-compatibility with extensions.
|
83 |
-
*
|
84 |
-
* @return array
|
85 |
-
*/
|
86 |
-
public static function get_meta_boxes() {
|
87 |
-
$meta_boxes = rwmb_get_registry( 'meta_box' )->all();
|
88 |
-
return wp_list_pluck( $meta_boxes, 'meta_box' );
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Add hooks for extra contexts.
|
93 |
-
*/
|
94 |
-
public function add_context_hooks() {
|
95 |
-
$hooks = array(
|
96 |
-
'edit_form_top',
|
97 |
-
'edit_form_after_title',
|
98 |
-
'edit_form_after_editor',
|
99 |
-
'edit_form_before_permalink',
|
100 |
-
);
|
101 |
-
|
102 |
-
foreach ( $hooks as $hook ) {
|
103 |
-
add_action( $hook, array( $this, 'add_context' ) );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Add new meta box context.
|
109 |
-
*
|
110 |
-
* @param WP_Post $post The current post object.
|
111 |
-
*/
|
112 |
-
public function add_context( $post ) {
|
113 |
-
$hook = current_filter();
|
114 |
-
$context = 'edit_form_top' === $hook ? 'form_top' : substr( $hook, 10 );
|
115 |
-
do_meta_boxes( null, $context, $post );
|
116 |
-
}
|
117 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The plugin core class which initialize plugin's code.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The Meta Box core class.
|
10 |
+
*
|
11 |
+
* @package Meta Box
|
12 |
+
*/
|
13 |
+
class RWMB_Core {
|
14 |
+
/**
|
15 |
+
* Initialization.
|
16 |
+
*/
|
17 |
+
public function init() {
|
18 |
+
load_plugin_textdomain( 'meta-box', false, plugin_basename( RWMB_DIR ) . '/languages/' );
|
19 |
+
|
20 |
+
add_filter( 'plugin_action_links_meta-box/meta-box.php', array( $this, 'plugin_links' ), 20 );
|
21 |
+
|
22 |
+
// Uses priority 20 to support custom port types registered using the default priority.
|
23 |
+
add_action( 'init', array( $this, 'register_meta_boxes' ), 20 );
|
24 |
+
add_action( 'edit_page_form', array( $this, 'fix_page_template' ) );
|
25 |
+
$this->add_context_hooks();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Add links to Documentation and Extensions in plugin's list of action links.
|
30 |
+
*
|
31 |
+
* @since 4.3.11
|
32 |
+
*
|
33 |
+
* @param array $links Array of plugin links.
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function plugin_links( $links ) {
|
38 |
+
$links[] = '<a href="https://docs.metabox.io">' . esc_html__( 'Documentation', 'meta-box' ) . '</a>';
|
39 |
+
$links[] = '<a href="https://metabox.io/plugins/" style="color: #39b54a; font-weight: bold">' . esc_html__( 'Extensions', 'meta-box' ) . '</a>';
|
40 |
+
return $links;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Register meta boxes.
|
45 |
+
* Advantages:
|
46 |
+
* - prevents incorrect hook.
|
47 |
+
* - no need to check for class existences.
|
48 |
+
*/
|
49 |
+
public function register_meta_boxes() {
|
50 |
+
$configs = apply_filters( 'rwmb_meta_boxes', array() );
|
51 |
+
$meta_boxes = rwmb_get_registry( 'meta_box' );
|
52 |
+
|
53 |
+
foreach ( $configs as $config ) {
|
54 |
+
$meta_box = rwmb_get_meta_box( $config );
|
55 |
+
$meta_boxes->add( $meta_box );
|
56 |
+
$meta_box->register_fields();
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* WordPress will prevent post data saving if a page template has been selected that does not exist.
|
62 |
+
* This is especially a problem when switching to our theme, and old page templates are in the post data.
|
63 |
+
* Unset the page template if the page does not exist to allow the post to save.
|
64 |
+
*
|
65 |
+
* @param WP_Post $post Post object.
|
66 |
+
*
|
67 |
+
* @since 4.3.10
|
68 |
+
*/
|
69 |
+
public function fix_page_template( WP_Post $post ) {
|
70 |
+
$template = get_post_meta( $post->ID, '_wp_page_template', true );
|
71 |
+
$page_templates = wp_get_theme()->get_page_templates();
|
72 |
+
|
73 |
+
// If the template doesn't exists, remove the data to allow WordPress to save.
|
74 |
+
if ( ! isset( $page_templates[ $template ] ) ) {
|
75 |
+
delete_post_meta( $post->ID, '_wp_page_template' );
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Get registered meta boxes via a filter.
|
81 |
+
*
|
82 |
+
* @deprecated No longer used. Keep for backward-compatibility with extensions.
|
83 |
+
*
|
84 |
+
* @return array
|
85 |
+
*/
|
86 |
+
public static function get_meta_boxes() {
|
87 |
+
$meta_boxes = rwmb_get_registry( 'meta_box' )->all();
|
88 |
+
return wp_list_pluck( $meta_boxes, 'meta_box' );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Add hooks for extra contexts.
|
93 |
+
*/
|
94 |
+
public function add_context_hooks() {
|
95 |
+
$hooks = array(
|
96 |
+
'edit_form_top',
|
97 |
+
'edit_form_after_title',
|
98 |
+
'edit_form_after_editor',
|
99 |
+
'edit_form_before_permalink',
|
100 |
+
);
|
101 |
+
|
102 |
+
foreach ( $hooks as $hook ) {
|
103 |
+
add_action( $hook, array( $this, 'add_context' ) );
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Add new meta box context.
|
109 |
+
*
|
110 |
+
* @param WP_Post $post The current post object.
|
111 |
+
*/
|
112 |
+
public function add_context( $post ) {
|
113 |
+
$hook = current_filter();
|
114 |
+
$context = 'edit_form_top' === $hook ? 'form_top' : substr( $hook, 10 );
|
115 |
+
do_meta_boxes( null, $context, $post );
|
116 |
+
}
|
117 |
+
}
|
inc/libraries/meta-box/inc/field-registry.php
CHANGED
@@ -1,64 +1,64 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* A registry for storing all fields.
|
4 |
-
*
|
5 |
-
* @link https://designpatternsphp.readthedocs.io/en/latest/Structural/Registry/README.html
|
6 |
-
* @package Meta Box
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Field registry class.
|
11 |
-
*/
|
12 |
-
class RWMB_Field_Registry {
|
13 |
-
/**
|
14 |
-
* Internal data storage.
|
15 |
-
*
|
16 |
-
* @var array
|
17 |
-
*/
|
18 |
-
private $data = array();
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Add a single field to the registry.
|
22 |
-
*
|
23 |
-
* @param array $field Field configuration.
|
24 |
-
* @param string $type Post type|Taxonomy|'user'|Setting page which the field belongs to.
|
25 |
-
* @param string $object_type Object type which the field belongs to.
|
26 |
-
*/
|
27 |
-
public function add( $field, $type, $object_type = 'post' ) {
|
28 |
-
if ( ! isset( $field['id'] ) ) {
|
29 |
-
return;
|
30 |
-
}
|
31 |
-
|
32 |
-
if ( empty( $this->data[ $object_type ] ) ) {
|
33 |
-
$this->data[ $object_type ] = array();
|
34 |
-
}
|
35 |
-
if ( empty( $this->data[ $object_type ][ $type ] ) ) {
|
36 |
-
$this->data[ $object_type ][ $type ] = array();
|
37 |
-
}
|
38 |
-
$this->data[ $object_type ][ $type ][ $field['id'] ] = $field;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Retrieve a field.
|
43 |
-
*
|
44 |
-
* @param string $id A meta box instance id.
|
45 |
-
* @param string $type Post type|Taxonomy|'user'|Setting page which the field belongs to.
|
46 |
-
* @param string $object_type Object type which the field belongs to.
|
47 |
-
*
|
48 |
-
* @return bool|array False or field configuration.
|
49 |
-
*/
|
50 |
-
public function get( $id, $type, $object_type = 'post' ) {
|
51 |
-
return isset( $this->data[ $object_type ][ $type ][ $id ] ) ? $this->data[ $object_type ][ $type ][ $id ] : false;
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Retrieve fields by object type.
|
56 |
-
*
|
57 |
-
* @param string $object_type Object type which the field belongs to.
|
58 |
-
*
|
59 |
-
* @return array List of fields.
|
60 |
-
*/
|
61 |
-
public function get_by_object_type( $object_type = 'post' ) {
|
62 |
-
return isset( $this->data[ $object_type ] ) ? $this->data[ $object_type ] : array();
|
63 |
-
}
|
64 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* A registry for storing all fields.
|
4 |
+
*
|
5 |
+
* @link https://designpatternsphp.readthedocs.io/en/latest/Structural/Registry/README.html
|
6 |
+
* @package Meta Box
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Field registry class.
|
11 |
+
*/
|
12 |
+
class RWMB_Field_Registry {
|
13 |
+
/**
|
14 |
+
* Internal data storage.
|
15 |
+
*
|
16 |
+
* @var array
|
17 |
+
*/
|
18 |
+
private $data = array();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Add a single field to the registry.
|
22 |
+
*
|
23 |
+
* @param array $field Field configuration.
|
24 |
+
* @param string $type Post type|Taxonomy|'user'|Setting page which the field belongs to.
|
25 |
+
* @param string $object_type Object type which the field belongs to.
|
26 |
+
*/
|
27 |
+
public function add( $field, $type, $object_type = 'post' ) {
|
28 |
+
if ( ! isset( $field['id'] ) ) {
|
29 |
+
return;
|
30 |
+
}
|
31 |
+
|
32 |
+
if ( empty( $this->data[ $object_type ] ) ) {
|
33 |
+
$this->data[ $object_type ] = array();
|
34 |
+
}
|
35 |
+
if ( empty( $this->data[ $object_type ][ $type ] ) ) {
|
36 |
+
$this->data[ $object_type ][ $type ] = array();
|
37 |
+
}
|
38 |
+
$this->data[ $object_type ][ $type ][ $field['id'] ] = $field;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Retrieve a field.
|
43 |
+
*
|
44 |
+
* @param string $id A meta box instance id.
|
45 |
+
* @param string $type Post type|Taxonomy|'user'|Setting page which the field belongs to.
|
46 |
+
* @param string $object_type Object type which the field belongs to.
|
47 |
+
*
|
48 |
+
* @return bool|array False or field configuration.
|
49 |
+
*/
|
50 |
+
public function get( $id, $type, $object_type = 'post' ) {
|
51 |
+
return isset( $this->data[ $object_type ][ $type ][ $id ] ) ? $this->data[ $object_type ][ $type ][ $id ] : false;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Retrieve fields by object type.
|
56 |
+
*
|
57 |
+
* @param string $object_type Object type which the field belongs to.
|
58 |
+
*
|
59 |
+
* @return array List of fields.
|
60 |
+
*/
|
61 |
+
public function get_by_object_type( $object_type = 'post' ) {
|
62 |
+
return isset( $this->data[ $object_type ] ) ? $this->data[ $object_type ] : array();
|
63 |
+
}
|
64 |
+
}
|
inc/libraries/meta-box/inc/field.php
CHANGED
@@ -1,695 +1,695 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The field base class.
|
4 |
-
* This is the parent class of all custom fields defined by the plugin, which defines all the common methods.
|
5 |
-
* Fields must inherit this class and overwrite methods with its own.
|
6 |
-
*
|
7 |
-
* @package Meta Box
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* The field base class.
|
12 |
-
*/
|
13 |
-
abstract class RWMB_Field {
|
14 |
-
/**
|
15 |
-
* Add actions.
|
16 |
-
*/
|
17 |
-
public static function add_actions() {
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Enqueue scripts and styles.
|
22 |
-
*/
|
23 |
-
public static function admin_enqueue_scripts() {
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Localize scripts with prevention of loading localized data twice.
|
28 |
-
*
|
29 |
-
* @link https://github.com/rilwis/meta-box/issues/850
|
30 |
-
*
|
31 |
-
* @param string $handle Script handle.
|
32 |
-
* @param string $name Object name.
|
33 |
-
* @param mixed $data Localized data.
|
34 |
-
*/
|
35 |
-
public static function localize_script( $handle, $name, $data ) {
|
36 |
-
/*
|
37 |
-
* Check with function_exists to make it work in WordPress 4.1.
|
38 |
-
* @link https://github.com/rilwis/meta-box/issues/1009
|
39 |
-
*/
|
40 |
-
if ( ! function_exists( 'wp_scripts' ) || ! wp_scripts()->get_data( $handle, 'data' ) ) {
|
41 |
-
wp_localize_script( $handle, $name, $data );
|
42 |
-
}
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Show field HTML
|
47 |
-
* Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
|
48 |
-
* That ensures the returned value are always been applied filters.
|
49 |
-
* This method is not meant to be overwritten in specific fields.
|
50 |
-
*
|
51 |
-
* @param array $field Field parameters.
|
52 |
-
* @param bool $saved Whether the meta box is saved at least once.
|
53 |
-
* @param int $post_id Post ID.
|
54 |
-
*/
|
55 |
-
public static function show( $field, $saved, $post_id = 0 ) {
|
56 |
-
$meta = self::call( $field, 'meta', $post_id, $saved );
|
57 |
-
$meta = self::filter( 'field_meta', $meta, $field, $saved );
|
58 |
-
|
59 |
-
$begin = self::call( $field, 'begin_html', $meta );
|
60 |
-
$begin = self::filter( 'begin_html', $begin, $field, $meta );
|
61 |
-
|
62 |
-
// Separate code for cloneable and non-cloneable fields to make easy to maintain.
|
63 |
-
if ( $field['clone'] ) {
|
64 |
-
$field_html = RWMB_Clone::html( $meta, $field );
|
65 |
-
} else {
|
66 |
-
// Call separated methods for displaying each type of field.
|
67 |
-
$field_html = self::call( $field, 'html', $meta );
|
68 |
-
$field_html = self::filter( 'html', $field_html, $field, $meta );
|
69 |
-
}
|
70 |
-
|
71 |
-
$end = self::call( $field, 'end_html', $meta );
|
72 |
-
$end = self::filter( 'end_html', $end, $field, $meta );
|
73 |
-
|
74 |
-
$html = self::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
|
75 |
-
|
76 |
-
// Display label and input in DIV and allow user-defined classes to be appended.
|
77 |
-
$classes = "rwmb-field rwmb-{$field['type']}-wrapper " . $field['class'];
|
78 |
-
if ( 'hidden' === $field['type'] ) {
|
79 |
-
$classes .= ' hidden';
|
80 |
-
}
|
81 |
-
if ( ! empty( $field['required'] ) ) {
|
82 |
-
$classes .= ' required';
|
83 |
-
}
|
84 |
-
|
85 |
-
$outer_html = sprintf(
|
86 |
-
$field['before'] . '<div class="%s">%s</div>' . $field['after'],
|
87 |
-
trim( $classes ),
|
88 |
-
$html
|
89 |
-
);
|
90 |
-
$outer_html = self::filter( 'outer_html', $outer_html, $field, $meta );
|
91 |
-
|
92 |
-
echo $outer_html; // WPCS: XSS OK.
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get field HTML.
|
97 |
-
*
|
98 |
-
* @param mixed $meta Meta value.
|
99 |
-
* @param array $field Field parameters.
|
100 |
-
*
|
101 |
-
* @return string
|
102 |
-
*/
|
103 |
-
public static function html( $meta, $field ) {
|
104 |
-
return '';
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Show begin HTML markup for fields.
|
109 |
-
*
|
110 |
-
* @param mixed $meta Meta value.
|
111 |
-
* @param array $field Field parameters.
|
112 |
-
*
|
113 |
-
* @return string
|
114 |
-
*/
|
115 |
-
public static function begin_html( $meta, $field ) {
|
116 |
-
$field_label = '';
|
117 |
-
if ( $field['name'] ) {
|
118 |
-
$field_label = sprintf(
|
119 |
-
'<div class="rwmb-label">
|
120 |
-
<label for="%s">%s</label>
|
121 |
-
%s
|
122 |
-
</div>',
|
123 |
-
esc_attr( $field['id'] ),
|
124 |
-
$field['name'],
|
125 |
-
self::label_description( $field )
|
126 |
-
);
|
127 |
-
}
|
128 |
-
|
129 |
-
$data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
|
130 |
-
|
131 |
-
$input_open = sprintf(
|
132 |
-
'<div class="rwmb-input"%s>',
|
133 |
-
$data_max_clone
|
134 |
-
);
|
135 |
-
|
136 |
-
return $field_label . $input_open;
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Show end HTML markup for fields.
|
141 |
-
*
|
142 |
-
* @param mixed $meta Meta value.
|
143 |
-
* @param array $field Field parameters.
|
144 |
-
*
|
145 |
-
* @return string
|
146 |
-
*/
|
147 |
-
public static function end_html( $meta, $field ) {
|
148 |
-
return RWMB_Clone::add_clone_button( $field ) . self::call( 'input_description', $field ) . '</div>';
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Display field label description.
|
153 |
-
*
|
154 |
-
* @param array $field Field parameters.
|
155 |
-
* @return string
|
156 |
-
*/
|
157 |
-
protected static function label_description( $field ) {
|
158 |
-
$id = $field['id'] ? ' id="' . esc_attr( $field['id'] ) . '-label-description"' : '';
|
159 |
-
return $field['label_description'] ? "<p{$id} class='description'>{$field['label_description']}</p>" : '';
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Display field description.
|
164 |
-
*
|
165 |
-
* @param array $field Field parameters.
|
166 |
-
* @return string
|
167 |
-
*/
|
168 |
-
protected static function input_description( $field ) {
|
169 |
-
$id = $field['id'] ? ' id="' . esc_attr( $field['id'] ) . '-description"' : '';
|
170 |
-
return $field['desc'] ? "<p{$id} class='description'>{$field['desc']}</p>" : '';
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* Get raw meta value.
|
175 |
-
*
|
176 |
-
* @param int $object_id Object ID.
|
177 |
-
* @param array $field Field parameters.
|
178 |
-
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
179 |
-
*
|
180 |
-
* @return mixed
|
181 |
-
*/
|
182 |
-
public static function raw_meta( $object_id, $field, $args = array() ) {
|
183 |
-
if ( empty( $field['id'] ) ) {
|
184 |
-
return '';
|
185 |
-
}
|
186 |
-
|
187 |
-
if ( isset( $field['storage'] ) ) {
|
188 |
-
$storage = $field['storage'];
|
189 |
-
} elseif ( isset( $args['object_type'] ) ) {
|
190 |
-
$storage = rwmb_get_storage( $args['object_type'] );
|
191 |
-
} else {
|
192 |
-
$storage = rwmb_get_storage( 'post' );
|
193 |
-
}
|
194 |
-
|
195 |
-
if ( ! isset( $args['single'] ) ) {
|
196 |
-
$args['single'] = $field['clone'] || ! $field['multiple'];
|
197 |
-
}
|
198 |
-
|
199 |
-
if ( $field['clone'] && $field['clone_as_multiple'] ) {
|
200 |
-
$args['single'] = false;
|
201 |
-
}
|
202 |
-
|
203 |
-
return $storage->get( $object_id, $field['id'], $args );
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Get meta value.
|
208 |
-
*
|
209 |
-
* @param int $post_id Post ID.
|
210 |
-
* @param bool $saved Whether the meta box is saved at least once.
|
211 |
-
* @param array $field Field parameters.
|
212 |
-
*
|
213 |
-
* @return mixed
|
214 |
-
*/
|
215 |
-
public static function meta( $post_id, $saved, $field ) {
|
216 |
-
/**
|
217 |
-
* For special fields like 'divider', 'heading' which don't have ID, just return empty string
|
218 |
-
* to prevent notice error when displaying fields.
|
219 |
-
*/
|
220 |
-
if ( empty( $field['id'] ) ) {
|
221 |
-
return '';
|
222 |
-
}
|
223 |
-
|
224 |
-
// Get raw meta.
|
225 |
-
$meta = self::call( $field, 'raw_meta', $post_id );
|
226 |
-
|
227 |
-
// Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run).
|
228 |
-
$meta = ! $saved ? $field['std'] : $meta;
|
229 |
-
|
230 |
-
// Ensure multiple fields are arrays.
|
231 |
-
if ( $field['multiple'] ) {
|
232 |
-
if ( $field['clone'] ) {
|
233 |
-
$meta = (array) $meta;
|
234 |
-
foreach ( $meta as $key => $m ) {
|
235 |
-
$meta[ $key ] = (array) $m;
|
236 |
-
}
|
237 |
-
} else {
|
238 |
-
$meta = (array) $meta;
|
239 |
-
}
|
240 |
-
}
|
241 |
-
// Escape attributes.
|
242 |
-
$meta = self::call( $field, 'esc_meta', $meta );
|
243 |
-
|
244 |
-
// Make sure meta value is an array for clonable and multiple fields.
|
245 |
-
if ( $field['clone'] || $field['multiple'] ) {
|
246 |
-
if ( empty( $meta ) || ! is_array( $meta ) ) {
|
247 |
-
/**
|
248 |
-
* If field is clonable, $meta must be an array with values so that the foreach loop in self::show() runs properly.
|
249 |
-
*
|
250 |
-
* @see self::show()
|
251 |
-
*/
|
252 |
-
$meta = $field['clone'] ? array( '' ) : array();
|
253 |
-
}
|
254 |
-
}
|
255 |
-
|
256 |
-
return $meta;
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Escape meta for field output.
|
261 |
-
*
|
262 |
-
* @param mixed $meta Meta value.
|
263 |
-
*
|
264 |
-
* @return mixed
|
265 |
-
*/
|
266 |
-
public static function esc_meta( $meta ) {
|
267 |
-
return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Set value of meta before saving into database.
|
272 |
-
*
|
273 |
-
* @param mixed $new The submitted meta value.
|
274 |
-
* @param mixed $old The existing meta value.
|
275 |
-
* @param int $post_id The post ID.
|
276 |
-
* @param array $field The field parameters.
|
277 |
-
*
|
278 |
-
* @return int
|
279 |
-
*/
|
280 |
-
public static function value( $new, $old, $post_id, $field ) {
|
281 |
-
return $new;
|
282 |
-
}
|
283 |
-
|
284 |
-
/**
|
285 |
-
* Save meta value.
|
286 |
-
*
|
287 |
-
* @param mixed $new The submitted meta value.
|
288 |
-
* @param mixed $old The existing meta value.
|
289 |
-
* @param int $post_id The post ID.
|
290 |
-
* @param array $field The field parameters.
|
291 |
-
*/
|
292 |
-
public static function save( $new, $old, $post_id, $field ) {
|
293 |
-
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
294 |
-
return;
|
295 |
-
}
|
296 |
-
$name = $field['id'];
|
297 |
-
$storage = $field['storage'];
|
298 |
-
|
299 |
-
// Remove post meta if it's empty.
|
300 |
-
if ( '' === $new || array() === $new ) {
|
301 |
-
$storage->delete( $post_id, $name );
|
302 |
-
return;
|
303 |
-
}
|
304 |
-
|
305 |
-
// Save cloned fields as multiple values instead serialized array.
|
306 |
-
if ( $field['clone'] && $field['clone_as_multiple'] ) {
|
307 |
-
$old = array_filter( (array) $old );
|
308 |
-
$new = array_filter( (array) $new );
|
309 |
-
|
310 |
-
if ( empty( $new ) ) {
|
311 |
-
$storage->delete( $post_id, $name );
|
312 |
-
}
|
313 |
-
|
314 |
-
if ( $field['sort_clone'] && array_values( $new ) != array_values( $old ) ) {
|
315 |
-
$storage->delete( $post_id, $name );
|
316 |
-
|
317 |
-
foreach ( $new as $new_value ) {
|
318 |
-
$storage->add( $post_id, $name, $new_value, false );
|
319 |
-
}
|
320 |
-
|
321 |
-
return;
|
322 |
-
}
|
323 |
-
|
324 |
-
$new_values = array_diff( $new, $old );
|
325 |
-
foreach ( $new_values as $new_value ) {
|
326 |
-
$storage->add( $post_id, $name, $new_value, false );
|
327 |
-
}
|
328 |
-
|
329 |
-
$old_values = array_diff( $old, $new );
|
330 |
-
foreach ( $old_values as $old_value ) {
|
331 |
-
$storage->delete( $post_id, $name, $old_value );
|
332 |
-
}
|
333 |
-
|
334 |
-
return;
|
335 |
-
}
|
336 |
-
|
337 |
-
// If field is cloneable, value is saved as a single entry in the database.
|
338 |
-
if ( $field['clone'] ) {
|
339 |
-
// Remove empty values.
|
340 |
-
$new = (array) $new;
|
341 |
-
foreach ( $new as $k => $v ) {
|
342 |
-
if ( '' === $v || array() === $v ) {
|
343 |
-
unset( $new[ $k ] );
|
344 |
-
}
|
345 |
-
}
|
346 |
-
// Reset indexes.
|
347 |
-
$new = array_values( $new );
|
348 |
-
$storage->update( $post_id, $name, $new );
|
349 |
-
return;
|
350 |
-
}
|
351 |
-
|
352 |
-
// If field is multiple, value is saved as multiple entries in the database (WordPress behaviour).
|
353 |
-
if ( $field['multiple'] ) {
|
354 |
-
$old = (array) $old;
|
355 |
-
$new = (array) $new;
|
356 |
-
$new_values = array_diff( $new, $old );
|
357 |
-
foreach ( $new_values as $new_value ) {
|
358 |
-
$storage->add( $post_id, $name, $new_value, false );
|
359 |
-
}
|
360 |
-
$old_values = array_diff( $old, $new );
|
361 |
-
foreach ( $old_values as $old_value ) {
|
362 |
-
$storage->delete( $post_id, $name, $old_value );
|
363 |
-
}
|
364 |
-
return;
|
365 |
-
}
|
366 |
-
|
367 |
-
// Default: just update post meta.
|
368 |
-
$storage->update( $post_id, $name, $new );
|
369 |
-
}
|
370 |
-
|
371 |
-
/**
|
372 |
-
* Normalize parameters for field.
|
373 |
-
*
|
374 |
-
* @param array $field Field parameters.
|
375 |
-
*
|
376 |
-
* @return array
|
377 |
-
*/
|
378 |
-
public static function normalize( $field ) {
|
379 |
-
$field = wp_parse_args(
|
380 |
-
$field,
|
381 |
-
array(
|
382 |
-
'id' => '',
|
383 |
-
'name' => '',
|
384 |
-
'label_description' => '',
|
385 |
-
'multiple' => false,
|
386 |
-
'std' => '',
|
387 |
-
'desc' => '',
|
388 |
-
'format' => '',
|
389 |
-
'before' => '',
|
390 |
-
'after' => '',
|
391 |
-
'field_name' => isset( $field['id'] ) ? $field['id'] : '',
|
392 |
-
'placeholder' => '',
|
393 |
-
'save_field' => true,
|
394 |
-
|
395 |
-
'clone' => false,
|
396 |
-
'max_clone' => 0,
|
397 |
-
'sort_clone' => false,
|
398 |
-
'add_button' => __( '+ Add more', 'meta-box' ),
|
399 |
-
'clone_default' => false,
|
400 |
-
'clone_as_multiple' => false,
|
401 |
-
|
402 |
-
'class' => '',
|
403 |
-
'disabled' => false,
|
404 |
-
'required' => false,
|
405 |
-
'autofocus' => false,
|
406 |
-
'attributes' => array(),
|
407 |
-
)
|
408 |
-
);
|
409 |
-
|
410 |
-
if ( $field['clone_default'] ) {
|
411 |
-
$field['attributes'] = wp_parse_args(
|
412 |
-
$field['attributes'],
|
413 |
-
array(
|
414 |
-
'data-default' => $field['std'],
|
415 |
-
'data-clone-default' => 'true',
|
416 |
-
)
|
417 |
-
);
|
418 |
-
}
|
419 |
-
|
420 |
-
return $field;
|
421 |
-
}
|
422 |
-
|
423 |
-
/**
|
424 |
-
* Get the attributes for a field.
|
425 |
-
*
|
426 |
-
* @param array $field Field parameters.
|
427 |
-
* @param mixed $value Meta value.
|
428 |
-
*
|
429 |
-
* @return array
|
430 |
-
*/
|
431 |
-
public static function get_attributes( $field, $value = null ) {
|
432 |
-
$attributes = wp_parse_args(
|
433 |
-
$field['attributes'],
|
434 |
-
array(
|
435 |
-
'disabled' => $field['disabled'],
|
436 |
-
'autofocus' => $field['autofocus'],
|
437 |
-
'required' => $field['required'],
|
438 |
-
'id' => $field['id'],
|
439 |
-
'class' => '',
|
440 |
-
'name' => $field['field_name'],
|
441 |
-
)
|
442 |
-
);
|
443 |
-
|
444 |
-
$attributes['class'] = trim( implode( ' ', array_merge( array( "rwmb-{$field['type']}" ), (array) $attributes['class'] ) ) );
|
445 |
-
|
446 |
-
return $attributes;
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* Renders an attribute array into an html attributes string.
|
451 |
-
*
|
452 |
-
* @param array $attributes HTML attributes.
|
453 |
-
*
|
454 |
-
* @return string
|
455 |
-
*/
|
456 |
-
public static function render_attributes( $attributes ) {
|
457 |
-
$output = '';
|
458 |
-
|
459 |
-
foreach ( $attributes as $key => $value ) {
|
460 |
-
if ( false === $value || '' === $value ) {
|
461 |
-
continue;
|
462 |
-
}
|
463 |
-
|
464 |
-
if ( is_array( $value ) ) {
|
465 |
-
$value = wp_json_encode( $value );
|
466 |
-
}
|
467 |
-
|
468 |
-
$output .= sprintf( true === $value ? ' %s' : ' %s="%s"', $key, esc_attr( $value ) );
|
469 |
-
}
|
470 |
-
|
471 |
-
return $output;
|
472 |
-
}
|
473 |
-
|
474 |
-
/**
|
475 |
-
* Get the field value.
|
476 |
-
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
477 |
-
* of the field saved in the database, while this function returns more meaningful value of the field, for ex.:
|
478 |
-
* for file/image: return array of file/image information instead of file/image IDs.
|
479 |
-
*
|
480 |
-
* Each field can extend this function and add more data to the returned value.
|
481 |
-
* See specific field classes for details.
|
482 |
-
*
|
483 |
-
* @param array $field Field parameters.
|
484 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
485 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
486 |
-
*
|
487 |
-
* @return mixed Field value
|
488 |
-
*/
|
489 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
490 |
-
// Some fields does not have ID like heading, custom HTML, etc.
|
491 |
-
if ( empty( $field['id'] ) ) {
|
492 |
-
return '';
|
493 |
-
}
|
494 |
-
|
495 |
-
if ( ! $post_id ) {
|
496 |
-
$post_id = get_the_ID();
|
497 |
-
}
|
498 |
-
|
499 |
-
// Get raw meta value in the database, no escape.
|
500 |
-
$value = self::call( $field, 'raw_meta', $post_id, $args );
|
501 |
-
|
502 |
-
// Make sure meta value is an array for cloneable and multiple fields.
|
503 |
-
if ( $field['clone'] || $field['multiple'] ) {
|
504 |
-
$value = is_array( $value ) && $value ? $value : array();
|
505 |
-
}
|
506 |
-
|
507 |
-
return $value;
|
508 |
-
}
|
509 |
-
|
510 |
-
/**
|
511 |
-
* Output the field value.
|
512 |
-
* Depends on field value and field types, each field can extend this method to output its value in its own way
|
513 |
-
* See specific field classes for details.
|
514 |
-
*
|
515 |
-
* Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
|
516 |
-
* rwmb_the_field function later.
|
517 |
-
*
|
518 |
-
* @use self::get_value()
|
519 |
-
* @see rwmb_the_value()
|
520 |
-
*
|
521 |
-
* @param array $field Field parameters.
|
522 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
523 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
524 |
-
*
|
525 |
-
* @return string HTML output of the field
|
526 |
-
*/
|
527 |
-
public static function the_value( $field, $args = array(), $post_id = null ) {
|
528 |
-
$value = self::call( 'get_value', $field, $args, $post_id );
|
529 |
-
|
530 |
-
if ( false === $value ) {
|
531 |
-
return '';
|
532 |
-
}
|
533 |
-
|
534 |
-
return self::call( 'format_value', $field, $value, $args, $post_id );
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* Format value for the helper functions.
|
539 |
-
*
|
540 |
-
* @param array $field Field parameters.
|
541 |
-
* @param string|array $value The field meta value.
|
542 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
543 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
544 |
-
*
|
545 |
-
* @return string
|
546 |
-
*/
|
547 |
-
public static function format_value( $field, $value, $args, $post_id ) {
|
548 |
-
if ( ! $field['clone'] ) {
|
549 |
-
return self::call( 'format_clone_value', $field, $value, $args, $post_id );
|
550 |
-
}
|
551 |
-
$output = '<ul>';
|
552 |
-
foreach ( $value as $clone ) {
|
553 |
-
$output .= '<li>' . self::call( 'format_clone_value', $field, $clone, $args, $post_id ) . '</li>';
|
554 |
-
}
|
555 |
-
$output .= '</ul>';
|
556 |
-
return $output;
|
557 |
-
}
|
558 |
-
|
559 |
-
/**
|
560 |
-
* Format value for a clone.
|
561 |
-
*
|
562 |
-
* @param array $field Field parameters.
|
563 |
-
* @param string|array $value The field meta value.
|
564 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
565 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
566 |
-
*
|
567 |
-
* @return string
|
568 |
-
*/
|
569 |
-
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
570 |
-
if ( ! $field['multiple'] ) {
|
571 |
-
return self::call( 'format_single_value', $field, $value, $args, $post_id );
|
572 |
-
}
|
573 |
-
$output = '<ul>';
|
574 |
-
foreach ( $value as $single ) {
|
575 |
-
$output .= '<li>' . self::call( 'format_single_value', $field, $single, $args, $post_id ) . '</li>';
|
576 |
-
}
|
577 |
-
$output .= '</ul>';
|
578 |
-
return $output;
|
579 |
-
}
|
580 |
-
|
581 |
-
/**
|
582 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
583 |
-
*
|
584 |
-
* @param array $field Field parameters.
|
585 |
-
* @param string $value The value.
|
586 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
587 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
588 |
-
*
|
589 |
-
* @return string
|
590 |
-
*/
|
591 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
592 |
-
return $value;
|
593 |
-
}
|
594 |
-
|
595 |
-
/**
|
596 |
-
* Call a method of a field.
|
597 |
-
* This should be replaced by static::$method( $args ) in PHP 5.3.
|
598 |
-
*
|
599 |
-
* @return mixed
|
600 |
-
*/
|
601 |
-
public static function call() {
|
602 |
-
$args = func_get_args();
|
603 |
-
|
604 |
-
$check = reset( $args );
|
605 |
-
|
606 |
-
// Params: method name, field, other params.
|
607 |
-
if ( is_string( $check ) ) {
|
608 |
-
$method = array_shift( $args );
|
609 |
-
$field = reset( $args ); // Keep field as 1st param.
|
610 |
-
} else {
|
611 |
-
$field = array_shift( $args );
|
612 |
-
$method = array_shift( $args );
|
613 |
-
|
614 |
-
if ( 'raw_meta' === $method ) {
|
615 |
-
// Add field param after object id.
|
616 |
-
array_splice( $args, 1, 0, array( $field ) );
|
617 |
-
} else {
|
618 |
-
$args[] = $field; // Add field as last param.
|
619 |
-
}
|
620 |
-
}
|
621 |
-
|
622 |
-
return call_user_func_array( array( self::get_class_name( $field ), $method ), $args );
|
623 |
-
}
|
624 |
-
|
625 |
-
/**
|
626 |
-
* Map field types.
|
627 |
-
*
|
628 |
-
* @param array $field Field parameters.
|
629 |
-
* @return string Field mapped type.
|
630 |
-
*/
|
631 |
-
public static function map_types( $field ) {
|
632 |
-
$type = isset( $field['type'] ) ? $field['type'] : 'input';
|
633 |
-
$type_map = apply_filters(
|
634 |
-
'rwmb_type_map',
|
635 |
-
array(
|
636 |
-
'file_advanced' => 'media',
|
637 |
-
'plupload_image' => 'image_upload',
|
638 |
-
'url' => 'text',
|
639 |
-
)
|
640 |
-
);
|
641 |
-
|
642 |
-
return isset( $type_map[ $type ] ) ? $type_map[ $type ] : $type;
|
643 |
-
}
|
644 |
-
|
645 |
-
/**
|
646 |
-
* Get field class name.
|
647 |
-
*
|
648 |
-
* @param array $field Field parameters.
|
649 |
-
* @return string Field class name.
|
650 |
-
*/
|
651 |
-
public static function get_class_name( $field ) {
|
652 |
-
$type = self::map_types( $field );
|
653 |
-
$type = str_replace( array( '-', '_' ), ' ', $type );
|
654 |
-
$class = 'RWMB_' . ucwords( $type ) . '_Field';
|
655 |
-
$class = str_replace( ' ', '_', $class );
|
656 |
-
return class_exists( $class ) ? $class : 'RWMB_Input_Field';
|
657 |
-
}
|
658 |
-
|
659 |
-
/**
|
660 |
-
* Apply various filters based on field type, id.
|
661 |
-
* Filters:
|
662 |
-
* - rwmb_{$name}
|
663 |
-
* - rwmb_{$field['type']}_{$name}
|
664 |
-
* - rwmb_{$field['id']}_{$name}
|
665 |
-
*
|
666 |
-
* @return mixed
|
667 |
-
*/
|
668 |
-
public static function filter() {
|
669 |
-
$args = func_get_args();
|
670 |
-
|
671 |
-
// 3 first params must be: filter name, value, field. Other params will be used for filters.
|
672 |
-
$name = array_shift( $args );
|
673 |
-
$value = array_shift( $args );
|
674 |
-
$field = array_shift( $args );
|
675 |
-
|
676 |
-
// List of filters.
|
677 |
-
$filters = array(
|
678 |
-
'rwmb_' . $name,
|
679 |
-
'rwmb_' . $field['type'] . '_' . $name,
|
680 |
-
);
|
681 |
-
if ( isset( $field['id'] ) ) {
|
682 |
-
$filters[] = 'rwmb_' . $field['id'] . '_' . $name;
|
683 |
-
}
|
684 |
-
|
685 |
-
// Filter params: value, field, other params. Note: value is changed after each run.
|
686 |
-
array_unshift( $args, $field );
|
687 |
-
foreach ( $filters as $filter ) {
|
688 |
-
$filter_args = $args;
|
689 |
-
array_unshift( $filter_args, $value );
|
690 |
-
$value = apply_filters_ref_array( $filter, $filter_args );
|
691 |
-
}
|
692 |
-
|
693 |
-
return $value;
|
694 |
-
}
|
695 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The field base class.
|
4 |
+
* This is the parent class of all custom fields defined by the plugin, which defines all the common methods.
|
5 |
+
* Fields must inherit this class and overwrite methods with its own.
|
6 |
+
*
|
7 |
+
* @package Meta Box
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* The field base class.
|
12 |
+
*/
|
13 |
+
abstract class RWMB_Field {
|
14 |
+
/**
|
15 |
+
* Add actions.
|
16 |
+
*/
|
17 |
+
public static function add_actions() {
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Enqueue scripts and styles.
|
22 |
+
*/
|
23 |
+
public static function admin_enqueue_scripts() {
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Localize scripts with prevention of loading localized data twice.
|
28 |
+
*
|
29 |
+
* @link https://github.com/rilwis/meta-box/issues/850
|
30 |
+
*
|
31 |
+
* @param string $handle Script handle.
|
32 |
+
* @param string $name Object name.
|
33 |
+
* @param mixed $data Localized data.
|
34 |
+
*/
|
35 |
+
public static function localize_script( $handle, $name, $data ) {
|
36 |
+
/*
|
37 |
+
* Check with function_exists to make it work in WordPress 4.1.
|
38 |
+
* @link https://github.com/rilwis/meta-box/issues/1009
|
39 |
+
*/
|
40 |
+
if ( ! function_exists( 'wp_scripts' ) || ! wp_scripts()->get_data( $handle, 'data' ) ) {
|
41 |
+
wp_localize_script( $handle, $name, $data );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Show field HTML
|
47 |
+
* Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
|
48 |
+
* That ensures the returned value are always been applied filters.
|
49 |
+
* This method is not meant to be overwritten in specific fields.
|
50 |
+
*
|
51 |
+
* @param array $field Field parameters.
|
52 |
+
* @param bool $saved Whether the meta box is saved at least once.
|
53 |
+
* @param int $post_id Post ID.
|
54 |
+
*/
|
55 |
+
public static function show( $field, $saved, $post_id = 0 ) {
|
56 |
+
$meta = self::call( $field, 'meta', $post_id, $saved );
|
57 |
+
$meta = self::filter( 'field_meta', $meta, $field, $saved );
|
58 |
+
|
59 |
+
$begin = self::call( $field, 'begin_html', $meta );
|
60 |
+
$begin = self::filter( 'begin_html', $begin, $field, $meta );
|
61 |
+
|
62 |
+
// Separate code for cloneable and non-cloneable fields to make easy to maintain.
|
63 |
+
if ( $field['clone'] ) {
|
64 |
+
$field_html = RWMB_Clone::html( $meta, $field );
|
65 |
+
} else {
|
66 |
+
// Call separated methods for displaying each type of field.
|
67 |
+
$field_html = self::call( $field, 'html', $meta );
|
68 |
+
$field_html = self::filter( 'html', $field_html, $field, $meta );
|
69 |
+
}
|
70 |
+
|
71 |
+
$end = self::call( $field, 'end_html', $meta );
|
72 |
+
$end = self::filter( 'end_html', $end, $field, $meta );
|
73 |
+
|
74 |
+
$html = self::filter( 'wrapper_html', "$begin$field_html$end", $field, $meta );
|
75 |
+
|
76 |
+
// Display label and input in DIV and allow user-defined classes to be appended.
|
77 |
+
$classes = "rwmb-field rwmb-{$field['type']}-wrapper " . $field['class'];
|
78 |
+
if ( 'hidden' === $field['type'] ) {
|
79 |
+
$classes .= ' hidden';
|
80 |
+
}
|
81 |
+
if ( ! empty( $field['required'] ) ) {
|
82 |
+
$classes .= ' required';
|
83 |
+
}
|
84 |
+
|
85 |
+
$outer_html = sprintf(
|
86 |
+
$field['before'] . '<div class="%s">%s</div>' . $field['after'],
|
87 |
+
trim( $classes ),
|
88 |
+
$html
|
89 |
+
);
|
90 |
+
$outer_html = self::filter( 'outer_html', $outer_html, $field, $meta );
|
91 |
+
|
92 |
+
echo $outer_html; // WPCS: XSS OK.
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get field HTML.
|
97 |
+
*
|
98 |
+
* @param mixed $meta Meta value.
|
99 |
+
* @param array $field Field parameters.
|
100 |
+
*
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public static function html( $meta, $field ) {
|
104 |
+
return '';
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Show begin HTML markup for fields.
|
109 |
+
*
|
110 |
+
* @param mixed $meta Meta value.
|
111 |
+
* @param array $field Field parameters.
|
112 |
+
*
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public static function begin_html( $meta, $field ) {
|
116 |
+
$field_label = '';
|
117 |
+
if ( $field['name'] ) {
|
118 |
+
$field_label = sprintf(
|
119 |
+
'<div class="rwmb-label">
|
120 |
+
<label for="%s">%s</label>
|
121 |
+
%s
|
122 |
+
</div>',
|
123 |
+
esc_attr( $field['id'] ),
|
124 |
+
$field['name'],
|
125 |
+
self::label_description( $field )
|
126 |
+
);
|
127 |
+
}
|
128 |
+
|
129 |
+
$data_max_clone = is_numeric( $field['max_clone'] ) && $field['max_clone'] > 1 ? ' data-max-clone=' . $field['max_clone'] : '';
|
130 |
+
|
131 |
+
$input_open = sprintf(
|
132 |
+
'<div class="rwmb-input"%s>',
|
133 |
+
$data_max_clone
|
134 |
+
);
|
135 |
+
|
136 |
+
return $field_label . $input_open;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Show end HTML markup for fields.
|
141 |
+
*
|
142 |
+
* @param mixed $meta Meta value.
|
143 |
+
* @param array $field Field parameters.
|
144 |
+
*
|
145 |
+
* @return string
|
146 |
+
*/
|
147 |
+
public static function end_html( $meta, $field ) {
|
148 |
+
return RWMB_Clone::add_clone_button( $field ) . self::call( 'input_description', $field ) . '</div>';
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Display field label description.
|
153 |
+
*
|
154 |
+
* @param array $field Field parameters.
|
155 |
+
* @return string
|
156 |
+
*/
|
157 |
+
protected static function label_description( $field ) {
|
158 |
+
$id = $field['id'] ? ' id="' . esc_attr( $field['id'] ) . '-label-description"' : '';
|
159 |
+
return $field['label_description'] ? "<p{$id} class='description'>{$field['label_description']}</p>" : '';
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Display field description.
|
164 |
+
*
|
165 |
+
* @param array $field Field parameters.
|
166 |
+
* @return string
|
167 |
+
*/
|
168 |
+
protected static function input_description( $field ) {
|
169 |
+
$id = $field['id'] ? ' id="' . esc_attr( $field['id'] ) . '-description"' : '';
|
170 |
+
return $field['desc'] ? "<p{$id} class='description'>{$field['desc']}</p>" : '';
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Get raw meta value.
|
175 |
+
*
|
176 |
+
* @param int $object_id Object ID.
|
177 |
+
* @param array $field Field parameters.
|
178 |
+
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
179 |
+
*
|
180 |
+
* @return mixed
|
181 |
+
*/
|
182 |
+
public static function raw_meta( $object_id, $field, $args = array() ) {
|
183 |
+
if ( empty( $field['id'] ) ) {
|
184 |
+
return '';
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( isset( $field['storage'] ) ) {
|
188 |
+
$storage = $field['storage'];
|
189 |
+
} elseif ( isset( $args['object_type'] ) ) {
|
190 |
+
$storage = rwmb_get_storage( $args['object_type'] );
|
191 |
+
} else {
|
192 |
+
$storage = rwmb_get_storage( 'post' );
|
193 |
+
}
|
194 |
+
|
195 |
+
if ( ! isset( $args['single'] ) ) {
|
196 |
+
$args['single'] = $field['clone'] || ! $field['multiple'];
|
197 |
+
}
|
198 |
+
|
199 |
+
if ( $field['clone'] && $field['clone_as_multiple'] ) {
|
200 |
+
$args['single'] = false;
|
201 |
+
}
|
202 |
+
|
203 |
+
return $storage->get( $object_id, $field['id'], $args );
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Get meta value.
|
208 |
+
*
|
209 |
+
* @param int $post_id Post ID.
|
210 |
+
* @param bool $saved Whether the meta box is saved at least once.
|
211 |
+
* @param array $field Field parameters.
|
212 |
+
*
|
213 |
+
* @return mixed
|
214 |
+
*/
|
215 |
+
public static function meta( $post_id, $saved, $field ) {
|
216 |
+
/**
|
217 |
+
* For special fields like 'divider', 'heading' which don't have ID, just return empty string
|
218 |
+
* to prevent notice error when displaying fields.
|
219 |
+
*/
|
220 |
+
if ( empty( $field['id'] ) ) {
|
221 |
+
return '';
|
222 |
+
}
|
223 |
+
|
224 |
+
// Get raw meta.
|
225 |
+
$meta = self::call( $field, 'raw_meta', $post_id );
|
226 |
+
|
227 |
+
// Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run).
|
228 |
+
$meta = ! $saved ? $field['std'] : $meta;
|
229 |
+
|
230 |
+
// Ensure multiple fields are arrays.
|
231 |
+
if ( $field['multiple'] ) {
|
232 |
+
if ( $field['clone'] ) {
|
233 |
+
$meta = (array) $meta;
|
234 |
+
foreach ( $meta as $key => $m ) {
|
235 |
+
$meta[ $key ] = (array) $m;
|
236 |
+
}
|
237 |
+
} else {
|
238 |
+
$meta = (array) $meta;
|
239 |
+
}
|
240 |
+
}
|
241 |
+
// Escape attributes.
|
242 |
+
$meta = self::call( $field, 'esc_meta', $meta );
|
243 |
+
|
244 |
+
// Make sure meta value is an array for clonable and multiple fields.
|
245 |
+
if ( $field['clone'] || $field['multiple'] ) {
|
246 |
+
if ( empty( $meta ) || ! is_array( $meta ) ) {
|
247 |
+
/**
|
248 |
+
* If field is clonable, $meta must be an array with values so that the foreach loop in self::show() runs properly.
|
249 |
+
*
|
250 |
+
* @see self::show()
|
251 |
+
*/
|
252 |
+
$meta = $field['clone'] ? array( '' ) : array();
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
return $meta;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Escape meta for field output.
|
261 |
+
*
|
262 |
+
* @param mixed $meta Meta value.
|
263 |
+
*
|
264 |
+
* @return mixed
|
265 |
+
*/
|
266 |
+
public static function esc_meta( $meta ) {
|
267 |
+
return is_array( $meta ) ? array_map( __METHOD__, $meta ) : esc_attr( $meta );
|
268 |
+
}
|
269 |
+
|
270 |
+
/**
|
271 |
+
* Set value of meta before saving into database.
|
272 |
+
*
|
273 |
+
* @param mixed $new The submitted meta value.
|
274 |
+
* @param mixed $old The existing meta value.
|
275 |
+
* @param int $post_id The post ID.
|
276 |
+
* @param array $field The field parameters.
|
277 |
+
*
|
278 |
+
* @return int
|
279 |
+
*/
|
280 |
+
public static function value( $new, $old, $post_id, $field ) {
|
281 |
+
return $new;
|
282 |
+
}
|
283 |
+
|
284 |
+
/**
|
285 |
+
* Save meta value.
|
286 |
+
*
|
287 |
+
* @param mixed $new The submitted meta value.
|
288 |
+
* @param mixed $old The existing meta value.
|
289 |
+
* @param int $post_id The post ID.
|
290 |
+
* @param array $field The field parameters.
|
291 |
+
*/
|
292 |
+
public static function save( $new, $old, $post_id, $field ) {
|
293 |
+
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
294 |
+
return;
|
295 |
+
}
|
296 |
+
$name = $field['id'];
|
297 |
+
$storage = $field['storage'];
|
298 |
+
|
299 |
+
// Remove post meta if it's empty.
|
300 |
+
if ( '' === $new || array() === $new ) {
|
301 |
+
$storage->delete( $post_id, $name );
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
|
305 |
+
// Save cloned fields as multiple values instead serialized array.
|
306 |
+
if ( $field['clone'] && $field['clone_as_multiple'] ) {
|
307 |
+
$old = array_filter( (array) $old );
|
308 |
+
$new = array_filter( (array) $new );
|
309 |
+
|
310 |
+
if ( empty( $new ) ) {
|
311 |
+
$storage->delete( $post_id, $name );
|
312 |
+
}
|
313 |
+
|
314 |
+
if ( $field['sort_clone'] && array_values( $new ) != array_values( $old ) ) {
|
315 |
+
$storage->delete( $post_id, $name );
|
316 |
+
|
317 |
+
foreach ( $new as $new_value ) {
|
318 |
+
$storage->add( $post_id, $name, $new_value, false );
|
319 |
+
}
|
320 |
+
|
321 |
+
return;
|
322 |
+
}
|
323 |
+
|
324 |
+
$new_values = array_diff( $new, $old );
|
325 |
+
foreach ( $new_values as $new_value ) {
|
326 |
+
$storage->add( $post_id, $name, $new_value, false );
|
327 |
+
}
|
328 |
+
|
329 |
+
$old_values = array_diff( $old, $new );
|
330 |
+
foreach ( $old_values as $old_value ) {
|
331 |
+
$storage->delete( $post_id, $name, $old_value );
|
332 |
+
}
|
333 |
+
|
334 |
+
return;
|
335 |
+
}
|
336 |
+
|
337 |
+
// If field is cloneable, value is saved as a single entry in the database.
|
338 |
+
if ( $field['clone'] ) {
|
339 |
+
// Remove empty values.
|
340 |
+
$new = (array) $new;
|
341 |
+
foreach ( $new as $k => $v ) {
|
342 |
+
if ( '' === $v || array() === $v ) {
|
343 |
+
unset( $new[ $k ] );
|
344 |
+
}
|
345 |
+
}
|
346 |
+
// Reset indexes.
|
347 |
+
$new = array_values( $new );
|
348 |
+
$storage->update( $post_id, $name, $new );
|
349 |
+
return;
|
350 |
+
}
|
351 |
+
|
352 |
+
// If field is multiple, value is saved as multiple entries in the database (WordPress behaviour).
|
353 |
+
if ( $field['multiple'] ) {
|
354 |
+
$old = (array) $old;
|
355 |
+
$new = (array) $new;
|
356 |
+
$new_values = array_diff( $new, $old );
|
357 |
+
foreach ( $new_values as $new_value ) {
|
358 |
+
$storage->add( $post_id, $name, $new_value, false );
|
359 |
+
}
|
360 |
+
$old_values = array_diff( $old, $new );
|
361 |
+
foreach ( $old_values as $old_value ) {
|
362 |
+
$storage->delete( $post_id, $name, $old_value );
|
363 |
+
}
|
364 |
+
return;
|
365 |
+
}
|
366 |
+
|
367 |
+
// Default: just update post meta.
|
368 |
+
$storage->update( $post_id, $name, $new );
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Normalize parameters for field.
|
373 |
+
*
|
374 |
+
* @param array $field Field parameters.
|
375 |
+
*
|
376 |
+
* @return array
|
377 |
+
*/
|
378 |
+
public static function normalize( $field ) {
|
379 |
+
$field = wp_parse_args(
|
380 |
+
$field,
|
381 |
+
array(
|
382 |
+
'id' => '',
|
383 |
+
'name' => '',
|
384 |
+
'label_description' => '',
|
385 |
+
'multiple' => false,
|
386 |
+
'std' => '',
|
387 |
+
'desc' => '',
|
388 |
+
'format' => '',
|
389 |
+
'before' => '',
|
390 |
+
'after' => '',
|
391 |
+
'field_name' => isset( $field['id'] ) ? $field['id'] : '',
|
392 |
+
'placeholder' => '',
|
393 |
+
'save_field' => true,
|
394 |
+
|
395 |
+
'clone' => false,
|
396 |
+
'max_clone' => 0,
|
397 |
+
'sort_clone' => false,
|
398 |
+
'add_button' => __( '+ Add more', 'meta-box' ),
|
399 |
+
'clone_default' => false,
|
400 |
+
'clone_as_multiple' => false,
|
401 |
+
|
402 |
+
'class' => '',
|
403 |
+
'disabled' => false,
|
404 |
+
'required' => false,
|
405 |
+
'autofocus' => false,
|
406 |
+
'attributes' => array(),
|
407 |
+
)
|
408 |
+
);
|
409 |
+
|
410 |
+
if ( $field['clone_default'] ) {
|
411 |
+
$field['attributes'] = wp_parse_args(
|
412 |
+
$field['attributes'],
|
413 |
+
array(
|
414 |
+
'data-default' => $field['std'],
|
415 |
+
'data-clone-default' => 'true',
|
416 |
+
)
|
417 |
+
);
|
418 |
+
}
|
419 |
+
|
420 |
+
return $field;
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Get the attributes for a field.
|
425 |
+
*
|
426 |
+
* @param array $field Field parameters.
|
427 |
+
* @param mixed $value Meta value.
|
428 |
+
*
|
429 |
+
* @return array
|
430 |
+
*/
|
431 |
+
public static function get_attributes( $field, $value = null ) {
|
432 |
+
$attributes = wp_parse_args(
|
433 |
+
$field['attributes'],
|
434 |
+
array(
|
435 |
+
'disabled' => $field['disabled'],
|
436 |
+
'autofocus' => $field['autofocus'],
|
437 |
+
'required' => $field['required'],
|
438 |
+
'id' => $field['id'],
|
439 |
+
'class' => '',
|
440 |
+
'name' => $field['field_name'],
|
441 |
+
)
|
442 |
+
);
|
443 |
+
|
444 |
+
$attributes['class'] = trim( implode( ' ', array_merge( array( "rwmb-{$field['type']}" ), (array) $attributes['class'] ) ) );
|
445 |
+
|
446 |
+
return $attributes;
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Renders an attribute array into an html attributes string.
|
451 |
+
*
|
452 |
+
* @param array $attributes HTML attributes.
|
453 |
+
*
|
454 |
+
* @return string
|
455 |
+
*/
|
456 |
+
public static function render_attributes( $attributes ) {
|
457 |
+
$output = '';
|
458 |
+
|
459 |
+
foreach ( $attributes as $key => $value ) {
|
460 |
+
if ( false === $value || '' === $value ) {
|
461 |
+
continue;
|
462 |
+
}
|
463 |
+
|
464 |
+
if ( is_array( $value ) ) {
|
465 |
+
$value = wp_json_encode( $value );
|
466 |
+
}
|
467 |
+
|
468 |
+
$output .= sprintf( true === $value ? ' %s' : ' %s="%s"', $key, esc_attr( $value ) );
|
469 |
+
}
|
470 |
+
|
471 |
+
return $output;
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Get the field value.
|
476 |
+
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
477 |
+
* of the field saved in the database, while this function returns more meaningful value of the field, for ex.:
|
478 |
+
* for file/image: return array of file/image information instead of file/image IDs.
|
479 |
+
*
|
480 |
+
* Each field can extend this function and add more data to the returned value.
|
481 |
+
* See specific field classes for details.
|
482 |
+
*
|
483 |
+
* @param array $field Field parameters.
|
484 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
485 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
486 |
+
*
|
487 |
+
* @return mixed Field value
|
488 |
+
*/
|
489 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
490 |
+
// Some fields does not have ID like heading, custom HTML, etc.
|
491 |
+
if ( empty( $field['id'] ) ) {
|
492 |
+
return '';
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( ! $post_id ) {
|
496 |
+
$post_id = get_the_ID();
|
497 |
+
}
|
498 |
+
|
499 |
+
// Get raw meta value in the database, no escape.
|
500 |
+
$value = self::call( $field, 'raw_meta', $post_id, $args );
|
501 |
+
|
502 |
+
// Make sure meta value is an array for cloneable and multiple fields.
|
503 |
+
if ( $field['clone'] || $field['multiple'] ) {
|
504 |
+
$value = is_array( $value ) && $value ? $value : array();
|
505 |
+
}
|
506 |
+
|
507 |
+
return $value;
|
508 |
+
}
|
509 |
+
|
510 |
+
/**
|
511 |
+
* Output the field value.
|
512 |
+
* Depends on field value and field types, each field can extend this method to output its value in its own way
|
513 |
+
* See specific field classes for details.
|
514 |
+
*
|
515 |
+
* Note: we don't echo the field value directly. We return the output HTML of field, which will be used in
|
516 |
+
* rwmb_the_field function later.
|
517 |
+
*
|
518 |
+
* @use self::get_value()
|
519 |
+
* @see rwmb_the_value()
|
520 |
+
*
|
521 |
+
* @param array $field Field parameters.
|
522 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
523 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
524 |
+
*
|
525 |
+
* @return string HTML output of the field
|
526 |
+
*/
|
527 |
+
public static function the_value( $field, $args = array(), $post_id = null ) {
|
528 |
+
$value = self::call( 'get_value', $field, $args, $post_id );
|
529 |
+
|
530 |
+
if ( false === $value ) {
|
531 |
+
return '';
|
532 |
+
}
|
533 |
+
|
534 |
+
return self::call( 'format_value', $field, $value, $args, $post_id );
|
535 |
+
}
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Format value for the helper functions.
|
539 |
+
*
|
540 |
+
* @param array $field Field parameters.
|
541 |
+
* @param string|array $value The field meta value.
|
542 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
543 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
544 |
+
*
|
545 |
+
* @return string
|
546 |
+
*/
|
547 |
+
public static function format_value( $field, $value, $args, $post_id ) {
|
548 |
+
if ( ! $field['clone'] ) {
|
549 |
+
return self::call( 'format_clone_value', $field, $value, $args, $post_id );
|
550 |
+
}
|
551 |
+
$output = '<ul>';
|
552 |
+
foreach ( $value as $clone ) {
|
553 |
+
$output .= '<li>' . self::call( 'format_clone_value', $field, $clone, $args, $post_id ) . '</li>';
|
554 |
+
}
|
555 |
+
$output .= '</ul>';
|
556 |
+
return $output;
|
557 |
+
}
|
558 |
+
|
559 |
+
/**
|
560 |
+
* Format value for a clone.
|
561 |
+
*
|
562 |
+
* @param array $field Field parameters.
|
563 |
+
* @param string|array $value The field meta value.
|
564 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
565 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
566 |
+
*
|
567 |
+
* @return string
|
568 |
+
*/
|
569 |
+
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
570 |
+
if ( ! $field['multiple'] ) {
|
571 |
+
return self::call( 'format_single_value', $field, $value, $args, $post_id );
|
572 |
+
}
|
573 |
+
$output = '<ul>';
|
574 |
+
foreach ( $value as $single ) {
|
575 |
+
$output .= '<li>' . self::call( 'format_single_value', $field, $single, $args, $post_id ) . '</li>';
|
576 |
+
}
|
577 |
+
$output .= '</ul>';
|
578 |
+
return $output;
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
583 |
+
*
|
584 |
+
* @param array $field Field parameters.
|
585 |
+
* @param string $value The value.
|
586 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
587 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
588 |
+
*
|
589 |
+
* @return string
|
590 |
+
*/
|
591 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
592 |
+
return $value;
|
593 |
+
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* Call a method of a field.
|
597 |
+
* This should be replaced by static::$method( $args ) in PHP 5.3.
|
598 |
+
*
|
599 |
+
* @return mixed
|
600 |
+
*/
|
601 |
+
public static function call() {
|
602 |
+
$args = func_get_args();
|
603 |
+
|
604 |
+
$check = reset( $args );
|
605 |
+
|
606 |
+
// Params: method name, field, other params.
|
607 |
+
if ( is_string( $check ) ) {
|
608 |
+
$method = array_shift( $args );
|
609 |
+
$field = reset( $args ); // Keep field as 1st param.
|
610 |
+
} else {
|
611 |
+
$field = array_shift( $args );
|
612 |
+
$method = array_shift( $args );
|
613 |
+
|
614 |
+
if ( 'raw_meta' === $method ) {
|
615 |
+
// Add field param after object id.
|
616 |
+
array_splice( $args, 1, 0, array( $field ) );
|
617 |
+
} else {
|
618 |
+
$args[] = $field; // Add field as last param.
|
619 |
+
}
|
620 |
+
}
|
621 |
+
|
622 |
+
return call_user_func_array( array( self::get_class_name( $field ), $method ), $args );
|
623 |
+
}
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Map field types.
|
627 |
+
*
|
628 |
+
* @param array $field Field parameters.
|
629 |
+
* @return string Field mapped type.
|
630 |
+
*/
|
631 |
+
public static function map_types( $field ) {
|
632 |
+
$type = isset( $field['type'] ) ? $field['type'] : 'input';
|
633 |
+
$type_map = apply_filters(
|
634 |
+
'rwmb_type_map',
|
635 |
+
array(
|
636 |
+
'file_advanced' => 'media',
|
637 |
+
'plupload_image' => 'image_upload',
|
638 |
+
'url' => 'text',
|
639 |
+
)
|
640 |
+
);
|
641 |
+
|
642 |
+
return isset( $type_map[ $type ] ) ? $type_map[ $type ] : $type;
|
643 |
+
}
|
644 |
+
|
645 |
+
/**
|
646 |
+
* Get field class name.
|
647 |
+
*
|
648 |
+
* @param array $field Field parameters.
|
649 |
+
* @return string Field class name.
|
650 |
+
*/
|
651 |
+
public static function get_class_name( $field ) {
|
652 |
+
$type = self::map_types( $field );
|
653 |
+
$type = str_replace( array( '-', '_' ), ' ', $type );
|
654 |
+
$class = 'RWMB_' . ucwords( $type ) . '_Field';
|
655 |
+
$class = str_replace( ' ', '_', $class );
|
656 |
+
return class_exists( $class ) ? $class : 'RWMB_Input_Field';
|
657 |
+
}
|
658 |
+
|
659 |
+
/**
|
660 |
+
* Apply various filters based on field type, id.
|
661 |
+
* Filters:
|
662 |
+
* - rwmb_{$name}
|
663 |
+
* - rwmb_{$field['type']}_{$name}
|
664 |
+
* - rwmb_{$field['id']}_{$name}
|
665 |
+
*
|
666 |
+
* @return mixed
|
667 |
+
*/
|
668 |
+
public static function filter() {
|
669 |
+
$args = func_get_args();
|
670 |
+
|
671 |
+
// 3 first params must be: filter name, value, field. Other params will be used for filters.
|
672 |
+
$name = array_shift( $args );
|
673 |
+
$value = array_shift( $args );
|
674 |
+
$field = array_shift( $args );
|
675 |
+
|
676 |
+
// List of filters.
|
677 |
+
$filters = array(
|
678 |
+
'rwmb_' . $name,
|
679 |
+
'rwmb_' . $field['type'] . '_' . $name,
|
680 |
+
);
|
681 |
+
if ( isset( $field['id'] ) ) {
|
682 |
+
$filters[] = 'rwmb_' . $field['id'] . '_' . $name;
|
683 |
+
}
|
684 |
+
|
685 |
+
// Filter params: value, field, other params. Note: value is changed after each run.
|
686 |
+
array_unshift( $args, $field );
|
687 |
+
foreach ( $filters as $filter ) {
|
688 |
+
$filter_args = $args;
|
689 |
+
array_unshift( $filter_args, $value );
|
690 |
+
$value = apply_filters_ref_array( $filter, $filter_args );
|
691 |
+
}
|
692 |
+
|
693 |
+
return $value;
|
694 |
+
}
|
695 |
+
}
|
inc/libraries/meta-box/inc/fields/autocomplete.php
CHANGED
@@ -1,125 +1,125 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The autocomplete field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Autocomplete field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-autocomplete', RWMB_CSS_URL . 'autocomplete.css', '', RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-autocomplete', RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), RWMB_VER, true );
|
18 |
-
|
19 |
-
self::localize_script(
|
20 |
-
'rwmb-autocomplete',
|
21 |
-
'RWMB_Autocomplete',
|
22 |
-
array(
|
23 |
-
'delete' => __( 'Delete', 'meta-box' ),
|
24 |
-
)
|
25 |
-
);
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get field HTML.
|
30 |
-
*
|
31 |
-
* @param mixed $meta Meta value.
|
32 |
-
* @param array $field Field parameters.
|
33 |
-
* @return string
|
34 |
-
*/
|
35 |
-
public static function html( $meta, $field ) {
|
36 |
-
if ( ! is_array( $meta ) ) {
|
37 |
-
$meta = array( $meta );
|
38 |
-
}
|
39 |
-
|
40 |
-
$field = apply_filters( 'rwmb_autocomplete_field', $field, $meta );
|
41 |
-
$options = $field['options'];
|
42 |
-
|
43 |
-
if ( is_array( $field['options'] ) ) {
|
44 |
-
$options = array();
|
45 |
-
foreach ( $field['options'] as $value => $label ) {
|
46 |
-
$options[] = array(
|
47 |
-
'value' => $value,
|
48 |
-
'label' => $label,
|
49 |
-
);
|
50 |
-
}
|
51 |
-
$options = wp_json_encode( $options );
|
52 |
-
}
|
53 |
-
|
54 |
-
// Input field that triggers autocomplete.
|
55 |
-
// This field doesn't store field values, so it doesn't have "name" attribute.
|
56 |
-
// The value(s) of the field is store in hidden input(s). See below.
|
57 |
-
$html = sprintf(
|
58 |
-
'<input type="text" class="rwmb-autocomplete-search" size="%s">
|
59 |
-
<input type="hidden" name="%s" class="rwmb-autocomplete" data-options="%s" disabled>',
|
60 |
-
esc_attr( $field['size'] ),
|
61 |
-
esc_attr( $field['field_name'] ),
|
62 |
-
esc_attr( $options )
|
63 |
-
);
|
64 |
-
|
65 |
-
$html .= '<div class="rwmb-autocomplete-results">';
|
66 |
-
|
67 |
-
// Each value is displayed with label and 'Delete' option.
|
68 |
-
// The hidden input has to have ".rwmb-*" class to make clone work.
|
69 |
-
$tpl = '
|
70 |
-
<div class="rwmb-autocomplete-result">
|
71 |
-
<div class="label">%s</div>
|
72 |
-
<div class="actions">%s</div>
|
73 |
-
<input type="hidden" class="rwmb-autocomplete-value" name="%s" value="%s">
|
74 |
-
</div>
|
75 |
-
';
|
76 |
-
|
77 |
-
if ( is_array( $field['options'] ) ) {
|
78 |
-
foreach ( $field['options'] as $value => $label ) {
|
79 |
-
if ( ! in_array( $value, $meta ) ) {
|
80 |
-
continue;
|
81 |
-
}
|
82 |
-
$html .= sprintf(
|
83 |
-
$tpl,
|
84 |
-
esc_html( $label ),
|
85 |
-
esc_html__( 'Delete', 'meta-box' ),
|
86 |
-
esc_attr( $field['field_name'] ),
|
87 |
-
esc_attr( $value )
|
88 |
-
);
|
89 |
-
}
|
90 |
-
} else {
|
91 |
-
$meta = array_filter( $meta );
|
92 |
-
foreach ( $meta as $value ) {
|
93 |
-
$label = apply_filters( 'rwmb_autocomplete_result_label', $value, $field );
|
94 |
-
$html .= sprintf(
|
95 |
-
$tpl,
|
96 |
-
esc_html( $label ),
|
97 |
-
esc_html__( 'Delete', 'meta-box' ),
|
98 |
-
esc_attr( $field['field_name'] ),
|
99 |
-
esc_attr( $value )
|
100 |
-
);
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
$html .= '</div>'; // .rwmb-autocomplete-results.
|
105 |
-
|
106 |
-
return $html;
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* Normalize parameters for field.
|
111 |
-
*
|
112 |
-
* @param array $field Field parameters.
|
113 |
-
* @return array
|
114 |
-
*/
|
115 |
-
public static function normalize( $field ) {
|
116 |
-
$field = parent::normalize( $field );
|
117 |
-
$field = wp_parse_args(
|
118 |
-
$field,
|
119 |
-
array(
|
120 |
-
'size' => 30,
|
121 |
-
)
|
122 |
-
);
|
123 |
-
return $field;
|
124 |
-
}
|
125 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The autocomplete field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Autocomplete field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Autocomplete_Field extends RWMB_Multiple_Values_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-autocomplete', RWMB_CSS_URL . 'autocomplete.css', '', RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-autocomplete', RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), RWMB_VER, true );
|
18 |
+
|
19 |
+
self::localize_script(
|
20 |
+
'rwmb-autocomplete',
|
21 |
+
'RWMB_Autocomplete',
|
22 |
+
array(
|
23 |
+
'delete' => __( 'Delete', 'meta-box' ),
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get field HTML.
|
30 |
+
*
|
31 |
+
* @param mixed $meta Meta value.
|
32 |
+
* @param array $field Field parameters.
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
public static function html( $meta, $field ) {
|
36 |
+
if ( ! is_array( $meta ) ) {
|
37 |
+
$meta = array( $meta );
|
38 |
+
}
|
39 |
+
|
40 |
+
$field = apply_filters( 'rwmb_autocomplete_field', $field, $meta );
|
41 |
+
$options = $field['options'];
|
42 |
+
|
43 |
+
if ( is_array( $field['options'] ) ) {
|
44 |
+
$options = array();
|
45 |
+
foreach ( $field['options'] as $value => $label ) {
|
46 |
+
$options[] = array(
|
47 |
+
'value' => $value,
|
48 |
+
'label' => $label,
|
49 |
+
);
|
50 |
+
}
|
51 |
+
$options = wp_json_encode( $options );
|
52 |
+
}
|
53 |
+
|
54 |
+
// Input field that triggers autocomplete.
|
55 |
+
// This field doesn't store field values, so it doesn't have "name" attribute.
|
56 |
+
// The value(s) of the field is store in hidden input(s). See below.
|
57 |
+
$html = sprintf(
|
58 |
+
'<input type="text" class="rwmb-autocomplete-search" size="%s">
|
59 |
+
<input type="hidden" name="%s" class="rwmb-autocomplete" data-options="%s" disabled>',
|
60 |
+
esc_attr( $field['size'] ),
|
61 |
+
esc_attr( $field['field_name'] ),
|
62 |
+
esc_attr( $options )
|
63 |
+
);
|
64 |
+
|
65 |
+
$html .= '<div class="rwmb-autocomplete-results">';
|
66 |
+
|
67 |
+
// Each value is displayed with label and 'Delete' option.
|
68 |
+
// The hidden input has to have ".rwmb-*" class to make clone work.
|
69 |
+
$tpl = '
|
70 |
+
<div class="rwmb-autocomplete-result">
|
71 |
+
<div class="label">%s</div>
|
72 |
+
<div class="actions">%s</div>
|
73 |
+
<input type="hidden" class="rwmb-autocomplete-value" name="%s" value="%s">
|
74 |
+
</div>
|
75 |
+
';
|
76 |
+
|
77 |
+
if ( is_array( $field['options'] ) ) {
|
78 |
+
foreach ( $field['options'] as $value => $label ) {
|
79 |
+
if ( ! in_array( $value, $meta ) ) {
|
80 |
+
continue;
|
81 |
+
}
|
82 |
+
$html .= sprintf(
|
83 |
+
$tpl,
|
84 |
+
esc_html( $label ),
|
85 |
+
esc_html__( 'Delete', 'meta-box' ),
|
86 |
+
esc_attr( $field['field_name'] ),
|
87 |
+
esc_attr( $value )
|
88 |
+
);
|
89 |
+
}
|
90 |
+
} else {
|
91 |
+
$meta = array_filter( $meta );
|
92 |
+
foreach ( $meta as $value ) {
|
93 |
+
$label = apply_filters( 'rwmb_autocomplete_result_label', $value, $field );
|
94 |
+
$html .= sprintf(
|
95 |
+
$tpl,
|
96 |
+
esc_html( $label ),
|
97 |
+
esc_html__( 'Delete', 'meta-box' ),
|
98 |
+
esc_attr( $field['field_name'] ),
|
99 |
+
esc_attr( $value )
|
100 |
+
);
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
$html .= '</div>'; // .rwmb-autocomplete-results.
|
105 |
+
|
106 |
+
return $html;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Normalize parameters for field.
|
111 |
+
*
|
112 |
+
* @param array $field Field parameters.
|
113 |
+
* @return array
|
114 |
+
*/
|
115 |
+
public static function normalize( $field ) {
|
116 |
+
$field = parent::normalize( $field );
|
117 |
+
$field = wp_parse_args(
|
118 |
+
$field,
|
119 |
+
array(
|
120 |
+
'size' => 30,
|
121 |
+
)
|
122 |
+
);
|
123 |
+
return $field;
|
124 |
+
}
|
125 |
+
}
|
inc/libraries/meta-box/inc/fields/background.php
CHANGED
@@ -1,167 +1,167 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The background field.
|
4 |
-
*
|
5 |
-
* @package Meta Box.
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The Background field.
|
10 |
-
*/
|
11 |
-
class RWMB_Background_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-background', RWMB_CSS_URL . 'background.css', '', RWMB_VER );
|
17 |
-
|
18 |
-
RWMB_Color_Field::admin_enqueue_scripts();
|
19 |
-
RWMB_File_Input_Field::admin_enqueue_scripts();
|
20 |
-
}
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Get field HTML.
|
24 |
-
*
|
25 |
-
* @param mixed $meta Meta value.
|
26 |
-
* @param array $field Field settings.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
public static function html( $meta, $field ) {
|
31 |
-
$meta = wp_parse_args(
|
32 |
-
$meta,
|
33 |
-
array(
|
34 |
-
'color' => '',
|
35 |
-
'image' => '',
|
36 |
-
'repeat' => '',
|
37 |
-
'attachment' => '',
|
38 |
-
'position' => '',
|
39 |
-
'size' => '',
|
40 |
-
)
|
41 |
-
);
|
42 |
-
|
43 |
-
$output = '<div class="rwmb-background-row">';
|
44 |
-
|
45 |
-
// Color.
|
46 |
-
$color = RWMB_Color_Field::normalize(
|
47 |
-
array(
|
48 |
-
'type' => 'color',
|
49 |
-
'id' => "{$field['id']}_color",
|
50 |
-
'field_name' => "{$field['field_name']}[color]",
|
51 |
-
)
|
52 |
-
);
|
53 |
-
$output .= RWMB_Color_Field::html( $meta['color'], $color );
|
54 |
-
|
55 |
-
$output .= '</div><!-- .rwmb-background-row -->';
|
56 |
-
$output .= '<div class="rwmb-background-row">';
|
57 |
-
|
58 |
-
// Image.
|
59 |
-
$image = RWMB_File_Input_Field::normalize(
|
60 |
-
array(
|
61 |
-
'type' => 'file_input',
|
62 |
-
'id' => "{$field['id']}_image",
|
63 |
-
'field_name' => "{$field['field_name']}[image]",
|
64 |
-
'placeholder' => __( 'Background Image', 'meta-box' ),
|
65 |
-
)
|
66 |
-
);
|
67 |
-
$output .= RWMB_File_Input_Field::html( $meta['image'], $image );
|
68 |
-
|
69 |
-
$output .= '</div><!-- .rwmb-background-row -->';
|
70 |
-
$output .= '<div class="rwmb-background-row">';
|
71 |
-
|
72 |
-
// Repeat.
|
73 |
-
$repeat = RWMB_Select_Field::normalize(
|
74 |
-
array(
|
75 |
-
'type' => 'select',
|
76 |
-
'id' => "{$field['id']}_repeat",
|
77 |
-
'field_name' => "{$field['field_name']}[repeat]",
|
78 |
-
'placeholder' => esc_html__( '-- Background Repeat --', 'meta-box' ),
|
79 |
-
'options' => array(
|
80 |
-
'no-repeat' => esc_html__( 'No Repeat', 'meta-box' ),
|
81 |
-
'repeat' => esc_html__( 'Repeat All', 'meta-box' ),
|
82 |
-
'repeat-x' => esc_html__( 'Repeat Horizontally', 'meta-box' ),
|
83 |
-
'repeat-y' => esc_html__( 'Repeat Vertically', 'meta-box' ),
|
84 |
-
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
85 |
-
),
|
86 |
-
)
|
87 |
-
);
|
88 |
-
$output .= RWMB_Select_Field::html( $meta['repeat'], $repeat );
|
89 |
-
|
90 |
-
// Position.
|
91 |
-
$position = RWMB_Select_Field::normalize(
|
92 |
-
array(
|
93 |
-
'type' => 'select',
|
94 |
-
'id' => "{$field['id']}_position",
|
95 |
-
'field_name' => "{$field['field_name']}[position]",
|
96 |
-
'placeholder' => esc_html__( '-- Background Position --', 'meta-box' ),
|
97 |
-
'options' => array(
|
98 |
-
'top left' => esc_html__( 'Top Left', 'meta-box' ),
|
99 |
-
'top center' => esc_html__( 'Top Center', 'meta-box' ),
|
100 |
-
'top right' => esc_html__( 'Top Right', 'meta-box' ),
|
101 |
-
'center left' => esc_html__( 'Center Left', 'meta-box' ),
|
102 |
-
'center center' => esc_html__( 'Center Center', 'meta-box' ),
|
103 |
-
'center right' => esc_html__( 'Center Right', 'meta-box' ),
|
104 |
-
'bottom left' => esc_html__( 'Bottom Left', 'meta-box' ),
|
105 |
-
'bottom center' => esc_html__( 'Bottom Center', 'meta-box' ),
|
106 |
-
'bottom right' => esc_html__( 'Bottom Right', 'meta-box' ),
|
107 |
-
),
|
108 |
-
)
|
109 |
-
);
|
110 |
-
$output .= RWMB_Select_Field::html( $meta['position'], $position );
|
111 |
-
|
112 |
-
// Attachment.
|
113 |
-
$attachment = RWMB_Select_Field::normalize(
|
114 |
-
array(
|
115 |
-
'type' => 'select',
|
116 |
-
'id' => "{$field['id']}_attachment",
|
117 |
-
'field_name' => "{$field['field_name']}[attachment]",
|
118 |
-
'placeholder' => esc_html__( '-- Background Attachment --', 'meta-box' ),
|
119 |
-
'options' => array(
|
120 |
-
'fixed' => esc_html__( 'Fixed', 'meta-box' ),
|
121 |
-
'scroll' => esc_html__( 'Scroll', 'meta-box' ),
|
122 |
-
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
123 |
-
),
|
124 |
-
)
|
125 |
-
);
|
126 |
-
$output .= RWMB_Select_Field::html( $meta['attachment'], $attachment );
|
127 |
-
|
128 |
-
// Size.
|
129 |
-
$size = RWMB_Select_Field::normalize(
|
130 |
-
array(
|
131 |
-
'type' => 'select',
|
132 |
-
'id' => "{$field['id']}_size",
|
133 |
-
'field_name' => "{$field['field_name']}[size]",
|
134 |
-
'placeholder' => esc_html__( '-- Background Size --', 'meta-box' ),
|
135 |
-
'options' => array(
|
136 |
-
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
137 |
-
'cover' => esc_html__( 'Cover', 'meta-box' ),
|
138 |
-
'contain' => esc_html__( 'Contain', 'meta-box' ),
|
139 |
-
),
|
140 |
-
)
|
141 |
-
);
|
142 |
-
$output .= RWMB_Select_Field::html( $meta['size'], $size );
|
143 |
-
$output .= '</div><!-- .rwmb-background-row -->';
|
144 |
-
|
145 |
-
return $output;
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
150 |
-
*
|
151 |
-
* @param array $field Field parameters.
|
152 |
-
* @param array $value The value.
|
153 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
154 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
155 |
-
*
|
156 |
-
* @return string
|
157 |
-
*/
|
158 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
159 |
-
$output = '';
|
160 |
-
$value = array_filter( $value );
|
161 |
-
foreach ( $value as $key => $subvalue ) {
|
162 |
-
$subvalue = 'image' === $key ? 'url(' . esc_url( $subvalue ) . ')' : $subvalue;
|
163 |
-
$output .= 'background-' . $key . ': ' . $subvalue . ';';
|
164 |
-
}
|
165 |
-
return $output;
|
166 |
-
}
|
167 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The background field.
|
4 |
+
*
|
5 |
+
* @package Meta Box.
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The Background field.
|
10 |
+
*/
|
11 |
+
class RWMB_Background_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-background', RWMB_CSS_URL . 'background.css', '', RWMB_VER );
|
17 |
+
|
18 |
+
RWMB_Color_Field::admin_enqueue_scripts();
|
19 |
+
RWMB_File_Input_Field::admin_enqueue_scripts();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get field HTML.
|
24 |
+
*
|
25 |
+
* @param mixed $meta Meta value.
|
26 |
+
* @param array $field Field settings.
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
public static function html( $meta, $field ) {
|
31 |
+
$meta = wp_parse_args(
|
32 |
+
$meta,
|
33 |
+
array(
|
34 |
+
'color' => '',
|
35 |
+
'image' => '',
|
36 |
+
'repeat' => '',
|
37 |
+
'attachment' => '',
|
38 |
+
'position' => '',
|
39 |
+
'size' => '',
|
40 |
+
)
|
41 |
+
);
|
42 |
+
|
43 |
+
$output = '<div class="rwmb-background-row">';
|
44 |
+
|
45 |
+
// Color.
|
46 |
+
$color = RWMB_Color_Field::normalize(
|
47 |
+
array(
|
48 |
+
'type' => 'color',
|
49 |
+
'id' => "{$field['id']}_color",
|
50 |
+
'field_name' => "{$field['field_name']}[color]",
|
51 |
+
)
|
52 |
+
);
|
53 |
+
$output .= RWMB_Color_Field::html( $meta['color'], $color );
|
54 |
+
|
55 |
+
$output .= '</div><!-- .rwmb-background-row -->';
|
56 |
+
$output .= '<div class="rwmb-background-row">';
|
57 |
+
|
58 |
+
// Image.
|
59 |
+
$image = RWMB_File_Input_Field::normalize(
|
60 |
+
array(
|
61 |
+
'type' => 'file_input',
|
62 |
+
'id' => "{$field['id']}_image",
|
63 |
+
'field_name' => "{$field['field_name']}[image]",
|
64 |
+
'placeholder' => __( 'Background Image', 'meta-box' ),
|
65 |
+
)
|
66 |
+
);
|
67 |
+
$output .= RWMB_File_Input_Field::html( $meta['image'], $image );
|
68 |
+
|
69 |
+
$output .= '</div><!-- .rwmb-background-row -->';
|
70 |
+
$output .= '<div class="rwmb-background-row">';
|
71 |
+
|
72 |
+
// Repeat.
|
73 |
+
$repeat = RWMB_Select_Field::normalize(
|
74 |
+
array(
|
75 |
+
'type' => 'select',
|
76 |
+
'id' => "{$field['id']}_repeat",
|
77 |
+
'field_name' => "{$field['field_name']}[repeat]",
|
78 |
+
'placeholder' => esc_html__( '-- Background Repeat --', 'meta-box' ),
|
79 |
+
'options' => array(
|
80 |
+
'no-repeat' => esc_html__( 'No Repeat', 'meta-box' ),
|
81 |
+
'repeat' => esc_html__( 'Repeat All', 'meta-box' ),
|
82 |
+
'repeat-x' => esc_html__( 'Repeat Horizontally', 'meta-box' ),
|
83 |
+
'repeat-y' => esc_html__( 'Repeat Vertically', 'meta-box' ),
|
84 |
+
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
85 |
+
),
|
86 |
+
)
|
87 |
+
);
|
88 |
+
$output .= RWMB_Select_Field::html( $meta['repeat'], $repeat );
|
89 |
+
|
90 |
+
// Position.
|
91 |
+
$position = RWMB_Select_Field::normalize(
|
92 |
+
array(
|
93 |
+
'type' => 'select',
|
94 |
+
'id' => "{$field['id']}_position",
|
95 |
+
'field_name' => "{$field['field_name']}[position]",
|
96 |
+
'placeholder' => esc_html__( '-- Background Position --', 'meta-box' ),
|
97 |
+
'options' => array(
|
98 |
+
'top left' => esc_html__( 'Top Left', 'meta-box' ),
|
99 |
+
'top center' => esc_html__( 'Top Center', 'meta-box' ),
|
100 |
+
'top right' => esc_html__( 'Top Right', 'meta-box' ),
|
101 |
+
'center left' => esc_html__( 'Center Left', 'meta-box' ),
|
102 |
+
'center center' => esc_html__( 'Center Center', 'meta-box' ),
|
103 |
+
'center right' => esc_html__( 'Center Right', 'meta-box' ),
|
104 |
+
'bottom left' => esc_html__( 'Bottom Left', 'meta-box' ),
|
105 |
+
'bottom center' => esc_html__( 'Bottom Center', 'meta-box' ),
|
106 |
+
'bottom right' => esc_html__( 'Bottom Right', 'meta-box' ),
|
107 |
+
),
|
108 |
+
)
|
109 |
+
);
|
110 |
+
$output .= RWMB_Select_Field::html( $meta['position'], $position );
|
111 |
+
|
112 |
+
// Attachment.
|
113 |
+
$attachment = RWMB_Select_Field::normalize(
|
114 |
+
array(
|
115 |
+
'type' => 'select',
|
116 |
+
'id' => "{$field['id']}_attachment",
|
117 |
+
'field_name' => "{$field['field_name']}[attachment]",
|
118 |
+
'placeholder' => esc_html__( '-- Background Attachment --', 'meta-box' ),
|
119 |
+
'options' => array(
|
120 |
+
'fixed' => esc_html__( 'Fixed', 'meta-box' ),
|
121 |
+
'scroll' => esc_html__( 'Scroll', 'meta-box' ),
|
122 |
+
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
123 |
+
),
|
124 |
+
)
|
125 |
+
);
|
126 |
+
$output .= RWMB_Select_Field::html( $meta['attachment'], $attachment );
|
127 |
+
|
128 |
+
// Size.
|
129 |
+
$size = RWMB_Select_Field::normalize(
|
130 |
+
array(
|
131 |
+
'type' => 'select',
|
132 |
+
'id' => "{$field['id']}_size",
|
133 |
+
'field_name' => "{$field['field_name']}[size]",
|
134 |
+
'placeholder' => esc_html__( '-- Background Size --', 'meta-box' ),
|
135 |
+
'options' => array(
|
136 |
+
'inherit' => esc_html__( 'Inherit', 'meta-box' ),
|
137 |
+
'cover' => esc_html__( 'Cover', 'meta-box' ),
|
138 |
+
'contain' => esc_html__( 'Contain', 'meta-box' ),
|
139 |
+
),
|
140 |
+
)
|
141 |
+
);
|
142 |
+
$output .= RWMB_Select_Field::html( $meta['size'], $size );
|
143 |
+
$output .= '</div><!-- .rwmb-background-row -->';
|
144 |
+
|
145 |
+
return $output;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
150 |
+
*
|
151 |
+
* @param array $field Field parameters.
|
152 |
+
* @param array $value The value.
|
153 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
154 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
155 |
+
*
|
156 |
+
* @return string
|
157 |
+
*/
|
158 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
159 |
+
$output = '';
|
160 |
+
$value = array_filter( $value );
|
161 |
+
foreach ( $value as $key => $subvalue ) {
|
162 |
+
$subvalue = 'image' === $key ? 'url(' . esc_url( $subvalue ) . ')' : $subvalue;
|
163 |
+
$output .= 'background-' . $key . ': ' . $subvalue . ';';
|
164 |
+
}
|
165 |
+
return $output;
|
166 |
+
}
|
167 |
+
}
|
inc/libraries/meta-box/inc/fields/button-group.php
CHANGED
@@ -1,82 +1,82 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Button group.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Button group class.
|
10 |
-
*/
|
11 |
-
class RWMB_Button_Group_Field extends RWMB_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-button-group', RWMB_CSS_URL . 'button-group.css', '', RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-button-group', RWMB_JS_URL . 'button-group.js', array(), RWMB_VER, true );
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get field HTML.
|
22 |
-
*
|
23 |
-
* @param mixed $meta Meta value.
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$options = self::transform_options( $field['options'] );
|
29 |
-
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
-
|
31 |
-
$output = sprintf(
|
32 |
-
'<ul class="rwmb-button-input-list %s">',
|
33 |
-
$field['inline'] ? ' rwmb-inline' : ''
|
34 |
-
);
|
35 |
-
$output .= $walker->walk( $options, -1 );
|
36 |
-
$output .= '</ul>';
|
37 |
-
|
38 |
-
return $output;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Normalize parameters for field.
|
43 |
-
*
|
44 |
-
* @param array $field Field parameters.
|
45 |
-
*
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
public static function normalize( $field ) {
|
49 |
-
$field = parent::normalize( $field );
|
50 |
-
$field = wp_parse_args(
|
51 |
-
$field,
|
52 |
-
array(
|
53 |
-
'inline' => null,
|
54 |
-
)
|
55 |
-
);
|
56 |
-
|
57 |
-
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
58 |
-
$field = RWMB_Input_Field::normalize( $field );
|
59 |
-
|
60 |
-
$field['flatten'] = true;
|
61 |
-
$field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
|
62 |
-
|
63 |
-
return $field;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Get the attributes for a field.
|
68 |
-
*
|
69 |
-
* @param array $field Field parameters.
|
70 |
-
* @param mixed $value Meta value.
|
71 |
-
*
|
72 |
-
* @return array
|
73 |
-
*/
|
74 |
-
public static function get_attributes( $field, $value = null ) {
|
75 |
-
$attributes = RWMB_Input_Field::get_attributes( $field, $value );
|
76 |
-
$attributes['id'] = false;
|
77 |
-
$attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
|
78 |
-
$attributes['value'] = $value;
|
79 |
-
|
80 |
-
return $attributes;
|
81 |
-
}
|
82 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Button group.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Button group class.
|
10 |
+
*/
|
11 |
+
class RWMB_Button_Group_Field extends RWMB_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-button-group', RWMB_CSS_URL . 'button-group.css', '', RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-button-group', RWMB_JS_URL . 'button-group.js', array(), RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML.
|
22 |
+
*
|
23 |
+
* @param mixed $meta Meta value.
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$options = self::transform_options( $field['options'] );
|
29 |
+
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
+
|
31 |
+
$output = sprintf(
|
32 |
+
'<ul class="rwmb-button-input-list %s">',
|
33 |
+
$field['inline'] ? ' rwmb-inline' : ''
|
34 |
+
);
|
35 |
+
$output .= $walker->walk( $options, -1 );
|
36 |
+
$output .= '</ul>';
|
37 |
+
|
38 |
+
return $output;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Normalize parameters for field.
|
43 |
+
*
|
44 |
+
* @param array $field Field parameters.
|
45 |
+
*
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public static function normalize( $field ) {
|
49 |
+
$field = parent::normalize( $field );
|
50 |
+
$field = wp_parse_args(
|
51 |
+
$field,
|
52 |
+
array(
|
53 |
+
'inline' => null,
|
54 |
+
)
|
55 |
+
);
|
56 |
+
|
57 |
+
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
58 |
+
$field = RWMB_Input_Field::normalize( $field );
|
59 |
+
|
60 |
+
$field['flatten'] = true;
|
61 |
+
$field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
|
62 |
+
|
63 |
+
return $field;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Get the attributes for a field.
|
68 |
+
*
|
69 |
+
* @param array $field Field parameters.
|
70 |
+
* @param mixed $value Meta value.
|
71 |
+
*
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
public static function get_attributes( $field, $value = null ) {
|
75 |
+
$attributes = RWMB_Input_Field::get_attributes( $field, $value );
|
76 |
+
$attributes['id'] = false;
|
77 |
+
$attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
|
78 |
+
$attributes['value'] = $value;
|
79 |
+
|
80 |
+
return $attributes;
|
81 |
+
}
|
82 |
+
}
|
inc/libraries/meta-box/inc/fields/button.php
CHANGED
@@ -1,60 +1,60 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The button field. Simply displays a HTML button which might be used for JavaScript actions.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Button field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Button_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field The field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
$attributes = self::get_attributes( $field );
|
21 |
-
return sprintf( '<button %s>%s</button>', self::render_attributes( $attributes ), $field['std'] );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Normalize parameters for field.
|
26 |
-
*
|
27 |
-
* @param array $field The field parameters.
|
28 |
-
* @return array
|
29 |
-
*/
|
30 |
-
public static function normalize( $field ) {
|
31 |
-
$field = wp_parse_args(
|
32 |
-
$field,
|
33 |
-
array(
|
34 |
-
'std' => __( 'Click me', 'meta-box' ),
|
35 |
-
)
|
36 |
-
);
|
37 |
-
$field = parent::normalize( $field );
|
38 |
-
return $field;
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Get the attributes for a field.
|
43 |
-
*
|
44 |
-
* @param array $field The field parameters.
|
45 |
-
* @param mixed $value The attribute value.
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
public static function get_attributes( $field, $value = null ) {
|
49 |
-
$attributes = parent::get_attributes( $field, $value );
|
50 |
-
$attributes = wp_parse_args(
|
51 |
-
$attributes,
|
52 |
-
array(
|
53 |
-
'type' => $field['type'],
|
54 |
-
)
|
55 |
-
);
|
56 |
-
$attributes['class'] .= ' button hide-if-no-js';
|
57 |
-
|
58 |
-
return $attributes;
|
59 |
-
}
|
60 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The button field. Simply displays a HTML button which might be used for JavaScript actions.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Button field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Button_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field The field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
$attributes = self::get_attributes( $field );
|
21 |
+
return sprintf( '<button %s>%s</button>', self::render_attributes( $attributes ), $field['std'] );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Normalize parameters for field.
|
26 |
+
*
|
27 |
+
* @param array $field The field parameters.
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public static function normalize( $field ) {
|
31 |
+
$field = wp_parse_args(
|
32 |
+
$field,
|
33 |
+
array(
|
34 |
+
'std' => __( 'Click me', 'meta-box' ),
|
35 |
+
)
|
36 |
+
);
|
37 |
+
$field = parent::normalize( $field );
|
38 |
+
return $field;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get the attributes for a field.
|
43 |
+
*
|
44 |
+
* @param array $field The field parameters.
|
45 |
+
* @param mixed $value The attribute value.
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public static function get_attributes( $field, $value = null ) {
|
49 |
+
$attributes = parent::get_attributes( $field, $value );
|
50 |
+
$attributes = wp_parse_args(
|
51 |
+
$attributes,
|
52 |
+
array(
|
53 |
+
'type' => $field['type'],
|
54 |
+
)
|
55 |
+
);
|
56 |
+
$attributes['class'] .= ' button hide-if-no-js';
|
57 |
+
|
58 |
+
return $attributes;
|
59 |
+
}
|
60 |
+
}
|
inc/libraries/meta-box/inc/fields/checkbox-list.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The checkbox list field which shows a list of choices and allow users to select multiple options.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Checkbox list field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Checkbox_List_Field extends RWMB_Input_List_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
$field['multiple'] = true;
|
20 |
-
$field = parent::normalize( $field );
|
21 |
-
|
22 |
-
return $field;
|
23 |
-
}
|
24 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The checkbox list field which shows a list of choices and allow users to select multiple options.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Checkbox list field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Checkbox_List_Field extends RWMB_Input_List_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
$field['multiple'] = true;
|
20 |
+
$field = parent::normalize( $field );
|
21 |
+
|
22 |
+
return $field;
|
23 |
+
}
|
24 |
+
}
|
inc/libraries/meta-box/inc/fields/checkbox.php
CHANGED
@@ -1,55 +1,55 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The checkbox field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Checkbox field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Checkbox_Field extends RWMB_Input_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
$attributes = self::get_attributes( $field, 1 );
|
21 |
-
$output = sprintf(
|
22 |
-
'<input %s %s>',
|
23 |
-
self::render_attributes( $attributes ),
|
24 |
-
checked( ! empty( $meta ), 1, false )
|
25 |
-
);
|
26 |
-
if ( $field['desc'] ) {
|
27 |
-
$output = "<label id='{$field['id']}_description' class='description'>$output {$field['desc']}</label>";
|
28 |
-
}
|
29 |
-
return $output;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Do not show field description.
|
34 |
-
*
|
35 |
-
* @param array $field Field parameters.
|
36 |
-
* @return string
|
37 |
-
*/
|
38 |
-
public static function input_description( $field ) {
|
39 |
-
return '';
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
44 |
-
*
|
45 |
-
* @param array $field Field parameters.
|
46 |
-
* @param string $value The value.
|
47 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
48 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
49 |
-
*
|
50 |
-
* @return string
|
51 |
-
*/
|
52 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
53 |
-
return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
|
54 |
-
}
|
55 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The checkbox field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Checkbox field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Checkbox_Field extends RWMB_Input_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
$attributes = self::get_attributes( $field, 1 );
|
21 |
+
$output = sprintf(
|
22 |
+
'<input %s %s>',
|
23 |
+
self::render_attributes( $attributes ),
|
24 |
+
checked( ! empty( $meta ), 1, false )
|
25 |
+
);
|
26 |
+
if ( $field['desc'] ) {
|
27 |
+
$output = "<label id='{$field['id']}_description' class='description'>$output {$field['desc']}</label>";
|
28 |
+
}
|
29 |
+
return $output;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Do not show field description.
|
34 |
+
*
|
35 |
+
* @param array $field Field parameters.
|
36 |
+
* @return string
|
37 |
+
*/
|
38 |
+
public static function input_description( $field ) {
|
39 |
+
return '';
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
44 |
+
*
|
45 |
+
* @param array $field Field parameters.
|
46 |
+
* @param string $value The value.
|
47 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
48 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
53 |
+
return $value ? __( 'Yes', 'meta-box' ) : __( 'No', 'meta-box' );
|
54 |
+
}
|
55 |
+
}
|
inc/libraries/meta-box/inc/fields/choice.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The abstract choice field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Abstract class for any kind of choice field.
|
10 |
-
*/
|
11 |
-
abstract class RWMB_Choice_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
return '';
|
21 |
-
}
|
22 |
-
|
23 |
-
/**
|
24 |
-
* Normalize parameters for field.
|
25 |
-
*
|
26 |
-
* @param array $field Field parameters.
|
27 |
-
* @return array
|
28 |
-
*/
|
29 |
-
public static function normalize( $field ) {
|
30 |
-
$field = parent::normalize( $field );
|
31 |
-
$field = wp_parse_args(
|
32 |
-
$field,
|
33 |
-
array(
|
34 |
-
'flatten' => true,
|
35 |
-
'options' => array(),
|
36 |
-
)
|
37 |
-
);
|
38 |
-
|
39 |
-
return $field;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Transform field options into the verbose format.
|
44 |
-
*
|
45 |
-
* @param array $options Field options.
|
46 |
-
*
|
47 |
-
* @return array
|
48 |
-
*/
|
49 |
-
public static function transform_options( $options ) {
|
50 |
-
$transformed = array();
|
51 |
-
$options = (array) $options;
|
52 |
-
foreach ( $options as $value => $label ) {
|
53 |
-
$option = is_array( $label ) ? $label : array(
|
54 |
-
'label' => (string) $label,
|
55 |
-
'value' => (string) $value,
|
56 |
-
);
|
57 |
-
if ( isset( $option['label'] ) && isset( $option['value'] ) ) {
|
58 |
-
$transformed[ $option['value'] ] = (object) $option;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
return $transformed;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
66 |
-
*
|
67 |
-
* @param array $field Field parameters.
|
68 |
-
* @param string $value The value.
|
69 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
70 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
71 |
-
*
|
72 |
-
* @return string
|
73 |
-
*/
|
74 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
75 |
-
$options = self::transform_options( $field['options'] );
|
76 |
-
return isset( $options[ $value ] ) ? $options[ $value ]->label : '';
|
77 |
-
}
|
78 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The abstract choice field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Abstract class for any kind of choice field.
|
10 |
+
*/
|
11 |
+
abstract class RWMB_Choice_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
return '';
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Normalize parameters for field.
|
25 |
+
*
|
26 |
+
* @param array $field Field parameters.
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public static function normalize( $field ) {
|
30 |
+
$field = parent::normalize( $field );
|
31 |
+
$field = wp_parse_args(
|
32 |
+
$field,
|
33 |
+
array(
|
34 |
+
'flatten' => true,
|
35 |
+
'options' => array(),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
|
39 |
+
return $field;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Transform field options into the verbose format.
|
44 |
+
*
|
45 |
+
* @param array $options Field options.
|
46 |
+
*
|
47 |
+
* @return array
|
48 |
+
*/
|
49 |
+
public static function transform_options( $options ) {
|
50 |
+
$transformed = array();
|
51 |
+
$options = (array) $options;
|
52 |
+
foreach ( $options as $value => $label ) {
|
53 |
+
$option = is_array( $label ) ? $label : array(
|
54 |
+
'label' => (string) $label,
|
55 |
+
'value' => (string) $value,
|
56 |
+
);
|
57 |
+
if ( isset( $option['label'] ) && isset( $option['value'] ) ) {
|
58 |
+
$transformed[ $option['value'] ] = (object) $option;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
return $transformed;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
66 |
+
*
|
67 |
+
* @param array $field Field parameters.
|
68 |
+
* @param string $value The value.
|
69 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
70 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
75 |
+
$options = self::transform_options( $field['options'] );
|
76 |
+
return isset( $options[ $value ] ) ? $options[ $value ]->label : '';
|
77 |
+
}
|
78 |
+
}
|
inc/libraries/meta-box/inc/fields/color.php
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The color field which uses WordPress color picker to select a color.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Color field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Color_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-color', RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), RWMB_VER );
|
17 |
-
|
18 |
-
$dependencies = array( 'wp-color-picker' );
|
19 |
-
$args = func_get_args();
|
20 |
-
$field = reset( $args );
|
21 |
-
if ( ! empty( $field['alpha_channel'] ) ) {
|
22 |
-
wp_enqueue_script( 'wp-color-picker-alpha', RWMB_JS_URL . 'wp-color-picker-alpha/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), RWMB_VER, true );
|
23 |
-
$dependencies = array( 'wp-color-picker-alpha' );
|
24 |
-
}
|
25 |
-
wp_enqueue_script( 'rwmb-color', RWMB_JS_URL . 'color.js', $dependencies, RWMB_VER, true );
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Normalize parameters for field.
|
30 |
-
*
|
31 |
-
* @param array $field Field parameters.
|
32 |
-
*
|
33 |
-
* @return array
|
34 |
-
*/
|
35 |
-
public static function normalize( $field ) {
|
36 |
-
$field = wp_parse_args(
|
37 |
-
$field,
|
38 |
-
array(
|
39 |
-
'alpha_channel' => false,
|
40 |
-
'js_options' => array(),
|
41 |
-
)
|
42 |
-
);
|
43 |
-
|
44 |
-
$field['js_options'] = wp_parse_args(
|
45 |
-
$field['js_options'],
|
46 |
-
array(
|
47 |
-
'defaultColor' => false,
|
48 |
-
'hide' => true,
|
49 |
-
'palettes' => true,
|
50 |
-
)
|
51 |
-
);
|
52 |
-
|
53 |
-
$field = parent::normalize( $field );
|
54 |
-
|
55 |
-
return $field;
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Get the attributes for a field.
|
60 |
-
*
|
61 |
-
* @param array $field Field parameters.
|
62 |
-
* @param mixed $value Meta value.
|
63 |
-
*
|
64 |
-
* @return array
|
65 |
-
*/
|
66 |
-
public static function get_attributes( $field, $value = null ) {
|
67 |
-
$attributes = parent::get_attributes( $field, $value );
|
68 |
-
$attributes = wp_parse_args(
|
69 |
-
$attributes,
|
70 |
-
array(
|
71 |
-
'data-options' => wp_json_encode( $field['js_options'] ),
|
72 |
-
)
|
73 |
-
);
|
74 |
-
$attributes['type'] = 'text';
|
75 |
-
|
76 |
-
if ( $field['alpha_channel'] ) {
|
77 |
-
$attributes['data-alpha'] = 'true';
|
78 |
-
}
|
79 |
-
|
80 |
-
return $attributes;
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
85 |
-
*
|
86 |
-
* @param array $field Field parameters.
|
87 |
-
* @param string $value The value.
|
88 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
89 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
90 |
-
*
|
91 |
-
* @return string
|
92 |
-
*/
|
93 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
94 |
-
return sprintf( "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>", $value );
|
95 |
-
}
|
96 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The color field which uses WordPress color picker to select a color.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Color field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Color_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-color', RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), RWMB_VER );
|
17 |
+
|
18 |
+
$dependencies = array( 'wp-color-picker' );
|
19 |
+
$args = func_get_args();
|
20 |
+
$field = reset( $args );
|
21 |
+
if ( ! empty( $field['alpha_channel'] ) ) {
|
22 |
+
wp_enqueue_script( 'wp-color-picker-alpha', RWMB_JS_URL . 'wp-color-picker-alpha/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), RWMB_VER, true );
|
23 |
+
$dependencies = array( 'wp-color-picker-alpha' );
|
24 |
+
}
|
25 |
+
wp_enqueue_script( 'rwmb-color', RWMB_JS_URL . 'color.js', $dependencies, RWMB_VER, true );
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Normalize parameters for field.
|
30 |
+
*
|
31 |
+
* @param array $field Field parameters.
|
32 |
+
*
|
33 |
+
* @return array
|
34 |
+
*/
|
35 |
+
public static function normalize( $field ) {
|
36 |
+
$field = wp_parse_args(
|
37 |
+
$field,
|
38 |
+
array(
|
39 |
+
'alpha_channel' => false,
|
40 |
+
'js_options' => array(),
|
41 |
+
)
|
42 |
+
);
|
43 |
+
|
44 |
+
$field['js_options'] = wp_parse_args(
|
45 |
+
$field['js_options'],
|
46 |
+
array(
|
47 |
+
'defaultColor' => false,
|
48 |
+
'hide' => true,
|
49 |
+
'palettes' => true,
|
50 |
+
)
|
51 |
+
);
|
52 |
+
|
53 |
+
$field = parent::normalize( $field );
|
54 |
+
|
55 |
+
return $field;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get the attributes for a field.
|
60 |
+
*
|
61 |
+
* @param array $field Field parameters.
|
62 |
+
* @param mixed $value Meta value.
|
63 |
+
*
|
64 |
+
* @return array
|
65 |
+
*/
|
66 |
+
public static function get_attributes( $field, $value = null ) {
|
67 |
+
$attributes = parent::get_attributes( $field, $value );
|
68 |
+
$attributes = wp_parse_args(
|
69 |
+
$attributes,
|
70 |
+
array(
|
71 |
+
'data-options' => wp_json_encode( $field['js_options'] ),
|
72 |
+
)
|
73 |
+
);
|
74 |
+
$attributes['type'] = 'text';
|
75 |
+
|
76 |
+
if ( $field['alpha_channel'] ) {
|
77 |
+
$attributes['data-alpha'] = 'true';
|
78 |
+
}
|
79 |
+
|
80 |
+
return $attributes;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
85 |
+
*
|
86 |
+
* @param array $field Field parameters.
|
87 |
+
* @param string $value The value.
|
88 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
89 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
90 |
+
*
|
91 |
+
* @return string
|
92 |
+
*/
|
93 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
94 |
+
return sprintf( "<span style='display:inline-block;width:20px;height:20px;border-radius:50%%;background:%s;'></span>", $value );
|
95 |
+
}
|
96 |
+
}
|
inc/libraries/meta-box/inc/fields/custom-html.php
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The custom HTML field which allows users to output any kind of content to the meta box.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Custom HTML field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Custom_Html_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
*
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
public static function html( $meta, $field ) {
|
21 |
-
$html = ! empty( $field['std'] ) ? $field['std'] : '';
|
22 |
-
if ( ! empty( $field['callback'] ) && is_callable( $field['callback'] ) ) {
|
23 |
-
$html = call_user_func_array( $field['callback'], array( $meta, $field ) );
|
24 |
-
}
|
25 |
-
return $html;
|
26 |
-
}
|
27 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The custom HTML field which allows users to output any kind of content to the meta box.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Custom HTML field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Custom_Html_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public static function html( $meta, $field ) {
|
21 |
+
$html = ! empty( $field['std'] ) ? $field['std'] : '';
|
22 |
+
if ( ! empty( $field['callback'] ) && is_callable( $field['callback'] ) ) {
|
23 |
+
$html = call_user_func_array( $field['callback'], array( $meta, $field ) );
|
24 |
+
}
|
25 |
+
return $html;
|
26 |
+
}
|
27 |
+
}
|
inc/libraries/meta-box/inc/fields/date.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The date picker field, which uses built-in jQueryUI date picker widget.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Date field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Date_Field extends RWMB_Datetime_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_register_scripts();
|
17 |
-
wp_enqueue_style( 'rwmb-date' );
|
18 |
-
wp_enqueue_script( 'rwmb-date' );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Returns a date() compatible format string from the JavaScript format.
|
23 |
-
*
|
24 |
-
* @link http://www.php.net/manual/en/function.date.php
|
25 |
-
* @param array $field Field parameters.
|
26 |
-
*
|
27 |
-
* @return string
|
28 |
-
*/
|
29 |
-
public static function translate_format( $field ) {
|
30 |
-
return strtr( $field['js_options']['dateFormat'], self::$date_formats );
|
31 |
-
}
|
32 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The date picker field, which uses built-in jQueryUI date picker widget.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Date field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Date_Field extends RWMB_Datetime_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_register_scripts();
|
17 |
+
wp_enqueue_style( 'rwmb-date' );
|
18 |
+
wp_enqueue_script( 'rwmb-date' );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Returns a date() compatible format string from the JavaScript format.
|
23 |
+
*
|
24 |
+
* @link http://www.php.net/manual/en/function.date.php
|
25 |
+
* @param array $field Field parameters.
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public static function translate_format( $field ) {
|
30 |
+
return strtr( $field['js_options']['dateFormat'], self::$date_formats );
|
31 |
+
}
|
32 |
+
}
|
inc/libraries/meta-box/inc/fields/datetime.php
CHANGED
@@ -1,278 +1,278 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The date and time picker field which allows users to select both date and time via jQueryUI datetime picker.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Datetime field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Datetime_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Translate date format from jQuery UI date picker to PHP date().
|
14 |
-
* It's used to store timestamp value of the field.
|
15 |
-
* Missing: '!' => '', 'oo' => '', '@' => '', "''" => "'".
|
16 |
-
*
|
17 |
-
* @var array
|
18 |
-
*/
|
19 |
-
protected static $date_formats = array(
|
20 |
-
'd' => 'j',
|
21 |
-
'dd' => 'd',
|
22 |
-
'oo' => 'z',
|
23 |
-
'D' => 'D',
|
24 |
-
'DD' => 'l',
|
25 |
-
'm' => 'n',
|
26 |
-
'mm' => 'm',
|
27 |
-
'M' => 'M',
|
28 |
-
'MM' => 'F',
|
29 |
-
'y' => 'y',
|
30 |
-
'yy' => 'Y',
|
31 |
-
'o' => 'z',
|
32 |
-
);
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Translate time format from jQuery UI time picker to PHP date().
|
36 |
-
* It's used to store timestamp value of the field.
|
37 |
-
* Missing: 't' => '', T' => '', 'm' => '', 's' => ''.
|
38 |
-
*
|
39 |
-
* @var array
|
40 |
-
*/
|
41 |
-
protected static $time_formats = array(
|
42 |
-
'H' => 'G',
|
43 |
-
'HH' => 'H',
|
44 |
-
'h' => 'g',
|
45 |
-
'hh' => 'h',
|
46 |
-
'mm' => 'i',
|
47 |
-
'ss' => 's',
|
48 |
-
'l' => 'u',
|
49 |
-
'tt' => 'a',
|
50 |
-
'TT' => 'A',
|
51 |
-
);
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Register scripts and styles.
|
55 |
-
*/
|
56 |
-
public static function admin_register_scripts() {
|
57 |
-
$url = RWMB_CSS_URL . 'jqueryui';
|
58 |
-
wp_register_style( 'jquery-ui-core', "$url/jquery.ui.core.css", array(), '1.8.17' );
|
59 |
-
wp_register_style( 'jquery-ui-theme', "$url/jquery.ui.theme.css", array(), '1.8.17' );
|
60 |
-
wp_register_style( 'jquery-ui-datepicker', "$url/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
61 |
-
wp_register_style( 'rwmb-date', RWMB_CSS_URL . 'datepicker.css', array( 'jquery-ui-datepicker' ), '1.8.17' );
|
62 |
-
|
63 |
-
wp_register_style( 'jquery-ui-slider', "$url/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
64 |
-
wp_register_style( 'jquery-ui-timepicker', "$url/jquery-ui-timepicker-addon.min.css", array( 'rwmb-date', 'jquery-ui-slider' ), '1.5.0' );
|
65 |
-
|
66 |
-
$url = RWMB_JS_URL . 'jqueryui';
|
67 |
-
wp_register_script( 'jquery-ui-timepicker', "$url/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
|
68 |
-
wp_register_script( 'jquery-ui-timepicker-i18n', "$url/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
|
69 |
-
|
70 |
-
wp_register_script( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', array( 'jquery-ui-datepicker', 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
|
71 |
-
wp_register_script( 'rwmb-date', RWMB_JS_URL . 'date.js', array( 'jquery-ui-datepicker' ), RWMB_VER, true );
|
72 |
-
wp_register_script( 'rwmb-time', RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
|
73 |
-
|
74 |
-
$handles = array( 'datetime', 'time' );
|
75 |
-
$locale = str_replace( '_', '-', get_locale() );
|
76 |
-
$locale_short = substr( $locale, 0, 2 );
|
77 |
-
$data = array(
|
78 |
-
'locale' => $locale,
|
79 |
-
'localeShort' => $locale_short,
|
80 |
-
);
|
81 |
-
foreach ( $handles as $handle ) {
|
82 |
-
self::localize_script( "rwmb-$handle", 'RWMB_' . ucfirst( $handle ), $data );
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Enqueue scripts and styles.
|
88 |
-
*/
|
89 |
-
public static function admin_enqueue_scripts() {
|
90 |
-
self::admin_register_scripts();
|
91 |
-
wp_enqueue_style( 'jquery-ui-timepicker' );
|
92 |
-
wp_enqueue_script( 'rwmb-datetime' );
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get field HTML.
|
97 |
-
*
|
98 |
-
* @param mixed $meta The field meta value.
|
99 |
-
* @param array $field The field parameters.
|
100 |
-
*
|
101 |
-
* @return string
|
102 |
-
*/
|
103 |
-
public static function html( $meta, $field ) {
|
104 |
-
$output = '';
|
105 |
-
|
106 |
-
if ( $field['timestamp'] ) {
|
107 |
-
$name = $field['field_name'];
|
108 |
-
$field = wp_parse_args(
|
109 |
-
array(
|
110 |
-
'field_name' => $name . '[formatted]',
|
111 |
-
),
|
112 |
-
$field
|
113 |
-
);
|
114 |
-
$output .= sprintf(
|
115 |
-
'<input type="hidden" name="%s" class="rwmb-datetime-timestamp" value="%s">',
|
116 |
-
esc_attr( $name . '[timestamp]' ),
|
117 |
-
isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
|
118 |
-
);
|
119 |
-
$meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
|
120 |
-
}
|
121 |
-
|
122 |
-
$output .= parent::html( $meta, $field );
|
123 |
-
|
124 |
-
if ( $field['inline'] ) {
|
125 |
-
$output .= '<div class="rwmb-datetime-inline"></div>';
|
126 |
-
}
|
127 |
-
|
128 |
-
return $output;
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Calculates the timestamp from the datetime string and returns it if $field['timestamp'] is set or the datetime string if not.
|
133 |
-
*
|
134 |
-
* @param mixed $new The submitted meta value.
|
135 |
-
* @param mixed $old The existing meta value.
|
136 |
-
* @param int $post_id The post ID.
|
137 |
-
* @param array $field The field parameters.
|
138 |
-
*
|
139 |
-
* @return string|int
|
140 |
-
*/
|
141 |
-
public static function value( $new, $old, $post_id, $field ) {
|
142 |
-
return $field['timestamp'] ? $new['timestamp'] : $new;
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Get meta value.
|
147 |
-
*
|
148 |
-
* @param int $post_id The post ID.
|
149 |
-
* @param bool $saved Whether the meta box is saved at least once.
|
150 |
-
* @param array $field The field parameters.
|
151 |
-
*
|
152 |
-
* @return mixed
|
153 |
-
*/
|
154 |
-
public static function meta( $post_id, $saved, $field ) {
|
155 |
-
$meta = parent::meta( $post_id, $saved, $field );
|
156 |
-
if ( $field['timestamp'] ) {
|
157 |
-
$meta = self::prepare_meta( $meta, $field );
|
158 |
-
}
|
159 |
-
return $meta;
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Format meta value if set 'timestamp'.
|
164 |
-
*
|
165 |
-
* @param array|string $meta The meta value.
|
166 |
-
* @param array $field Field parameters.
|
167 |
-
* @return array
|
168 |
-
*/
|
169 |
-
protected static function prepare_meta( $meta, $field ) {
|
170 |
-
if ( is_array( $meta ) ) {
|
171 |
-
foreach ( $meta as $key => $value ) {
|
172 |
-
$meta[ $key ] = self::prepare_meta( $value, $field );
|
173 |
-
}
|
174 |
-
return $meta;
|
175 |
-
}
|
176 |
-
return array(
|
177 |
-
'timestamp' => $meta ? $meta : null,
|
178 |
-
'formatted' => $meta ? date( self::call( 'translate_format', $field ), intval( $meta ) ) : '',
|
179 |
-
);
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Normalize parameters for field.
|
184 |
-
*
|
185 |
-
* @param array $field The field parameters.
|
186 |
-
* @return array
|
187 |
-
*/
|
188 |
-
public static function normalize( $field ) {
|
189 |
-
$field = wp_parse_args(
|
190 |
-
$field,
|
191 |
-
array(
|
192 |
-
'timestamp' => false,
|
193 |
-
'inline' => false,
|
194 |
-
'js_options' => array(),
|
195 |
-
)
|
196 |
-
);
|
197 |
-
|
198 |
-
// Deprecate 'format', but keep it for backward compatible.
|
199 |
-
// Use 'js_options' instead.
|
200 |
-
$field['js_options'] = wp_parse_args(
|
201 |
-
$field['js_options'],
|
202 |
-
array(
|
203 |
-
'timeFormat' => 'HH:mm',
|
204 |
-
'separator' => ' ',
|
205 |
-
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
206 |
-
'showButtonPanel' => true,
|
207 |
-
)
|
208 |
-
);
|
209 |
-
|
210 |
-
if ( $field['inline'] ) {
|
211 |
-
$field['js_options'] = wp_parse_args(
|
212 |
-
$field['js_options'],
|
213 |
-
array(
|
214 |
-
'altFieldTimeOnly' => false,
|
215 |
-
)
|
216 |
-
);
|
217 |
-
}
|
218 |
-
|
219 |
-
$field = parent::normalize( $field );
|
220 |
-
|
221 |
-
return $field;
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Get the attributes for a field.
|
226 |
-
*
|
227 |
-
* @param array $field The field parameters.
|
228 |
-
* @param mixed $value The meta value.
|
229 |
-
*
|
230 |
-
* @return array
|
231 |
-
*/
|
232 |
-
public static function get_attributes( $field, $value = null ) {
|
233 |
-
$attributes = parent::get_attributes( $field, $value );
|
234 |
-
$attributes = wp_parse_args(
|
235 |
-
$attributes,
|
236 |
-
array(
|
237 |
-
'data-options' => wp_json_encode( $field['js_options'] ),
|
238 |
-
)
|
239 |
-
);
|
240 |
-
$attributes['type'] = 'text';
|
241 |
-
|
242 |
-
return $attributes;
|
243 |
-
}
|
244 |
-
|
245 |
-
/**
|
246 |
-
* Returns a date() compatible format string from the JavaScript format.
|
247 |
-
*
|
248 |
-
* @link http://www.php.net/manual/en/function.date.php
|
249 |
-
* @param array $field The field parameters.
|
250 |
-
*
|
251 |
-
* @return string
|
252 |
-
*/
|
253 |
-
public static function translate_format( $field ) {
|
254 |
-
return strtr( $field['js_options']['dateFormat'], self::$date_formats )
|
255 |
-
. $field['js_options']['separator']
|
256 |
-
. strtr( $field['js_options']['timeFormat'], self::$time_formats );
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
261 |
-
*
|
262 |
-
* @param array $field Field parameters.
|
263 |
-
* @param string $value The value.
|
264 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
265 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
266 |
-
*
|
267 |
-
* @return string
|
268 |
-
*/
|
269 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
270 |
-
if ( empty( $args['format'] ) ) {
|
271 |
-
return $value;
|
272 |
-
}
|
273 |
-
if ( ! $field['timestamp'] ) {
|
274 |
-
$value = strtotime( $value );
|
275 |
-
}
|
276 |
-
return date( $args['format'], $value );
|
277 |
-
}
|
278 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The date and time picker field which allows users to select both date and time via jQueryUI datetime picker.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Datetime field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Datetime_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Translate date format from jQuery UI date picker to PHP date().
|
14 |
+
* It's used to store timestamp value of the field.
|
15 |
+
* Missing: '!' => '', 'oo' => '', '@' => '', "''" => "'".
|
16 |
+
*
|
17 |
+
* @var array
|
18 |
+
*/
|
19 |
+
protected static $date_formats = array(
|
20 |
+
'd' => 'j',
|
21 |
+
'dd' => 'd',
|
22 |
+
'oo' => 'z',
|
23 |
+
'D' => 'D',
|
24 |
+
'DD' => 'l',
|
25 |
+
'm' => 'n',
|
26 |
+
'mm' => 'm',
|
27 |
+
'M' => 'M',
|
28 |
+
'MM' => 'F',
|
29 |
+
'y' => 'y',
|
30 |
+
'yy' => 'Y',
|
31 |
+
'o' => 'z',
|
32 |
+
);
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Translate time format from jQuery UI time picker to PHP date().
|
36 |
+
* It's used to store timestamp value of the field.
|
37 |
+
* Missing: 't' => '', T' => '', 'm' => '', 's' => ''.
|
38 |
+
*
|
39 |
+
* @var array
|
40 |
+
*/
|
41 |
+
protected static $time_formats = array(
|
42 |
+
'H' => 'G',
|
43 |
+
'HH' => 'H',
|
44 |
+
'h' => 'g',
|
45 |
+
'hh' => 'h',
|
46 |
+
'mm' => 'i',
|
47 |
+
'ss' => 's',
|
48 |
+
'l' => 'u',
|
49 |
+
'tt' => 'a',
|
50 |
+
'TT' => 'A',
|
51 |
+
);
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Register scripts and styles.
|
55 |
+
*/
|
56 |
+
public static function admin_register_scripts() {
|
57 |
+
$url = RWMB_CSS_URL . 'jqueryui';
|
58 |
+
wp_register_style( 'jquery-ui-core', "$url/jquery.ui.core.css", array(), '1.8.17' );
|
59 |
+
wp_register_style( 'jquery-ui-theme', "$url/jquery.ui.theme.css", array(), '1.8.17' );
|
60 |
+
wp_register_style( 'jquery-ui-datepicker', "$url/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
61 |
+
wp_register_style( 'rwmb-date', RWMB_CSS_URL . 'datepicker.css', array( 'jquery-ui-datepicker' ), '1.8.17' );
|
62 |
+
|
63 |
+
wp_register_style( 'jquery-ui-slider', "$url/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
64 |
+
wp_register_style( 'jquery-ui-timepicker', "$url/jquery-ui-timepicker-addon.min.css", array( 'rwmb-date', 'jquery-ui-slider' ), '1.5.0' );
|
65 |
+
|
66 |
+
$url = RWMB_JS_URL . 'jqueryui';
|
67 |
+
wp_register_script( 'jquery-ui-timepicker', "$url/jquery-ui-timepicker-addon.min.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '1.5.0', true );
|
68 |
+
wp_register_script( 'jquery-ui-timepicker-i18n', "$url/jquery-ui-timepicker-addon-i18n.min.js", array( 'jquery-ui-timepicker' ), '1.5.0', true );
|
69 |
+
|
70 |
+
wp_register_script( 'rwmb-datetime', RWMB_JS_URL . 'datetime.js', array( 'jquery-ui-datepicker', 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
|
71 |
+
wp_register_script( 'rwmb-date', RWMB_JS_URL . 'date.js', array( 'jquery-ui-datepicker' ), RWMB_VER, true );
|
72 |
+
wp_register_script( 'rwmb-time', RWMB_JS_URL . 'time.js', array( 'jquery-ui-timepicker-i18n' ), RWMB_VER, true );
|
73 |
+
|
74 |
+
$handles = array( 'datetime', 'time' );
|
75 |
+
$locale = str_replace( '_', '-', get_locale() );
|
76 |
+
$locale_short = substr( $locale, 0, 2 );
|
77 |
+
$data = array(
|
78 |
+
'locale' => $locale,
|
79 |
+
'localeShort' => $locale_short,
|
80 |
+
);
|
81 |
+
foreach ( $handles as $handle ) {
|
82 |
+
self::localize_script( "rwmb-$handle", 'RWMB_' . ucfirst( $handle ), $data );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Enqueue scripts and styles.
|
88 |
+
*/
|
89 |
+
public static function admin_enqueue_scripts() {
|
90 |
+
self::admin_register_scripts();
|
91 |
+
wp_enqueue_style( 'jquery-ui-timepicker' );
|
92 |
+
wp_enqueue_script( 'rwmb-datetime' );
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get field HTML.
|
97 |
+
*
|
98 |
+
* @param mixed $meta The field meta value.
|
99 |
+
* @param array $field The field parameters.
|
100 |
+
*
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public static function html( $meta, $field ) {
|
104 |
+
$output = '';
|
105 |
+
|
106 |
+
if ( $field['timestamp'] ) {
|
107 |
+
$name = $field['field_name'];
|
108 |
+
$field = wp_parse_args(
|
109 |
+
array(
|
110 |
+
'field_name' => $name . '[formatted]',
|
111 |
+
),
|
112 |
+
$field
|
113 |
+
);
|
114 |
+
$output .= sprintf(
|
115 |
+
'<input type="hidden" name="%s" class="rwmb-datetime-timestamp" value="%s">',
|
116 |
+
esc_attr( $name . '[timestamp]' ),
|
117 |
+
isset( $meta['timestamp'] ) ? intval( $meta['timestamp'] ) : ''
|
118 |
+
);
|
119 |
+
$meta = isset( $meta['formatted'] ) ? $meta['formatted'] : '';
|
120 |
+
}
|
121 |
+
|
122 |
+
$output .= parent::html( $meta, $field );
|
123 |
+
|
124 |
+
if ( $field['inline'] ) {
|
125 |
+
$output .= '<div class="rwmb-datetime-inline"></div>';
|
126 |
+
}
|
127 |
+
|
128 |
+
return $output;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Calculates the timestamp from the datetime string and returns it if $field['timestamp'] is set or the datetime string if not.
|
133 |
+
*
|
134 |
+
* @param mixed $new The submitted meta value.
|
135 |
+
* @param mixed $old The existing meta value.
|
136 |
+
* @param int $post_id The post ID.
|
137 |
+
* @param array $field The field parameters.
|
138 |
+
*
|
139 |
+
* @return string|int
|
140 |
+
*/
|
141 |
+
public static function value( $new, $old, $post_id, $field ) {
|
142 |
+
return $field['timestamp'] ? $new['timestamp'] : $new;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Get meta value.
|
147 |
+
*
|
148 |
+
* @param int $post_id The post ID.
|
149 |
+
* @param bool $saved Whether the meta box is saved at least once.
|
150 |
+
* @param array $field The field parameters.
|
151 |
+
*
|
152 |
+
* @return mixed
|
153 |
+
*/
|
154 |
+
public static function meta( $post_id, $saved, $field ) {
|
155 |
+
$meta = parent::meta( $post_id, $saved, $field );
|
156 |
+
if ( $field['timestamp'] ) {
|
157 |
+
$meta = self::prepare_meta( $meta, $field );
|
158 |
+
}
|
159 |
+
return $meta;
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Format meta value if set 'timestamp'.
|
164 |
+
*
|
165 |
+
* @param array|string $meta The meta value.
|
166 |
+
* @param array $field Field parameters.
|
167 |
+
* @return array
|
168 |
+
*/
|
169 |
+
protected static function prepare_meta( $meta, $field ) {
|
170 |
+
if ( is_array( $meta ) ) {
|
171 |
+
foreach ( $meta as $key => $value ) {
|
172 |
+
$meta[ $key ] = self::prepare_meta( $value, $field );
|
173 |
+
}
|
174 |
+
return $meta;
|
175 |
+
}
|
176 |
+
return array(
|
177 |
+
'timestamp' => $meta ? $meta : null,
|
178 |
+
'formatted' => $meta ? date( self::call( 'translate_format', $field ), intval( $meta ) ) : '',
|
179 |
+
);
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Normalize parameters for field.
|
184 |
+
*
|
185 |
+
* @param array $field The field parameters.
|
186 |
+
* @return array
|
187 |
+
*/
|
188 |
+
public static function normalize( $field ) {
|
189 |
+
$field = wp_parse_args(
|
190 |
+
$field,
|
191 |
+
array(
|
192 |
+
'timestamp' => false,
|
193 |
+
'inline' => false,
|
194 |
+
'js_options' => array(),
|
195 |
+
)
|
196 |
+
);
|
197 |
+
|
198 |
+
// Deprecate 'format', but keep it for backward compatible.
|
199 |
+
// Use 'js_options' instead.
|
200 |
+
$field['js_options'] = wp_parse_args(
|
201 |
+
$field['js_options'],
|
202 |
+
array(
|
203 |
+
'timeFormat' => 'HH:mm',
|
204 |
+
'separator' => ' ',
|
205 |
+
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
206 |
+
'showButtonPanel' => true,
|
207 |
+
)
|
208 |
+
);
|
209 |
+
|
210 |
+
if ( $field['inline'] ) {
|
211 |
+
$field['js_options'] = wp_parse_args(
|
212 |
+
$field['js_options'],
|
213 |
+
array(
|
214 |
+
'altFieldTimeOnly' => false,
|
215 |
+
)
|
216 |
+
);
|
217 |
+
}
|
218 |
+
|
219 |
+
$field = parent::normalize( $field );
|
220 |
+
|
221 |
+
return $field;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Get the attributes for a field.
|
226 |
+
*
|
227 |
+
* @param array $field The field parameters.
|
228 |
+
* @param mixed $value The meta value.
|
229 |
+
*
|
230 |
+
* @return array
|
231 |
+
*/
|
232 |
+
public static function get_attributes( $field, $value = null ) {
|
233 |
+
$attributes = parent::get_attributes( $field, $value );
|
234 |
+
$attributes = wp_parse_args(
|
235 |
+
$attributes,
|
236 |
+
array(
|
237 |
+
'data-options' => wp_json_encode( $field['js_options'] ),
|
238 |
+
)
|
239 |
+
);
|
240 |
+
$attributes['type'] = 'text';
|
241 |
+
|
242 |
+
return $attributes;
|
243 |
+
}
|
244 |
+
|
245 |
+
/**
|
246 |
+
* Returns a date() compatible format string from the JavaScript format.
|
247 |
+
*
|
248 |
+
* @link http://www.php.net/manual/en/function.date.php
|
249 |
+
* @param array $field The field parameters.
|
250 |
+
*
|
251 |
+
* @return string
|
252 |
+
*/
|
253 |
+
public static function translate_format( $field ) {
|
254 |
+
return strtr( $field['js_options']['dateFormat'], self::$date_formats )
|
255 |
+
. $field['js_options']['separator']
|
256 |
+
. strtr( $field['js_options']['timeFormat'], self::$time_formats );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
261 |
+
*
|
262 |
+
* @param array $field Field parameters.
|
263 |
+
* @param string $value The value.
|
264 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
265 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
266 |
+
*
|
267 |
+
* @return string
|
268 |
+
*/
|
269 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
270 |
+
if ( empty( $args['format'] ) ) {
|
271 |
+
return $value;
|
272 |
+
}
|
273 |
+
if ( ! $field['timestamp'] ) {
|
274 |
+
$value = strtotime( $value );
|
275 |
+
}
|
276 |
+
return date( $args['format'], $value );
|
277 |
+
}
|
278 |
+
}
|
inc/libraries/meta-box/inc/fields/divider.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The divider field which displays a simple horizontal line.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Divider field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Divider_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-divider', RWMB_CSS_URL . 'divider.css', array(), RWMB_VER );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Show begin HTML markup for fields.
|
21 |
-
*
|
22 |
-
* @param mixed $meta Meta value.
|
23 |
-
* @param array $field Field parameters.
|
24 |
-
*
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function begin_html( $meta, $field ) {
|
28 |
-
$attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
|
29 |
-
return "<hr$attributes>";
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Show end HTML markup for fields.
|
34 |
-
*
|
35 |
-
* @param mixed $meta Meta value.
|
36 |
-
* @param array $field Field parameters.
|
37 |
-
*
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
public static function end_html( $meta, $field ) {
|
41 |
-
return '';
|
42 |
-
}
|
43 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The divider field which displays a simple horizontal line.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Divider field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Divider_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-divider', RWMB_CSS_URL . 'divider.css', array(), RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields.
|
21 |
+
*
|
22 |
+
* @param mixed $meta Meta value.
|
23 |
+
* @param array $field Field parameters.
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function begin_html( $meta, $field ) {
|
28 |
+
$attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
|
29 |
+
return "<hr$attributes>";
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Show end HTML markup for fields.
|
34 |
+
*
|
35 |
+
* @param mixed $meta Meta value.
|
36 |
+
* @param array $field Field parameters.
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public static function end_html( $meta, $field ) {
|
41 |
+
return '';
|
42 |
+
}
|
43 |
+
}
|
inc/libraries/meta-box/inc/fields/fieldset-text.php
CHANGED
@@ -1,125 +1,125 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The text fieldset field, which allows users to enter content for a list of text fields.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Fieldset text class.
|
10 |
-
*/
|
11 |
-
class RWMB_Fieldset_Text_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue field scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-fieldset-text', RWMB_CSS_URL . 'fieldset-text.css', '', RWMB_VER );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get field HTML.
|
21 |
-
*
|
22 |
-
* @param mixed $meta Meta value.
|
23 |
-
* @param array $field Field parameters.
|
24 |
-
*
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$html = array();
|
29 |
-
$tpl = '<p><label>%s</label> %s</p>';
|
30 |
-
|
31 |
-
foreach ( $field['options'] as $key => $label ) {
|
32 |
-
$value = isset( $meta[ $key ] ) ? $meta[ $key ] : '';
|
33 |
-
$field['attributes']['name'] = $field['field_name'] . "[{$key}]";
|
34 |
-
$html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
|
35 |
-
}
|
36 |
-
|
37 |
-
$out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
|
38 |
-
|
39 |
-
return $out;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Do not show field description.
|
44 |
-
*
|
45 |
-
* @param array $field Field parameters.
|
46 |
-
*
|
47 |
-
* @return string
|
48 |
-
*/
|
49 |
-
public static function input_description( $field ) {
|
50 |
-
return '';
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Do not show field description.
|
55 |
-
*
|
56 |
-
* @param array $field Field parameters.
|
57 |
-
*
|
58 |
-
* @return string
|
59 |
-
*/
|
60 |
-
public static function label_description( $field ) {
|
61 |
-
return '';
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Normalize parameters for field.
|
66 |
-
*
|
67 |
-
* @param array $field Field parameters.
|
68 |
-
*
|
69 |
-
* @return array
|
70 |
-
*/
|
71 |
-
public static function normalize( $field ) {
|
72 |
-
$field = parent::normalize( $field );
|
73 |
-
$field['multiple'] = false;
|
74 |
-
$field['attributes']['id'] = false;
|
75 |
-
$field['attributes']['type'] = 'text';
|
76 |
-
return $field;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Format value for the helper functions.
|
81 |
-
*
|
82 |
-
* @param array $field Field parameters.
|
83 |
-
* @param string|array $value The field meta value.
|
84 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
85 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
86 |
-
*
|
87 |
-
* @return string
|
88 |
-
*/
|
89 |
-
public static function format_value( $field, $value, $args, $post_id ) {
|
90 |
-
$output = '<table><thead><tr>';
|
91 |
-
foreach ( $field['options'] as $label ) {
|
92 |
-
$output .= "<th>$label</th>";
|
93 |
-
}
|
94 |
-
$output .= '</tr></thead></tbody>';
|
95 |
-
|
96 |
-
if ( ! $field['clone'] ) {
|
97 |
-
$output .= self::format_single_value( $field, $value, $args, $post_id );
|
98 |
-
} else {
|
99 |
-
foreach ( $value as $subvalue ) {
|
100 |
-
$output .= self::format_single_value( $field, $subvalue, $args, $post_id );
|
101 |
-
}
|
102 |
-
}
|
103 |
-
$output .= '</tbody></table>';
|
104 |
-
return $output;
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
109 |
-
*
|
110 |
-
* @param array $field Field parameters.
|
111 |
-
* @param array $value The value.
|
112 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
113 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
114 |
-
*
|
115 |
-
* @return string
|
116 |
-
*/
|
117 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
118 |
-
$output = '<tr>';
|
119 |
-
foreach ( $value as $subvalue ) {
|
120 |
-
$output .= "<td>$subvalue</td>";
|
121 |
-
}
|
122 |
-
$output .= '</tr>';
|
123 |
-
return $output;
|
124 |
-
}
|
125 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The text fieldset field, which allows users to enter content for a list of text fields.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Fieldset text class.
|
10 |
+
*/
|
11 |
+
class RWMB_Fieldset_Text_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue field scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-fieldset-text', RWMB_CSS_URL . 'fieldset-text.css', '', RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML.
|
21 |
+
*
|
22 |
+
* @param mixed $meta Meta value.
|
23 |
+
* @param array $field Field parameters.
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$html = array();
|
29 |
+
$tpl = '<p><label>%s</label> %s</p>';
|
30 |
+
|
31 |
+
foreach ( $field['options'] as $key => $label ) {
|
32 |
+
$value = isset( $meta[ $key ] ) ? $meta[ $key ] : '';
|
33 |
+
$field['attributes']['name'] = $field['field_name'] . "[{$key}]";
|
34 |
+
$html[] = sprintf( $tpl, $label, parent::html( $value, $field ) );
|
35 |
+
}
|
36 |
+
|
37 |
+
$out = '<fieldset><legend>' . $field['desc'] . '</legend>' . implode( ' ', $html ) . '</fieldset>';
|
38 |
+
|
39 |
+
return $out;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Do not show field description.
|
44 |
+
*
|
45 |
+
* @param array $field Field parameters.
|
46 |
+
*
|
47 |
+
* @return string
|
48 |
+
*/
|
49 |
+
public static function input_description( $field ) {
|
50 |
+
return '';
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Do not show field description.
|
55 |
+
*
|
56 |
+
* @param array $field Field parameters.
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function label_description( $field ) {
|
61 |
+
return '';
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Normalize parameters for field.
|
66 |
+
*
|
67 |
+
* @param array $field Field parameters.
|
68 |
+
*
|
69 |
+
* @return array
|
70 |
+
*/
|
71 |
+
public static function normalize( $field ) {
|
72 |
+
$field = parent::normalize( $field );
|
73 |
+
$field['multiple'] = false;
|
74 |
+
$field['attributes']['id'] = false;
|
75 |
+
$field['attributes']['type'] = 'text';
|
76 |
+
return $field;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Format value for the helper functions.
|
81 |
+
*
|
82 |
+
* @param array $field Field parameters.
|
83 |
+
* @param string|array $value The field meta value.
|
84 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
85 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public static function format_value( $field, $value, $args, $post_id ) {
|
90 |
+
$output = '<table><thead><tr>';
|
91 |
+
foreach ( $field['options'] as $label ) {
|
92 |
+
$output .= "<th>$label</th>";
|
93 |
+
}
|
94 |
+
$output .= '</tr></thead></tbody>';
|
95 |
+
|
96 |
+
if ( ! $field['clone'] ) {
|
97 |
+
$output .= self::format_single_value( $field, $value, $args, $post_id );
|
98 |
+
} else {
|
99 |
+
foreach ( $value as $subvalue ) {
|
100 |
+
$output .= self::format_single_value( $field, $subvalue, $args, $post_id );
|
101 |
+
}
|
102 |
+
}
|
103 |
+
$output .= '</tbody></table>';
|
104 |
+
return $output;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
109 |
+
*
|
110 |
+
* @param array $field Field parameters.
|
111 |
+
* @param array $value The value.
|
112 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
113 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
114 |
+
*
|
115 |
+
* @return string
|
116 |
+
*/
|
117 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
118 |
+
$output = '<tr>';
|
119 |
+
foreach ( $value as $subvalue ) {
|
120 |
+
$output .= "<td>$subvalue</td>";
|
121 |
+
}
|
122 |
+
$output .= '</tr>';
|
123 |
+
return $output;
|
124 |
+
}
|
125 |
+
}
|
inc/libraries/meta-box/inc/fields/file-input.php
CHANGED
@@ -1,62 +1,62 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The file input field which allows users to enter a file URL or select it from the Media Library.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* File input field class which uses an input for file URL.
|
10 |
-
*/
|
11 |
-
class RWMB_File_Input_Field extends RWMB_Input_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_media();
|
17 |
-
wp_enqueue_style( 'rwmb-file-input', RWMB_CSS_URL . 'file-input.css', array(), RWMB_VER );
|
18 |
-
wp_enqueue_script( 'rwmb-file-input', RWMB_JS_URL . 'file-input.js', array( 'jquery' ), RWMB_VER, true );
|
19 |
-
self::localize_script(
|
20 |
-
'rwmb-file-input',
|
21 |
-
'rwmbFileInput',
|
22 |
-
array(
|
23 |
-
'frameTitle' => esc_html__( 'Select File', 'meta-box' ),
|
24 |
-
)
|
25 |
-
);
|
26 |
-
}
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Get field HTML.
|
30 |
-
*
|
31 |
-
* @param mixed $meta Meta value.
|
32 |
-
* @param array $field Field parameters.
|
33 |
-
*
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
public static function html( $meta, $field ) {
|
37 |
-
$attributes = self::get_attributes( $field, $meta );
|
38 |
-
return sprintf(
|
39 |
-
'<input %s>
|
40 |
-
<a href="#" class="rwmb-file-input-select button">%s</a>
|
41 |
-
<a href="#" class="rwmb-file-input-remove button %s">%s</a>',
|
42 |
-
self::render_attributes( $attributes ),
|
43 |
-
esc_html__( 'Select', 'meta-box' ),
|
44 |
-
$meta ? '' : 'hidden',
|
45 |
-
esc_html__( 'Remove', 'meta-box' )
|
46 |
-
);
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Get the attributes for a field.
|
51 |
-
*
|
52 |
-
* @param array $field Field parameters.
|
53 |
-
* @param mixed $value Meta value.
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public static function get_attributes( $field, $value = null ) {
|
57 |
-
$attributes = parent::get_attributes( $field, $value );
|
58 |
-
$attributes['type'] = 'text';
|
59 |
-
|
60 |
-
return $attributes;
|
61 |
-
}
|
62 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The file input field which allows users to enter a file URL or select it from the Media Library.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* File input field class which uses an input for file URL.
|
10 |
+
*/
|
11 |
+
class RWMB_File_Input_Field extends RWMB_Input_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_media();
|
17 |
+
wp_enqueue_style( 'rwmb-file-input', RWMB_CSS_URL . 'file-input.css', array(), RWMB_VER );
|
18 |
+
wp_enqueue_script( 'rwmb-file-input', RWMB_JS_URL . 'file-input.js', array( 'jquery' ), RWMB_VER, true );
|
19 |
+
self::localize_script(
|
20 |
+
'rwmb-file-input',
|
21 |
+
'rwmbFileInput',
|
22 |
+
array(
|
23 |
+
'frameTitle' => esc_html__( 'Select File', 'meta-box' ),
|
24 |
+
)
|
25 |
+
);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Get field HTML.
|
30 |
+
*
|
31 |
+
* @param mixed $meta Meta value.
|
32 |
+
* @param array $field Field parameters.
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public static function html( $meta, $field ) {
|
37 |
+
$attributes = self::get_attributes( $field, $meta );
|
38 |
+
return sprintf(
|
39 |
+
'<input %s>
|
40 |
+
<a href="#" class="rwmb-file-input-select button">%s</a>
|
41 |
+
<a href="#" class="rwmb-file-input-remove button %s">%s</a>',
|
42 |
+
self::render_attributes( $attributes ),
|
43 |
+
esc_html__( 'Select', 'meta-box' ),
|
44 |
+
$meta ? '' : 'hidden',
|
45 |
+
esc_html__( 'Remove', 'meta-box' )
|
46 |
+
);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get the attributes for a field.
|
51 |
+
*
|
52 |
+
* @param array $field Field parameters.
|
53 |
+
* @param mixed $value Meta value.
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public static function get_attributes( $field, $value = null ) {
|
57 |
+
$attributes = parent::get_attributes( $field, $value );
|
58 |
+
$attributes['type'] = 'text';
|
59 |
+
|
60 |
+
return $attributes;
|
61 |
+
}
|
62 |
+
}
|
inc/libraries/meta-box/inc/fields/file-upload.php
CHANGED
@@ -1,54 +1,54 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The file upload field which allows users to drag and drop files to upload.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The file upload field class.
|
10 |
-
*/
|
11 |
-
class RWMB_File_Upload_Field extends RWMB_Media_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_enqueue_scripts();
|
17 |
-
wp_enqueue_style( 'rwmb-upload', RWMB_CSS_URL . 'upload.css', array( 'rwmb-media' ), RWMB_VER );
|
18 |
-
wp_enqueue_script( 'rwmb-file-upload', RWMB_JS_URL . 'file-upload.js', array( 'rwmb-media' ), RWMB_VER, true );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Normalize parameters for field.
|
23 |
-
*
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
*
|
26 |
-
* @return array
|
27 |
-
*/
|
28 |
-
public static function normalize( $field ) {
|
29 |
-
$field = parent::normalize( $field );
|
30 |
-
$field = wp_parse_args(
|
31 |
-
$field,
|
32 |
-
array(
|
33 |
-
'max_file_size' => 0,
|
34 |
-
)
|
35 |
-
);
|
36 |
-
|
37 |
-
$field['js_options'] = wp_parse_args(
|
38 |
-
$field['js_options'],
|
39 |
-
array(
|
40 |
-
'maxFileSize' => $field['max_file_size'],
|
41 |
-
)
|
42 |
-
);
|
43 |
-
|
44 |
-
return $field;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Template for media item.
|
49 |
-
*/
|
50 |
-
public static function print_templates() {
|
51 |
-
parent::print_templates();
|
52 |
-
require_once RWMB_INC_DIR . 'templates/upload.php';
|
53 |
-
}
|
54 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The file upload field which allows users to drag and drop files to upload.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The file upload field class.
|
10 |
+
*/
|
11 |
+
class RWMB_File_Upload_Field extends RWMB_Media_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
wp_enqueue_style( 'rwmb-upload', RWMB_CSS_URL . 'upload.css', array( 'rwmb-media' ), RWMB_VER );
|
18 |
+
wp_enqueue_script( 'rwmb-file-upload', RWMB_JS_URL . 'file-upload.js', array( 'rwmb-media' ), RWMB_VER, true );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Normalize parameters for field.
|
23 |
+
*
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
public static function normalize( $field ) {
|
29 |
+
$field = parent::normalize( $field );
|
30 |
+
$field = wp_parse_args(
|
31 |
+
$field,
|
32 |
+
array(
|
33 |
+
'max_file_size' => 0,
|
34 |
+
)
|
35 |
+
);
|
36 |
+
|
37 |
+
$field['js_options'] = wp_parse_args(
|
38 |
+
$field['js_options'],
|
39 |
+
array(
|
40 |
+
'maxFileSize' => $field['max_file_size'],
|
41 |
+
)
|
42 |
+
);
|
43 |
+
|
44 |
+
return $field;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Template for media item.
|
49 |
+
*/
|
50 |
+
public static function print_templates() {
|
51 |
+
parent::print_templates();
|
52 |
+
require_once RWMB_INC_DIR . 'templates/upload.php';
|
53 |
+
}
|
54 |
+
}
|
inc/libraries/meta-box/inc/fields/file.php
CHANGED
@@ -1,369 +1,369 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The file upload file which allows users to upload files via the default HTML <input type="file">.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* File field class which uses HTML <input type="file"> to upload file.
|
10 |
-
*/
|
11 |
-
class RWMB_File_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery-ui-sortable' ), RWMB_VER, true );
|
18 |
-
|
19 |
-
self::localize_script(
|
20 |
-
'rwmb-file',
|
21 |
-
'rwmbFile',
|
22 |
-
array(
|
23 |
-
// Translators: %d is the number of files in singular form.
|
24 |
-
'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'meta-box' ),
|
25 |
-
// Translators: %d is the number of files in plural form.
|
26 |
-
'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'meta-box' ),
|
27 |
-
)
|
28 |
-
);
|
29 |
-
}
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Add custom actions.
|
33 |
-
*/
|
34 |
-
public static function add_actions() {
|
35 |
-
add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
|
36 |
-
add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'ajax_delete_file' ) );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Add data encoding type for file uploading
|
41 |
-
*/
|
42 |
-
public static function post_edit_form_tag() {
|
43 |
-
echo ' enctype="multipart/form-data"';
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Ajax callback for deleting files.
|
48 |
-
*/
|
49 |
-
public static function ajax_delete_file() {
|
50 |
-
$field_id = (string) filter_input( INPUT_POST, 'field_id' );
|
51 |
-
$attachment_id = (int) filter_input( INPUT_POST, 'attachment_id', FILTER_SANITIZE_NUMBER_INT );
|
52 |
-
|
53 |
-
check_ajax_referer( "rwmb-delete-file_{$field_id}" );
|
54 |
-
if ( wp_delete_attachment( $attachment_id ) ) {
|
55 |
-
wp_send_json_success();
|
56 |
-
}
|
57 |
-
wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Get field HTML.
|
62 |
-
*
|
63 |
-
* @param mixed $meta Meta value.
|
64 |
-
* @param array $field Field parameters.
|
65 |
-
*
|
66 |
-
* @return string
|
67 |
-
*/
|
68 |
-
public static function html( $meta, $field ) {
|
69 |
-
$meta = array_filter( (array) $meta );
|
70 |
-
$i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
|
71 |
-
$html = self::get_uploaded_files( $meta, $field );
|
72 |
-
|
73 |
-
// Show form upload.
|
74 |
-
$html .= sprintf(
|
75 |
-
'<div class="rwmb-file-new">
|
76 |
-
<input type="file" name="%s[]" class="rwmb-file-input">
|
77 |
-
<a class="rwmb-file-add" href="#"><strong>%s</strong></a>
|
78 |
-
</div>',
|
79 |
-
$field['file_input_name'],
|
80 |
-
$i18n_more
|
81 |
-
);
|
82 |
-
|
83 |
-
return $html;
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Get HTML for uploaded files.
|
88 |
-
*
|
89 |
-
* @param array $files List of uploaded files.
|
90 |
-
* @param array $field Field parameters.
|
91 |
-
* @return string
|
92 |
-
*/
|
93 |
-
protected static function get_uploaded_files( $files, $field ) {
|
94 |
-
$reorder_nonce = wp_create_nonce( "rwmb-reorder-files_{$field['id']}" );
|
95 |
-
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
96 |
-
$output = '';
|
97 |
-
|
98 |
-
foreach ( (array) $files as $k => $file ) {
|
99 |
-
// Ignore deleted files (if users accidentally deleted files or uses `force_delete` without saving post).
|
100 |
-
if ( get_attached_file( $file ) ) {
|
101 |
-
$output .= self::call( $field, 'file_html', $file, $k );
|
102 |
-
}
|
103 |
-
}
|
104 |
-
return sprintf(
|
105 |
-
'<ul class="rwmb-uploaded" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s" data-mime_type="%s">%s</ul>',
|
106 |
-
$field['id'],
|
107 |
-
$delete_nonce,
|
108 |
-
$reorder_nonce,
|
109 |
-
$field['force_delete'] ? 1 : 0,
|
110 |
-
$field['max_file_uploads'],
|
111 |
-
$field['mime_type'],
|
112 |
-
$output
|
113 |
-
);
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* Get HTML for uploaded file.
|
118 |
-
*
|
119 |
-
* @param int $file Attachment (file) ID.
|
120 |
-
* @param int $index File index.
|
121 |
-
* @param array $field Field data.
|
122 |
-
* @return string
|
123 |
-
*/
|
124 |
-
protected static function file_html( $file, $index, $field ) {
|
125 |
-
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
|
126 |
-
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
|
127 |
-
$attributes = self::get_attributes( $field, $file );
|
128 |
-
$path = get_attached_file( $file );
|
129 |
-
$icon = wp_get_attachment_image( $file, array( 60, 60 ), true );
|
130 |
-
|
131 |
-
return sprintf(
|
132 |
-
'<li class="rwmb-file">
|
133 |
-
<div class="rwmb-file-icon"><a href="%s" target="_blank">%s</a></div>
|
134 |
-
<div class="rwmb-file-info">
|
135 |
-
<a href="%s" target="_blank" class="rwmb-file-title">%s</a>
|
136 |
-
<p class="rwmb-file-name">%s</p>
|
137 |
-
<p class="rwmb-file-actions">
|
138 |
-
<a href="%s" class="rwmb-file-edit" target="_blank"><span class="dashicons dashicons-edit"></span>%s</a>
|
139 |
-
<a href="#" class="rwmb-file-delete" data-attachment_id="%s"><span class="dashicons dashicons-no-alt"></span>%s</a>
|
140 |
-
</p>
|
141 |
-
</div>
|
142 |
-
<input type="hidden" name="%s[%s]" value="%s">
|
143 |
-
</li>',
|
144 |
-
wp_get_attachment_url( $file ),
|
145 |
-
$icon,
|
146 |
-
wp_get_attachment_url( $file ),
|
147 |
-
get_the_title( $file ),
|
148 |
-
basename( $path ),
|
149 |
-
get_edit_post_link( $file ),
|
150 |
-
$i18n_edit,
|
151 |
-
$file,
|
152 |
-
$i18n_delete,
|
153 |
-
$attributes['name'],
|
154 |
-
$index,
|
155 |
-
$file
|
156 |
-
);
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Get meta values to save.
|
161 |
-
*
|
162 |
-
* @param mixed $new The submitted meta value.
|
163 |
-
* @param mixed $old The existing meta value.
|
164 |
-
* @param int $post_id The post ID.
|
165 |
-
* @param array $field The field parameters.
|
166 |
-
*
|
167 |
-
* @return array|mixed
|
168 |
-
*/
|
169 |
-
public static function value( $new, $old, $post_id, $field ) {
|
170 |
-
$input = $field['file_input_name'];
|
171 |
-
|
172 |
-
// @codingStandardsIgnoreLine
|
173 |
-
if ( empty( $_FILES[ $input ] ) ) {
|
174 |
-
return $new;
|
175 |
-
}
|
176 |
-
|
177 |
-
$new = array_filter( (array) $new );
|
178 |
-
|
179 |
-
// Non-cloneable field.
|
180 |
-
if ( ! $field['clone'] ) {
|
181 |
-
$count = self::transform( $input );
|
182 |
-
for ( $i = 0; $i <= $count; $i ++ ) {
|
183 |
-
$attachment = media_handle_upload( "{$input}_{$i}", $post_id );
|
184 |
-
if ( ! is_wp_error( $attachment ) ) {
|
185 |
-
$new[] = $attachment;
|
186 |
-
}
|
187 |
-
}
|
188 |
-
return $new;
|
189 |
-
}
|
190 |
-
|
191 |
-
// Cloneable field.
|
192 |
-
$counts = self::transform_cloneable( $input );
|
193 |
-
foreach ( $counts as $clone_index => $count ) {
|
194 |
-
if ( empty( $new[ $clone_index ] ) ) {
|
195 |
-
$new[ $clone_index ] = array();
|
196 |
-
}
|
197 |
-
for ( $i = 0; $i <= $count; $i ++ ) {
|
198 |
-
$attachment = media_handle_upload( "{$input}_{$clone_index}_{$i}", $post_id );
|
199 |
-
if ( ! is_wp_error( $attachment ) ) {
|
200 |
-
$new[ $clone_index ][] = $attachment;
|
201 |
-
}
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
return $new;
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
* Transform $_FILES from $_FILES['field']['key']['index'] to $_FILES['field_index']['key'].
|
210 |
-
*
|
211 |
-
* @param string $input_name The field input name.
|
212 |
-
*
|
213 |
-
* @return int The number of uploaded files.
|
214 |
-
*/
|
215 |
-
protected static function transform( $input_name ) {
|
216 |
-
// @codingStandardsIgnoreStart
|
217 |
-
foreach ( $_FILES[ $input_name ] as $key => $list ) {
|
218 |
-
foreach ( $list as $index => $value ) {
|
219 |
-
$file_key = "{$input_name}_{$index}";
|
220 |
-
if ( ! isset( $_FILES[ $file_key ] ) ) {
|
221 |
-
$_FILES[ $file_key ] = array();
|
222 |
-
}
|
223 |
-
$_FILES[ $file_key ][ $key ] = $value;
|
224 |
-
}
|
225 |
-
}
|
226 |
-
|
227 |
-
return count( $_FILES[ $input_name ]['name'] );
|
228 |
-
// @codingStandardsIgnoreEnd
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* Transform $_FILES from $_FILES['field']['key']['cloneIndex']['index'] to $_FILES['field_cloneIndex_index']['key'].
|
233 |
-
*
|
234 |
-
* @param string $input_name The field input name.
|
235 |
-
*
|
236 |
-
* @return array
|
237 |
-
*/
|
238 |
-
protected static function transform_cloneable( $input_name ) {
|
239 |
-
// @codingStandardsIgnoreStart
|
240 |
-
foreach ( $_FILES[ $input_name ] as $key => $list ) {
|
241 |
-
foreach ( $list as $clone_index => $clone_values ) {
|
242 |
-
foreach ( $clone_values as $index => $value ) {
|
243 |
-
$file_key = "{$input_name}_{$clone_index}_{$index}";
|
244 |
-
|
245 |
-
if ( ! isset( $_FILES[ $file_key ] ) ) {
|
246 |
-
$_FILES[ $file_key ] = array();
|
247 |
-
}
|
248 |
-
$_FILES[ $file_key ][ $key ] = $value;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
$counts = array();
|
254 |
-
foreach ( $_FILES[ $input_name ]['name'] as $clone_index => $clone_values ) {
|
255 |
-
$counts[ $clone_index ] = count( $clone_values );
|
256 |
-
}
|
257 |
-
return $counts;
|
258 |
-
// @codingStandardsIgnoreEnd
|
259 |
-
}
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Normalize parameters for field.
|
263 |
-
*
|
264 |
-
* @param array $field Field parameters.
|
265 |
-
* @return array
|
266 |
-
*/
|
267 |
-
public static function normalize( $field ) {
|
268 |
-
$field = parent::normalize( $field );
|
269 |
-
$field = wp_parse_args(
|
270 |
-
$field,
|
271 |
-
array(
|
272 |
-
'std' => array(),
|
273 |
-
'force_delete' => false,
|
274 |
-
'max_file_uploads' => 0,
|
275 |
-
'mime_type' => '',
|
276 |
-
)
|
277 |
-
);
|
278 |
-
$field['multiple'] = true;
|
279 |
-
|
280 |
-
$field['file_input_name'] = '_file_' . $field['id'];
|
281 |
-
|
282 |
-
return $field;
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Get the field value. Return meaningful info of the files.
|
287 |
-
*
|
288 |
-
* @param array $field Field parameters.
|
289 |
-
* @param array $args Not used for this field.
|
290 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
291 |
-
*
|
292 |
-
* @return mixed Full info of uploaded files
|
293 |
-
*/
|
294 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
295 |
-
$value = parent::get_value( $field, $args, $post_id );
|
296 |
-
if ( ! $field['clone'] ) {
|
297 |
-
$value = self::call( 'files_info', $field, $value, $args );
|
298 |
-
} else {
|
299 |
-
$return = array();
|
300 |
-
foreach ( $value as $subvalue ) {
|
301 |
-
$return[] = self::call( 'files_info', $field, $subvalue, $args );
|
302 |
-
}
|
303 |
-
$value = $return;
|
304 |
-
}
|
305 |
-
if ( isset( $args['limit'] ) ) {
|
306 |
-
$value = array_slice( $value, 0, intval( $args['limit'] ) );
|
307 |
-
}
|
308 |
-
return $value;
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Get uploaded files information.
|
313 |
-
*
|
314 |
-
* @param array $field Field parameters.
|
315 |
-
* @param array $files Files IDs.
|
316 |
-
* @param array $args Additional arguments (for image size).
|
317 |
-
* @return array
|
318 |
-
*/
|
319 |
-
public static function files_info( $field, $files, $args ) {
|
320 |
-
$return = array();
|
321 |
-
foreach ( (array) $files as $file ) {
|
322 |
-
$info = self::call( $field, 'file_info', $file, $args );
|
323 |
-
if ( $info ) {
|
324 |
-
$return[ $file ] = $info;
|
325 |
-
}
|
326 |
-
}
|
327 |
-
return $return;
|
328 |
-
}
|
329 |
-
|
330 |
-
/**
|
331 |
-
* Get uploaded file information.
|
332 |
-
*
|
333 |
-
* @param int $file Attachment file ID (post ID). Required.
|
334 |
-
* @param array $args Array of arguments (for size).
|
335 |
-
*
|
336 |
-
* @return array|bool False if file not found. Array of (id, name, path, url) on success.
|
337 |
-
*/
|
338 |
-
public static function file_info( $file, $args = array() ) {
|
339 |
-
$path = get_attached_file( $file );
|
340 |
-
if ( ! $path ) {
|
341 |
-
return false;
|
342 |
-
}
|
343 |
-
|
344 |
-
return wp_parse_args(
|
345 |
-
array(
|
346 |
-
'ID' => $file,
|
347 |
-
'name' => basename( $path ),
|
348 |
-
'path' => $path,
|
349 |
-
'url' => wp_get_attachment_url( $file ),
|
350 |
-
'title' => get_the_title( $file ),
|
351 |
-
),
|
352 |
-
wp_get_attachment_metadata( $file )
|
353 |
-
);
|
354 |
-
}
|
355 |
-
|
356 |
-
/**
|
357 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
358 |
-
*
|
359 |
-
* @param array $field Field parameters.
|
360 |
-
* @param array $value The value.
|
361 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
362 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
363 |
-
*
|
364 |
-
* @return string
|
365 |
-
*/
|
366 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
367 |
-
return sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $value['url'] ), esc_html( $value['title'] ) );
|
368 |
-
}
|
369 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The file upload file which allows users to upload files via the default HTML <input type="file">.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* File field class which uses HTML <input type="file"> to upload file.
|
10 |
+
*/
|
11 |
+
class RWMB_File_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-file', RWMB_CSS_URL . 'file.css', array(), RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-file', RWMB_JS_URL . 'file.js', array( 'jquery-ui-sortable' ), RWMB_VER, true );
|
18 |
+
|
19 |
+
self::localize_script(
|
20 |
+
'rwmb-file',
|
21 |
+
'rwmbFile',
|
22 |
+
array(
|
23 |
+
// Translators: %d is the number of files in singular form.
|
24 |
+
'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'meta-box' ),
|
25 |
+
// Translators: %d is the number of files in plural form.
|
26 |
+
'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'meta-box' ),
|
27 |
+
)
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Add custom actions.
|
33 |
+
*/
|
34 |
+
public static function add_actions() {
|
35 |
+
add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
|
36 |
+
add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'ajax_delete_file' ) );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Add data encoding type for file uploading
|
41 |
+
*/
|
42 |
+
public static function post_edit_form_tag() {
|
43 |
+
echo ' enctype="multipart/form-data"';
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Ajax callback for deleting files.
|
48 |
+
*/
|
49 |
+
public static function ajax_delete_file() {
|
50 |
+
$field_id = (string) filter_input( INPUT_POST, 'field_id' );
|
51 |
+
$attachment_id = (int) filter_input( INPUT_POST, 'attachment_id', FILTER_SANITIZE_NUMBER_INT );
|
52 |
+
|
53 |
+
check_ajax_referer( "rwmb-delete-file_{$field_id}" );
|
54 |
+
if ( wp_delete_attachment( $attachment_id ) ) {
|
55 |
+
wp_send_json_success();
|
56 |
+
}
|
57 |
+
wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get field HTML.
|
62 |
+
*
|
63 |
+
* @param mixed $meta Meta value.
|
64 |
+
* @param array $field Field parameters.
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public static function html( $meta, $field ) {
|
69 |
+
$meta = array_filter( (array) $meta );
|
70 |
+
$i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
|
71 |
+
$html = self::get_uploaded_files( $meta, $field );
|
72 |
+
|
73 |
+
// Show form upload.
|
74 |
+
$html .= sprintf(
|
75 |
+
'<div class="rwmb-file-new">
|
76 |
+
<input type="file" name="%s[]" class="rwmb-file-input">
|
77 |
+
<a class="rwmb-file-add" href="#"><strong>%s</strong></a>
|
78 |
+
</div>',
|
79 |
+
$field['file_input_name'],
|
80 |
+
$i18n_more
|
81 |
+
);
|
82 |
+
|
83 |
+
return $html;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Get HTML for uploaded files.
|
88 |
+
*
|
89 |
+
* @param array $files List of uploaded files.
|
90 |
+
* @param array $field Field parameters.
|
91 |
+
* @return string
|
92 |
+
*/
|
93 |
+
protected static function get_uploaded_files( $files, $field ) {
|
94 |
+
$reorder_nonce = wp_create_nonce( "rwmb-reorder-files_{$field['id']}" );
|
95 |
+
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
96 |
+
$output = '';
|
97 |
+
|
98 |
+
foreach ( (array) $files as $k => $file ) {
|
99 |
+
// Ignore deleted files (if users accidentally deleted files or uses `force_delete` without saving post).
|
100 |
+
if ( get_attached_file( $file ) ) {
|
101 |
+
$output .= self::call( $field, 'file_html', $file, $k );
|
102 |
+
}
|
103 |
+
}
|
104 |
+
return sprintf(
|
105 |
+
'<ul class="rwmb-uploaded" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s" data-mime_type="%s">%s</ul>',
|
106 |
+
$field['id'],
|
107 |
+
$delete_nonce,
|
108 |
+
$reorder_nonce,
|
109 |
+
$field['force_delete'] ? 1 : 0,
|
110 |
+
$field['max_file_uploads'],
|
111 |
+
$field['mime_type'],
|
112 |
+
$output
|
113 |
+
);
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get HTML for uploaded file.
|
118 |
+
*
|
119 |
+
* @param int $file Attachment (file) ID.
|
120 |
+
* @param int $index File index.
|
121 |
+
* @param array $field Field data.
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
+
protected static function file_html( $file, $index, $field ) {
|
125 |
+
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
|
126 |
+
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
|
127 |
+
$attributes = self::get_attributes( $field, $file );
|
128 |
+
$path = get_attached_file( $file );
|
129 |
+
$icon = wp_get_attachment_image( $file, array( 60, 60 ), true );
|
130 |
+
|
131 |
+
return sprintf(
|
132 |
+
'<li class="rwmb-file">
|
133 |
+
<div class="rwmb-file-icon"><a href="%s" target="_blank">%s</a></div>
|
134 |
+
<div class="rwmb-file-info">
|
135 |
+
<a href="%s" target="_blank" class="rwmb-file-title">%s</a>
|
136 |
+
<p class="rwmb-file-name">%s</p>
|
137 |
+
<p class="rwmb-file-actions">
|
138 |
+
<a href="%s" class="rwmb-file-edit" target="_blank"><span class="dashicons dashicons-edit"></span>%s</a>
|
139 |
+
<a href="#" class="rwmb-file-delete" data-attachment_id="%s"><span class="dashicons dashicons-no-alt"></span>%s</a>
|
140 |
+
</p>
|
141 |
+
</div>
|
142 |
+
<input type="hidden" name="%s[%s]" value="%s">
|
143 |
+
</li>',
|
144 |
+
wp_get_attachment_url( $file ),
|
145 |
+
$icon,
|
146 |
+
wp_get_attachment_url( $file ),
|
147 |
+
get_the_title( $file ),
|
148 |
+
basename( $path ),
|
149 |
+
get_edit_post_link( $file ),
|
150 |
+
$i18n_edit,
|
151 |
+
$file,
|
152 |
+
$i18n_delete,
|
153 |
+
$attributes['name'],
|
154 |
+
$index,
|
155 |
+
$file
|
156 |
+
);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get meta values to save.
|
161 |
+
*
|
162 |
+
* @param mixed $new The submitted meta value.
|
163 |
+
* @param mixed $old The existing meta value.
|
164 |
+
* @param int $post_id The post ID.
|
165 |
+
* @param array $field The field parameters.
|
166 |
+
*
|
167 |
+
* @return array|mixed
|
168 |
+
*/
|
169 |
+
public static function value( $new, $old, $post_id, $field ) {
|
170 |
+
$input = $field['file_input_name'];
|
171 |
+
|
172 |
+
// @codingStandardsIgnoreLine
|
173 |
+
if ( empty( $_FILES[ $input ] ) ) {
|
174 |
+
return $new;
|
175 |
+
}
|
176 |
+
|
177 |
+
$new = array_filter( (array) $new );
|
178 |
+
|
179 |
+
// Non-cloneable field.
|
180 |
+
if ( ! $field['clone'] ) {
|
181 |
+
$count = self::transform( $input );
|
182 |
+
for ( $i = 0; $i <= $count; $i ++ ) {
|
183 |
+
$attachment = media_handle_upload( "{$input}_{$i}", $post_id );
|
184 |
+
if ( ! is_wp_error( $attachment ) ) {
|
185 |
+
$new[] = $attachment;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
return $new;
|
189 |
+
}
|
190 |
+
|
191 |
+
// Cloneable field.
|
192 |
+
$counts = self::transform_cloneable( $input );
|
193 |
+
foreach ( $counts as $clone_index => $count ) {
|
194 |
+
if ( empty( $new[ $clone_index ] ) ) {
|
195 |
+
$new[ $clone_index ] = array();
|
196 |
+
}
|
197 |
+
for ( $i = 0; $i <= $count; $i ++ ) {
|
198 |
+
$attachment = media_handle_upload( "{$input}_{$clone_index}_{$i}", $post_id );
|
199 |
+
if ( ! is_wp_error( $attachment ) ) {
|
200 |
+
$new[ $clone_index ][] = $attachment;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
return $new;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Transform $_FILES from $_FILES['field']['key']['index'] to $_FILES['field_index']['key'].
|
210 |
+
*
|
211 |
+
* @param string $input_name The field input name.
|
212 |
+
*
|
213 |
+
* @return int The number of uploaded files.
|
214 |
+
*/
|
215 |
+
protected static function transform( $input_name ) {
|
216 |
+
// @codingStandardsIgnoreStart
|
217 |
+
foreach ( $_FILES[ $input_name ] as $key => $list ) {
|
218 |
+
foreach ( $list as $index => $value ) {
|
219 |
+
$file_key = "{$input_name}_{$index}";
|
220 |
+
if ( ! isset( $_FILES[ $file_key ] ) ) {
|
221 |
+
$_FILES[ $file_key ] = array();
|
222 |
+
}
|
223 |
+
$_FILES[ $file_key ][ $key ] = $value;
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
return count( $_FILES[ $input_name ]['name'] );
|
228 |
+
// @codingStandardsIgnoreEnd
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Transform $_FILES from $_FILES['field']['key']['cloneIndex']['index'] to $_FILES['field_cloneIndex_index']['key'].
|
233 |
+
*
|
234 |
+
* @param string $input_name The field input name.
|
235 |
+
*
|
236 |
+
* @return array
|
237 |
+
*/
|
238 |
+
protected static function transform_cloneable( $input_name ) {
|
239 |
+
// @codingStandardsIgnoreStart
|
240 |
+
foreach ( $_FILES[ $input_name ] as $key => $list ) {
|
241 |
+
foreach ( $list as $clone_index => $clone_values ) {
|
242 |
+
foreach ( $clone_values as $index => $value ) {
|
243 |
+
$file_key = "{$input_name}_{$clone_index}_{$index}";
|
244 |
+
|
245 |
+
if ( ! isset( $_FILES[ $file_key ] ) ) {
|
246 |
+
$_FILES[ $file_key ] = array();
|
247 |
+
}
|
248 |
+
$_FILES[ $file_key ][ $key ] = $value;
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
$counts = array();
|
254 |
+
foreach ( $_FILES[ $input_name ]['name'] as $clone_index => $clone_values ) {
|
255 |
+
$counts[ $clone_index ] = count( $clone_values );
|
256 |
+
}
|
257 |
+
return $counts;
|
258 |
+
// @codingStandardsIgnoreEnd
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Normalize parameters for field.
|
263 |
+
*
|
264 |
+
* @param array $field Field parameters.
|
265 |
+
* @return array
|
266 |
+
*/
|
267 |
+
public static function normalize( $field ) {
|
268 |
+
$field = parent::normalize( $field );
|
269 |
+
$field = wp_parse_args(
|
270 |
+
$field,
|
271 |
+
array(
|
272 |
+
'std' => array(),
|
273 |
+
'force_delete' => false,
|
274 |
+
'max_file_uploads' => 0,
|
275 |
+
'mime_type' => '',
|
276 |
+
)
|
277 |
+
);
|
278 |
+
$field['multiple'] = true;
|
279 |
+
|
280 |
+
$field['file_input_name'] = '_file_' . $field['id'];
|
281 |
+
|
282 |
+
return $field;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Get the field value. Return meaningful info of the files.
|
287 |
+
*
|
288 |
+
* @param array $field Field parameters.
|
289 |
+
* @param array $args Not used for this field.
|
290 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
291 |
+
*
|
292 |
+
* @return mixed Full info of uploaded files
|
293 |
+
*/
|
294 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
295 |
+
$value = parent::get_value( $field, $args, $post_id );
|
296 |
+
if ( ! $field['clone'] ) {
|
297 |
+
$value = self::call( 'files_info', $field, $value, $args );
|
298 |
+
} else {
|
299 |
+
$return = array();
|
300 |
+
foreach ( $value as $subvalue ) {
|
301 |
+
$return[] = self::call( 'files_info', $field, $subvalue, $args );
|
302 |
+
}
|
303 |
+
$value = $return;
|
304 |
+
}
|
305 |
+
if ( isset( $args['limit'] ) ) {
|
306 |
+
$value = array_slice( $value, 0, intval( $args['limit'] ) );
|
307 |
+
}
|
308 |
+
return $value;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Get uploaded files information.
|
313 |
+
*
|
314 |
+
* @param array $field Field parameters.
|
315 |
+
* @param array $files Files IDs.
|
316 |
+
* @param array $args Additional arguments (for image size).
|
317 |
+
* @return array
|
318 |
+
*/
|
319 |
+
public static function files_info( $field, $files, $args ) {
|
320 |
+
$return = array();
|
321 |
+
foreach ( (array) $files as $file ) {
|
322 |
+
$info = self::call( $field, 'file_info', $file, $args );
|
323 |
+
if ( $info ) {
|
324 |
+
$return[ $file ] = $info;
|
325 |
+
}
|
326 |
+
}
|
327 |
+
return $return;
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Get uploaded file information.
|
332 |
+
*
|
333 |
+
* @param int $file Attachment file ID (post ID). Required.
|
334 |
+
* @param array $args Array of arguments (for size).
|
335 |
+
*
|
336 |
+
* @return array|bool False if file not found. Array of (id, name, path, url) on success.
|
337 |
+
*/
|
338 |
+
public static function file_info( $file, $args = array() ) {
|
339 |
+
$path = get_attached_file( $file );
|
340 |
+
if ( ! $path ) {
|
341 |
+
return false;
|
342 |
+
}
|
343 |
+
|
344 |
+
return wp_parse_args(
|
345 |
+
array(
|
346 |
+
'ID' => $file,
|
347 |
+
'name' => basename( $path ),
|
348 |
+
'path' => $path,
|
349 |
+
'url' => wp_get_attachment_url( $file ),
|
350 |
+
'title' => get_the_title( $file ),
|
351 |
+
),
|
352 |
+
wp_get_attachment_metadata( $file )
|
353 |
+
);
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
358 |
+
*
|
359 |
+
* @param array $field Field parameters.
|
360 |
+
* @param array $value The value.
|
361 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
362 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
363 |
+
*
|
364 |
+
* @return string
|
365 |
+
*/
|
366 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
367 |
+
return sprintf( '<a href="%s" target="_blank">%s</a>', esc_url( $value['url'] ), esc_html( $value['title'] ) );
|
368 |
+
}
|
369 |
+
}
|
inc/libraries/meta-box/inc/fields/heading.php
CHANGED
@@ -1,43 +1,43 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The heading field which displays a simple heading text.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Heading field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Heading_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-heading', RWMB_CSS_URL . 'heading.css', array(), RWMB_VER );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Show begin HTML markup for fields.
|
21 |
-
*
|
22 |
-
* @param mixed $meta Meta value.
|
23 |
-
* @param array $field Field parameters.
|
24 |
-
*
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function begin_html( $meta, $field ) {
|
28 |
-
$attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
|
29 |
-
return sprintf( '<h4%s>%s</h4>', $attributes, $field['name'] );
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Show end HTML markup for fields.
|
34 |
-
*
|
35 |
-
* @param mixed $meta Meta value.
|
36 |
-
* @param array $field Field parameters.
|
37 |
-
*
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
public static function end_html( $meta, $field ) {
|
41 |
-
return self::input_description( $field );
|
42 |
-
}
|
43 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The heading field which displays a simple heading text.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Heading field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Heading_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-heading', RWMB_CSS_URL . 'heading.css', array(), RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields.
|
21 |
+
*
|
22 |
+
* @param mixed $meta Meta value.
|
23 |
+
* @param array $field Field parameters.
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function begin_html( $meta, $field ) {
|
28 |
+
$attributes = empty( $field['id'] ) ? '' : " id='{$field['id']}'";
|
29 |
+
return sprintf( '<h4%s>%s</h4>', $attributes, $field['name'] );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Show end HTML markup for fields.
|
34 |
+
*
|
35 |
+
* @param mixed $meta Meta value.
|
36 |
+
* @param array $field Field parameters.
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public static function end_html( $meta, $field ) {
|
41 |
+
return self::input_description( $field );
|
42 |
+
}
|
43 |
+
}
|
inc/libraries/meta-box/inc/fields/image-advanced.php
CHANGED
@@ -1,93 +1,93 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The advanced image upload field which uses WordPress media popup to upload and select images.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Image advanced field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Image_Advanced_Field extends RWMB_Media_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_enqueue_scripts();
|
17 |
-
RWMB_Image_Field::admin_enqueue_scripts();
|
18 |
-
wp_enqueue_script( 'rwmb-image-advanced', RWMB_JS_URL . 'image-advanced.js', array( 'rwmb-media' ), RWMB_VER, true );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Normalize parameters for field.
|
23 |
-
*
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
*
|
26 |
-
* @return array
|
27 |
-
*/
|
28 |
-
public static function normalize( $field ) {
|
29 |
-
$field['mime_type'] = 'image';
|
30 |
-
$field = wp_parse_args(
|
31 |
-
$field,
|
32 |
-
array(
|
33 |
-
'image_size' => 'thumbnail',
|
34 |
-
)
|
35 |
-
);
|
36 |
-
|
37 |
-
$field = parent::normalize( $field );
|
38 |
-
|
39 |
-
$field['js_options'] = wp_parse_args(
|
40 |
-
$field['js_options'],
|
41 |
-
array(
|
42 |
-
'imageSize' => $field['image_size'],
|
43 |
-
)
|
44 |
-
);
|
45 |
-
|
46 |
-
return $field;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Get the field value.
|
51 |
-
*
|
52 |
-
* @param array $field Field parameters.
|
53 |
-
* @param array $args Additional arguments.
|
54 |
-
* @param null $post_id Post ID.
|
55 |
-
* @return mixed
|
56 |
-
*/
|
57 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
58 |
-
return RWMB_Image_Field::get_value( $field, $args, $post_id );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Get uploaded file information.
|
63 |
-
*
|
64 |
-
* @param int $file Attachment image ID (post ID). Required.
|
65 |
-
* @param array $args Array of arguments (for size).
|
66 |
-
* @return array|bool False if file not found. Array of image info on success.
|
67 |
-
*/
|
68 |
-
public static function file_info( $file, $args = array() ) {
|
69 |
-
return RWMB_Image_Field::file_info( $file, $args );
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
74 |
-
*
|
75 |
-
* @param array $field Field parameters.
|
76 |
-
* @param string $value The value.
|
77 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
78 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
79 |
-
*
|
80 |
-
* @return string
|
81 |
-
*/
|
82 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
83 |
-
return RWMB_Image_Field::format_single_value( $field, $value, $args, $post_id );
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Template for media item.
|
88 |
-
*/
|
89 |
-
public static function print_templates() {
|
90 |
-
parent::print_templates();
|
91 |
-
require_once RWMB_INC_DIR . 'templates/image-advanced.php';
|
92 |
-
}
|
93 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The advanced image upload field which uses WordPress media popup to upload and select images.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Image advanced field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Image_Advanced_Field extends RWMB_Media_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
RWMB_Image_Field::admin_enqueue_scripts();
|
18 |
+
wp_enqueue_script( 'rwmb-image-advanced', RWMB_JS_URL . 'image-advanced.js', array( 'rwmb-media' ), RWMB_VER, true );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Normalize parameters for field.
|
23 |
+
*
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
public static function normalize( $field ) {
|
29 |
+
$field['mime_type'] = 'image';
|
30 |
+
$field = wp_parse_args(
|
31 |
+
$field,
|
32 |
+
array(
|
33 |
+
'image_size' => 'thumbnail',
|
34 |
+
)
|
35 |
+
);
|
36 |
+
|
37 |
+
$field = parent::normalize( $field );
|
38 |
+
|
39 |
+
$field['js_options'] = wp_parse_args(
|
40 |
+
$field['js_options'],
|
41 |
+
array(
|
42 |
+
'imageSize' => $field['image_size'],
|
43 |
+
)
|
44 |
+
);
|
45 |
+
|
46 |
+
return $field;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get the field value.
|
51 |
+
*
|
52 |
+
* @param array $field Field parameters.
|
53 |
+
* @param array $args Additional arguments.
|
54 |
+
* @param null $post_id Post ID.
|
55 |
+
* @return mixed
|
56 |
+
*/
|
57 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
58 |
+
return RWMB_Image_Field::get_value( $field, $args, $post_id );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get uploaded file information.
|
63 |
+
*
|
64 |
+
* @param int $file Attachment image ID (post ID). Required.
|
65 |
+
* @param array $args Array of arguments (for size).
|
66 |
+
* @return array|bool False if file not found. Array of image info on success.
|
67 |
+
*/
|
68 |
+
public static function file_info( $file, $args = array() ) {
|
69 |
+
return RWMB_Image_Field::file_info( $file, $args );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
74 |
+
*
|
75 |
+
* @param array $field Field parameters.
|
76 |
+
* @param string $value The value.
|
77 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
78 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
79 |
+
*
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
83 |
+
return RWMB_Image_Field::format_single_value( $field, $value, $args, $post_id );
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Template for media item.
|
88 |
+
*/
|
89 |
+
public static function print_templates() {
|
90 |
+
parent::print_templates();
|
91 |
+
require_once RWMB_INC_DIR . 'templates/image-advanced.php';
|
92 |
+
}
|
93 |
+
}
|
inc/libraries/meta-box/inc/fields/image-select.php
CHANGED
@@ -1,72 +1,72 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The image select field which behaves similar to the radio field but uses images as options.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The image select field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Image_Select_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-image-select', RWMB_CSS_URL . 'image-select.css', array(), RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-image-select', RWMB_JS_URL . 'image-select.js', array( 'jquery' ), RWMB_VER, true );
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get field HTML.
|
22 |
-
*
|
23 |
-
* @param mixed $meta Meta value.
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$html = array();
|
29 |
-
$tpl = '<label class="rwmb-image-select"><img src="%s"><input type="%s" class="rwmb-image_select" name="%s" value="%s"%s></label>';
|
30 |
-
|
31 |
-
$meta = (array) $meta;
|
32 |
-
foreach ( $field['options'] as $value => $image ) {
|
33 |
-
$html[] = sprintf(
|
34 |
-
$tpl,
|
35 |
-
$image,
|
36 |
-
$field['multiple'] ? 'checkbox' : 'radio',
|
37 |
-
$field['field_name'],
|
38 |
-
$value,
|
39 |
-
checked( in_array( $value, $meta ), true, false )
|
40 |
-
);
|
41 |
-
}
|
42 |
-
|
43 |
-
return implode( ' ', $html );
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Normalize parameters for field.
|
48 |
-
*
|
49 |
-
* @param array $field Field parameters.
|
50 |
-
* @return array
|
51 |
-
*/
|
52 |
-
public static function normalize( $field ) {
|
53 |
-
$field = parent::normalize( $field );
|
54 |
-
$field['field_name'] .= $field['multiple'] ? '[]' : '';
|
55 |
-
|
56 |
-
return $field;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
61 |
-
*
|
62 |
-
* @param array $field Field parameters.
|
63 |
-
* @param string $value The value.
|
64 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
65 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
66 |
-
*
|
67 |
-
* @return string
|
68 |
-
*/
|
69 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
70 |
-
return sprintf( '<img src="%s">', esc_url( $field['options'][ $value ] ) );
|
71 |
-
}
|
72 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image select field which behaves similar to the radio field but uses images as options.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The image select field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Image_Select_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-image-select', RWMB_CSS_URL . 'image-select.css', array(), RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-image-select', RWMB_JS_URL . 'image-select.js', array( 'jquery' ), RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML.
|
22 |
+
*
|
23 |
+
* @param mixed $meta Meta value.
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$html = array();
|
29 |
+
$tpl = '<label class="rwmb-image-select"><img src="%s"><input type="%s" class="rwmb-image_select" name="%s" value="%s"%s></label>';
|
30 |
+
|
31 |
+
$meta = (array) $meta;
|
32 |
+
foreach ( $field['options'] as $value => $image ) {
|
33 |
+
$html[] = sprintf(
|
34 |
+
$tpl,
|
35 |
+
$image,
|
36 |
+
$field['multiple'] ? 'checkbox' : 'radio',
|
37 |
+
$field['field_name'],
|
38 |
+
$value,
|
39 |
+
checked( in_array( $value, $meta ), true, false )
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
return implode( ' ', $html );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Normalize parameters for field.
|
48 |
+
*
|
49 |
+
* @param array $field Field parameters.
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public static function normalize( $field ) {
|
53 |
+
$field = parent::normalize( $field );
|
54 |
+
$field['field_name'] .= $field['multiple'] ? '[]' : '';
|
55 |
+
|
56 |
+
return $field;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
61 |
+
*
|
62 |
+
* @param array $field Field parameters.
|
63 |
+
* @param string $value The value.
|
64 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
65 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
66 |
+
*
|
67 |
+
* @return string
|
68 |
+
*/
|
69 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
70 |
+
return sprintf( '<img src="%s">', esc_url( $field['options'][ $value ] ) );
|
71 |
+
}
|
72 |
+
}
|
inc/libraries/meta-box/inc/fields/image-upload.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The image upload field which allows users to drag and drop images.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* File advanced field class which users WordPress media popup to upload and select files.
|
10 |
-
*/
|
11 |
-
class RWMB_Image_Upload_Field extends RWMB_Image_Advanced_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_enqueue_scripts();
|
17 |
-
RWMB_File_Upload_Field::admin_enqueue_scripts();
|
18 |
-
wp_enqueue_script( 'rwmb-image-upload', RWMB_JS_URL . 'image-upload.js', array( 'rwmb-file-upload', 'rwmb-image-advanced' ), RWMB_VER, true );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Normalize parameters for field.
|
23 |
-
*
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
*
|
26 |
-
* @return array
|
27 |
-
*/
|
28 |
-
public static function normalize( $field ) {
|
29 |
-
$field = parent::normalize( $field );
|
30 |
-
return RWMB_File_Upload_Field::normalize( $field );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Template for media item.
|
35 |
-
*/
|
36 |
-
public static function print_templates() {
|
37 |
-
parent::print_templates();
|
38 |
-
RWMB_File_Upload_Field::print_templates();
|
39 |
-
}
|
40 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image upload field which allows users to drag and drop images.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* File advanced field class which users WordPress media popup to upload and select files.
|
10 |
+
*/
|
11 |
+
class RWMB_Image_Upload_Field extends RWMB_Image_Advanced_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
RWMB_File_Upload_Field::admin_enqueue_scripts();
|
18 |
+
wp_enqueue_script( 'rwmb-image-upload', RWMB_JS_URL . 'image-upload.js', array( 'rwmb-file-upload', 'rwmb-image-advanced' ), RWMB_VER, true );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Normalize parameters for field.
|
23 |
+
*
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
public static function normalize( $field ) {
|
29 |
+
$field = parent::normalize( $field );
|
30 |
+
return RWMB_File_Upload_Field::normalize( $field );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Template for media item.
|
35 |
+
*/
|
36 |
+
public static function print_templates() {
|
37 |
+
parent::print_templates();
|
38 |
+
RWMB_File_Upload_Field::print_templates();
|
39 |
+
}
|
40 |
+
}
|
inc/libraries/meta-box/inc/fields/image.php
CHANGED
@@ -1,144 +1,144 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The image field which uploads images via HTML <input type="file">.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Image field class which uses <input type="file"> to upload.
|
10 |
-
*/
|
11 |
-
class RWMB_Image_Field extends RWMB_File_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_enqueue_scripts();
|
17 |
-
wp_enqueue_media();
|
18 |
-
wp_enqueue_style( 'rwmb-image', RWMB_CSS_URL . 'image.css', array(), RWMB_VER );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Get HTML for uploaded file.
|
23 |
-
*
|
24 |
-
* @param int $file Attachment (file) ID.
|
25 |
-
* @param int $index File index.
|
26 |
-
* @param array $field Field data.
|
27 |
-
*
|
28 |
-
* @return string
|
29 |
-
*/
|
30 |
-
protected static function file_html( $file, $index, $field ) {
|
31 |
-
$attributes = self::get_attributes( $field, $file );
|
32 |
-
|
33 |
-
return sprintf(
|
34 |
-
'<li class="rwmb-image-item attachment %s">
|
35 |
-
<input type="hidden" name="%s[%s]" value="%s">
|
36 |
-
<div class="attachment-preview">
|
37 |
-
<div class="thumbnail">
|
38 |
-
<div class="centered">
|
39 |
-
%s
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
<div class="rwmb-image-overlay"></div>
|
44 |
-
<div class="rwmb-image-actions">
|
45 |
-
<a href="%s" class="rwmb-image-edit" target="_blank"><span class="dashicons dashicons-edit"></span></a>
|
46 |
-
<a href="#" class="rwmb-image-delete rwmb-file-delete" data-attachment_id="%s"><span class="dashicons dashicons-no-alt"></span></a>
|
47 |
-
</div>
|
48 |
-
</li>',
|
49 |
-
esc_attr( $field['image_size'] ),
|
50 |
-
$attributes['name'],
|
51 |
-
$index,
|
52 |
-
$file,
|
53 |
-
wp_get_attachment_image( $file, $field['image_size'] ),
|
54 |
-
get_edit_post_link( $file ),
|
55 |
-
$file
|
56 |
-
);
|
57 |
-
}
|
58 |
-
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Normalize field settings.
|
62 |
-
*
|
63 |
-
* @param array $field Field settings.
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
*/
|
67 |
-
public static function normalize( $field ) {
|
68 |
-
$field = parent::normalize( $field );
|
69 |
-
$field = wp_parse_args(
|
70 |
-
$field,
|
71 |
-
array(
|
72 |
-
'image_size' => 'thumbnail',
|
73 |
-
)
|
74 |
-
);
|
75 |
-
|
76 |
-
return $field;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
81 |
-
*
|
82 |
-
* @param array $field Field parameters.
|
83 |
-
* @param array $value The value.
|
84 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
85 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
86 |
-
*
|
87 |
-
* @return string
|
88 |
-
*/
|
89 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
90 |
-
$output = sprintf( '<img src="%s" alt="%s">', esc_url( $value['url'] ), esc_attr( $value['alt'] ) );
|
91 |
-
|
92 |
-
// Link thumbnail to full size image?
|
93 |
-
if ( ! empty( $args['link'] ) ) {
|
94 |
-
$output = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( $value['full_url'] ), esc_attr( $value['title'] ), $output );
|
95 |
-
}
|
96 |
-
return $output;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Get uploaded file information.
|
101 |
-
*
|
102 |
-
* @param int $file Attachment image ID (post ID). Required.
|
103 |
-
* @param array $args Array of arguments (for size).
|
104 |
-
*
|
105 |
-
* @return array|bool False if file not found. Array of image info on success.
|
106 |
-
*/
|
107 |
-
public static function file_info( $file, $args = array() ) {
|
108 |
-
$path = get_attached_file( $file );
|
109 |
-
if ( ! $path ) {
|
110 |
-
return false;
|
111 |
-
}
|
112 |
-
|
113 |
-
$args = wp_parse_args(
|
114 |
-
$args,
|
115 |
-
array(
|
116 |
-
'size' => 'thumbnail',
|
117 |
-
)
|
118 |
-
);
|
119 |
-
$image = wp_get_attachment_image_src( $file, $args['size'] );
|
120 |
-
$attachment = get_post( $file );
|
121 |
-
$info = array(
|
122 |
-
'ID' => $file,
|
123 |
-
'name' => basename( $path ),
|
124 |
-
'path' => $path,
|
125 |
-
'url' => $image[0],
|
126 |
-
'full_url' => wp_get_attachment_url( $file ),
|
127 |
-
'title' => $attachment->post_title,
|
128 |
-
'caption' => $attachment->post_excerpt,
|
129 |
-
'description' => $attachment->post_content,
|
130 |
-
'alt' => get_post_meta( $file, '_wp_attachment_image_alt', true ),
|
131 |
-
);
|
132 |
-
if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
|
133 |
-
$info['srcset'] = wp_get_attachment_image_srcset( $file, $args['size'] );
|
134 |
-
}
|
135 |
-
|
136 |
-
$info = wp_parse_args( $info, wp_get_attachment_metadata( $file ) );
|
137 |
-
|
138 |
-
// Do not overwrite width and height by returned value of image meta.
|
139 |
-
$info['width'] = $image[1];
|
140 |
-
$info['height'] = $image[2];
|
141 |
-
|
142 |
-
return $info;
|
143 |
-
}
|
144 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The image field which uploads images via HTML <input type="file">.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Image field class which uses <input type="file"> to upload.
|
10 |
+
*/
|
11 |
+
class RWMB_Image_Field extends RWMB_File_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
wp_enqueue_media();
|
18 |
+
wp_enqueue_style( 'rwmb-image', RWMB_CSS_URL . 'image.css', array(), RWMB_VER );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Get HTML for uploaded file.
|
23 |
+
*
|
24 |
+
* @param int $file Attachment (file) ID.
|
25 |
+
* @param int $index File index.
|
26 |
+
* @param array $field Field data.
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
protected static function file_html( $file, $index, $field ) {
|
31 |
+
$attributes = self::get_attributes( $field, $file );
|
32 |
+
|
33 |
+
return sprintf(
|
34 |
+
'<li class="rwmb-image-item attachment %s">
|
35 |
+
<input type="hidden" name="%s[%s]" value="%s">
|
36 |
+
<div class="attachment-preview">
|
37 |
+
<div class="thumbnail">
|
38 |
+
<div class="centered">
|
39 |
+
%s
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<div class="rwmb-image-overlay"></div>
|
44 |
+
<div class="rwmb-image-actions">
|
45 |
+
<a href="%s" class="rwmb-image-edit" target="_blank"><span class="dashicons dashicons-edit"></span></a>
|
46 |
+
<a href="#" class="rwmb-image-delete rwmb-file-delete" data-attachment_id="%s"><span class="dashicons dashicons-no-alt"></span></a>
|
47 |
+
</div>
|
48 |
+
</li>',
|
49 |
+
esc_attr( $field['image_size'] ),
|
50 |
+
$attributes['name'],
|
51 |
+
$index,
|
52 |
+
$file,
|
53 |
+
wp_get_attachment_image( $file, $field['image_size'] ),
|
54 |
+
get_edit_post_link( $file ),
|
55 |
+
$file
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Normalize field settings.
|
62 |
+
*
|
63 |
+
* @param array $field Field settings.
|
64 |
+
*
|
65 |
+
* @return array
|
66 |
+
*/
|
67 |
+
public static function normalize( $field ) {
|
68 |
+
$field = parent::normalize( $field );
|
69 |
+
$field = wp_parse_args(
|
70 |
+
$field,
|
71 |
+
array(
|
72 |
+
'image_size' => 'thumbnail',
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
return $field;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
81 |
+
*
|
82 |
+
* @param array $field Field parameters.
|
83 |
+
* @param array $value The value.
|
84 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
85 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
86 |
+
*
|
87 |
+
* @return string
|
88 |
+
*/
|
89 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
90 |
+
$output = sprintf( '<img src="%s" alt="%s">', esc_url( $value['url'] ), esc_attr( $value['alt'] ) );
|
91 |
+
|
92 |
+
// Link thumbnail to full size image?
|
93 |
+
if ( ! empty( $args['link'] ) ) {
|
94 |
+
$output = sprintf( '<a href="%s" title="%s">%s</a>', esc_url( $value['full_url'] ), esc_attr( $value['title'] ), $output );
|
95 |
+
}
|
96 |
+
return $output;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Get uploaded file information.
|
101 |
+
*
|
102 |
+
* @param int $file Attachment image ID (post ID). Required.
|
103 |
+
* @param array $args Array of arguments (for size).
|
104 |
+
*
|
105 |
+
* @return array|bool False if file not found. Array of image info on success.
|
106 |
+
*/
|
107 |
+
public static function file_info( $file, $args = array() ) {
|
108 |
+
$path = get_attached_file( $file );
|
109 |
+
if ( ! $path ) {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
$args = wp_parse_args(
|
114 |
+
$args,
|
115 |
+
array(
|
116 |
+
'size' => 'thumbnail',
|
117 |
+
)
|
118 |
+
);
|
119 |
+
$image = wp_get_attachment_image_src( $file, $args['size'] );
|
120 |
+
$attachment = get_post( $file );
|
121 |
+
$info = array(
|
122 |
+
'ID' => $file,
|
123 |
+
'name' => basename( $path ),
|
124 |
+
'path' => $path,
|
125 |
+
'url' => $image[0],
|
126 |
+
'full_url' => wp_get_attachment_url( $file ),
|
127 |
+
'title' => $attachment->post_title,
|
128 |
+
'caption' => $attachment->post_excerpt,
|
129 |
+
'description' => $attachment->post_content,
|
130 |
+
'alt' => get_post_meta( $file, '_wp_attachment_image_alt', true ),
|
131 |
+
);
|
132 |
+
if ( function_exists( 'wp_get_attachment_image_srcset' ) ) {
|
133 |
+
$info['srcset'] = wp_get_attachment_image_srcset( $file, $args['size'] );
|
134 |
+
}
|
135 |
+
|
136 |
+
$info = wp_parse_args( $info, wp_get_attachment_metadata( $file ) );
|
137 |
+
|
138 |
+
// Do not overwrite width and height by returned value of image meta.
|
139 |
+
$info['width'] = $image[1];
|
140 |
+
$info['height'] = $image[2];
|
141 |
+
|
142 |
+
return $info;
|
143 |
+
}
|
144 |
+
}
|
inc/libraries/meta-box/inc/fields/input-list.php
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The input list field which displays choices in a list of inputs.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Input list field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Input_List_Field extends RWMB_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-input-list', RWMB_CSS_URL . 'input-list.css', array(), RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-input-list', RWMB_JS_URL . 'input-list.js', array(), RWMB_VER, true );
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get field HTML.
|
22 |
-
*
|
23 |
-
* @param mixed $meta Meta value.
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$options = self::transform_options( $field['options'] );
|
29 |
-
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
-
$output = self::get_select_all_html( $field );
|
31 |
-
$output .= sprintf(
|
32 |
-
'<ul class="rwmb-input-list%s%s">',
|
33 |
-
$field['collapse'] ? ' rwmb-collapse' : '',
|
34 |
-
$field['inline'] ? ' rwmb-inline' : ''
|
35 |
-
);
|
36 |
-
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
37 |
-
$output .= '</ul>';
|
38 |
-
|
39 |
-
return $output;
|
40 |
-
}
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Normalize parameters for field.
|
44 |
-
*
|
45 |
-
* @param array $field Field parameters.
|
46 |
-
* @return array
|
47 |
-
*/
|
48 |
-
public static function normalize( $field ) {
|
49 |
-
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
50 |
-
$field = RWMB_Input_Field::normalize( $field );
|
51 |
-
$field = parent::normalize( $field );
|
52 |
-
$field = wp_parse_args(
|
53 |
-
$field,
|
54 |
-
array(
|
55 |
-
'collapse' => true,
|
56 |
-
'inline' => null,
|
57 |
-
'select_all_none' => false,
|
58 |
-
)
|
59 |
-
);
|
60 |
-
|
61 |
-
$field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
|
62 |
-
$field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
|
63 |
-
|
64 |
-
return $field;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get the attributes for a field.
|
69 |
-
*
|
70 |
-
* @param array $field Field parameters.
|
71 |
-
* @param mixed $value Meta value.
|
72 |
-
*
|
73 |
-
* @return array
|
74 |
-
*/
|
75 |
-
public static function get_attributes( $field, $value = null ) {
|
76 |
-
$attributes = RWMB_Input_Field::get_attributes( $field, $value );
|
77 |
-
$attributes['id'] = false;
|
78 |
-
$attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
|
79 |
-
$attributes['value'] = $value;
|
80 |
-
|
81 |
-
return $attributes;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Get html for select all|none for multiple checkbox.
|
86 |
-
*
|
87 |
-
* @param array $field Field parameters.
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public static function get_select_all_html( $field ) {
|
91 |
-
if ( $field['multiple'] && $field['select_all_none'] ) {
|
92 |
-
return sprintf( '<p><button class="rwmb-input-list-select-all-none button" data-name="%s">%s</button></p>', $field['id'], __( 'Select All / None', 'meta-box' ) );
|
93 |
-
}
|
94 |
-
return '';
|
95 |
-
}
|
96 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The input list field which displays choices in a list of inputs.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Input list field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Input_List_Field extends RWMB_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-input-list', RWMB_CSS_URL . 'input-list.css', array(), RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-input-list', RWMB_JS_URL . 'input-list.js', array(), RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML.
|
22 |
+
*
|
23 |
+
* @param mixed $meta Meta value.
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$options = self::transform_options( $field['options'] );
|
29 |
+
$walker = new RWMB_Walker_Input_List( $field, $meta );
|
30 |
+
$output = self::get_select_all_html( $field );
|
31 |
+
$output .= sprintf(
|
32 |
+
'<ul class="rwmb-input-list%s%s">',
|
33 |
+
$field['collapse'] ? ' rwmb-collapse' : '',
|
34 |
+
$field['inline'] ? ' rwmb-inline' : ''
|
35 |
+
);
|
36 |
+
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
37 |
+
$output .= '</ul>';
|
38 |
+
|
39 |
+
return $output;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Normalize parameters for field.
|
44 |
+
*
|
45 |
+
* @param array $field Field parameters.
|
46 |
+
* @return array
|
47 |
+
*/
|
48 |
+
public static function normalize( $field ) {
|
49 |
+
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
50 |
+
$field = RWMB_Input_Field::normalize( $field );
|
51 |
+
$field = parent::normalize( $field );
|
52 |
+
$field = wp_parse_args(
|
53 |
+
$field,
|
54 |
+
array(
|
55 |
+
'collapse' => true,
|
56 |
+
'inline' => null,
|
57 |
+
'select_all_none' => false,
|
58 |
+
)
|
59 |
+
);
|
60 |
+
|
61 |
+
$field['flatten'] = $field['multiple'] ? $field['flatten'] : true;
|
62 |
+
$field['inline'] = ! $field['multiple'] && ! isset( $field['inline'] ) ? true : $field['inline'];
|
63 |
+
|
64 |
+
return $field;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get the attributes for a field.
|
69 |
+
*
|
70 |
+
* @param array $field Field parameters.
|
71 |
+
* @param mixed $value Meta value.
|
72 |
+
*
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
public static function get_attributes( $field, $value = null ) {
|
76 |
+
$attributes = RWMB_Input_Field::get_attributes( $field, $value );
|
77 |
+
$attributes['id'] = false;
|
78 |
+
$attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio';
|
79 |
+
$attributes['value'] = $value;
|
80 |
+
|
81 |
+
return $attributes;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get html for select all|none for multiple checkbox.
|
86 |
+
*
|
87 |
+
* @param array $field Field parameters.
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public static function get_select_all_html( $field ) {
|
91 |
+
if ( $field['multiple'] && $field['select_all_none'] ) {
|
92 |
+
return sprintf( '<p><button class="rwmb-input-list-select-all-none button" data-name="%s">%s</button></p>', $field['id'], __( 'Select All / None', 'meta-box' ) );
|
93 |
+
}
|
94 |
+
return '';
|
95 |
+
}
|
96 |
+
}
|
inc/libraries/meta-box/inc/fields/input.php
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The abstract input field which is used for all <input> fields.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Abstract input field class.
|
10 |
-
*/
|
11 |
-
abstract class RWMB_Input_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
$attributes = self::call( 'get_attributes', $field, $meta );
|
21 |
-
return sprintf( '<input %s>%s', self::render_attributes( $attributes ), self::datalist( $field ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* Normalize parameters for field.
|
26 |
-
*
|
27 |
-
* @param array $field Field parameters.
|
28 |
-
* @return array
|
29 |
-
*/
|
30 |
-
public static function normalize( $field ) {
|
31 |
-
$field = parent::normalize( $field );
|
32 |
-
$field = wp_parse_args(
|
33 |
-
$field,
|
34 |
-
array(
|
35 |
-
'autocomplete' => false,
|
36 |
-
'size' => 30,
|
37 |
-
'datalist' => false,
|
38 |
-
'readonly' => false,
|
39 |
-
)
|
40 |
-
);
|
41 |
-
if ( $field['datalist'] ) {
|
42 |
-
$field['datalist'] = wp_parse_args(
|
43 |
-
$field['datalist'],
|
44 |
-
array(
|
45 |
-
'id' => $field['id'] . '_list',
|
46 |
-
'options' => array(),
|
47 |
-
)
|
48 |
-
);
|
49 |
-
}
|
50 |
-
return $field;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get the attributes for a field.
|
55 |
-
*
|
56 |
-
* @param array $field Field parameters.
|
57 |
-
* @param mixed $value Meta value.
|
58 |
-
* @return array
|
59 |
-
*/
|
60 |
-
public static function get_attributes( $field, $value = null ) {
|
61 |
-
$attributes = parent::get_attributes( $field, $value );
|
62 |
-
$attributes = wp_parse_args(
|
63 |
-
$attributes,
|
64 |
-
array(
|
65 |
-
'autocomplete' => $field['autocomplete'],
|
66 |
-
'list' => $field['datalist'] ? $field['datalist']['id'] : false,
|
67 |
-
'readonly' => $field['readonly'],
|
68 |
-
'value' => $value,
|
69 |
-
'placeholder' => $field['placeholder'],
|
70 |
-
'type' => $field['type'],
|
71 |
-
'size' => $field['size'],
|
72 |
-
)
|
73 |
-
);
|
74 |
-
|
75 |
-
return $attributes;
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Create datalist, if any.
|
80 |
-
*
|
81 |
-
* @param array $field Field parameters.
|
82 |
-
* @return string
|
83 |
-
*/
|
84 |
-
protected static function datalist( $field ) {
|
85 |
-
if ( empty( $field['datalist'] ) ) {
|
86 |
-
return '';
|
87 |
-
}
|
88 |
-
|
89 |
-
$datalist = $field['datalist'];
|
90 |
-
$html = sprintf( '<datalist id="%s">', $datalist['id'] );
|
91 |
-
foreach ( $datalist['options'] as $option ) {
|
92 |
-
$html .= sprintf( '<option value="%s"></option>', $option );
|
93 |
-
}
|
94 |
-
$html .= '</datalist>';
|
95 |
-
return $html;
|
96 |
-
}
|
97 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The abstract input field which is used for all <input> fields.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Abstract input field class.
|
10 |
+
*/
|
11 |
+
abstract class RWMB_Input_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
$attributes = self::call( 'get_attributes', $field, $meta );
|
21 |
+
return sprintf( '<input %s>%s', self::render_attributes( $attributes ), self::datalist( $field ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Normalize parameters for field.
|
26 |
+
*
|
27 |
+
* @param array $field Field parameters.
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public static function normalize( $field ) {
|
31 |
+
$field = parent::normalize( $field );
|
32 |
+
$field = wp_parse_args(
|
33 |
+
$field,
|
34 |
+
array(
|
35 |
+
'autocomplete' => false,
|
36 |
+
'size' => 30,
|
37 |
+
'datalist' => false,
|
38 |
+
'readonly' => false,
|
39 |
+
)
|
40 |
+
);
|
41 |
+
if ( $field['datalist'] ) {
|
42 |
+
$field['datalist'] = wp_parse_args(
|
43 |
+
$field['datalist'],
|
44 |
+
array(
|
45 |
+
'id' => $field['id'] . '_list',
|
46 |
+
'options' => array(),
|
47 |
+
)
|
48 |
+
);
|
49 |
+
}
|
50 |
+
return $field;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get the attributes for a field.
|
55 |
+
*
|
56 |
+
* @param array $field Field parameters.
|
57 |
+
* @param mixed $value Meta value.
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
public static function get_attributes( $field, $value = null ) {
|
61 |
+
$attributes = parent::get_attributes( $field, $value );
|
62 |
+
$attributes = wp_parse_args(
|
63 |
+
$attributes,
|
64 |
+
array(
|
65 |
+
'autocomplete' => $field['autocomplete'],
|
66 |
+
'list' => $field['datalist'] ? $field['datalist']['id'] : false,
|
67 |
+
'readonly' => $field['readonly'],
|
68 |
+
'value' => $value,
|
69 |
+
'placeholder' => $field['placeholder'],
|
70 |
+
'type' => $field['type'],
|
71 |
+
'size' => $field['size'],
|
72 |
+
)
|
73 |
+
);
|
74 |
+
|
75 |
+
return $attributes;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Create datalist, if any.
|
80 |
+
*
|
81 |
+
* @param array $field Field parameters.
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
protected static function datalist( $field ) {
|
85 |
+
if ( empty( $field['datalist'] ) ) {
|
86 |
+
return '';
|
87 |
+
}
|
88 |
+
|
89 |
+
$datalist = $field['datalist'];
|
90 |
+
$html = sprintf( '<datalist id="%s">', $datalist['id'] );
|
91 |
+
foreach ( $datalist['options'] as $option ) {
|
92 |
+
$html .= sprintf( '<option value="%s"></option>', $option );
|
93 |
+
}
|
94 |
+
$html .= '</datalist>';
|
95 |
+
return $html;
|
96 |
+
}
|
97 |
+
}
|
inc/libraries/meta-box/inc/fields/key-value.php
CHANGED
@@ -1,154 +1,154 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The key-value field which allows users to add pairs of keys and values.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Key-value field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Key_Value_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
*
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
public static function html( $meta, $field ) {
|
21 |
-
// Key.
|
22 |
-
$key = isset( $meta[0] ) ? $meta[0] : '';
|
23 |
-
$attributes = self::get_attributes( $field, $key );
|
24 |
-
$attributes['placeholder'] = $field['placeholder']['key'];
|
25 |
-
$html = sprintf( '<input %s>', self::render_attributes( $attributes ) );
|
26 |
-
|
27 |
-
// Value.
|
28 |
-
$val = isset( $meta[1] ) ? $meta[1] : '';
|
29 |
-
$attributes = self::get_attributes( $field, $val );
|
30 |
-
$attributes['placeholder'] = $field['placeholder']['value'];
|
31 |
-
$html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
|
32 |
-
|
33 |
-
return $html;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Show begin HTML markup for fields.
|
38 |
-
*
|
39 |
-
* @param mixed $meta Meta value.
|
40 |
-
* @param array $field Field parameters.
|
41 |
-
*
|
42 |
-
* @return string
|
43 |
-
*/
|
44 |
-
public static function begin_html( $meta, $field ) {
|
45 |
-
$desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
|
46 |
-
|
47 |
-
if ( empty( $field['name'] ) ) {
|
48 |
-
return '<div class="rwmb-input">' . $desc;
|
49 |
-
}
|
50 |
-
|
51 |
-
return sprintf(
|
52 |
-
'<div class="rwmb-label">
|
53 |
-
<label for="%s">%s</label>
|
54 |
-
</div>
|
55 |
-
<div class="rwmb-input">
|
56 |
-
%s',
|
57 |
-
$field['id'],
|
58 |
-
$field['name'],
|
59 |
-
$desc
|
60 |
-
);
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Do not show field description.
|
65 |
-
*
|
66 |
-
* @param array $field Field parameters.
|
67 |
-
*
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
public static function input_description( $field ) {
|
71 |
-
return '';
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Do not show field description.
|
76 |
-
*
|
77 |
-
* @param array $field Field parameters.
|
78 |
-
*
|
79 |
-
* @return string
|
80 |
-
*/
|
81 |
-
public static function label_description( $field ) {
|
82 |
-
return '';
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Escape meta for field output.
|
87 |
-
*
|
88 |
-
* @param mixed $meta Meta value.
|
89 |
-
*
|
90 |
-
* @return mixed
|
91 |
-
*/
|
92 |
-
public static function esc_meta( $meta ) {
|
93 |
-
foreach ( (array) $meta as $k => $pairs ) {
|
94 |
-
$meta[ $k ] = array_map( 'esc_attr', (array) $pairs );
|
95 |
-
}
|
96 |
-
return $meta;
|
97 |
-
}
|
98 |
-
|
99 |
-
/**
|
100 |
-
* Sanitize field value.
|
101 |
-
*
|
102 |
-
* @param mixed $new The submitted meta value.
|
103 |
-
* @param mixed $old The existing meta value.
|
104 |
-
* @param int $post_id The post ID.
|
105 |
-
* @param array $field The field parameters.
|
106 |
-
*
|
107 |
-
* @return array
|
108 |
-
*/
|
109 |
-
public static function value( $new, $old, $post_id, $field ) {
|
110 |
-
foreach ( $new as &$arr ) {
|
111 |
-
if ( empty( $arr[0] ) && empty( $arr[1] ) ) {
|
112 |
-
$arr = false;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
$new = array_filter( $new );
|
116 |
-
return $new;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Normalize parameters for field.
|
121 |
-
*
|
122 |
-
* @param array $field Field parameters.
|
123 |
-
*
|
124 |
-
* @return array
|
125 |
-
*/
|
126 |
-
public static function normalize( $field ) {
|
127 |
-
$field = parent::normalize( $field );
|
128 |
-
$field['clone'] = true;
|
129 |
-
$field['multiple'] = true;
|
130 |
-
$field['attributes']['type'] = 'text';
|
131 |
-
$field['placeholder'] = wp_parse_args(
|
132 |
-
(array) $field['placeholder'],
|
133 |
-
array(
|
134 |
-
'key' => __( 'Key', 'meta-box' ),
|
135 |
-
'value' => __( 'Value', 'meta-box' ),
|
136 |
-
)
|
137 |
-
);
|
138 |
-
return $field;
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Format value for the helper functions.
|
143 |
-
*
|
144 |
-
* @param array $field Field parameters.
|
145 |
-
* @param string|array $value The field meta value.
|
146 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
147 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
148 |
-
*
|
149 |
-
* @return string
|
150 |
-
*/
|
151 |
-
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
152 |
-
return sprintf( '<label>%s:</label> %s', $value[0], $value[1] );
|
153 |
-
}
|
154 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The key-value field which allows users to add pairs of keys and values.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Key-value field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Key_Value_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public static function html( $meta, $field ) {
|
21 |
+
// Key.
|
22 |
+
$key = isset( $meta[0] ) ? $meta[0] : '';
|
23 |
+
$attributes = self::get_attributes( $field, $key );
|
24 |
+
$attributes['placeholder'] = $field['placeholder']['key'];
|
25 |
+
$html = sprintf( '<input %s>', self::render_attributes( $attributes ) );
|
26 |
+
|
27 |
+
// Value.
|
28 |
+
$val = isset( $meta[1] ) ? $meta[1] : '';
|
29 |
+
$attributes = self::get_attributes( $field, $val );
|
30 |
+
$attributes['placeholder'] = $field['placeholder']['value'];
|
31 |
+
$html .= sprintf( '<input %s>', self::render_attributes( $attributes ) );
|
32 |
+
|
33 |
+
return $html;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Show begin HTML markup for fields.
|
38 |
+
*
|
39 |
+
* @param mixed $meta Meta value.
|
40 |
+
* @param array $field Field parameters.
|
41 |
+
*
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public static function begin_html( $meta, $field ) {
|
45 |
+
$desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
|
46 |
+
|
47 |
+
if ( empty( $field['name'] ) ) {
|
48 |
+
return '<div class="rwmb-input">' . $desc;
|
49 |
+
}
|
50 |
+
|
51 |
+
return sprintf(
|
52 |
+
'<div class="rwmb-label">
|
53 |
+
<label for="%s">%s</label>
|
54 |
+
</div>
|
55 |
+
<div class="rwmb-input">
|
56 |
+
%s',
|
57 |
+
$field['id'],
|
58 |
+
$field['name'],
|
59 |
+
$desc
|
60 |
+
);
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Do not show field description.
|
65 |
+
*
|
66 |
+
* @param array $field Field parameters.
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
public static function input_description( $field ) {
|
71 |
+
return '';
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Do not show field description.
|
76 |
+
*
|
77 |
+
* @param array $field Field parameters.
|
78 |
+
*
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
public static function label_description( $field ) {
|
82 |
+
return '';
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Escape meta for field output.
|
87 |
+
*
|
88 |
+
* @param mixed $meta Meta value.
|
89 |
+
*
|
90 |
+
* @return mixed
|
91 |
+
*/
|
92 |
+
public static function esc_meta( $meta ) {
|
93 |
+
foreach ( (array) $meta as $k => $pairs ) {
|
94 |
+
$meta[ $k ] = array_map( 'esc_attr', (array) $pairs );
|
95 |
+
}
|
96 |
+
return $meta;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Sanitize field value.
|
101 |
+
*
|
102 |
+
* @param mixed $new The submitted meta value.
|
103 |
+
* @param mixed $old The existing meta value.
|
104 |
+
* @param int $post_id The post ID.
|
105 |
+
* @param array $field The field parameters.
|
106 |
+
*
|
107 |
+
* @return array
|
108 |
+
*/
|
109 |
+
public static function value( $new, $old, $post_id, $field ) {
|
110 |
+
foreach ( $new as &$arr ) {
|
111 |
+
if ( empty( $arr[0] ) && empty( $arr[1] ) ) {
|
112 |
+
$arr = false;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
$new = array_filter( $new );
|
116 |
+
return $new;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Normalize parameters for field.
|
121 |
+
*
|
122 |
+
* @param array $field Field parameters.
|
123 |
+
*
|
124 |
+
* @return array
|
125 |
+
*/
|
126 |
+
public static function normalize( $field ) {
|
127 |
+
$field = parent::normalize( $field );
|
128 |
+
$field['clone'] = true;
|
129 |
+
$field['multiple'] = true;
|
130 |
+
$field['attributes']['type'] = 'text';
|
131 |
+
$field['placeholder'] = wp_parse_args(
|
132 |
+
(array) $field['placeholder'],
|
133 |
+
array(
|
134 |
+
'key' => __( 'Key', 'meta-box' ),
|
135 |
+
'value' => __( 'Value', 'meta-box' ),
|
136 |
+
)
|
137 |
+
);
|
138 |
+
return $field;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Format value for the helper functions.
|
143 |
+
*
|
144 |
+
* @param array $field Field parameters.
|
145 |
+
* @param string|array $value The field meta value.
|
146 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
147 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
148 |
+
*
|
149 |
+
* @return string
|
150 |
+
*/
|
151 |
+
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
152 |
+
return sprintf( '<label>%s:</label> %s', $value[0], $value[1] );
|
153 |
+
}
|
154 |
+
}
|
inc/libraries/meta-box/inc/fields/map.php
CHANGED
@@ -1,228 +1,228 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Google Maps field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Map field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Map_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css', array(), RWMB_VER );
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Since June 2016, Google Maps requires a valid API key.
|
20 |
-
*
|
21 |
-
* @link http://googlegeodevelopers.blogspot.com/2016/06/building-for-scale-updates-to-google.html
|
22 |
-
* @link https://developers.google.com/maps/documentation/javascript/get-api-key
|
23 |
-
*/
|
24 |
-
$args = func_get_args();
|
25 |
-
$field = $args[0];
|
26 |
-
$google_maps_url = add_query_arg(
|
27 |
-
array(
|
28 |
-
'key' => $field['api_key'],
|
29 |
-
'language' => $field['language'],
|
30 |
-
),
|
31 |
-
'https://maps.google.com/maps/api/js'
|
32 |
-
);
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Allows developers load more libraries via a filter.
|
36 |
-
*
|
37 |
-
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
38 |
-
*/
|
39 |
-
$google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
|
40 |
-
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), RWMB_VER, true );
|
41 |
-
wp_enqueue_script(
|
42 |
-
'rwmb-map',
|
43 |
-
RWMB_JS_URL . 'map.js',
|
44 |
-
array(
|
45 |
-
'jquery-ui-autocomplete',
|
46 |
-
'google-maps',
|
47 |
-
),
|
48 |
-
RWMB_VER,
|
49 |
-
true
|
50 |
-
);
|
51 |
-
self::localize_script(
|
52 |
-
'rwmb-map',
|
53 |
-
'RWMB_Map',
|
54 |
-
array(
|
55 |
-
'no_results_string' => __( 'No results found', 'meta-box' ),
|
56 |
-
)
|
57 |
-
);
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Get field HTML.
|
62 |
-
*
|
63 |
-
* @param mixed $meta Meta value.
|
64 |
-
* @param array $field Field parameters.
|
65 |
-
*
|
66 |
-
* @return string
|
67 |
-
*/
|
68 |
-
public static function html( $meta, $field ) {
|
69 |
-
$address = is_array( $field['address_field'] ) ? implode( ',', $field['address_field'] ) : $field['address_field'];
|
70 |
-
$html = sprintf(
|
71 |
-
'<div class="rwmb-map-field" data-address-field="%s">',
|
72 |
-
esc_attr( $address )
|
73 |
-
);
|
74 |
-
|
75 |
-
$html .= sprintf(
|
76 |
-
'<div class="rwmb-map-canvas" data-default-loc="%s" data-region="%s"></div>
|
77 |
-
<input type="hidden" name="%s" class="rwmb-map-coordinate" value="%s">',
|
78 |
-
esc_attr( $field['std'] ),
|
79 |
-
esc_attr( $field['region'] ),
|
80 |
-
esc_attr( $field['field_name'] ),
|
81 |
-
esc_attr( $meta )
|
82 |
-
);
|
83 |
-
|
84 |
-
if ( $field['address_field'] ) {
|
85 |
-
$html .= sprintf(
|
86 |
-
'<button class="button rwmb-map-goto-address-button">%s</button>',
|
87 |
-
esc_html__( 'Find Address', 'meta-box' )
|
88 |
-
);
|
89 |
-
}
|
90 |
-
|
91 |
-
$html .= '</div>';
|
92 |
-
|
93 |
-
return $html;
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Normalize parameters for field.
|
98 |
-
*
|
99 |
-
* @param array $field Field parameters.
|
100 |
-
*
|
101 |
-
* @return array
|
102 |
-
*/
|
103 |
-
public static function normalize( $field ) {
|
104 |
-
$field = parent::normalize( $field );
|
105 |
-
$field = wp_parse_args(
|
106 |
-
$field,
|
107 |
-
array(
|
108 |
-
'std' => '',
|
109 |
-
'address_field' => '',
|
110 |
-
'language' => '',
|
111 |
-
'region' => '',
|
112 |
-
|
113 |
-
// Default API key, required by Google Maps since June 2016.
|
114 |
-
// Users should overwrite this key with their own key.
|
115 |
-
'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
|
116 |
-
)
|
117 |
-
);
|
118 |
-
|
119 |
-
return $field;
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Get the field value.
|
124 |
-
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
125 |
-
* of the field saved in the database, while this function returns more meaningful value of the field.
|
126 |
-
*
|
127 |
-
* @param array $field Field parameters.
|
128 |
-
* @param array $args Not used for this field.
|
129 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
130 |
-
*
|
131 |
-
* @return mixed Array(latitude, longitude, zoom)
|
132 |
-
*/
|
133 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
134 |
-
$value = parent::get_value( $field, $args, $post_id );
|
135 |
-
list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
|
136 |
-
return compact( 'latitude', 'longitude', 'zoom' );
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* Output the field value.
|
141 |
-
* Display Google maps.
|
142 |
-
*
|
143 |
-
* @param array $field Field parameters.
|
144 |
-
* @param array $args Additional arguments for the map.
|
145 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
146 |
-
*
|
147 |
-
* @return string HTML output of the field
|
148 |
-
*/
|
149 |
-
public static function the_value( $field, $args = array(), $post_id = null ) {
|
150 |
-
$value = parent::get_value( $field, $args, $post_id );
|
151 |
-
$args = wp_parse_args(
|
152 |
-
$args,
|
153 |
-
array(
|
154 |
-
'api_key' => isset( $field['api_key'] ) ? $field['api_key'] : '',
|
155 |
-
)
|
156 |
-
);
|
157 |
-
return self::render_map( $value, $args );
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Render a map in the frontend.
|
162 |
-
*
|
163 |
-
* @param array $location The [latitude, longitude[, zoom]] location.
|
164 |
-
* @param array $args Additional arguments for the map.
|
165 |
-
*
|
166 |
-
* @return string
|
167 |
-
*/
|
168 |
-
public static function render_map( $location, $args = array() ) {
|
169 |
-
list( $latitude, $longitude, $zoom ) = explode( ',', $location . ',,' );
|
170 |
-
if ( ! $latitude || ! $longitude ) {
|
171 |
-
return '';
|
172 |
-
}
|
173 |
-
|
174 |
-
$args = wp_parse_args(
|
175 |
-
$args,
|
176 |
-
array(
|
177 |
-
'latitude' => $latitude,
|
178 |
-
'longitude' => $longitude,
|
179 |
-
'width' => '100%',
|
180 |
-
'height' => '480px',
|
181 |
-
'marker' => true, // Display marker?
|
182 |
-
'marker_title' => '', // Marker title, when hover.
|
183 |
-
'info_window' => '', // Content of info window (when click on marker). HTML allowed.
|
184 |
-
'js_options' => array(),
|
185 |
-
'zoom' => $zoom,
|
186 |
-
|
187 |
-
// Default API key, required by Google Maps since June 2016.
|
188 |
-
// Users should overwrite this key with their own key.
|
189 |
-
'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
|
190 |
-
)
|
191 |
-
);
|
192 |
-
|
193 |
-
$google_maps_url = add_query_arg( 'key', $args['api_key'], 'https://maps.google.com/maps/api/js' );
|
194 |
-
|
195 |
-
/*
|
196 |
-
* Allows developers load more libraries via a filter.
|
197 |
-
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
198 |
-
*/
|
199 |
-
$google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
|
200 |
-
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), RWMB_VER, true );
|
201 |
-
wp_enqueue_script( 'rwmb-map-frontend', RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), RWMB_VER, true );
|
202 |
-
|
203 |
-
/*
|
204 |
-
* Google Maps options.
|
205 |
-
* Option name is the same as specified in Google Maps documentation.
|
206 |
-
* This array will be convert to Javascript Object and pass as map options.
|
207 |
-
* @link https://developers.google.com/maps/documentation/javascript/reference
|
208 |
-
*/
|
209 |
-
$args['js_options'] = wp_parse_args(
|
210 |
-
$args['js_options'],
|
211 |
-
array(
|
212 |
-
// Default to 'zoom' level set in admin, but can be overwritten.
|
213 |
-
'zoom' => $args['zoom'],
|
214 |
-
|
215 |
-
// Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId.
|
216 |
-
'mapTypeId' => 'ROADMAP',
|
217 |
-
)
|
218 |
-
);
|
219 |
-
|
220 |
-
$output = sprintf(
|
221 |
-
'<div class="rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
|
222 |
-
esc_attr( wp_json_encode( $args ) ),
|
223 |
-
esc_attr( $args['width'] ),
|
224 |
-
esc_attr( $args['height'] )
|
225 |
-
);
|
226 |
-
return $output;
|
227 |
-
}
|
228 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Google Maps field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Map field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Map_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-map', RWMB_CSS_URL . 'map.css', array(), RWMB_VER );
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Since June 2016, Google Maps requires a valid API key.
|
20 |
+
*
|
21 |
+
* @link http://googlegeodevelopers.blogspot.com/2016/06/building-for-scale-updates-to-google.html
|
22 |
+
* @link https://developers.google.com/maps/documentation/javascript/get-api-key
|
23 |
+
*/
|
24 |
+
$args = func_get_args();
|
25 |
+
$field = $args[0];
|
26 |
+
$google_maps_url = add_query_arg(
|
27 |
+
array(
|
28 |
+
'key' => $field['api_key'],
|
29 |
+
'language' => $field['language'],
|
30 |
+
),
|
31 |
+
'https://maps.google.com/maps/api/js'
|
32 |
+
);
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Allows developers load more libraries via a filter.
|
36 |
+
*
|
37 |
+
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
38 |
+
*/
|
39 |
+
$google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
|
40 |
+
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), RWMB_VER, true );
|
41 |
+
wp_enqueue_script(
|
42 |
+
'rwmb-map',
|
43 |
+
RWMB_JS_URL . 'map.js',
|
44 |
+
array(
|
45 |
+
'jquery-ui-autocomplete',
|
46 |
+
'google-maps',
|
47 |
+
),
|
48 |
+
RWMB_VER,
|
49 |
+
true
|
50 |
+
);
|
51 |
+
self::localize_script(
|
52 |
+
'rwmb-map',
|
53 |
+
'RWMB_Map',
|
54 |
+
array(
|
55 |
+
'no_results_string' => __( 'No results found', 'meta-box' ),
|
56 |
+
)
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get field HTML.
|
62 |
+
*
|
63 |
+
* @param mixed $meta Meta value.
|
64 |
+
* @param array $field Field parameters.
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public static function html( $meta, $field ) {
|
69 |
+
$address = is_array( $field['address_field'] ) ? implode( ',', $field['address_field'] ) : $field['address_field'];
|
70 |
+
$html = sprintf(
|
71 |
+
'<div class="rwmb-map-field" data-address-field="%s">',
|
72 |
+
esc_attr( $address )
|
73 |
+
);
|
74 |
+
|
75 |
+
$html .= sprintf(
|
76 |
+
'<div class="rwmb-map-canvas" data-default-loc="%s" data-region="%s"></div>
|
77 |
+
<input type="hidden" name="%s" class="rwmb-map-coordinate" value="%s">',
|
78 |
+
esc_attr( $field['std'] ),
|
79 |
+
esc_attr( $field['region'] ),
|
80 |
+
esc_attr( $field['field_name'] ),
|
81 |
+
esc_attr( $meta )
|
82 |
+
);
|
83 |
+
|
84 |
+
if ( $field['address_field'] ) {
|
85 |
+
$html .= sprintf(
|
86 |
+
'<button class="button rwmb-map-goto-address-button">%s</button>',
|
87 |
+
esc_html__( 'Find Address', 'meta-box' )
|
88 |
+
);
|
89 |
+
}
|
90 |
+
|
91 |
+
$html .= '</div>';
|
92 |
+
|
93 |
+
return $html;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Normalize parameters for field.
|
98 |
+
*
|
99 |
+
* @param array $field Field parameters.
|
100 |
+
*
|
101 |
+
* @return array
|
102 |
+
*/
|
103 |
+
public static function normalize( $field ) {
|
104 |
+
$field = parent::normalize( $field );
|
105 |
+
$field = wp_parse_args(
|
106 |
+
$field,
|
107 |
+
array(
|
108 |
+
'std' => '',
|
109 |
+
'address_field' => '',
|
110 |
+
'language' => '',
|
111 |
+
'region' => '',
|
112 |
+
|
113 |
+
// Default API key, required by Google Maps since June 2016.
|
114 |
+
// Users should overwrite this key with their own key.
|
115 |
+
'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
|
116 |
+
)
|
117 |
+
);
|
118 |
+
|
119 |
+
return $field;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get the field value.
|
124 |
+
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
125 |
+
* of the field saved in the database, while this function returns more meaningful value of the field.
|
126 |
+
*
|
127 |
+
* @param array $field Field parameters.
|
128 |
+
* @param array $args Not used for this field.
|
129 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
130 |
+
*
|
131 |
+
* @return mixed Array(latitude, longitude, zoom)
|
132 |
+
*/
|
133 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
134 |
+
$value = parent::get_value( $field, $args, $post_id );
|
135 |
+
list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
|
136 |
+
return compact( 'latitude', 'longitude', 'zoom' );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Output the field value.
|
141 |
+
* Display Google maps.
|
142 |
+
*
|
143 |
+
* @param array $field Field parameters.
|
144 |
+
* @param array $args Additional arguments for the map.
|
145 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
146 |
+
*
|
147 |
+
* @return string HTML output of the field
|
148 |
+
*/
|
149 |
+
public static function the_value( $field, $args = array(), $post_id = null ) {
|
150 |
+
$value = parent::get_value( $field, $args, $post_id );
|
151 |
+
$args = wp_parse_args(
|
152 |
+
$args,
|
153 |
+
array(
|
154 |
+
'api_key' => isset( $field['api_key'] ) ? $field['api_key'] : '',
|
155 |
+
)
|
156 |
+
);
|
157 |
+
return self::render_map( $value, $args );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Render a map in the frontend.
|
162 |
+
*
|
163 |
+
* @param array $location The [latitude, longitude[, zoom]] location.
|
164 |
+
* @param array $args Additional arguments for the map.
|
165 |
+
*
|
166 |
+
* @return string
|
167 |
+
*/
|
168 |
+
public static function render_map( $location, $args = array() ) {
|
169 |
+
list( $latitude, $longitude, $zoom ) = explode( ',', $location . ',,' );
|
170 |
+
if ( ! $latitude || ! $longitude ) {
|
171 |
+
return '';
|
172 |
+
}
|
173 |
+
|
174 |
+
$args = wp_parse_args(
|
175 |
+
$args,
|
176 |
+
array(
|
177 |
+
'latitude' => $latitude,
|
178 |
+
'longitude' => $longitude,
|
179 |
+
'width' => '100%',
|
180 |
+
'height' => '480px',
|
181 |
+
'marker' => true, // Display marker?
|
182 |
+
'marker_title' => '', // Marker title, when hover.
|
183 |
+
'info_window' => '', // Content of info window (when click on marker). HTML allowed.
|
184 |
+
'js_options' => array(),
|
185 |
+
'zoom' => $zoom,
|
186 |
+
|
187 |
+
// Default API key, required by Google Maps since June 2016.
|
188 |
+
// Users should overwrite this key with their own key.
|
189 |
+
'api_key' => 'AIzaSyC1mUh87SGFyf133tpZQJa-s96p0tgnraQ',
|
190 |
+
)
|
191 |
+
);
|
192 |
+
|
193 |
+
$google_maps_url = add_query_arg( 'key', $args['api_key'], 'https://maps.google.com/maps/api/js' );
|
194 |
+
|
195 |
+
/*
|
196 |
+
* Allows developers load more libraries via a filter.
|
197 |
+
* @link https://developers.google.com/maps/documentation/javascript/libraries
|
198 |
+
*/
|
199 |
+
$google_maps_url = apply_filters( 'rwmb_google_maps_url', $google_maps_url );
|
200 |
+
wp_register_script( 'google-maps', esc_url_raw( $google_maps_url ), array(), RWMB_VER, true );
|
201 |
+
wp_enqueue_script( 'rwmb-map-frontend', RWMB_JS_URL . 'map-frontend.js', array( 'google-maps' ), RWMB_VER, true );
|
202 |
+
|
203 |
+
/*
|
204 |
+
* Google Maps options.
|
205 |
+
* Option name is the same as specified in Google Maps documentation.
|
206 |
+
* This array will be convert to Javascript Object and pass as map options.
|
207 |
+
* @link https://developers.google.com/maps/documentation/javascript/reference
|
208 |
+
*/
|
209 |
+
$args['js_options'] = wp_parse_args(
|
210 |
+
$args['js_options'],
|
211 |
+
array(
|
212 |
+
// Default to 'zoom' level set in admin, but can be overwritten.
|
213 |
+
'zoom' => $args['zoom'],
|
214 |
+
|
215 |
+
// Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId.
|
216 |
+
'mapTypeId' => 'ROADMAP',
|
217 |
+
)
|
218 |
+
);
|
219 |
+
|
220 |
+
$output = sprintf(
|
221 |
+
'<div class="rwmb-map-canvas" data-map_options="%s" style="width:%s;height:%s"></div>',
|
222 |
+
esc_attr( wp_json_encode( $args ) ),
|
223 |
+
esc_attr( $args['width'] ),
|
224 |
+
esc_attr( $args['height'] )
|
225 |
+
);
|
226 |
+
return $output;
|
227 |
+
}
|
228 |
+
}
|
inc/libraries/meta-box/inc/fields/media.php
CHANGED
@@ -1,190 +1,190 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Media field class which users WordPress media popup to upload and select files.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The media field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Media_Field extends RWMB_File_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_media();
|
17 |
-
if ( ! is_admin() ) {
|
18 |
-
wp_register_script( 'media-grid', includes_url( 'js/media-grid.min.js' ), array( 'media-editor' ), '4.9.7', true );
|
19 |
-
}
|
20 |
-
wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
|
21 |
-
wp_enqueue_script( 'rwmb-media', RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone', 'media-grid' ), RWMB_VER, true );
|
22 |
-
|
23 |
-
self::localize_script(
|
24 |
-
'rwmb-media',
|
25 |
-
'i18nRwmbMedia',
|
26 |
-
array(
|
27 |
-
'add' => apply_filters( 'rwmb_media_add_string', _x( '+ Add Media', 'media', 'meta-box' ) ),
|
28 |
-
'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'meta-box' ) ),
|
29 |
-
'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'meta-box' ) ),
|
30 |
-
'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'meta-box' ) ),
|
31 |
-
'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'meta-box' ) ),
|
32 |
-
'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'meta-box' ) ),
|
33 |
-
'noTitle' => _x( 'No Title', 'media', 'meta-box' ),
|
34 |
-
'loadingUrl' => admin_url( 'images/spinner.gif' ),
|
35 |
-
'extensions' => self::get_mime_extensions(),
|
36 |
-
'select' => apply_filters( 'rwmb_media_select_string', _x( 'Select Files', 'media', 'meta-box' ) ),
|
37 |
-
'or' => apply_filters( 'rwmb_media_or_string', _x( 'or', 'media', 'meta-box' ) ),
|
38 |
-
'uploadInstructions' => apply_filters( 'rwmb_media_upload_instructions_string', _x( 'Drop files here to upload', 'media', 'meta-box' ) ),
|
39 |
-
)
|
40 |
-
);
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Add actions.
|
45 |
-
*/
|
46 |
-
public static function add_actions() {
|
47 |
-
$args = func_get_args();
|
48 |
-
$field = reset( $args );
|
49 |
-
add_action( 'print_media_templates', array( self::get_class_name( $field ), 'print_templates' ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Get field HTML.
|
54 |
-
*
|
55 |
-
* @param mixed $meta Meta value.
|
56 |
-
* @param array $field Field parameters.
|
57 |
-
*
|
58 |
-
* @return string
|
59 |
-
*/
|
60 |
-
public static function html( $meta, $field ) {
|
61 |
-
$meta = (array) $meta;
|
62 |
-
$meta = implode( ',', $meta );
|
63 |
-
$attributes = self::call( 'get_attributes', $field, $meta );
|
64 |
-
|
65 |
-
$html = sprintf(
|
66 |
-
'<input %s data-options="%s">',
|
67 |
-
self::render_attributes( $attributes ),
|
68 |
-
esc_attr( wp_json_encode( $field['js_options'] ) )
|
69 |
-
);
|
70 |
-
|
71 |
-
return $html;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Normalize parameters for field.
|
76 |
-
*
|
77 |
-
* @param array $field Field parameters.
|
78 |
-
*
|
79 |
-
* @return array
|
80 |
-
*/
|
81 |
-
public static function normalize( $field ) {
|
82 |
-
$field = parent::normalize( $field );
|
83 |
-
$field = wp_parse_args(
|
84 |
-
$field,
|
85 |
-
array(
|
86 |
-
'std' => array(),
|
87 |
-
'mime_type' => '',
|
88 |
-
'max_file_uploads' => 0,
|
89 |
-
'force_delete' => false,
|
90 |
-
'max_status' => true,
|
91 |
-
'js_options' => array(),
|
92 |
-
)
|
93 |
-
);
|
94 |
-
|
95 |
-
$field['js_options'] = wp_parse_args(
|
96 |
-
$field['js_options'],
|
97 |
-
array(
|
98 |
-
'mimeType' => $field['mime_type'],
|
99 |
-
'maxFiles' => $field['max_file_uploads'],
|
100 |
-
'forceDelete' => $field['force_delete'] ? true : false,
|
101 |
-
'maxStatus' => $field['max_status'],
|
102 |
-
)
|
103 |
-
);
|
104 |
-
|
105 |
-
$field['multiple'] = true;
|
106 |
-
|
107 |
-
return $field;
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Get the attributes for a field.
|
112 |
-
*
|
113 |
-
* @param array $field Field parameters.
|
114 |
-
* @param mixed $value Meta value.
|
115 |
-
*
|
116 |
-
* @return array
|
117 |
-
*/
|
118 |
-
public static function get_attributes( $field, $value = null ) {
|
119 |
-
$attributes = parent::get_attributes( $field, $value );
|
120 |
-
$attributes['type'] = 'hidden';
|
121 |
-
$attributes['name'] = $field['clone'] ? str_replace( '[]', '', $attributes['name'] ) : $attributes['name'];
|
122 |
-
$attributes['id'] = false;
|
123 |
-
$attributes['value'] = $value;
|
124 |
-
|
125 |
-
return $attributes;
|
126 |
-
}
|
127 |
-
|
128 |
-
/**
|
129 |
-
* Get supported mime extensions.
|
130 |
-
*
|
131 |
-
* @return array
|
132 |
-
*/
|
133 |
-
protected static function get_mime_extensions() {
|
134 |
-
$mime_types = wp_get_mime_types();
|
135 |
-
$extensions = array();
|
136 |
-
foreach ( $mime_types as $ext => $mime ) {
|
137 |
-
$ext = explode( '|', $ext );
|
138 |
-
$extensions[ $mime ] = $ext;
|
139 |
-
|
140 |
-
$mime_parts = explode( '/', $mime );
|
141 |
-
if ( empty( $extensions[ $mime_parts[0] ] ) ) {
|
142 |
-
$extensions[ $mime_parts[0] ] = array();
|
143 |
-
}
|
144 |
-
$extensions[ $mime_parts[0] ] = array_merge( $extensions[ $mime_parts[0] ], $ext );
|
145 |
-
$extensions[ $mime_parts[0] . '/*' ] = $extensions[ $mime_parts[0] ];
|
146 |
-
}
|
147 |
-
|
148 |
-
return $extensions;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* Get meta values to save.
|
153 |
-
*
|
154 |
-
* @param mixed $new The submitted meta value.
|
155 |
-
* @param mixed $old The existing meta value.
|
156 |
-
* @param int $post_id The post ID.
|
157 |
-
* @param array $field The field parameters.
|
158 |
-
*
|
159 |
-
* @return array|mixed
|
160 |
-
*/
|
161 |
-
public static function value( $new, $old, $post_id, $field ) {
|
162 |
-
$new = rwmb_csv_to_array( $new );
|
163 |
-
array_walk( $new, 'absint' );
|
164 |
-
return array_filter( array_unique( $new ) );
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Save meta value.
|
169 |
-
*
|
170 |
-
* @param mixed $new The submitted meta value.
|
171 |
-
* @param mixed $old The existing meta value.
|
172 |
-
* @param int $post_id The post ID.
|
173 |
-
* @param array $field The field parameters.
|
174 |
-
*/
|
175 |
-
public static function save( $new, $old, $post_id, $field ) {
|
176 |
-
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
177 |
-
return;
|
178 |
-
}
|
179 |
-
$storage = $field['storage'];
|
180 |
-
$storage->delete( $post_id, $field['id'] );
|
181 |
-
parent::save( $new, array(), $post_id, $field );
|
182 |
-
}
|
183 |
-
|
184 |
-
/**
|
185 |
-
* Template for media item.
|
186 |
-
*/
|
187 |
-
public static function print_templates() {
|
188 |
-
require_once RWMB_INC_DIR . 'templates/media.php';
|
189 |
-
}
|
190 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Media field class which users WordPress media popup to upload and select files.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The media field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Media_Field extends RWMB_File_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_media();
|
17 |
+
if ( ! is_admin() ) {
|
18 |
+
wp_register_script( 'media-grid', includes_url( 'js/media-grid.min.js' ), array( 'media-editor' ), '4.9.7', true );
|
19 |
+
}
|
20 |
+
wp_enqueue_style( 'rwmb-media', RWMB_CSS_URL . 'media.css', array(), RWMB_VER );
|
21 |
+
wp_enqueue_script( 'rwmb-media', RWMB_JS_URL . 'media.js', array( 'jquery-ui-sortable', 'underscore', 'backbone', 'media-grid' ), RWMB_VER, true );
|
22 |
+
|
23 |
+
self::localize_script(
|
24 |
+
'rwmb-media',
|
25 |
+
'i18nRwmbMedia',
|
26 |
+
array(
|
27 |
+
'add' => apply_filters( 'rwmb_media_add_string', _x( '+ Add Media', 'media', 'meta-box' ) ),
|
28 |
+
'single' => apply_filters( 'rwmb_media_single_files_string', _x( ' file', 'media', 'meta-box' ) ),
|
29 |
+
'multiple' => apply_filters( 'rwmb_media_multiple_files_string', _x( ' files', 'media', 'meta-box' ) ),
|
30 |
+
'remove' => apply_filters( 'rwmb_media_remove_string', _x( 'Remove', 'media', 'meta-box' ) ),
|
31 |
+
'edit' => apply_filters( 'rwmb_media_edit_string', _x( 'Edit', 'media', 'meta-box' ) ),
|
32 |
+
'view' => apply_filters( 'rwmb_media_view_string', _x( 'View', 'media', 'meta-box' ) ),
|
33 |
+
'noTitle' => _x( 'No Title', 'media', 'meta-box' ),
|
34 |
+
'loadingUrl' => admin_url( 'images/spinner.gif' ),
|
35 |
+
'extensions' => self::get_mime_extensions(),
|
36 |
+
'select' => apply_filters( 'rwmb_media_select_string', _x( 'Select Files', 'media', 'meta-box' ) ),
|
37 |
+
'or' => apply_filters( 'rwmb_media_or_string', _x( 'or', 'media', 'meta-box' ) ),
|
38 |
+
'uploadInstructions' => apply_filters( 'rwmb_media_upload_instructions_string', _x( 'Drop files here to upload', 'media', 'meta-box' ) ),
|
39 |
+
)
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Add actions.
|
45 |
+
*/
|
46 |
+
public static function add_actions() {
|
47 |
+
$args = func_get_args();
|
48 |
+
$field = reset( $args );
|
49 |
+
add_action( 'print_media_templates', array( self::get_class_name( $field ), 'print_templates' ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get field HTML.
|
54 |
+
*
|
55 |
+
* @param mixed $meta Meta value.
|
56 |
+
* @param array $field Field parameters.
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function html( $meta, $field ) {
|
61 |
+
$meta = (array) $meta;
|
62 |
+
$meta = implode( ',', $meta );
|
63 |
+
$attributes = self::call( 'get_attributes', $field, $meta );
|
64 |
+
|
65 |
+
$html = sprintf(
|
66 |
+
'<input %s data-options="%s">',
|
67 |
+
self::render_attributes( $attributes ),
|
68 |
+
esc_attr( wp_json_encode( $field['js_options'] ) )
|
69 |
+
);
|
70 |
+
|
71 |
+
return $html;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Normalize parameters for field.
|
76 |
+
*
|
77 |
+
* @param array $field Field parameters.
|
78 |
+
*
|
79 |
+
* @return array
|
80 |
+
*/
|
81 |
+
public static function normalize( $field ) {
|
82 |
+
$field = parent::normalize( $field );
|
83 |
+
$field = wp_parse_args(
|
84 |
+
$field,
|
85 |
+
array(
|
86 |
+
'std' => array(),
|
87 |
+
'mime_type' => '',
|
88 |
+
'max_file_uploads' => 0,
|
89 |
+
'force_delete' => false,
|
90 |
+
'max_status' => true,
|
91 |
+
'js_options' => array(),
|
92 |
+
)
|
93 |
+
);
|
94 |
+
|
95 |
+
$field['js_options'] = wp_parse_args(
|
96 |
+
$field['js_options'],
|
97 |
+
array(
|
98 |
+
'mimeType' => $field['mime_type'],
|
99 |
+
'maxFiles' => $field['max_file_uploads'],
|
100 |
+
'forceDelete' => $field['force_delete'] ? true : false,
|
101 |
+
'maxStatus' => $field['max_status'],
|
102 |
+
)
|
103 |
+
);
|
104 |
+
|
105 |
+
$field['multiple'] = true;
|
106 |
+
|
107 |
+
return $field;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Get the attributes for a field.
|
112 |
+
*
|
113 |
+
* @param array $field Field parameters.
|
114 |
+
* @param mixed $value Meta value.
|
115 |
+
*
|
116 |
+
* @return array
|
117 |
+
*/
|
118 |
+
public static function get_attributes( $field, $value = null ) {
|
119 |
+
$attributes = parent::get_attributes( $field, $value );
|
120 |
+
$attributes['type'] = 'hidden';
|
121 |
+
$attributes['name'] = $field['clone'] ? str_replace( '[]', '', $attributes['name'] ) : $attributes['name'];
|
122 |
+
$attributes['id'] = false;
|
123 |
+
$attributes['value'] = $value;
|
124 |
+
|
125 |
+
return $attributes;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Get supported mime extensions.
|
130 |
+
*
|
131 |
+
* @return array
|
132 |
+
*/
|
133 |
+
protected static function get_mime_extensions() {
|
134 |
+
$mime_types = wp_get_mime_types();
|
135 |
+
$extensions = array();
|
136 |
+
foreach ( $mime_types as $ext => $mime ) {
|
137 |
+
$ext = explode( '|', $ext );
|
138 |
+
$extensions[ $mime ] = $ext;
|
139 |
+
|
140 |
+
$mime_parts = explode( '/', $mime );
|
141 |
+
if ( empty( $extensions[ $mime_parts[0] ] ) ) {
|
142 |
+
$extensions[ $mime_parts[0] ] = array();
|
143 |
+
}
|
144 |
+
$extensions[ $mime_parts[0] ] = array_merge( $extensions[ $mime_parts[0] ], $ext );
|
145 |
+
$extensions[ $mime_parts[0] . '/*' ] = $extensions[ $mime_parts[0] ];
|
146 |
+
}
|
147 |
+
|
148 |
+
return $extensions;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Get meta values to save.
|
153 |
+
*
|
154 |
+
* @param mixed $new The submitted meta value.
|
155 |
+
* @param mixed $old The existing meta value.
|
156 |
+
* @param int $post_id The post ID.
|
157 |
+
* @param array $field The field parameters.
|
158 |
+
*
|
159 |
+
* @return array|mixed
|
160 |
+
*/
|
161 |
+
public static function value( $new, $old, $post_id, $field ) {
|
162 |
+
$new = rwmb_csv_to_array( $new );
|
163 |
+
array_walk( $new, 'absint' );
|
164 |
+
return array_filter( array_unique( $new ) );
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Save meta value.
|
169 |
+
*
|
170 |
+
* @param mixed $new The submitted meta value.
|
171 |
+
* @param mixed $old The existing meta value.
|
172 |
+
* @param int $post_id The post ID.
|
173 |
+
* @param array $field The field parameters.
|
174 |
+
*/
|
175 |
+
public static function save( $new, $old, $post_id, $field ) {
|
176 |
+
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
177 |
+
return;
|
178 |
+
}
|
179 |
+
$storage = $field['storage'];
|
180 |
+
$storage->delete( $post_id, $field['id'] );
|
181 |
+
parent::save( $new, array(), $post_id, $field );
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Template for media item.
|
186 |
+
*/
|
187 |
+
public static function print_templates() {
|
188 |
+
require_once RWMB_INC_DIR . 'templates/media.php';
|
189 |
+
}
|
190 |
+
}
|
inc/libraries/meta-box/inc/fields/multiple-values.php
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This class implements common methods used in fields which have multiple values
|
4 |
-
* like checkbox list, autocomplete, etc.
|
5 |
-
*
|
6 |
-
* The difference when handling actions for these fields are the way they get/set
|
7 |
-
* meta value. Briefly:
|
8 |
-
* - If field is cloneable, value is saved as a single entry in the database
|
9 |
-
* - Otherwise value is saved as multiple entries
|
10 |
-
*
|
11 |
-
* @package Meta Box
|
12 |
-
*/
|
13 |
-
|
14 |
-
/**
|
15 |
-
* Multiple values field class.
|
16 |
-
*/
|
17 |
-
abstract class RWMB_Multiple_Values_Field extends RWMB_Field {
|
18 |
-
/**
|
19 |
-
* Normalize parameters for field.
|
20 |
-
*
|
21 |
-
* @param array $field Field parameters.
|
22 |
-
*
|
23 |
-
* @return array
|
24 |
-
*/
|
25 |
-
public static function normalize( $field ) {
|
26 |
-
$field = parent::normalize( $field );
|
27 |
-
$field['multiple'] = true;
|
28 |
-
$field['field_name'] = $field['id'];
|
29 |
-
if ( ! $field['clone'] ) {
|
30 |
-
$field['field_name'] .= '[]';
|
31 |
-
}
|
32 |
-
|
33 |
-
return $field;
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
38 |
-
*
|
39 |
-
* @param array $field Field parameters.
|
40 |
-
* @param string $value The value.
|
41 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
42 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
43 |
-
*
|
44 |
-
* @return string
|
45 |
-
*/
|
46 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
47 |
-
return $field['options'][ $value ];
|
48 |
-
}
|
49 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This class implements common methods used in fields which have multiple values
|
4 |
+
* like checkbox list, autocomplete, etc.
|
5 |
+
*
|
6 |
+
* The difference when handling actions for these fields are the way they get/set
|
7 |
+
* meta value. Briefly:
|
8 |
+
* - If field is cloneable, value is saved as a single entry in the database
|
9 |
+
* - Otherwise value is saved as multiple entries
|
10 |
+
*
|
11 |
+
* @package Meta Box
|
12 |
+
*/
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Multiple values field class.
|
16 |
+
*/
|
17 |
+
abstract class RWMB_Multiple_Values_Field extends RWMB_Field {
|
18 |
+
/**
|
19 |
+
* Normalize parameters for field.
|
20 |
+
*
|
21 |
+
* @param array $field Field parameters.
|
22 |
+
*
|
23 |
+
* @return array
|
24 |
+
*/
|
25 |
+
public static function normalize( $field ) {
|
26 |
+
$field = parent::normalize( $field );
|
27 |
+
$field['multiple'] = true;
|
28 |
+
$field['field_name'] = $field['id'];
|
29 |
+
if ( ! $field['clone'] ) {
|
30 |
+
$field['field_name'] .= '[]';
|
31 |
+
}
|
32 |
+
|
33 |
+
return $field;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
38 |
+
*
|
39 |
+
* @param array $field Field parameters.
|
40 |
+
* @param string $value The value.
|
41 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
42 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
43 |
+
*
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
47 |
+
return $field['options'][ $value ];
|
48 |
+
}
|
49 |
+
}
|
inc/libraries/meta-box/inc/fields/number.php
CHANGED
@@ -1,54 +1,54 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The number field which uses HTML <input type="number">.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Number field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Number_Field extends RWMB_Input_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public static function normalize( $field ) {
|
20 |
-
$field = parent::normalize( $field );
|
21 |
-
|
22 |
-
$field = wp_parse_args(
|
23 |
-
$field,
|
24 |
-
array(
|
25 |
-
'step' => 1,
|
26 |
-
'min' => 0,
|
27 |
-
'max' => false,
|
28 |
-
)
|
29 |
-
);
|
30 |
-
|
31 |
-
return $field;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Get the attributes for a field.
|
36 |
-
*
|
37 |
-
* @param array $field Field parameters.
|
38 |
-
* @param mixed $value Meta value.
|
39 |
-
*
|
40 |
-
* @return array
|
41 |
-
*/
|
42 |
-
public static function get_attributes( $field, $value = null ) {
|
43 |
-
$attributes = parent::get_attributes( $field, $value );
|
44 |
-
$attributes = wp_parse_args(
|
45 |
-
$attributes,
|
46 |
-
array(
|
47 |
-
'step' => $field['step'],
|
48 |
-
'max' => $field['max'],
|
49 |
-
'min' => $field['min'],
|
50 |
-
)
|
51 |
-
);
|
52 |
-
return $attributes;
|
53 |
-
}
|
54 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The number field which uses HTML <input type="number">.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Number field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Number_Field extends RWMB_Input_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public static function normalize( $field ) {
|
20 |
+
$field = parent::normalize( $field );
|
21 |
+
|
22 |
+
$field = wp_parse_args(
|
23 |
+
$field,
|
24 |
+
array(
|
25 |
+
'step' => 1,
|
26 |
+
'min' => 0,
|
27 |
+
'max' => false,
|
28 |
+
)
|
29 |
+
);
|
30 |
+
|
31 |
+
return $field;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get the attributes for a field.
|
36 |
+
*
|
37 |
+
* @param array $field Field parameters.
|
38 |
+
* @param mixed $value Meta value.
|
39 |
+
*
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public static function get_attributes( $field, $value = null ) {
|
43 |
+
$attributes = parent::get_attributes( $field, $value );
|
44 |
+
$attributes = wp_parse_args(
|
45 |
+
$attributes,
|
46 |
+
array(
|
47 |
+
'step' => $field['step'],
|
48 |
+
'max' => $field['max'],
|
49 |
+
'min' => $field['min'],
|
50 |
+
)
|
51 |
+
);
|
52 |
+
return $attributes;
|
53 |
+
}
|
54 |
+
}
|
inc/libraries/meta-box/inc/fields/object-choice.php
CHANGED
@@ -1,124 +1,124 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The object choice class which allows users to select specific objects in WordPress.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Abstract field to select an object: post, user, taxonomy, etc.
|
10 |
-
*/
|
11 |
-
abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Show field HTML.
|
14 |
-
* Populate field options before showing to make sure query is made only once.
|
15 |
-
*
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @param bool $saved Whether the meta box is saved at least once.
|
18 |
-
* @param int $post_id Post ID.
|
19 |
-
*/
|
20 |
-
public static function show( $field, $saved, $post_id = 0 ) {
|
21 |
-
$field['options'] = self::call( $field, 'query' );
|
22 |
-
|
23 |
-
parent::show( $field, $saved, $post_id );
|
24 |
-
}
|
25 |
-
|
26 |
-
/**
|
27 |
-
* Get field HTML.
|
28 |
-
*
|
29 |
-
* @param mixed $meta Meta value.
|
30 |
-
* @param array $field Field parameters.
|
31 |
-
* @return string
|
32 |
-
*/
|
33 |
-
public static function html( $meta, $field ) {
|
34 |
-
$html = call_user_func( array( self::get_type_class( $field ), 'html' ), $meta, $field );
|
35 |
-
$html .= self::call( 'add_new_form', $field );
|
36 |
-
return $html;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Render "Add New" form
|
41 |
-
*
|
42 |
-
* @param array $field Field settings.
|
43 |
-
* @return string
|
44 |
-
*/
|
45 |
-
public static function add_new_form( $field ) {
|
46 |
-
return '';
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Normalize parameters for field.
|
51 |
-
*
|
52 |
-
* @param array $field Field parameters.
|
53 |
-
*
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public static function normalize( $field ) {
|
57 |
-
$field = parent::normalize( $field );
|
58 |
-
$field = wp_parse_args(
|
59 |
-
$field,
|
60 |
-
array(
|
61 |
-
'flatten' => true,
|
62 |
-
'query_args' => array(),
|
63 |
-
'field_type' => 'select_advanced',
|
64 |
-
)
|
65 |
-
);
|
66 |
-
|
67 |
-
if ( 'checkbox_tree' === $field['field_type'] ) {
|
68 |
-
$field['field_type'] = 'checkbox_list';
|
69 |
-
$field['flatten'] = false;
|
70 |
-
}
|
71 |
-
if ( 'radio_list' === $field['field_type'] ) {
|
72 |
-
$field['multiple'] = false;
|
73 |
-
}
|
74 |
-
if ( 'checkbox_list' === $field['field_type'] ) {
|
75 |
-
$field['multiple'] = true;
|
76 |
-
}
|
77 |
-
return call_user_func( array( self::get_type_class( $field ), 'normalize' ), $field );
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Get the attributes for a field.
|
82 |
-
*
|
83 |
-
* @param array $field Field parameters.
|
84 |
-
* @param mixed $value Meta value.
|
85 |
-
*
|
86 |
-
* @return array
|
87 |
-
*/
|
88 |
-
public static function get_attributes( $field, $value = null ) {
|
89 |
-
$attributes = call_user_func( array( self::get_type_class( $field ), 'get_attributes' ), $field, $value );
|
90 |
-
if ( 'select_advanced' === $field['field_type'] ) {
|
91 |
-
$attributes['class'] .= ' rwmb-select_advanced';
|
92 |
-
} elseif ( 'select' === $field['field_type'] ) {
|
93 |
-
$attributes['class'] .= ' rwmb-select';
|
94 |
-
}
|
95 |
-
return $attributes;
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
* Enqueue scripts and styles.
|
100 |
-
*/
|
101 |
-
public static function admin_enqueue_scripts() {
|
102 |
-
RWMB_Input_List_Field::admin_enqueue_scripts();
|
103 |
-
RWMB_Select_Field::admin_enqueue_scripts();
|
104 |
-
RWMB_Select_Tree_Field::admin_enqueue_scripts();
|
105 |
-
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Get correct rendering class for the field.
|
110 |
-
*
|
111 |
-
* @param array $field Field parameters.
|
112 |
-
* @return string
|
113 |
-
*/
|
114 |
-
protected static function get_type_class( $field ) {
|
115 |
-
if ( in_array( $field['field_type'], array( 'checkbox_list', 'radio_list' ), true ) ) {
|
116 |
-
return 'RWMB_Input_List_Field';
|
117 |
-
}
|
118 |
-
return self::get_class_name(
|
119 |
-
array(
|
120 |
-
'type' => $field['field_type'],
|
121 |
-
)
|
122 |
-
);
|
123 |
-
}
|
124 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The object choice class which allows users to select specific objects in WordPress.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Abstract field to select an object: post, user, taxonomy, etc.
|
10 |
+
*/
|
11 |
+
abstract class RWMB_Object_Choice_Field extends RWMB_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Show field HTML.
|
14 |
+
* Populate field options before showing to make sure query is made only once.
|
15 |
+
*
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @param bool $saved Whether the meta box is saved at least once.
|
18 |
+
* @param int $post_id Post ID.
|
19 |
+
*/
|
20 |
+
public static function show( $field, $saved, $post_id = 0 ) {
|
21 |
+
$field['options'] = self::call( $field, 'query' );
|
22 |
+
|
23 |
+
parent::show( $field, $saved, $post_id );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get field HTML.
|
28 |
+
*
|
29 |
+
* @param mixed $meta Meta value.
|
30 |
+
* @param array $field Field parameters.
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
public static function html( $meta, $field ) {
|
34 |
+
$html = call_user_func( array( self::get_type_class( $field ), 'html' ), $meta, $field );
|
35 |
+
$html .= self::call( 'add_new_form', $field );
|
36 |
+
return $html;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Render "Add New" form
|
41 |
+
*
|
42 |
+
* @param array $field Field settings.
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public static function add_new_form( $field ) {
|
46 |
+
return '';
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Normalize parameters for field.
|
51 |
+
*
|
52 |
+
* @param array $field Field parameters.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public static function normalize( $field ) {
|
57 |
+
$field = parent::normalize( $field );
|
58 |
+
$field = wp_parse_args(
|
59 |
+
$field,
|
60 |
+
array(
|
61 |
+
'flatten' => true,
|
62 |
+
'query_args' => array(),
|
63 |
+
'field_type' => 'select_advanced',
|
64 |
+
)
|
65 |
+
);
|
66 |
+
|
67 |
+
if ( 'checkbox_tree' === $field['field_type'] ) {
|
68 |
+
$field['field_type'] = 'checkbox_list';
|
69 |
+
$field['flatten'] = false;
|
70 |
+
}
|
71 |
+
if ( 'radio_list' === $field['field_type'] ) {
|
72 |
+
$field['multiple'] = false;
|
73 |
+
}
|
74 |
+
if ( 'checkbox_list' === $field['field_type'] ) {
|
75 |
+
$field['multiple'] = true;
|
76 |
+
}
|
77 |
+
return call_user_func( array( self::get_type_class( $field ), 'normalize' ), $field );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get the attributes for a field.
|
82 |
+
*
|
83 |
+
* @param array $field Field parameters.
|
84 |
+
* @param mixed $value Meta value.
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
public static function get_attributes( $field, $value = null ) {
|
89 |
+
$attributes = call_user_func( array( self::get_type_class( $field ), 'get_attributes' ), $field, $value );
|
90 |
+
if ( 'select_advanced' === $field['field_type'] ) {
|
91 |
+
$attributes['class'] .= ' rwmb-select_advanced';
|
92 |
+
} elseif ( 'select' === $field['field_type'] ) {
|
93 |
+
$attributes['class'] .= ' rwmb-select';
|
94 |
+
}
|
95 |
+
return $attributes;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Enqueue scripts and styles.
|
100 |
+
*/
|
101 |
+
public static function admin_enqueue_scripts() {
|
102 |
+
RWMB_Input_List_Field::admin_enqueue_scripts();
|
103 |
+
RWMB_Select_Field::admin_enqueue_scripts();
|
104 |
+
RWMB_Select_Tree_Field::admin_enqueue_scripts();
|
105 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Get correct rendering class for the field.
|
110 |
+
*
|
111 |
+
* @param array $field Field parameters.
|
112 |
+
* @return string
|
113 |
+
*/
|
114 |
+
protected static function get_type_class( $field ) {
|
115 |
+
if ( in_array( $field['field_type'], array( 'checkbox_list', 'radio_list' ), true ) ) {
|
116 |
+
return 'RWMB_Input_List_Field';
|
117 |
+
}
|
118 |
+
return self::get_class_name(
|
119 |
+
array(
|
120 |
+
'type' => $field['field_type'],
|
121 |
+
)
|
122 |
+
);
|
123 |
+
}
|
124 |
+
}
|
inc/libraries/meta-box/inc/fields/oembed.php
CHANGED
@@ -1,145 +1,145 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The oEmbed field which allows users to enter oEmbed URLs.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* OEmbed field class.
|
10 |
-
*/
|
11 |
-
class RWMB_OEmbed_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
$field = parent::normalize( $field );
|
20 |
-
|
21 |
-
$field = wp_parse_args(
|
22 |
-
$field,
|
23 |
-
array(
|
24 |
-
'not_available_string' => __( 'Embed HTML not available.', 'meta-box' ),
|
25 |
-
)
|
26 |
-
);
|
27 |
-
$field['attributes'] = wp_parse_args(
|
28 |
-
$field['attributes'],
|
29 |
-
array(
|
30 |
-
'data-not-available' => $field['not_available_string'],
|
31 |
-
)
|
32 |
-
);
|
33 |
-
|
34 |
-
return $field;
|
35 |
-
}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Enqueue scripts and styles.
|
39 |
-
*/
|
40 |
-
public static function admin_enqueue_scripts() {
|
41 |
-
wp_enqueue_style( 'rwmb-oembed', RWMB_CSS_URL . 'oembed.css', '', RWMB_VER );
|
42 |
-
wp_enqueue_script( 'rwmb-oembed', RWMB_JS_URL . 'oembed.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Add actions.
|
47 |
-
*/
|
48 |
-
public static function add_actions() {
|
49 |
-
add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
|
50 |
-
}
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Ajax callback for returning oEmbed HTML.
|
54 |
-
*/
|
55 |
-
public static function wp_ajax_get_embed() {
|
56 |
-
$url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
|
57 |
-
$not_available = (string) filter_input( INPUT_POST, 'not_available' );
|
58 |
-
wp_send_json_success( self::get_embed( $url, $not_available ) );
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Get embed html from url.
|
63 |
-
*
|
64 |
-
* @param string $url URL.
|
65 |
-
* @param string $not_available Not available string displayed to users.
|
66 |
-
* @return string
|
67 |
-
*/
|
68 |
-
public static function get_embed( $url, $not_available = '' ) {
|
69 |
-
/**
|
70 |
-
* Set arguments for getting embeded HTML.
|
71 |
-
* Without arguments, default width will be taken from global $content_width, which can break UI in the admin.
|
72 |
-
*
|
73 |
-
* @link https://github.com/rilwis/meta-box/issues/801
|
74 |
-
* @see WP_oEmbed::fetch()
|
75 |
-
* @see WP_Embed::shortcode()
|
76 |
-
* @see wp_embed_defaults()
|
77 |
-
*/
|
78 |
-
$args = array();
|
79 |
-
if ( is_admin() ) {
|
80 |
-
$args['width'] = 360;
|
81 |
-
}
|
82 |
-
|
83 |
-
// Try oembed first.
|
84 |
-
$embed = wp_oembed_get( $url, $args );
|
85 |
-
|
86 |
-
// If no oembed provides found, try WordPress auto embed.
|
87 |
-
if ( ! $embed ) {
|
88 |
-
global $wp_embed;
|
89 |
-
$temp = $wp_embed->return_false_on_fail;
|
90 |
-
$wp_embed->return_false_on_fail = true; // Do not fallback to make a link.
|
91 |
-
$embed = $wp_embed->shortcode( $args, $url );
|
92 |
-
$wp_embed->return_false_on_fail = $temp;
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( $not_available ) {
|
96 |
-
$not_available = '<div class="rwmb-oembed-not-available">' . wp_kses_post( $not_available ) . '</div>';
|
97 |
-
}
|
98 |
-
$not_available = apply_filters( 'rwmb_oembed_not_available_string', $not_available );
|
99 |
-
|
100 |
-
return $embed ? $embed : $not_available;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Get field HTML.
|
105 |
-
*
|
106 |
-
* @param mixed $meta Meta value.
|
107 |
-
* @param array $field Field parameters.
|
108 |
-
* @return string
|
109 |
-
*/
|
110 |
-
public static function html( $meta, $field ) {
|
111 |
-
return parent::html( $meta, $field ) . sprintf(
|
112 |
-
'<span class="spinner"></span>
|
113 |
-
<div class="rwmb-embed-media">%s</div>',
|
114 |
-
$meta ? self::get_embed( $meta, $field['not_available_string'] ) : ''
|
115 |
-
);
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Get the attributes for a field.
|
120 |
-
*
|
121 |
-
* @param array $field Field parameters.
|
122 |
-
* @param mixed $value Meta value.
|
123 |
-
*
|
124 |
-
* @return array
|
125 |
-
*/
|
126 |
-
public static function get_attributes( $field, $value = null ) {
|
127 |
-
$attributes = parent::get_attributes( $field, $value );
|
128 |
-
$attributes['type'] = 'url';
|
129 |
-
return $attributes;
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
134 |
-
*
|
135 |
-
* @param array $field Field parameters.
|
136 |
-
* @param string $value The value.
|
137 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
138 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
139 |
-
*
|
140 |
-
* @return string
|
141 |
-
*/
|
142 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
143 |
-
return self::get_embed( $value, $field['not_available_string'] );
|
144 |
-
}
|
145 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The oEmbed field which allows users to enter oEmbed URLs.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* OEmbed field class.
|
10 |
+
*/
|
11 |
+
class RWMB_OEmbed_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
$field = parent::normalize( $field );
|
20 |
+
|
21 |
+
$field = wp_parse_args(
|
22 |
+
$field,
|
23 |
+
array(
|
24 |
+
'not_available_string' => __( 'Embed HTML not available.', 'meta-box' ),
|
25 |
+
)
|
26 |
+
);
|
27 |
+
$field['attributes'] = wp_parse_args(
|
28 |
+
$field['attributes'],
|
29 |
+
array(
|
30 |
+
'data-not-available' => $field['not_available_string'],
|
31 |
+
)
|
32 |
+
);
|
33 |
+
|
34 |
+
return $field;
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Enqueue scripts and styles.
|
39 |
+
*/
|
40 |
+
public static function admin_enqueue_scripts() {
|
41 |
+
wp_enqueue_style( 'rwmb-oembed', RWMB_CSS_URL . 'oembed.css', '', RWMB_VER );
|
42 |
+
wp_enqueue_script( 'rwmb-oembed', RWMB_JS_URL . 'oembed.js', array( 'jquery', 'underscore' ), RWMB_VER, true );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Add actions.
|
47 |
+
*/
|
48 |
+
public static function add_actions() {
|
49 |
+
add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Ajax callback for returning oEmbed HTML.
|
54 |
+
*/
|
55 |
+
public static function wp_ajax_get_embed() {
|
56 |
+
$url = (string) filter_input( INPUT_POST, 'url', FILTER_SANITIZE_URL );
|
57 |
+
$not_available = (string) filter_input( INPUT_POST, 'not_available' );
|
58 |
+
wp_send_json_success( self::get_embed( $url, $not_available ) );
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get embed html from url.
|
63 |
+
*
|
64 |
+
* @param string $url URL.
|
65 |
+
* @param string $not_available Not available string displayed to users.
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public static function get_embed( $url, $not_available = '' ) {
|
69 |
+
/**
|
70 |
+
* Set arguments for getting embeded HTML.
|
71 |
+
* Without arguments, default width will be taken from global $content_width, which can break UI in the admin.
|
72 |
+
*
|
73 |
+
* @link https://github.com/rilwis/meta-box/issues/801
|
74 |
+
* @see WP_oEmbed::fetch()
|
75 |
+
* @see WP_Embed::shortcode()
|
76 |
+
* @see wp_embed_defaults()
|
77 |
+
*/
|
78 |
+
$args = array();
|
79 |
+
if ( is_admin() ) {
|
80 |
+
$args['width'] = 360;
|
81 |
+
}
|
82 |
+
|
83 |
+
// Try oembed first.
|
84 |
+
$embed = wp_oembed_get( $url, $args );
|
85 |
+
|
86 |
+
// If no oembed provides found, try WordPress auto embed.
|
87 |
+
if ( ! $embed ) {
|
88 |
+
global $wp_embed;
|
89 |
+
$temp = $wp_embed->return_false_on_fail;
|
90 |
+
$wp_embed->return_false_on_fail = true; // Do not fallback to make a link.
|
91 |
+
$embed = $wp_embed->shortcode( $args, $url );
|
92 |
+
$wp_embed->return_false_on_fail = $temp;
|
93 |
+
}
|
94 |
+
|
95 |
+
if ( $not_available ) {
|
96 |
+
$not_available = '<div class="rwmb-oembed-not-available">' . wp_kses_post( $not_available ) . '</div>';
|
97 |
+
}
|
98 |
+
$not_available = apply_filters( 'rwmb_oembed_not_available_string', $not_available );
|
99 |
+
|
100 |
+
return $embed ? $embed : $not_available;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Get field HTML.
|
105 |
+
*
|
106 |
+
* @param mixed $meta Meta value.
|
107 |
+
* @param array $field Field parameters.
|
108 |
+
* @return string
|
109 |
+
*/
|
110 |
+
public static function html( $meta, $field ) {
|
111 |
+
return parent::html( $meta, $field ) . sprintf(
|
112 |
+
'<span class="spinner"></span>
|
113 |
+
<div class="rwmb-embed-media">%s</div>',
|
114 |
+
$meta ? self::get_embed( $meta, $field['not_available_string'] ) : ''
|
115 |
+
);
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Get the attributes for a field.
|
120 |
+
*
|
121 |
+
* @param array $field Field parameters.
|
122 |
+
* @param mixed $value Meta value.
|
123 |
+
*
|
124 |
+
* @return array
|
125 |
+
*/
|
126 |
+
public static function get_attributes( $field, $value = null ) {
|
127 |
+
$attributes = parent::get_attributes( $field, $value );
|
128 |
+
$attributes['type'] = 'url';
|
129 |
+
return $attributes;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
134 |
+
*
|
135 |
+
* @param array $field Field parameters.
|
136 |
+
* @param string $value The value.
|
137 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
138 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
139 |
+
*
|
140 |
+
* @return string
|
141 |
+
*/
|
142 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
143 |
+
return self::get_embed( $value, $field['not_available_string'] );
|
144 |
+
}
|
145 |
+
}
|
inc/libraries/meta-box/inc/fields/osm.php
CHANGED
@@ -1,175 +1,175 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Open Street Map field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
* @since 4.15.0
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* Open Street Map field class.
|
11 |
-
*/
|
12 |
-
class RWMB_OSM_Field extends RWMB_Field {
|
13 |
-
/**
|
14 |
-
* Enqueue scripts and styles.
|
15 |
-
*/
|
16 |
-
public static function admin_enqueue_scripts() {
|
17 |
-
// Because map is a hosted service, it's ok to use hosted Leaflet scripts.
|
18 |
-
wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
|
19 |
-
wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
|
20 |
-
|
21 |
-
wp_enqueue_style( 'rwmb-osm', RWMB_CSS_URL . 'osm.css', array( 'leaflet' ), RWMB_VER );
|
22 |
-
wp_enqueue_script( 'rwmb-osm', RWMB_JS_URL . 'osm.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
|
23 |
-
self::localize_script(
|
24 |
-
'rwmb-osm',
|
25 |
-
'RWMB_Osm',
|
26 |
-
array(
|
27 |
-
'no_results_string' => __( 'No results found', 'meta-box' ),
|
28 |
-
)
|
29 |
-
);
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Get field HTML.
|
34 |
-
*
|
35 |
-
* @param mixed $meta Meta value.
|
36 |
-
* @param array $field Field parameters.
|
37 |
-
*
|
38 |
-
* @return string
|
39 |
-
*/
|
40 |
-
public static function html( $meta, $field ) {
|
41 |
-
$address = is_array( $field['address_field'] ) ? implode( ',', $field['address_field'] ) : $field['address_field'];
|
42 |
-
$html = sprintf(
|
43 |
-
'<div class="rwmb-osm-field" data-address-field="%s">',
|
44 |
-
esc_attr( $address )
|
45 |
-
);
|
46 |
-
|
47 |
-
$html .= sprintf(
|
48 |
-
'<div class="rwmb-osm-canvas" data-default-loc="%s" data-region="%s" data-language="%s"></div>
|
49 |
-
<input type="hidden" name="%s" class="rwmb-osm-coordinate" value="%s">',
|
50 |
-
esc_attr( $field['std'] ),
|
51 |
-
esc_attr( $field['region'] ),
|
52 |
-
esc_attr( $field['language'] ),
|
53 |
-
esc_attr( $field['field_name'] ),
|
54 |
-
esc_attr( $meta )
|
55 |
-
);
|
56 |
-
|
57 |
-
if ( $field['address_field'] ) {
|
58 |
-
$html .= sprintf(
|
59 |
-
'<button class="button rwmb-osm-goto-address-button">%s</button>',
|
60 |
-
esc_html__( 'Find Address', 'meta-box' )
|
61 |
-
);
|
62 |
-
}
|
63 |
-
|
64 |
-
$html .= '</div>';
|
65 |
-
|
66 |
-
return $html;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Normalize parameters for field.
|
71 |
-
*
|
72 |
-
* @param array $field Field parameters.
|
73 |
-
*
|
74 |
-
* @return array
|
75 |
-
*/
|
76 |
-
public static function normalize( $field ) {
|
77 |
-
$field = parent::normalize( $field );
|
78 |
-
$field = wp_parse_args(
|
79 |
-
$field,
|
80 |
-
array(
|
81 |
-
'std' => '',
|
82 |
-
'address_field' => '',
|
83 |
-
'language' => '',
|
84 |
-
'region' => '',
|
85 |
-
)
|
86 |
-
);
|
87 |
-
|
88 |
-
return $field;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Get the field value.
|
93 |
-
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
94 |
-
* of the field saved in the database, while this function returns more meaningful value of the field.
|
95 |
-
*
|
96 |
-
* @param array $field Field parameters.
|
97 |
-
* @param array $args Not used for this field.
|
98 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
99 |
-
*
|
100 |
-
* @return mixed Array(latitude, longitude, zoom)
|
101 |
-
*/
|
102 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
103 |
-
$value = parent::get_value( $field, $args, $post_id );
|
104 |
-
list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
|
105 |
-
return compact( 'latitude', 'longitude', 'zoom' );
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Output the field value.
|
110 |
-
* Display Google maps.
|
111 |
-
*
|
112 |
-
* @param array $field Field parameters.
|
113 |
-
* @param array $args Additional arguments for the map.
|
114 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
115 |
-
*
|
116 |
-
* @return string HTML output of the field
|
117 |
-
*/
|
118 |
-
public static function the_value( $field, $args = array(), $post_id = null ) {
|
119 |
-
$value = parent::get_value( $field, $args, $post_id );
|
120 |
-
return self::render_map( $value, $args );
|
121 |
-
}
|
122 |
-
|
123 |
-
/**
|
124 |
-
* Render a map in the frontend.
|
125 |
-
*
|
126 |
-
* @param array $location The [latitude, longitude[, zoom]] location.
|
127 |
-
* @param array $args Additional arguments for the map.
|
128 |
-
*
|
129 |
-
* @return string
|
130 |
-
*/
|
131 |
-
public static function render_map( $location, $args = array() ) {
|
132 |
-
list( $latitude, $longitude, $zoom ) = explode( ',', $location . ',,' );
|
133 |
-
if ( ! $latitude || ! $longitude ) {
|
134 |
-
return '';
|
135 |
-
}
|
136 |
-
|
137 |
-
$args = wp_parse_args(
|
138 |
-
$args,
|
139 |
-
array(
|
140 |
-
'latitude' => $latitude,
|
141 |
-
'longitude' => $longitude,
|
142 |
-
'width' => '100%',
|
143 |
-
'height' => '480px',
|
144 |
-
'marker' => true, // Display marker?
|
145 |
-
'marker_title' => '', // Marker title, when hover.
|
146 |
-
'info_window' => '', // Content of info window (when click on marker). HTML allowed.
|
147 |
-
'js_options' => array(),
|
148 |
-
)
|
149 |
-
);
|
150 |
-
|
151 |
-
wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
|
152 |
-
wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
|
153 |
-
wp_enqueue_script( 'rwmb-osm-frontend', RWMB_JS_URL . 'osm-frontend.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
|
154 |
-
|
155 |
-
/*
|
156 |
-
* More Open Street Map options
|
157 |
-
* @link https://leafletjs.com/reference-1.3.0.html#map-option
|
158 |
-
*/
|
159 |
-
$args['js_options'] = wp_parse_args(
|
160 |
-
$args['js_options'],
|
161 |
-
array(
|
162 |
-
// Default to 'zoom' level set in admin, but can be overwritten.
|
163 |
-
'zoom' => $zoom,
|
164 |
-
)
|
165 |
-
);
|
166 |
-
|
167 |
-
$output = sprintf(
|
168 |
-
'<div class="rwmb-osm-canvas" data-osm_options="%s" style="width:%s;height:%s"></div>',
|
169 |
-
esc_attr( wp_json_encode( $args ) ),
|
170 |
-
esc_attr( $args['width'] ),
|
171 |
-
esc_attr( $args['height'] )
|
172 |
-
);
|
173 |
-
return $output;
|
174 |
-
}
|
175 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Open Street Map field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
* @since 4.15.0
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* Open Street Map field class.
|
11 |
+
*/
|
12 |
+
class RWMB_OSM_Field extends RWMB_Field {
|
13 |
+
/**
|
14 |
+
* Enqueue scripts and styles.
|
15 |
+
*/
|
16 |
+
public static function admin_enqueue_scripts() {
|
17 |
+
// Because map is a hosted service, it's ok to use hosted Leaflet scripts.
|
18 |
+
wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
|
19 |
+
wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
|
20 |
+
|
21 |
+
wp_enqueue_style( 'rwmb-osm', RWMB_CSS_URL . 'osm.css', array( 'leaflet' ), RWMB_VER );
|
22 |
+
wp_enqueue_script( 'rwmb-osm', RWMB_JS_URL . 'osm.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
|
23 |
+
self::localize_script(
|
24 |
+
'rwmb-osm',
|
25 |
+
'RWMB_Osm',
|
26 |
+
array(
|
27 |
+
'no_results_string' => __( 'No results found', 'meta-box' ),
|
28 |
+
)
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get field HTML.
|
34 |
+
*
|
35 |
+
* @param mixed $meta Meta value.
|
36 |
+
* @param array $field Field parameters.
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
public static function html( $meta, $field ) {
|
41 |
+
$address = is_array( $field['address_field'] ) ? implode( ',', $field['address_field'] ) : $field['address_field'];
|
42 |
+
$html = sprintf(
|
43 |
+
'<div class="rwmb-osm-field" data-address-field="%s">',
|
44 |
+
esc_attr( $address )
|
45 |
+
);
|
46 |
+
|
47 |
+
$html .= sprintf(
|
48 |
+
'<div class="rwmb-osm-canvas" data-default-loc="%s" data-region="%s" data-language="%s"></div>
|
49 |
+
<input type="hidden" name="%s" class="rwmb-osm-coordinate" value="%s">',
|
50 |
+
esc_attr( $field['std'] ),
|
51 |
+
esc_attr( $field['region'] ),
|
52 |
+
esc_attr( $field['language'] ),
|
53 |
+
esc_attr( $field['field_name'] ),
|
54 |
+
esc_attr( $meta )
|
55 |
+
);
|
56 |
+
|
57 |
+
if ( $field['address_field'] ) {
|
58 |
+
$html .= sprintf(
|
59 |
+
'<button class="button rwmb-osm-goto-address-button">%s</button>',
|
60 |
+
esc_html__( 'Find Address', 'meta-box' )
|
61 |
+
);
|
62 |
+
}
|
63 |
+
|
64 |
+
$html .= '</div>';
|
65 |
+
|
66 |
+
return $html;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Normalize parameters for field.
|
71 |
+
*
|
72 |
+
* @param array $field Field parameters.
|
73 |
+
*
|
74 |
+
* @return array
|
75 |
+
*/
|
76 |
+
public static function normalize( $field ) {
|
77 |
+
$field = parent::normalize( $field );
|
78 |
+
$field = wp_parse_args(
|
79 |
+
$field,
|
80 |
+
array(
|
81 |
+
'std' => '',
|
82 |
+
'address_field' => '',
|
83 |
+
'language' => '',
|
84 |
+
'region' => '',
|
85 |
+
)
|
86 |
+
);
|
87 |
+
|
88 |
+
return $field;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get the field value.
|
93 |
+
* The difference between this function and 'meta' function is 'meta' function always returns the escaped value
|
94 |
+
* of the field saved in the database, while this function returns more meaningful value of the field.
|
95 |
+
*
|
96 |
+
* @param array $field Field parameters.
|
97 |
+
* @param array $args Not used for this field.
|
98 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
99 |
+
*
|
100 |
+
* @return mixed Array(latitude, longitude, zoom)
|
101 |
+
*/
|
102 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
103 |
+
$value = parent::get_value( $field, $args, $post_id );
|
104 |
+
list( $latitude, $longitude, $zoom ) = explode( ',', $value . ',,' );
|
105 |
+
return compact( 'latitude', 'longitude', 'zoom' );
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Output the field value.
|
110 |
+
* Display Google maps.
|
111 |
+
*
|
112 |
+
* @param array $field Field parameters.
|
113 |
+
* @param array $args Additional arguments for the map.
|
114 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
115 |
+
*
|
116 |
+
* @return string HTML output of the field
|
117 |
+
*/
|
118 |
+
public static function the_value( $field, $args = array(), $post_id = null ) {
|
119 |
+
$value = parent::get_value( $field, $args, $post_id );
|
120 |
+
return self::render_map( $value, $args );
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Render a map in the frontend.
|
125 |
+
*
|
126 |
+
* @param array $location The [latitude, longitude[, zoom]] location.
|
127 |
+
* @param array $args Additional arguments for the map.
|
128 |
+
*
|
129 |
+
* @return string
|
130 |
+
*/
|
131 |
+
public static function render_map( $location, $args = array() ) {
|
132 |
+
list( $latitude, $longitude, $zoom ) = explode( ',', $location . ',,' );
|
133 |
+
if ( ! $latitude || ! $longitude ) {
|
134 |
+
return '';
|
135 |
+
}
|
136 |
+
|
137 |
+
$args = wp_parse_args(
|
138 |
+
$args,
|
139 |
+
array(
|
140 |
+
'latitude' => $latitude,
|
141 |
+
'longitude' => $longitude,
|
142 |
+
'width' => '100%',
|
143 |
+
'height' => '480px',
|
144 |
+
'marker' => true, // Display marker?
|
145 |
+
'marker_title' => '', // Marker title, when hover.
|
146 |
+
'info_window' => '', // Content of info window (when click on marker). HTML allowed.
|
147 |
+
'js_options' => array(),
|
148 |
+
)
|
149 |
+
);
|
150 |
+
|
151 |
+
wp_enqueue_style( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.css', array(), '1.3.1' );
|
152 |
+
wp_enqueue_script( 'leaflet', 'https://unpkg.com/leaflet@1.3.1/dist/leaflet.js', array(), '1.3.1', true );
|
153 |
+
wp_enqueue_script( 'rwmb-osm-frontend', RWMB_JS_URL . 'osm-frontend.js', array( 'jquery', 'leaflet' ), RWMB_VER, true );
|
154 |
+
|
155 |
+
/*
|
156 |
+
* More Open Street Map options
|
157 |
+
* @link https://leafletjs.com/reference-1.3.0.html#map-option
|
158 |
+
*/
|
159 |
+
$args['js_options'] = wp_parse_args(
|
160 |
+
$args['js_options'],
|
161 |
+
array(
|
162 |
+
// Default to 'zoom' level set in admin, but can be overwritten.
|
163 |
+
'zoom' => $zoom,
|
164 |
+
)
|
165 |
+
);
|
166 |
+
|
167 |
+
$output = sprintf(
|
168 |
+
'<div class="rwmb-osm-canvas" data-osm_options="%s" style="width:%s;height:%s"></div>',
|
169 |
+
esc_attr( wp_json_encode( $args ) ),
|
170 |
+
esc_attr( $args['width'] ),
|
171 |
+
esc_attr( $args['height'] )
|
172 |
+
);
|
173 |
+
return $output;
|
174 |
+
}
|
175 |
+
}
|
inc/libraries/meta-box/inc/fields/password.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The secured password field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Password field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Password_Field extends RWMB_Text_Field {
|
12 |
-
/**
|
13 |
-
* Store secured password in the database.
|
14 |
-
*
|
15 |
-
* @param mixed $new The submitted meta value.
|
16 |
-
* @param mixed $old The existing meta value.
|
17 |
-
* @param int $post_id The post ID.
|
18 |
-
* @param array $field The field parameters.
|
19 |
-
* @return string
|
20 |
-
*/
|
21 |
-
public static function value( $new, $old, $post_id, $field ) {
|
22 |
-
$new = $new !== $old ? wp_hash_password( $new ) : $new;
|
23 |
-
return $new;
|
24 |
-
}
|
25 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The secured password field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Password field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Password_Field extends RWMB_Text_Field {
|
12 |
+
/**
|
13 |
+
* Store secured password in the database.
|
14 |
+
*
|
15 |
+
* @param mixed $new The submitted meta value.
|
16 |
+
* @param mixed $old The existing meta value.
|
17 |
+
* @param int $post_id The post ID.
|
18 |
+
* @param array $field The field parameters.
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
public static function value( $new, $old, $post_id, $field ) {
|
22 |
+
$new = $new !== $old ? wp_hash_password( $new ) : $new;
|
23 |
+
return $new;
|
24 |
+
}
|
25 |
+
}
|
inc/libraries/meta-box/inc/fields/post.php
CHANGED
@@ -1,135 +1,135 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The post field which allows users to select existing posts.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Post field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Post_Field extends RWMB_Object_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
$field = wp_parse_args(
|
20 |
-
$field,
|
21 |
-
array(
|
22 |
-
'post_type' => 'post',
|
23 |
-
'parent' => false,
|
24 |
-
'query_args' => array(),
|
25 |
-
)
|
26 |
-
);
|
27 |
-
|
28 |
-
$field['post_type'] = (array) $field['post_type'];
|
29 |
-
|
30 |
-
/*
|
31 |
-
* Set default placeholder:
|
32 |
-
* - If multiple post types: show 'Select a post'.
|
33 |
-
* - If single post type: show 'Select a %post_type_name%'.
|
34 |
-
*/
|
35 |
-
$placeholder = __( 'Select a post', 'meta-box' );
|
36 |
-
if ( 1 === count( $field['post_type'] ) ) {
|
37 |
-
$post_type = reset( $field['post_type'] );
|
38 |
-
$post_type_object = get_post_type_object( $post_type );
|
39 |
-
if ( ! empty( $post_type_object ) ) {
|
40 |
-
// Translators: %s is the taxonomy singular label.
|
41 |
-
$placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $post_type_object->labels->singular_name ) );
|
42 |
-
}
|
43 |
-
}
|
44 |
-
$field = wp_parse_args(
|
45 |
-
$field,
|
46 |
-
array(
|
47 |
-
'placeholder' => $placeholder,
|
48 |
-
)
|
49 |
-
);
|
50 |
-
|
51 |
-
// Set parent option, which will change field name to `parent_id` to save as post parent.
|
52 |
-
if ( $field['parent'] ) {
|
53 |
-
$field['multiple'] = false;
|
54 |
-
$field['field_name'] = 'parent_id';
|
55 |
-
}
|
56 |
-
|
57 |
-
$field = parent::normalize( $field );
|
58 |
-
|
59 |
-
return $field;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Query posts for field options.
|
64 |
-
*
|
65 |
-
* @param array $field Field settings.
|
66 |
-
* @return array Field options array.
|
67 |
-
*/
|
68 |
-
public static function query( $field ) {
|
69 |
-
$args = wp_parse_args(
|
70 |
-
$field['query_args'],
|
71 |
-
array(
|
72 |
-
'post_type' => $field['post_type'],
|
73 |
-
'post_status' => 'publish',
|
74 |
-
'posts_per_page' => -1,
|
75 |
-
'no_found_rows' => true,
|
76 |
-
'update_post_meta_cache' => false,
|
77 |
-
'update_post_term_cache' => false,
|
78 |
-
)
|
79 |
-
);
|
80 |
-
$query = new WP_Query( $args );
|
81 |
-
$options = array();
|
82 |
-
foreach ( $query->posts as $post ) {
|
83 |
-
$options[ $post->ID ] = array_merge(
|
84 |
-
array(
|
85 |
-
'value' => $post->ID,
|
86 |
-
'label' => $post->post_title,
|
87 |
-
'parent' => $post->post_parent,
|
88 |
-
),
|
89 |
-
(array) $post
|
90 |
-
);
|
91 |
-
}
|
92 |
-
return $options;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Get meta value.
|
97 |
-
* If field is cloneable, value is saved as a single entry in DB.
|
98 |
-
* Otherwise value is saved as multiple entries (for backward compatibility).
|
99 |
-
*
|
100 |
-
* @see "save" method for better understanding
|
101 |
-
*
|
102 |
-
* @param int $post_id Post ID.
|
103 |
-
* @param bool $saved Is the meta box saved.
|
104 |
-
* @param array $field Field parameters.
|
105 |
-
*
|
106 |
-
* @return mixed
|
107 |
-
*/
|
108 |
-
public static function meta( $post_id, $saved, $field ) {
|
109 |
-
return $field['parent'] ? wp_get_post_parent_id( $post_id ) : parent::meta( $post_id, $saved, $field );
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
114 |
-
*
|
115 |
-
* @param array $field Field parameters.
|
116 |
-
* @param string $value The value.
|
117 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
118 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
119 |
-
*
|
120 |
-
* @return string
|
121 |
-
*/
|
122 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
123 |
-
return ! $value ? '' : sprintf(
|
124 |
-
'<a href="%s" title="%s">%s</a>',
|
125 |
-
esc_url( get_permalink( $value ) ),
|
126 |
-
the_title_attribute(
|
127 |
-
array(
|
128 |
-
'post' => $value,
|
129 |
-
'echo' => false,
|
130 |
-
)
|
131 |
-
),
|
132 |
-
get_the_title( $value )
|
133 |
-
);
|
134 |
-
}
|
135 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The post field which allows users to select existing posts.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Post field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Post_Field extends RWMB_Object_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
$field = wp_parse_args(
|
20 |
+
$field,
|
21 |
+
array(
|
22 |
+
'post_type' => 'post',
|
23 |
+
'parent' => false,
|
24 |
+
'query_args' => array(),
|
25 |
+
)
|
26 |
+
);
|
27 |
+
|
28 |
+
$field['post_type'] = (array) $field['post_type'];
|
29 |
+
|
30 |
+
/*
|
31 |
+
* Set default placeholder:
|
32 |
+
* - If multiple post types: show 'Select a post'.
|
33 |
+
* - If single post type: show 'Select a %post_type_name%'.
|
34 |
+
*/
|
35 |
+
$placeholder = __( 'Select a post', 'meta-box' );
|
36 |
+
if ( 1 === count( $field['post_type'] ) ) {
|
37 |
+
$post_type = reset( $field['post_type'] );
|
38 |
+
$post_type_object = get_post_type_object( $post_type );
|
39 |
+
if ( ! empty( $post_type_object ) ) {
|
40 |
+
// Translators: %s is the taxonomy singular label.
|
41 |
+
$placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $post_type_object->labels->singular_name ) );
|
42 |
+
}
|
43 |
+
}
|
44 |
+
$field = wp_parse_args(
|
45 |
+
$field,
|
46 |
+
array(
|
47 |
+
'placeholder' => $placeholder,
|
48 |
+
)
|
49 |
+
);
|
50 |
+
|
51 |
+
// Set parent option, which will change field name to `parent_id` to save as post parent.
|
52 |
+
if ( $field['parent'] ) {
|
53 |
+
$field['multiple'] = false;
|
54 |
+
$field['field_name'] = 'parent_id';
|
55 |
+
}
|
56 |
+
|
57 |
+
$field = parent::normalize( $field );
|
58 |
+
|
59 |
+
return $field;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Query posts for field options.
|
64 |
+
*
|
65 |
+
* @param array $field Field settings.
|
66 |
+
* @return array Field options array.
|
67 |
+
*/
|
68 |
+
public static function query( $field ) {
|
69 |
+
$args = wp_parse_args(
|
70 |
+
$field['query_args'],
|
71 |
+
array(
|
72 |
+
'post_type' => $field['post_type'],
|
73 |
+
'post_status' => 'publish',
|
74 |
+
'posts_per_page' => -1,
|
75 |
+
'no_found_rows' => true,
|
76 |
+
'update_post_meta_cache' => false,
|
77 |
+
'update_post_term_cache' => false,
|
78 |
+
)
|
79 |
+
);
|
80 |
+
$query = new WP_Query( $args );
|
81 |
+
$options = array();
|
82 |
+
foreach ( $query->posts as $post ) {
|
83 |
+
$options[ $post->ID ] = array_merge(
|
84 |
+
array(
|
85 |
+
'value' => $post->ID,
|
86 |
+
'label' => $post->post_title,
|
87 |
+
'parent' => $post->post_parent,
|
88 |
+
),
|
89 |
+
(array) $post
|
90 |
+
);
|
91 |
+
}
|
92 |
+
return $options;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get meta value.
|
97 |
+
* If field is cloneable, value is saved as a single entry in DB.
|
98 |
+
* Otherwise value is saved as multiple entries (for backward compatibility).
|
99 |
+
*
|
100 |
+
* @see "save" method for better understanding
|
101 |
+
*
|
102 |
+
* @param int $post_id Post ID.
|
103 |
+
* @param bool $saved Is the meta box saved.
|
104 |
+
* @param array $field Field parameters.
|
105 |
+
*
|
106 |
+
* @return mixed
|
107 |
+
*/
|
108 |
+
public static function meta( $post_id, $saved, $field ) {
|
109 |
+
return $field['parent'] ? wp_get_post_parent_id( $post_id ) : parent::meta( $post_id, $saved, $field );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
114 |
+
*
|
115 |
+
* @param array $field Field parameters.
|
116 |
+
* @param string $value The value.
|
117 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
118 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
119 |
+
*
|
120 |
+
* @return string
|
121 |
+
*/
|
122 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
123 |
+
return ! $value ? '' : sprintf(
|
124 |
+
'<a href="%s" title="%s">%s</a>',
|
125 |
+
esc_url( get_permalink( $value ) ),
|
126 |
+
the_title_attribute(
|
127 |
+
array(
|
128 |
+
'post' => $value,
|
129 |
+
'echo' => false,
|
130 |
+
)
|
131 |
+
),
|
132 |
+
get_the_title( $value )
|
133 |
+
);
|
134 |
+
}
|
135 |
+
}
|
inc/libraries/meta-box/inc/fields/radio.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The radio field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Radio field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Radio_Field extends RWMB_Input_List_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
$field['multiple'] = false;
|
20 |
-
$field = parent::normalize( $field );
|
21 |
-
|
22 |
-
return $field;
|
23 |
-
}
|
24 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The radio field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Radio field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Radio_Field extends RWMB_Input_List_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
$field['multiple'] = false;
|
20 |
+
$field = parent::normalize( $field );
|
21 |
+
|
22 |
+
return $field;
|
23 |
+
}
|
24 |
+
}
|
inc/libraries/meta-box/inc/fields/range.php
CHANGED
@@ -1,73 +1,73 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The HTML5 range field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* HTML5 range field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Range_Field extends RWMB_Number_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
$output = parent::html( $meta, $field );
|
21 |
-
$output .= sprintf( '<span class="rwmb-output">%s</span>', $meta );
|
22 |
-
return $output;
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Enqueue styles.
|
27 |
-
*/
|
28 |
-
public static function admin_enqueue_scripts() {
|
29 |
-
wp_enqueue_style( 'rwmb-range', RWMB_CSS_URL . 'range.css', array(), RWMB_VER );
|
30 |
-
wp_enqueue_script( 'rwmb-range', RWMB_JS_URL . 'range.js', array(), RWMB_VER, true );
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Normalize parameters for field.
|
35 |
-
*
|
36 |
-
* @param array $field Field parameters.
|
37 |
-
* @return array
|
38 |
-
*/
|
39 |
-
public static function normalize( $field ) {
|
40 |
-
$field = wp_parse_args(
|
41 |
-
$field,
|
42 |
-
array(
|
43 |
-
'max' => 10,
|
44 |
-
)
|
45 |
-
);
|
46 |
-
$field = parent::normalize( $field );
|
47 |
-
return $field;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Ensure number in range.
|
52 |
-
*
|
53 |
-
* @param mixed $new The submitted meta value.
|
54 |
-
* @param mixed $old The existing meta value.
|
55 |
-
* @param int $post_id The post ID.
|
56 |
-
* @param array $field The field parameters.
|
57 |
-
*
|
58 |
-
* @return int
|
59 |
-
*/
|
60 |
-
public static function value( $new, $old, $post_id, $field ) {
|
61 |
-
$new = intval( $new );
|
62 |
-
$min = intval( $field['min'] );
|
63 |
-
$max = intval( $field['max'] );
|
64 |
-
|
65 |
-
if ( $new < $min ) {
|
66 |
-
return $min;
|
67 |
-
}
|
68 |
-
if ( $new > $max ) {
|
69 |
-
return $max;
|
70 |
-
}
|
71 |
-
return $new;
|
72 |
-
}
|
73 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The HTML5 range field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* HTML5 range field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Range_Field extends RWMB_Number_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
$output = parent::html( $meta, $field );
|
21 |
+
$output .= sprintf( '<span class="rwmb-output">%s</span>', $meta );
|
22 |
+
return $output;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Enqueue styles.
|
27 |
+
*/
|
28 |
+
public static function admin_enqueue_scripts() {
|
29 |
+
wp_enqueue_style( 'rwmb-range', RWMB_CSS_URL . 'range.css', array(), RWMB_VER );
|
30 |
+
wp_enqueue_script( 'rwmb-range', RWMB_JS_URL . 'range.js', array(), RWMB_VER, true );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Normalize parameters for field.
|
35 |
+
*
|
36 |
+
* @param array $field Field parameters.
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public static function normalize( $field ) {
|
40 |
+
$field = wp_parse_args(
|
41 |
+
$field,
|
42 |
+
array(
|
43 |
+
'max' => 10,
|
44 |
+
)
|
45 |
+
);
|
46 |
+
$field = parent::normalize( $field );
|
47 |
+
return $field;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Ensure number in range.
|
52 |
+
*
|
53 |
+
* @param mixed $new The submitted meta value.
|
54 |
+
* @param mixed $old The existing meta value.
|
55 |
+
* @param int $post_id The post ID.
|
56 |
+
* @param array $field The field parameters.
|
57 |
+
*
|
58 |
+
* @return int
|
59 |
+
*/
|
60 |
+
public static function value( $new, $old, $post_id, $field ) {
|
61 |
+
$new = intval( $new );
|
62 |
+
$min = intval( $field['min'] );
|
63 |
+
$max = intval( $field['max'] );
|
64 |
+
|
65 |
+
if ( $new < $min ) {
|
66 |
+
return $min;
|
67 |
+
}
|
68 |
+
if ( $new > $max ) {
|
69 |
+
return $max;
|
70 |
+
}
|
71 |
+
return $new;
|
72 |
+
}
|
73 |
+
}
|
inc/libraries/meta-box/inc/fields/select-advanced.php
CHANGED
@@ -1,83 +1,83 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The beautiful select field which uses select2 library.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Select advanced field which uses select2 library.
|
10 |
-
*/
|
11 |
-
class RWMB_Select_Advanced_Field extends RWMB_Select_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_enqueue_scripts();
|
17 |
-
wp_enqueue_style( 'rwmb-select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
|
18 |
-
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
19 |
-
|
20 |
-
wp_register_script( 'rwmb-select2', RWMB_JS_URL . 'select2/select2.min.js', array( 'jquery' ), '4.0.2', true );
|
21 |
-
|
22 |
-
// Localize.
|
23 |
-
$dependencies = array( 'rwmb-select2', 'rwmb-select' );
|
24 |
-
$locale = str_replace( '_', '-', get_locale() );
|
25 |
-
$locale_short = substr( $locale, 0, 2 );
|
26 |
-
$locale = file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) ? $locale : $locale_short;
|
27 |
-
|
28 |
-
if ( file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) ) {
|
29 |
-
wp_register_script( 'rwmb-select2-i18n', RWMB_JS_URL . "select2/i18n/$locale.js", array( 'rwmb-select2' ), '4.0.2', true );
|
30 |
-
$dependencies[] = 'rwmb-select2-i18n';
|
31 |
-
}
|
32 |
-
|
33 |
-
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', $dependencies, RWMB_VER, true );
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Normalize parameters for field.
|
38 |
-
*
|
39 |
-
* @param array $field Field parameters.
|
40 |
-
* @return array
|
41 |
-
*/
|
42 |
-
public static function normalize( $field ) {
|
43 |
-
$field = wp_parse_args(
|
44 |
-
$field,
|
45 |
-
array(
|
46 |
-
'js_options' => array(),
|
47 |
-
'placeholder' => __( 'Select an item', 'meta-box' ),
|
48 |
-
)
|
49 |
-
);
|
50 |
-
|
51 |
-
$field = parent::normalize( $field );
|
52 |
-
|
53 |
-
$field['js_options'] = wp_parse_args(
|
54 |
-
$field['js_options'],
|
55 |
-
array(
|
56 |
-
'allowClear' => true,
|
57 |
-
'width' => 'none',
|
58 |
-
'placeholder' => $field['placeholder'],
|
59 |
-
)
|
60 |
-
);
|
61 |
-
|
62 |
-
return $field;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Get the attributes for a field.
|
67 |
-
*
|
68 |
-
* @param array $field Field parameters.
|
69 |
-
* @param mixed $value Meta value.
|
70 |
-
* @return array
|
71 |
-
*/
|
72 |
-
public static function get_attributes( $field, $value = null ) {
|
73 |
-
$attributes = parent::get_attributes( $field, $value );
|
74 |
-
$attributes = wp_parse_args(
|
75 |
-
$attributes,
|
76 |
-
array(
|
77 |
-
'data-options' => wp_json_encode( $field['js_options'] ),
|
78 |
-
)
|
79 |
-
);
|
80 |
-
|
81 |
-
return $attributes;
|
82 |
-
}
|
83 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The beautiful select field which uses select2 library.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Select advanced field which uses select2 library.
|
10 |
+
*/
|
11 |
+
class RWMB_Select_Advanced_Field extends RWMB_Select_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
wp_enqueue_style( 'rwmb-select2', RWMB_CSS_URL . 'select2/select2.css', array(), '4.0.1' );
|
18 |
+
wp_enqueue_style( 'rwmb-select-advanced', RWMB_CSS_URL . 'select-advanced.css', array(), RWMB_VER );
|
19 |
+
|
20 |
+
wp_register_script( 'rwmb-select2', RWMB_JS_URL . 'select2/select2.min.js', array( 'jquery' ), '4.0.2', true );
|
21 |
+
|
22 |
+
// Localize.
|
23 |
+
$dependencies = array( 'rwmb-select2', 'rwmb-select' );
|
24 |
+
$locale = str_replace( '_', '-', get_locale() );
|
25 |
+
$locale_short = substr( $locale, 0, 2 );
|
26 |
+
$locale = file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) ? $locale : $locale_short;
|
27 |
+
|
28 |
+
if ( file_exists( RWMB_DIR . "js/select2/i18n/$locale.js" ) ) {
|
29 |
+
wp_register_script( 'rwmb-select2-i18n', RWMB_JS_URL . "select2/i18n/$locale.js", array( 'rwmb-select2' ), '4.0.2', true );
|
30 |
+
$dependencies[] = 'rwmb-select2-i18n';
|
31 |
+
}
|
32 |
+
|
33 |
+
wp_enqueue_script( 'rwmb-select-advanced', RWMB_JS_URL . 'select-advanced.js', $dependencies, RWMB_VER, true );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Normalize parameters for field.
|
38 |
+
*
|
39 |
+
* @param array $field Field parameters.
|
40 |
+
* @return array
|
41 |
+
*/
|
42 |
+
public static function normalize( $field ) {
|
43 |
+
$field = wp_parse_args(
|
44 |
+
$field,
|
45 |
+
array(
|
46 |
+
'js_options' => array(),
|
47 |
+
'placeholder' => __( 'Select an item', 'meta-box' ),
|
48 |
+
)
|
49 |
+
);
|
50 |
+
|
51 |
+
$field = parent::normalize( $field );
|
52 |
+
|
53 |
+
$field['js_options'] = wp_parse_args(
|
54 |
+
$field['js_options'],
|
55 |
+
array(
|
56 |
+
'allowClear' => true,
|
57 |
+
'width' => 'none',
|
58 |
+
'placeholder' => $field['placeholder'],
|
59 |
+
)
|
60 |
+
);
|
61 |
+
|
62 |
+
return $field;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get the attributes for a field.
|
67 |
+
*
|
68 |
+
* @param array $field Field parameters.
|
69 |
+
* @param mixed $value Meta value.
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public static function get_attributes( $field, $value = null ) {
|
73 |
+
$attributes = parent::get_attributes( $field, $value );
|
74 |
+
$attributes = wp_parse_args(
|
75 |
+
$attributes,
|
76 |
+
array(
|
77 |
+
'data-options' => wp_json_encode( $field['js_options'] ),
|
78 |
+
)
|
79 |
+
);
|
80 |
+
|
81 |
+
return $attributes;
|
82 |
+
}
|
83 |
+
}
|
inc/libraries/meta-box/inc/fields/select-tree.php
CHANGED
@@ -1,63 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The select tree field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Select tree field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Select_Tree_Field extends RWMB_Select_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
* @return string
|
18 |
-
*/
|
19 |
-
public static function html( $meta, $field ) {
|
20 |
-
$options = self::transform_options( $field['options'] );
|
21 |
-
$walker = new RWMB_Walker_Select_Tree( $field, $meta );
|
22 |
-
return $options ? $walker->walk( $options ) : '';
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Enqueue scripts and styles.
|
27 |
-
*/
|
28 |
-
public static function admin_enqueue_scripts() {
|
29 |
-
parent::admin_enqueue_scripts();
|
30 |
-
wp_enqueue_style( 'rwmb-select-tree', RWMB_CSS_URL . 'select-tree.css', array( 'rwmb-select' ), RWMB_VER );
|
31 |
-
wp_enqueue_script( 'rwmb-select-tree', RWMB_JS_URL . 'select-tree.js', array( 'rwmb-select' ), RWMB_VER, true );
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Normalize parameters for field.
|
36 |
-
*
|
37 |
-
* @param array $field Field parameters.
|
38 |
-
* @return array
|
39 |
-
*/
|
40 |
-
public static function normalize( $field ) {
|
41 |
-
$field['multiple'] = true;
|
42 |
-
$field['size'] = 0;
|
43 |
-
$field = parent::normalize( $field );
|
44 |
-
|
45 |
-
return $field;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Get the attributes for a field.
|
50 |
-
*
|
51 |
-
* @param array $field Field parameters.
|
52 |
-
* @param mixed $value Meta value.
|
53 |
-
*
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public static function get_attributes( $field, $value = null ) {
|
57 |
-
$attributes = parent::get_attributes( $field, $value );
|
58 |
-
$attributes['multiple'] = false;
|
59 |
-
$attributes['id'] = false;
|
60 |
-
|
61 |
-
return $attributes;
|
62 |
-
}
|
63 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The select tree field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Select tree field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Select_Tree_Field extends RWMB_Select_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
* @return string
|
18 |
+
*/
|
19 |
+
public static function html( $meta, $field ) {
|
20 |
+
$options = self::transform_options( $field['options'] );
|
21 |
+
$walker = new RWMB_Walker_Select_Tree( $field, $meta );
|
22 |
+
return $options ? $walker->walk( $options ) : '';
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Enqueue scripts and styles.
|
27 |
+
*/
|
28 |
+
public static function admin_enqueue_scripts() {
|
29 |
+
parent::admin_enqueue_scripts();
|
30 |
+
wp_enqueue_style( 'rwmb-select-tree', RWMB_CSS_URL . 'select-tree.css', array( 'rwmb-select' ), RWMB_VER );
|
31 |
+
wp_enqueue_script( 'rwmb-select-tree', RWMB_JS_URL . 'select-tree.js', array( 'rwmb-select' ), RWMB_VER, true );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Normalize parameters for field.
|
36 |
+
*
|
37 |
+
* @param array $field Field parameters.
|
38 |
+
* @return array
|
39 |
+
*/
|
40 |
+
public static function normalize( $field ) {
|
41 |
+
$field['multiple'] = true;
|
42 |
+
$field['size'] = 0;
|
43 |
+
$field = parent::normalize( $field );
|
44 |
+
|
45 |
+
return $field;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get the attributes for a field.
|
50 |
+
*
|
51 |
+
* @param array $field Field parameters.
|
52 |
+
* @param mixed $value Meta value.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public static function get_attributes( $field, $value = null ) {
|
57 |
+
$attributes = parent::get_attributes( $field, $value );
|
58 |
+
$attributes['multiple'] = false;
|
59 |
+
$attributes['id'] = false;
|
60 |
+
|
61 |
+
return $attributes;
|
62 |
+
}
|
63 |
+
}
|
inc/libraries/meta-box/inc/fields/select.php
CHANGED
@@ -1,96 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The select field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Select field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Select_Field extends RWMB_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-select', RWMB_CSS_URL . 'select.css', array(), RWMB_VER );
|
17 |
-
wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array( 'jquery' ), RWMB_VER, true );
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Get field HTML.
|
22 |
-
*
|
23 |
-
* @param mixed $meta Meta value.
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$options = self::transform_options( $field['options'] );
|
29 |
-
$attributes = self::call( 'get_attributes', $field, $meta );
|
30 |
-
$attributes['data-selected'] = $meta;
|
31 |
-
$walker = new RWMB_Walker_Select( $field, $meta );
|
32 |
-
$output = sprintf(
|
33 |
-
'<select %s>',
|
34 |
-
self::render_attributes( $attributes )
|
35 |
-
);
|
36 |
-
if ( ! $field['multiple'] && $field['placeholder'] ) {
|
37 |
-
$output .= '<option value="">' . esc_html( $field['placeholder'] ) . '</option>';
|
38 |
-
}
|
39 |
-
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
40 |
-
$output .= '</select>';
|
41 |
-
$output .= self::get_select_all_html( $field );
|
42 |
-
return $output;
|
43 |
-
}
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Normalize parameters for field.
|
47 |
-
*
|
48 |
-
* @param array $field Field parameters.
|
49 |
-
* @return array
|
50 |
-
*/
|
51 |
-
public static function normalize( $field ) {
|
52 |
-
$field = parent::normalize( $field );
|
53 |
-
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
54 |
-
$field = wp_parse_args(
|
55 |
-
$field,
|
56 |
-
array(
|
57 |
-
'select_all_none' => false,
|
58 |
-
)
|
59 |
-
);
|
60 |
-
|
61 |
-
return $field;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Get the attributes for a field.
|
66 |
-
*
|
67 |
-
* @param array $field Field parameters.
|
68 |
-
* @param mixed $value Meta value.
|
69 |
-
*
|
70 |
-
* @return array
|
71 |
-
*/
|
72 |
-
public static function get_attributes( $field, $value = null ) {
|
73 |
-
$attributes = parent::get_attributes( $field, $value );
|
74 |
-
$attributes = wp_parse_args(
|
75 |
-
$attributes,
|
76 |
-
array(
|
77 |
-
'multiple' => $field['multiple'],
|
78 |
-
)
|
79 |
-
);
|
80 |
-
|
81 |
-
return $attributes;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Get html for select all|none for multiple select.
|
86 |
-
*
|
87 |
-
* @param array $field Field parameters.
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public static function get_select_all_html( $field ) {
|
91 |
-
if ( $field['multiple'] && $field['select_all_none'] ) {
|
92 |
-
return '<div class="rwmb-select-all-none">' . __( 'Select', 'meta-box' ) . ': <a data-type="all" href="#">' . __( 'All', 'meta-box' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'meta-box' ) . '</a></div>';
|
93 |
-
}
|
94 |
-
return '';
|
95 |
-
}
|
96 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The select field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Select field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Select_Field extends RWMB_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-select', RWMB_CSS_URL . 'select.css', array(), RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-select', RWMB_JS_URL . 'select.js', array( 'jquery' ), RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML.
|
22 |
+
*
|
23 |
+
* @param mixed $meta Meta value.
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$options = self::transform_options( $field['options'] );
|
29 |
+
$attributes = self::call( 'get_attributes', $field, $meta );
|
30 |
+
$attributes['data-selected'] = $meta;
|
31 |
+
$walker = new RWMB_Walker_Select( $field, $meta );
|
32 |
+
$output = sprintf(
|
33 |
+
'<select %s>',
|
34 |
+
self::render_attributes( $attributes )
|
35 |
+
);
|
36 |
+
if ( ! $field['multiple'] && $field['placeholder'] ) {
|
37 |
+
$output .= '<option value="">' . esc_html( $field['placeholder'] ) . '</option>';
|
38 |
+
}
|
39 |
+
$output .= $walker->walk( $options, $field['flatten'] ? -1 : 0 );
|
40 |
+
$output .= '</select>';
|
41 |
+
$output .= self::get_select_all_html( $field );
|
42 |
+
return $output;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Normalize parameters for field.
|
47 |
+
*
|
48 |
+
* @param array $field Field parameters.
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
public static function normalize( $field ) {
|
52 |
+
$field = parent::normalize( $field );
|
53 |
+
$field = $field['multiple'] ? RWMB_Multiple_Values_Field::normalize( $field ) : $field;
|
54 |
+
$field = wp_parse_args(
|
55 |
+
$field,
|
56 |
+
array(
|
57 |
+
'select_all_none' => false,
|
58 |
+
)
|
59 |
+
);
|
60 |
+
|
61 |
+
return $field;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Get the attributes for a field.
|
66 |
+
*
|
67 |
+
* @param array $field Field parameters.
|
68 |
+
* @param mixed $value Meta value.
|
69 |
+
*
|
70 |
+
* @return array
|
71 |
+
*/
|
72 |
+
public static function get_attributes( $field, $value = null ) {
|
73 |
+
$attributes = parent::get_attributes( $field, $value );
|
74 |
+
$attributes = wp_parse_args(
|
75 |
+
$attributes,
|
76 |
+
array(
|
77 |
+
'multiple' => $field['multiple'],
|
78 |
+
)
|
79 |
+
);
|
80 |
+
|
81 |
+
return $attributes;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get html for select all|none for multiple select.
|
86 |
+
*
|
87 |
+
* @param array $field Field parameters.
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public static function get_select_all_html( $field ) {
|
91 |
+
if ( $field['multiple'] && $field['select_all_none'] ) {
|
92 |
+
return '<div class="rwmb-select-all-none">' . __( 'Select', 'meta-box' ) . ': <a data-type="all" href="#">' . __( 'All', 'meta-box' ) . '</a> | <a data-type="none" href="#">' . __( 'None', 'meta-box' ) . '</a></div>';
|
93 |
+
}
|
94 |
+
return '';
|
95 |
+
}
|
96 |
+
}
|
inc/libraries/meta-box/inc/fields/sidebar.php
CHANGED
@@ -1,68 +1,68 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The sidebar select field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Sidebar field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Sidebar_Field extends RWMB_Object_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public static function normalize( $field ) {
|
20 |
-
$field = wp_parse_args(
|
21 |
-
$field,
|
22 |
-
array(
|
23 |
-
'placeholder' => __( 'Select a sidebar', 'meta-box' ),
|
24 |
-
)
|
25 |
-
);
|
26 |
-
|
27 |
-
$field = parent::normalize( $field );
|
28 |
-
|
29 |
-
return $field;
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Get sidebars for field options.
|
34 |
-
*
|
35 |
-
* @param array $field Field settings.
|
36 |
-
* @return array Field options array.
|
37 |
-
*/
|
38 |
-
public static function query( $field ) {
|
39 |
-
global $wp_registered_sidebars;
|
40 |
-
$options = array();
|
41 |
-
foreach ( $wp_registered_sidebars as $sidebar ) {
|
42 |
-
$options[ $sidebar['id'] ] = array(
|
43 |
-
'value' => $sidebar['id'],
|
44 |
-
'label' => $sidebar['name'],
|
45 |
-
);
|
46 |
-
}
|
47 |
-
return $options;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
52 |
-
*
|
53 |
-
* @param array $field Field parameters.
|
54 |
-
* @param string $value The value.
|
55 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
56 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
57 |
-
*
|
58 |
-
* @return string
|
59 |
-
*/
|
60 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
61 |
-
if ( ! is_active_sidebar( $value ) ) {
|
62 |
-
return '';
|
63 |
-
}
|
64 |
-
ob_start();
|
65 |
-
dynamic_sidebar( $value );
|
66 |
-
return ob_get_clean();
|
67 |
-
}
|
68 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The sidebar select field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Sidebar field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Sidebar_Field extends RWMB_Object_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public static function normalize( $field ) {
|
20 |
+
$field = wp_parse_args(
|
21 |
+
$field,
|
22 |
+
array(
|
23 |
+
'placeholder' => __( 'Select a sidebar', 'meta-box' ),
|
24 |
+
)
|
25 |
+
);
|
26 |
+
|
27 |
+
$field = parent::normalize( $field );
|
28 |
+
|
29 |
+
return $field;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get sidebars for field options.
|
34 |
+
*
|
35 |
+
* @param array $field Field settings.
|
36 |
+
* @return array Field options array.
|
37 |
+
*/
|
38 |
+
public static function query( $field ) {
|
39 |
+
global $wp_registered_sidebars;
|
40 |
+
$options = array();
|
41 |
+
foreach ( $wp_registered_sidebars as $sidebar ) {
|
42 |
+
$options[ $sidebar['id'] ] = array(
|
43 |
+
'value' => $sidebar['id'],
|
44 |
+
'label' => $sidebar['name'],
|
45 |
+
);
|
46 |
+
}
|
47 |
+
return $options;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
52 |
+
*
|
53 |
+
* @param array $field Field parameters.
|
54 |
+
* @param string $value The value.
|
55 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
56 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
57 |
+
*
|
58 |
+
* @return string
|
59 |
+
*/
|
60 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
61 |
+
if ( ! is_active_sidebar( $value ) ) {
|
62 |
+
return '';
|
63 |
+
}
|
64 |
+
ob_start();
|
65 |
+
dynamic_sidebar( $value );
|
66 |
+
return ob_get_clean();
|
67 |
+
}
|
68 |
+
}
|
inc/libraries/meta-box/inc/fields/single-image.php
CHANGED
@@ -1,76 +1,76 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The advanced image upload field which uses WordPress media popup to upload and select images.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Image advanced field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Single_Image_Field extends RWMB_Image_Advanced_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public static function normalize( $field ) {
|
20 |
-
$field['max_file_uploads'] = 1;
|
21 |
-
$field['max_status'] = false;
|
22 |
-
|
23 |
-
$field = parent::normalize( $field );
|
24 |
-
|
25 |
-
$field['attributes'] = wp_parse_args(
|
26 |
-
$field['attributes'],
|
27 |
-
array(
|
28 |
-
'class' => '',
|
29 |
-
'data-single-image' => 1,
|
30 |
-
)
|
31 |
-
);
|
32 |
-
|
33 |
-
$field['attributes']['class'] .= ' rwmb-image_advanced';
|
34 |
-
$field['multiple'] = false;
|
35 |
-
|
36 |
-
return $field;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get meta values to save.
|
41 |
-
*
|
42 |
-
* @param mixed $new The submitted meta value.
|
43 |
-
* @param mixed $old The existing meta value.
|
44 |
-
* @param int $post_id The post ID.
|
45 |
-
* @param array $field The field parameters.
|
46 |
-
*
|
47 |
-
* @return array|mixed
|
48 |
-
*/
|
49 |
-
public static function value( $new, $old, $post_id, $field ) {
|
50 |
-
return $new;
|
51 |
-
}
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Get the field value. Return meaningful info of the files.
|
55 |
-
*
|
56 |
-
* @param array $field Field parameters.
|
57 |
-
* @param array $args Not used for this field.
|
58 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
59 |
-
*
|
60 |
-
* @return mixed Full info of uploaded files
|
61 |
-
*/
|
62 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
63 |
-
$value = RWMB_Field::get_value( $field, $args, $post_id );
|
64 |
-
|
65 |
-
if ( ! is_array( $value ) ) {
|
66 |
-
return RWMB_Image_Field::file_info( $value, $args );
|
67 |
-
}
|
68 |
-
|
69 |
-
$return = array();
|
70 |
-
foreach ( $value as $image_id ) {
|
71 |
-
$return[] = RWMB_Image_Field::file_info( $image_id, $args );
|
72 |
-
}
|
73 |
-
|
74 |
-
return $return;
|
75 |
-
}
|
76 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The advanced image upload field which uses WordPress media popup to upload and select images.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Image advanced field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Single_Image_Field extends RWMB_Image_Advanced_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public static function normalize( $field ) {
|
20 |
+
$field['max_file_uploads'] = 1;
|
21 |
+
$field['max_status'] = false;
|
22 |
+
|
23 |
+
$field = parent::normalize( $field );
|
24 |
+
|
25 |
+
$field['attributes'] = wp_parse_args(
|
26 |
+
$field['attributes'],
|
27 |
+
array(
|
28 |
+
'class' => '',
|
29 |
+
'data-single-image' => 1,
|
30 |
+
)
|
31 |
+
);
|
32 |
+
|
33 |
+
$field['attributes']['class'] .= ' rwmb-image_advanced';
|
34 |
+
$field['multiple'] = false;
|
35 |
+
|
36 |
+
return $field;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get meta values to save.
|
41 |
+
*
|
42 |
+
* @param mixed $new The submitted meta value.
|
43 |
+
* @param mixed $old The existing meta value.
|
44 |
+
* @param int $post_id The post ID.
|
45 |
+
* @param array $field The field parameters.
|
46 |
+
*
|
47 |
+
* @return array|mixed
|
48 |
+
*/
|
49 |
+
public static function value( $new, $old, $post_id, $field ) {
|
50 |
+
return $new;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get the field value. Return meaningful info of the files.
|
55 |
+
*
|
56 |
+
* @param array $field Field parameters.
|
57 |
+
* @param array $args Not used for this field.
|
58 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
59 |
+
*
|
60 |
+
* @return mixed Full info of uploaded files
|
61 |
+
*/
|
62 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
63 |
+
$value = RWMB_Field::get_value( $field, $args, $post_id );
|
64 |
+
|
65 |
+
if ( ! is_array( $value ) ) {
|
66 |
+
return RWMB_Image_Field::file_info( $value, $args );
|
67 |
+
}
|
68 |
+
|
69 |
+
$return = array();
|
70 |
+
foreach ( $value as $image_id ) {
|
71 |
+
$return[] = RWMB_Image_Field::file_info( $image_id, $args );
|
72 |
+
}
|
73 |
+
|
74 |
+
return $return;
|
75 |
+
}
|
76 |
+
}
|
inc/libraries/meta-box/inc/fields/slider.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The slider field which users jQueryUI slider widget.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Slider field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Slider_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
-
wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
-
wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
-
wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
|
20 |
-
wp_enqueue_style( 'rwmb-slider', RWMB_CSS_URL . 'slider.css', array(), RWMB_VER );
|
21 |
-
|
22 |
-
wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), RWMB_VER, true );
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Get div HTML.
|
27 |
-
*
|
28 |
-
* @param mixed $meta Meta value.
|
29 |
-
* @param array $field Field parameters.
|
30 |
-
*
|
31 |
-
* @return string
|
32 |
-
*/
|
33 |
-
public static function html( $meta, $field ) {
|
34 |
-
return sprintf(
|
35 |
-
'<div class="clearfix">
|
36 |
-
<div class="rwmb-slider" id="%s" data-options="%s"></div>
|
37 |
-
<span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
|
38 |
-
<input type="hidden" name="%s" value="%s" class="rwmb-slider-value">
|
39 |
-
</div>',
|
40 |
-
$field['id'],
|
41 |
-
esc_attr( wp_json_encode( $field['js_options'] ) ),
|
42 |
-
$field['prefix'],
|
43 |
-
( $meta >= 0 ) ? $meta : $field['std'],
|
44 |
-
$field['suffix'],
|
45 |
-
$field['field_name'],
|
46 |
-
( $meta >= 0 ) ? $meta : $field['std']
|
47 |
-
);
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Normalize parameters for field.
|
52 |
-
*
|
53 |
-
* @param array $field Field parameters.
|
54 |
-
*
|
55 |
-
* @return array
|
56 |
-
*/
|
57 |
-
public static function normalize( $field ) {
|
58 |
-
$field = parent::normalize( $field );
|
59 |
-
$field = wp_parse_args(
|
60 |
-
$field,
|
61 |
-
array(
|
62 |
-
'prefix' => '',
|
63 |
-
'suffix' => '',
|
64 |
-
'std' => '',
|
65 |
-
'js_options' => array(),
|
66 |
-
)
|
67 |
-
);
|
68 |
-
$field['js_options'] = wp_parse_args(
|
69 |
-
$field['js_options'],
|
70 |
-
array(
|
71 |
-
'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI.
|
72 |
-
'value' => $field['std'],
|
73 |
-
)
|
74 |
-
);
|
75 |
-
|
76 |
-
return $field;
|
77 |
-
}
|
78 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The slider field which users jQueryUI slider widget.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Slider field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Slider_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
$url = RWMB_CSS_URL . 'jqueryui';
|
17 |
+
wp_enqueue_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
+
wp_enqueue_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
+
wp_enqueue_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array(), '1.8.17' );
|
20 |
+
wp_enqueue_style( 'rwmb-slider', RWMB_CSS_URL . 'slider.css', array(), RWMB_VER );
|
21 |
+
|
22 |
+
wp_enqueue_script( 'rwmb-slider', RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), RWMB_VER, true );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get div HTML.
|
27 |
+
*
|
28 |
+
* @param mixed $meta Meta value.
|
29 |
+
* @param array $field Field parameters.
|
30 |
+
*
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
public static function html( $meta, $field ) {
|
34 |
+
return sprintf(
|
35 |
+
'<div class="clearfix">
|
36 |
+
<div class="rwmb-slider" id="%s" data-options="%s"></div>
|
37 |
+
<span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
|
38 |
+
<input type="hidden" name="%s" value="%s" class="rwmb-slider-value">
|
39 |
+
</div>',
|
40 |
+
$field['id'],
|
41 |
+
esc_attr( wp_json_encode( $field['js_options'] ) ),
|
42 |
+
$field['prefix'],
|
43 |
+
( $meta >= 0 ) ? $meta : $field['std'],
|
44 |
+
$field['suffix'],
|
45 |
+
$field['field_name'],
|
46 |
+
( $meta >= 0 ) ? $meta : $field['std']
|
47 |
+
);
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Normalize parameters for field.
|
52 |
+
*
|
53 |
+
* @param array $field Field parameters.
|
54 |
+
*
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public static function normalize( $field ) {
|
58 |
+
$field = parent::normalize( $field );
|
59 |
+
$field = wp_parse_args(
|
60 |
+
$field,
|
61 |
+
array(
|
62 |
+
'prefix' => '',
|
63 |
+
'suffix' => '',
|
64 |
+
'std' => '',
|
65 |
+
'js_options' => array(),
|
66 |
+
)
|
67 |
+
);
|
68 |
+
$field['js_options'] = wp_parse_args(
|
69 |
+
$field['js_options'],
|
70 |
+
array(
|
71 |
+
'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI.
|
72 |
+
'value' => $field['std'],
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
return $field;
|
77 |
+
}
|
78 |
+
}
|
inc/libraries/meta-box/inc/fields/switch.php
CHANGED
@@ -1,97 +1,97 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The Switch field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Switch field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Switch_Field extends RWMB_Input_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-switch', RWMB_CSS_URL . 'switch.css', '', RWMB_VER );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get field HTML.
|
21 |
-
*
|
22 |
-
* @param mixed $meta Meta value.
|
23 |
-
* @param array $field Field parameters.
|
24 |
-
*
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
$attributes = self::get_attributes( $field, 1 );
|
29 |
-
$output = sprintf(
|
30 |
-
'<label class="rwmb-switch-label rwmb-switch-label--' . esc_attr( $field['style'] ) . '">
|
31 |
-
<input %s %s>
|
32 |
-
<div class="rwmb-switch-status">
|
33 |
-
<span class="rwmb-switch-slider"></span>
|
34 |
-
<span class="rwmb-switch-on">' . $field['on_label'] . '</span>
|
35 |
-
<span class="rwmb-switch-off">' . $field['off_label'] . '</span>
|
36 |
-
</div>
|
37 |
-
</label>
|
38 |
-
',
|
39 |
-
self::render_attributes( $attributes ),
|
40 |
-
checked( ! empty( $meta ), 1, false )
|
41 |
-
);
|
42 |
-
|
43 |
-
return $output;
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Normalize parameters for field.
|
48 |
-
*
|
49 |
-
* @param array $field Field parameters.
|
50 |
-
*
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public static function normalize( $field ) {
|
54 |
-
$field = parent::normalize( $field );
|
55 |
-
$field = wp_parse_args(
|
56 |
-
$field,
|
57 |
-
array(
|
58 |
-
'style' => 'rounded',
|
59 |
-
'on_label' => '',
|
60 |
-
'off_label' => '',
|
61 |
-
)
|
62 |
-
);
|
63 |
-
|
64 |
-
return $field;
|
65 |
-
}
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Get the attributes for a field.
|
69 |
-
*
|
70 |
-
* @param array $field The field parameters.
|
71 |
-
* @param mixed $value The attribute value.
|
72 |
-
*
|
73 |
-
* @return array
|
74 |
-
*/
|
75 |
-
public static function get_attributes( $field, $value = null ) {
|
76 |
-
$attributes = parent::get_attributes( $field, $value );
|
77 |
-
$attributes['type'] = 'checkbox';
|
78 |
-
|
79 |
-
return $attributes;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
84 |
-
*
|
85 |
-
* @param array $field Field parameters.
|
86 |
-
* @param string $value The value.
|
87 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
88 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
89 |
-
*
|
90 |
-
* @return string
|
91 |
-
*/
|
92 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
93 |
-
$on = $field['on_label'] ? $field['on_label'] : __( 'On', 'meta-box' );
|
94 |
-
$off = $field['off_label'] ? $field['on_label'] : __( 'Off', 'meta-box' );
|
95 |
-
return $value ? $on : $off;
|
96 |
-
}
|
97 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The Switch field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Switch field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Switch_Field extends RWMB_Input_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-switch', RWMB_CSS_URL . 'switch.css', '', RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML.
|
21 |
+
*
|
22 |
+
* @param mixed $meta Meta value.
|
23 |
+
* @param array $field Field parameters.
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
$attributes = self::get_attributes( $field, 1 );
|
29 |
+
$output = sprintf(
|
30 |
+
'<label class="rwmb-switch-label rwmb-switch-label--' . esc_attr( $field['style'] ) . '">
|
31 |
+
<input %s %s>
|
32 |
+
<div class="rwmb-switch-status">
|
33 |
+
<span class="rwmb-switch-slider"></span>
|
34 |
+
<span class="rwmb-switch-on">' . $field['on_label'] . '</span>
|
35 |
+
<span class="rwmb-switch-off">' . $field['off_label'] . '</span>
|
36 |
+
</div>
|
37 |
+
</label>
|
38 |
+
',
|
39 |
+
self::render_attributes( $attributes ),
|
40 |
+
checked( ! empty( $meta ), 1, false )
|
41 |
+
);
|
42 |
+
|
43 |
+
return $output;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Normalize parameters for field.
|
48 |
+
*
|
49 |
+
* @param array $field Field parameters.
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
public static function normalize( $field ) {
|
54 |
+
$field = parent::normalize( $field );
|
55 |
+
$field = wp_parse_args(
|
56 |
+
$field,
|
57 |
+
array(
|
58 |
+
'style' => 'rounded',
|
59 |
+
'on_label' => '',
|
60 |
+
'off_label' => '',
|
61 |
+
)
|
62 |
+
);
|
63 |
+
|
64 |
+
return $field;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Get the attributes for a field.
|
69 |
+
*
|
70 |
+
* @param array $field The field parameters.
|
71 |
+
* @param mixed $value The attribute value.
|
72 |
+
*
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
public static function get_attributes( $field, $value = null ) {
|
76 |
+
$attributes = parent::get_attributes( $field, $value );
|
77 |
+
$attributes['type'] = 'checkbox';
|
78 |
+
|
79 |
+
return $attributes;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
84 |
+
*
|
85 |
+
* @param array $field Field parameters.
|
86 |
+
* @param string $value The value.
|
87 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
88 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
89 |
+
*
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
93 |
+
$on = $field['on_label'] ? $field['on_label'] : __( 'On', 'meta-box' );
|
94 |
+
$off = $field['off_label'] ? $field['on_label'] : __( 'Off', 'meta-box' );
|
95 |
+
return $value ? $on : $off;
|
96 |
+
}
|
97 |
+
}
|
inc/libraries/meta-box/inc/fields/taxonomy-advanced.php
CHANGED
@@ -1,132 +1,132 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Taxonomy advanced field which saves terms' IDs in the post meta in CSV format.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* The taxonomy advanced field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
|
12 |
-
/**
|
13 |
-
* Get meta values to save.
|
14 |
-
* Save terms in custom field in form of comma-separated IDs, no more by setting post terms.
|
15 |
-
*
|
16 |
-
* @param mixed $new The submitted meta value.
|
17 |
-
* @param mixed $old The existing meta value.
|
18 |
-
* @param int $post_id The post ID.
|
19 |
-
* @param array $field The field parameters.
|
20 |
-
*
|
21 |
-
* @return string
|
22 |
-
*/
|
23 |
-
public static function value( $new, $old, $post_id, $field ) {
|
24 |
-
return implode( ',', array_unique( (array) $new ) );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Save meta value.
|
29 |
-
*
|
30 |
-
* @param mixed $new The submitted meta value.
|
31 |
-
* @param mixed $old The existing meta value.
|
32 |
-
* @param int $post_id The post ID.
|
33 |
-
* @param array $field The field parameters.
|
34 |
-
*/
|
35 |
-
public static function save( $new, $old, $post_id, $field ) {
|
36 |
-
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
37 |
-
return;
|
38 |
-
}
|
39 |
-
$storage = $field['storage'];
|
40 |
-
|
41 |
-
if ( ! $new ) {
|
42 |
-
$storage->delete( $post_id, $field['id'] );
|
43 |
-
return;
|
44 |
-
}
|
45 |
-
|
46 |
-
if ( ! $field['clone'] || ! $field['clone_as_multiple'] ) {
|
47 |
-
$storage->update( $post_id, $field['id'], $new );
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
// clone and clone_as_multiple.
|
52 |
-
$storage->delete( $post_id, $field['id'] );
|
53 |
-
foreach ( $new as $value ) {
|
54 |
-
$storage->add( $post_id, $field['id'], $value );
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Get raw meta value.
|
60 |
-
*
|
61 |
-
* @param int $object_id Object ID.
|
62 |
-
* @param array $field Field parameters.
|
63 |
-
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
64 |
-
*
|
65 |
-
* @return mixed
|
66 |
-
*/
|
67 |
-
public static function raw_meta( $object_id, $field, $args = array() ) {
|
68 |
-
$args['single'] = true;
|
69 |
-
$meta = RWMB_Field::raw_meta( $object_id, $field, $args );
|
70 |
-
|
71 |
-
if ( empty( $meta ) ) {
|
72 |
-
return $field['multiple'] ? array() : '';
|
73 |
-
}
|
74 |
-
|
75 |
-
$meta = is_array( $meta ) ? array_map( 'wp_parse_id_list', $meta ) : wp_parse_id_list( $meta );
|
76 |
-
|
77 |
-
$meta = array_filter( $meta );
|
78 |
-
|
79 |
-
return $meta;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Get the field value.
|
84 |
-
* Return list of post term objects.
|
85 |
-
*
|
86 |
-
* @param array $field Field parameters.
|
87 |
-
* @param array $args Additional arguments.
|
88 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
89 |
-
*
|
90 |
-
* @return array List of post term objects.
|
91 |
-
*/
|
92 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
93 |
-
$value = RWMB_Field::get_value( $field, $args, $post_id );
|
94 |
-
if ( ! $field['clone'] ) {
|
95 |
-
$value = self::call( 'terms_info', $field, $value, $args );
|
96 |
-
} else {
|
97 |
-
$return = array();
|
98 |
-
foreach ( $value as $subvalue ) {
|
99 |
-
$return[] = self::call( 'terms_info', $field, $subvalue, $args );
|
100 |
-
}
|
101 |
-
$value = $return;
|
102 |
-
}
|
103 |
-
|
104 |
-
return $value;
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Get terms information.
|
109 |
-
*
|
110 |
-
* @param array $field Field parameters.
|
111 |
-
* @param string $term_ids Term IDs, in CSV format.
|
112 |
-
* @param array $args Additional arguments (for image size).
|
113 |
-
*
|
114 |
-
* @return array
|
115 |
-
*/
|
116 |
-
public static function terms_info( $field, $term_ids, $args ) {
|
117 |
-
if ( empty( $term_ids ) ) {
|
118 |
-
return array();
|
119 |
-
}
|
120 |
-
$args = wp_parse_args(
|
121 |
-
array(
|
122 |
-
'include' => $term_ids,
|
123 |
-
'hide_empty' => false,
|
124 |
-
),
|
125 |
-
$args
|
126 |
-
);
|
127 |
-
|
128 |
-
$info = get_terms( $field['taxonomy'], $args );
|
129 |
-
$info = is_array( $info ) ? $info : array();
|
130 |
-
return $field['multiple'] ? $info : reset( $info );
|
131 |
-
}
|
132 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Taxonomy advanced field which saves terms' IDs in the post meta in CSV format.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* The taxonomy advanced field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field {
|
12 |
+
/**
|
13 |
+
* Get meta values to save.
|
14 |
+
* Save terms in custom field in form of comma-separated IDs, no more by setting post terms.
|
15 |
+
*
|
16 |
+
* @param mixed $new The submitted meta value.
|
17 |
+
* @param mixed $old The existing meta value.
|
18 |
+
* @param int $post_id The post ID.
|
19 |
+
* @param array $field The field parameters.
|
20 |
+
*
|
21 |
+
* @return string
|
22 |
+
*/
|
23 |
+
public static function value( $new, $old, $post_id, $field ) {
|
24 |
+
return implode( ',', array_unique( (array) $new ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Save meta value.
|
29 |
+
*
|
30 |
+
* @param mixed $new The submitted meta value.
|
31 |
+
* @param mixed $old The existing meta value.
|
32 |
+
* @param int $post_id The post ID.
|
33 |
+
* @param array $field The field parameters.
|
34 |
+
*/
|
35 |
+
public static function save( $new, $old, $post_id, $field ) {
|
36 |
+
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
$storage = $field['storage'];
|
40 |
+
|
41 |
+
if ( ! $new ) {
|
42 |
+
$storage->delete( $post_id, $field['id'] );
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
|
46 |
+
if ( ! $field['clone'] || ! $field['clone_as_multiple'] ) {
|
47 |
+
$storage->update( $post_id, $field['id'], $new );
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
// clone and clone_as_multiple.
|
52 |
+
$storage->delete( $post_id, $field['id'] );
|
53 |
+
foreach ( $new as $value ) {
|
54 |
+
$storage->add( $post_id, $field['id'], $value );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get raw meta value.
|
60 |
+
*
|
61 |
+
* @param int $object_id Object ID.
|
62 |
+
* @param array $field Field parameters.
|
63 |
+
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
64 |
+
*
|
65 |
+
* @return mixed
|
66 |
+
*/
|
67 |
+
public static function raw_meta( $object_id, $field, $args = array() ) {
|
68 |
+
$args['single'] = true;
|
69 |
+
$meta = RWMB_Field::raw_meta( $object_id, $field, $args );
|
70 |
+
|
71 |
+
if ( empty( $meta ) ) {
|
72 |
+
return $field['multiple'] ? array() : '';
|
73 |
+
}
|
74 |
+
|
75 |
+
$meta = is_array( $meta ) ? array_map( 'wp_parse_id_list', $meta ) : wp_parse_id_list( $meta );
|
76 |
+
|
77 |
+
$meta = array_filter( $meta );
|
78 |
+
|
79 |
+
return $meta;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get the field value.
|
84 |
+
* Return list of post term objects.
|
85 |
+
*
|
86 |
+
* @param array $field Field parameters.
|
87 |
+
* @param array $args Additional arguments.
|
88 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
89 |
+
*
|
90 |
+
* @return array List of post term objects.
|
91 |
+
*/
|
92 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
93 |
+
$value = RWMB_Field::get_value( $field, $args, $post_id );
|
94 |
+
if ( ! $field['clone'] ) {
|
95 |
+
$value = self::call( 'terms_info', $field, $value, $args );
|
96 |
+
} else {
|
97 |
+
$return = array();
|
98 |
+
foreach ( $value as $subvalue ) {
|
99 |
+
$return[] = self::call( 'terms_info', $field, $subvalue, $args );
|
100 |
+
}
|
101 |
+
$value = $return;
|
102 |
+
}
|
103 |
+
|
104 |
+
return $value;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Get terms information.
|
109 |
+
*
|
110 |
+
* @param array $field Field parameters.
|
111 |
+
* @param string $term_ids Term IDs, in CSV format.
|
112 |
+
* @param array $args Additional arguments (for image size).
|
113 |
+
*
|
114 |
+
* @return array
|
115 |
+
*/
|
116 |
+
public static function terms_info( $field, $term_ids, $args ) {
|
117 |
+
if ( empty( $term_ids ) ) {
|
118 |
+
return array();
|
119 |
+
}
|
120 |
+
$args = wp_parse_args(
|
121 |
+
array(
|
122 |
+
'include' => $term_ids,
|
123 |
+
'hide_empty' => false,
|
124 |
+
),
|
125 |
+
$args
|
126 |
+
);
|
127 |
+
|
128 |
+
$info = get_terms( $field['taxonomy'], $args );
|
129 |
+
$info = is_array( $info ) ? $info : array();
|
130 |
+
return $field['multiple'] ? $info : reset( $info );
|
131 |
+
}
|
132 |
+
}
|
inc/libraries/meta-box/inc/fields/taxonomy.php
CHANGED
@@ -1,212 +1,212 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The taxonomy field which aims to replace the built-in WordPress taxonomy UI with more options.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Taxonomy field class which set post terms when saving.
|
10 |
-
*/
|
11 |
-
class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Add default value for 'taxonomy' field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
// Backwards compatibility with field args.
|
20 |
-
if ( isset( $field['options']['args'] ) ) {
|
21 |
-
$field['query_args'] = $field['options']['args'];
|
22 |
-
}
|
23 |
-
if ( isset( $field['options']['taxonomy'] ) ) {
|
24 |
-
$field['taxonomy'] = $field['options']['taxonomy'];
|
25 |
-
}
|
26 |
-
if ( isset( $field['options']['type'] ) ) {
|
27 |
-
$field['field_type'] = $field['options']['type'];
|
28 |
-
}
|
29 |
-
|
30 |
-
// Set default field args.
|
31 |
-
$field = wp_parse_args(
|
32 |
-
$field,
|
33 |
-
array(
|
34 |
-
'taxonomy' => 'category',
|
35 |
-
'query_args' => array(),
|
36 |
-
)
|
37 |
-
);
|
38 |
-
|
39 |
-
// Force taxonomy to be an array.
|
40 |
-
$field['taxonomy'] = (array) $field['taxonomy'];
|
41 |
-
|
42 |
-
/*
|
43 |
-
* Set default placeholder:
|
44 |
-
* - If multiple taxonomies: show 'Select a term'.
|
45 |
-
* - If single taxonomy: show 'Select a %taxonomy_name%'.
|
46 |
-
*/
|
47 |
-
$placeholder = __( 'Select a term', 'meta-box' );
|
48 |
-
if ( 1 === count( $field['taxonomy'] ) ) {
|
49 |
-
$taxonomy = reset( $field['taxonomy'] );
|
50 |
-
$taxonomy_object = get_taxonomy( $taxonomy );
|
51 |
-
if ( false !== $taxonomy_object ) {
|
52 |
-
// Translators: %s is the taxonomy singular label.
|
53 |
-
$placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $taxonomy_object->labels->singular_name ) );
|
54 |
-
}
|
55 |
-
}
|
56 |
-
$field = wp_parse_args(
|
57 |
-
$field,
|
58 |
-
array(
|
59 |
-
'placeholder' => $placeholder,
|
60 |
-
)
|
61 |
-
);
|
62 |
-
|
63 |
-
// Set default query args.
|
64 |
-
$field['query_args'] = wp_parse_args(
|
65 |
-
$field['query_args'],
|
66 |
-
array(
|
67 |
-
'hide_empty' => false,
|
68 |
-
)
|
69 |
-
);
|
70 |
-
|
71 |
-
// Prevent cloning for taxonomy field, not for child fields (taxonomy_advanced).
|
72 |
-
if ( 'taxonomy' == $field['type'] ) {
|
73 |
-
$field['clone'] = false;
|
74 |
-
}
|
75 |
-
|
76 |
-
$field = parent::normalize( $field );
|
77 |
-
|
78 |
-
return $field;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Query terms for field options.
|
83 |
-
*
|
84 |
-
* @param array $field Field settings.
|
85 |
-
* @return array Field options array.
|
86 |
-
*/
|
87 |
-
public static function query( $field ) {
|
88 |
-
$args = wp_parse_args(
|
89 |
-
$field['query_args'],
|
90 |
-
array(
|
91 |
-
'taxonomy' => $field['taxonomy'],
|
92 |
-
'hide_empty' => false,
|
93 |
-
'count' => false,
|
94 |
-
'update_term_meta_cache' => false,
|
95 |
-
)
|
96 |
-
);
|
97 |
-
$terms = get_terms( $args );
|
98 |
-
if ( ! is_array( $terms ) ) {
|
99 |
-
return array();
|
100 |
-
}
|
101 |
-
$options = array();
|
102 |
-
foreach ( $terms as $term ) {
|
103 |
-
$options[ $term->term_id ] = array_merge(
|
104 |
-
array(
|
105 |
-
'value' => $term->term_id,
|
106 |
-
'label' => $term->name,
|
107 |
-
'parent' => $term->parent,
|
108 |
-
),
|
109 |
-
(array) $term
|
110 |
-
);
|
111 |
-
}
|
112 |
-
return $options;
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Save meta value.
|
117 |
-
*
|
118 |
-
* @param mixed $new The submitted meta value.
|
119 |
-
* @param mixed $old The existing meta value.
|
120 |
-
* @param int $post_id The post ID.
|
121 |
-
* @param array $field The field parameters.
|
122 |
-
*/
|
123 |
-
public static function save( $new, $old, $post_id, $field ) {
|
124 |
-
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
125 |
-
return;
|
126 |
-
}
|
127 |
-
$new = array_unique( array_map( 'intval', (array) $new ) );
|
128 |
-
$new = empty( $new ) ? null : $new;
|
129 |
-
|
130 |
-
foreach ( $field['taxonomy'] as $taxonomy ) {
|
131 |
-
wp_set_object_terms( $post_id, $new, $taxonomy );
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* Get raw meta value.
|
137 |
-
*
|
138 |
-
* @param int $object_id Object ID.
|
139 |
-
* @param array $field Field parameters.
|
140 |
-
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
141 |
-
*
|
142 |
-
* @return mixed
|
143 |
-
*/
|
144 |
-
public static function raw_meta( $object_id, $field, $args = array() ) {
|
145 |
-
if ( empty( $field['id'] ) ) {
|
146 |
-
return '';
|
147 |
-
}
|
148 |
-
|
149 |
-
$meta = wp_get_object_terms(
|
150 |
-
$object_id,
|
151 |
-
$field['taxonomy'],
|
152 |
-
array(
|
153 |
-
'orderby' => 'term_order',
|
154 |
-
)
|
155 |
-
);
|
156 |
-
if ( is_wp_error( $meta ) ) {
|
157 |
-
return '';
|
158 |
-
}
|
159 |
-
$meta = wp_list_pluck( $meta, 'term_id' );
|
160 |
-
|
161 |
-
return $field['multiple'] ? $meta : reset( $meta );
|
162 |
-
}
|
163 |
-
|
164 |
-
/**
|
165 |
-
* Get the field value.
|
166 |
-
* Return list of post term objects.
|
167 |
-
*
|
168 |
-
* @param array $field Field parameters.
|
169 |
-
* @param array $args Additional arguments.
|
170 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
171 |
-
*
|
172 |
-
* @return array List of post term objects.
|
173 |
-
*/
|
174 |
-
public static function get_value( $field, $args = array(), $post_id = null ) {
|
175 |
-
if ( ! $post_id ) {
|
176 |
-
$post_id = get_the_ID();
|
177 |
-
}
|
178 |
-
$value = wp_get_object_terms(
|
179 |
-
$post_id,
|
180 |
-
$field['taxonomy'],
|
181 |
-
array(
|
182 |
-
'orderby' => 'term_order',
|
183 |
-
)
|
184 |
-
);
|
185 |
-
|
186 |
-
// Get single value if necessary.
|
187 |
-
if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) ) {
|
188 |
-
$value = reset( $value );
|
189 |
-
}
|
190 |
-
return $value;
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
195 |
-
*
|
196 |
-
* @param array $field Field parameters.
|
197 |
-
* @param string $value The value.
|
198 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
199 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
200 |
-
*
|
201 |
-
* @return string
|
202 |
-
*/
|
203 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
204 |
-
return sprintf(
|
205 |
-
'<a href="%s" title="%s">%s</a>',
|
206 |
-
// @codingStandardsIgnoreLine
|
207 |
-
esc_url( get_term_link( $value ) ),
|
208 |
-
esc_attr( $value->name ),
|
209 |
-
esc_html( $value->name )
|
210 |
-
);
|
211 |
-
}
|
212 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The taxonomy field which aims to replace the built-in WordPress taxonomy UI with more options.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Taxonomy field class which set post terms when saving.
|
10 |
+
*/
|
11 |
+
class RWMB_Taxonomy_Field extends RWMB_Object_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Add default value for 'taxonomy' field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
// Backwards compatibility with field args.
|
20 |
+
if ( isset( $field['options']['args'] ) ) {
|
21 |
+
$field['query_args'] = $field['options']['args'];
|
22 |
+
}
|
23 |
+
if ( isset( $field['options']['taxonomy'] ) ) {
|
24 |
+
$field['taxonomy'] = $field['options']['taxonomy'];
|
25 |
+
}
|
26 |
+
if ( isset( $field['options']['type'] ) ) {
|
27 |
+
$field['field_type'] = $field['options']['type'];
|
28 |
+
}
|
29 |
+
|
30 |
+
// Set default field args.
|
31 |
+
$field = wp_parse_args(
|
32 |
+
$field,
|
33 |
+
array(
|
34 |
+
'taxonomy' => 'category',
|
35 |
+
'query_args' => array(),
|
36 |
+
)
|
37 |
+
);
|
38 |
+
|
39 |
+
// Force taxonomy to be an array.
|
40 |
+
$field['taxonomy'] = (array) $field['taxonomy'];
|
41 |
+
|
42 |
+
/*
|
43 |
+
* Set default placeholder:
|
44 |
+
* - If multiple taxonomies: show 'Select a term'.
|
45 |
+
* - If single taxonomy: show 'Select a %taxonomy_name%'.
|
46 |
+
*/
|
47 |
+
$placeholder = __( 'Select a term', 'meta-box' );
|
48 |
+
if ( 1 === count( $field['taxonomy'] ) ) {
|
49 |
+
$taxonomy = reset( $field['taxonomy'] );
|
50 |
+
$taxonomy_object = get_taxonomy( $taxonomy );
|
51 |
+
if ( false !== $taxonomy_object ) {
|
52 |
+
// Translators: %s is the taxonomy singular label.
|
53 |
+
$placeholder = sprintf( __( 'Select a %s', 'meta-box' ), strtolower( $taxonomy_object->labels->singular_name ) );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
$field = wp_parse_args(
|
57 |
+
$field,
|
58 |
+
array(
|
59 |
+
'placeholder' => $placeholder,
|
60 |
+
)
|
61 |
+
);
|
62 |
+
|
63 |
+
// Set default query args.
|
64 |
+
$field['query_args'] = wp_parse_args(
|
65 |
+
$field['query_args'],
|
66 |
+
array(
|
67 |
+
'hide_empty' => false,
|
68 |
+
)
|
69 |
+
);
|
70 |
+
|
71 |
+
// Prevent cloning for taxonomy field, not for child fields (taxonomy_advanced).
|
72 |
+
if ( 'taxonomy' == $field['type'] ) {
|
73 |
+
$field['clone'] = false;
|
74 |
+
}
|
75 |
+
|
76 |
+
$field = parent::normalize( $field );
|
77 |
+
|
78 |
+
return $field;
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Query terms for field options.
|
83 |
+
*
|
84 |
+
* @param array $field Field settings.
|
85 |
+
* @return array Field options array.
|
86 |
+
*/
|
87 |
+
public static function query( $field ) {
|
88 |
+
$args = wp_parse_args(
|
89 |
+
$field['query_args'],
|
90 |
+
array(
|
91 |
+
'taxonomy' => $field['taxonomy'],
|
92 |
+
'hide_empty' => false,
|
93 |
+
'count' => false,
|
94 |
+
'update_term_meta_cache' => false,
|
95 |
+
)
|
96 |
+
);
|
97 |
+
$terms = get_terms( $args );
|
98 |
+
if ( ! is_array( $terms ) ) {
|
99 |
+
return array();
|
100 |
+
}
|
101 |
+
$options = array();
|
102 |
+
foreach ( $terms as $term ) {
|
103 |
+
$options[ $term->term_id ] = array_merge(
|
104 |
+
array(
|
105 |
+
'value' => $term->term_id,
|
106 |
+
'label' => $term->name,
|
107 |
+
'parent' => $term->parent,
|
108 |
+
),
|
109 |
+
(array) $term
|
110 |
+
);
|
111 |
+
}
|
112 |
+
return $options;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Save meta value.
|
117 |
+
*
|
118 |
+
* @param mixed $new The submitted meta value.
|
119 |
+
* @param mixed $old The existing meta value.
|
120 |
+
* @param int $post_id The post ID.
|
121 |
+
* @param array $field The field parameters.
|
122 |
+
*/
|
123 |
+
public static function save( $new, $old, $post_id, $field ) {
|
124 |
+
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
125 |
+
return;
|
126 |
+
}
|
127 |
+
$new = array_unique( array_map( 'intval', (array) $new ) );
|
128 |
+
$new = empty( $new ) ? null : $new;
|
129 |
+
|
130 |
+
foreach ( $field['taxonomy'] as $taxonomy ) {
|
131 |
+
wp_set_object_terms( $post_id, $new, $taxonomy );
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Get raw meta value.
|
137 |
+
*
|
138 |
+
* @param int $object_id Object ID.
|
139 |
+
* @param array $field Field parameters.
|
140 |
+
* @param array $args Arguments of {@see rwmb_meta()} helper.
|
141 |
+
*
|
142 |
+
* @return mixed
|
143 |
+
*/
|
144 |
+
public static function raw_meta( $object_id, $field, $args = array() ) {
|
145 |
+
if ( empty( $field['id'] ) ) {
|
146 |
+
return '';
|
147 |
+
}
|
148 |
+
|
149 |
+
$meta = wp_get_object_terms(
|
150 |
+
$object_id,
|
151 |
+
$field['taxonomy'],
|
152 |
+
array(
|
153 |
+
'orderby' => 'term_order',
|
154 |
+
)
|
155 |
+
);
|
156 |
+
if ( is_wp_error( $meta ) ) {
|
157 |
+
return '';
|
158 |
+
}
|
159 |
+
$meta = wp_list_pluck( $meta, 'term_id' );
|
160 |
+
|
161 |
+
return $field['multiple'] ? $meta : reset( $meta );
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Get the field value.
|
166 |
+
* Return list of post term objects.
|
167 |
+
*
|
168 |
+
* @param array $field Field parameters.
|
169 |
+
* @param array $args Additional arguments.
|
170 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
171 |
+
*
|
172 |
+
* @return array List of post term objects.
|
173 |
+
*/
|
174 |
+
public static function get_value( $field, $args = array(), $post_id = null ) {
|
175 |
+
if ( ! $post_id ) {
|
176 |
+
$post_id = get_the_ID();
|
177 |
+
}
|
178 |
+
$value = wp_get_object_terms(
|
179 |
+
$post_id,
|
180 |
+
$field['taxonomy'],
|
181 |
+
array(
|
182 |
+
'orderby' => 'term_order',
|
183 |
+
)
|
184 |
+
);
|
185 |
+
|
186 |
+
// Get single value if necessary.
|
187 |
+
if ( ! $field['clone'] && ! $field['multiple'] && is_array( $value ) ) {
|
188 |
+
$value = reset( $value );
|
189 |
+
}
|
190 |
+
return $value;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
195 |
+
*
|
196 |
+
* @param array $field Field parameters.
|
197 |
+
* @param string $value The value.
|
198 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
199 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
200 |
+
*
|
201 |
+
* @return string
|
202 |
+
*/
|
203 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
204 |
+
return sprintf(
|
205 |
+
'<a href="%s" title="%s">%s</a>',
|
206 |
+
// @codingStandardsIgnoreLine
|
207 |
+
esc_url( get_term_link( $value ) ),
|
208 |
+
esc_attr( $value->name ),
|
209 |
+
esc_html( $value->name )
|
210 |
+
);
|
211 |
+
}
|
212 |
+
}
|
inc/libraries/meta-box/inc/fields/text-list.php
CHANGED
@@ -1,127 +1,127 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The text list field which allows users to enter multiple texts.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Text list field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
wp_enqueue_style( 'rwmb-text-list', RWMB_CSS_URL . 'text-list.css', '', RWMB_VER );
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Get field HTML.
|
21 |
-
*
|
22 |
-
* @param mixed $meta Meta value.
|
23 |
-
* @param array $field Field parameters.
|
24 |
-
*
|
25 |
-
* @return string
|
26 |
-
*/
|
27 |
-
public static function html( $meta, $field ) {
|
28 |
-
if ( empty( $field['options'] ) ) {
|
29 |
-
return '';
|
30 |
-
}
|
31 |
-
$html = array();
|
32 |
-
$input = '<label><span class="rwmb-text-list-label">%s</span> <input type="text" class="rwmb-text-list" name="%s" value="%s" placeholder="%s"></label>';
|
33 |
-
|
34 |
-
$count = 0;
|
35 |
-
foreach ( $field['options'] as $placeholder => $label ) {
|
36 |
-
$html[] = sprintf(
|
37 |
-
$input,
|
38 |
-
$label,
|
39 |
-
$field['field_name'],
|
40 |
-
isset( $meta[ $count ] ) ? esc_attr( $meta[ $count ] ) : '',
|
41 |
-
$placeholder
|
42 |
-
);
|
43 |
-
$count ++;
|
44 |
-
}
|
45 |
-
|
46 |
-
return implode( ' ', $html );
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Normalize parameters for field.
|
51 |
-
*
|
52 |
-
* @param array $field Field parameters.
|
53 |
-
*
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public static function normalize( $field ) {
|
57 |
-
$field = parent::normalize( $field );
|
58 |
-
if ( ! $field['clone'] ) {
|
59 |
-
$field['class'] .= ' rwmb-text_list-non-cloneable';
|
60 |
-
}
|
61 |
-
return $field;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Format value for the helper functions.
|
66 |
-
*
|
67 |
-
* @param array $field Field parameters.
|
68 |
-
* @param string|array $value The field meta value.
|
69 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
70 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
71 |
-
*
|
72 |
-
* @return string
|
73 |
-
*/
|
74 |
-
public static function format_value( $field, $value, $args, $post_id ) {
|
75 |
-
$output = '<table><thead><tr>';
|
76 |
-
foreach ( $field['options'] as $label ) {
|
77 |
-
$output .= "<th>$label</th>";
|
78 |
-
}
|
79 |
-
$output .= '</tr></thead><tbody>';
|
80 |
-
|
81 |
-
if ( ! $field['clone'] ) {
|
82 |
-
$output .= self::format_single_value( $field, $value, $args, $post_id );
|
83 |
-
} else {
|
84 |
-
foreach ( $value as $subvalue ) {
|
85 |
-
$output .= self::format_single_value( $field, $subvalue, $args, $post_id );
|
86 |
-
}
|
87 |
-
}
|
88 |
-
$output .= '</tbody></table>';
|
89 |
-
return $output;
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
94 |
-
*
|
95 |
-
* @param array $field Field parameters.
|
96 |
-
* @param array $value The value.
|
97 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
98 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
99 |
-
*
|
100 |
-
* @return string
|
101 |
-
*/
|
102 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
103 |
-
$output = '<tr>';
|
104 |
-
foreach ( $value as $subvalue ) {
|
105 |
-
$output .= "<td>$subvalue</td>";
|
106 |
-
}
|
107 |
-
$output .= '</tr>';
|
108 |
-
return $output;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Save meta value.
|
113 |
-
*
|
114 |
-
* @param mixed $new The submitted meta value.
|
115 |
-
* @param mixed $old The existing meta value.
|
116 |
-
* @param int $post_id The post ID.
|
117 |
-
* @param array $field The field parameters.
|
118 |
-
*/
|
119 |
-
public static function save( $new, $old, $post_id, $field ) {
|
120 |
-
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
121 |
-
return;
|
122 |
-
}
|
123 |
-
$storage = $field['storage'];
|
124 |
-
$storage->delete( $post_id, $field['id'] );
|
125 |
-
parent::save( $new, array(), $post_id, $field );
|
126 |
-
}
|
127 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The text list field which allows users to enter multiple texts.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Text list field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Text_List_Field extends RWMB_Multiple_Values_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
wp_enqueue_style( 'rwmb-text-list', RWMB_CSS_URL . 'text-list.css', '', RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML.
|
21 |
+
*
|
22 |
+
* @param mixed $meta Meta value.
|
23 |
+
* @param array $field Field parameters.
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
public static function html( $meta, $field ) {
|
28 |
+
if ( empty( $field['options'] ) ) {
|
29 |
+
return '';
|
30 |
+
}
|
31 |
+
$html = array();
|
32 |
+
$input = '<label><span class="rwmb-text-list-label">%s</span> <input type="text" class="rwmb-text-list" name="%s" value="%s" placeholder="%s"></label>';
|
33 |
+
|
34 |
+
$count = 0;
|
35 |
+
foreach ( $field['options'] as $placeholder => $label ) {
|
36 |
+
$html[] = sprintf(
|
37 |
+
$input,
|
38 |
+
$label,
|
39 |
+
$field['field_name'],
|
40 |
+
isset( $meta[ $count ] ) ? esc_attr( $meta[ $count ] ) : '',
|
41 |
+
$placeholder
|
42 |
+
);
|
43 |
+
$count ++;
|
44 |
+
}
|
45 |
+
|
46 |
+
return implode( ' ', $html );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Normalize parameters for field.
|
51 |
+
*
|
52 |
+
* @param array $field Field parameters.
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public static function normalize( $field ) {
|
57 |
+
$field = parent::normalize( $field );
|
58 |
+
if ( ! $field['clone'] ) {
|
59 |
+
$field['class'] .= ' rwmb-text_list-non-cloneable';
|
60 |
+
}
|
61 |
+
return $field;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Format value for the helper functions.
|
66 |
+
*
|
67 |
+
* @param array $field Field parameters.
|
68 |
+
* @param string|array $value The field meta value.
|
69 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
70 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
public static function format_value( $field, $value, $args, $post_id ) {
|
75 |
+
$output = '<table><thead><tr>';
|
76 |
+
foreach ( $field['options'] as $label ) {
|
77 |
+
$output .= "<th>$label</th>";
|
78 |
+
}
|
79 |
+
$output .= '</tr></thead><tbody>';
|
80 |
+
|
81 |
+
if ( ! $field['clone'] ) {
|
82 |
+
$output .= self::format_single_value( $field, $value, $args, $post_id );
|
83 |
+
} else {
|
84 |
+
foreach ( $value as $subvalue ) {
|
85 |
+
$output .= self::format_single_value( $field, $subvalue, $args, $post_id );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
$output .= '</tbody></table>';
|
89 |
+
return $output;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
94 |
+
*
|
95 |
+
* @param array $field Field parameters.
|
96 |
+
* @param array $value The value.
|
97 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
98 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
99 |
+
*
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
103 |
+
$output = '<tr>';
|
104 |
+
foreach ( $value as $subvalue ) {
|
105 |
+
$output .= "<td>$subvalue</td>";
|
106 |
+
}
|
107 |
+
$output .= '</tr>';
|
108 |
+
return $output;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Save meta value.
|
113 |
+
*
|
114 |
+
* @param mixed $new The submitted meta value.
|
115 |
+
* @param mixed $old The existing meta value.
|
116 |
+
* @param int $post_id The post ID.
|
117 |
+
* @param array $field The field parameters.
|
118 |
+
*/
|
119 |
+
public static function save( $new, $old, $post_id, $field ) {
|
120 |
+
if ( empty( $field['id'] ) || ! $field['save_field'] ) {
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
$storage = $field['storage'];
|
124 |
+
$storage->delete( $post_id, $field['id'] );
|
125 |
+
parent::save( $new, array(), $post_id, $field );
|
126 |
+
}
|
127 |
+
}
|
inc/libraries/meta-box/inc/fields/text.php
CHANGED
@@ -1,55 +1,55 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The text field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Text field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Text_Field extends RWMB_Input_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
* @return array
|
17 |
-
*/
|
18 |
-
public static function normalize( $field ) {
|
19 |
-
$field = parent::normalize( $field );
|
20 |
-
|
21 |
-
$field = wp_parse_args(
|
22 |
-
$field,
|
23 |
-
array(
|
24 |
-
'size' => 30,
|
25 |
-
'maxlength' => false,
|
26 |
-
'pattern' => false,
|
27 |
-
)
|
28 |
-
);
|
29 |
-
|
30 |
-
return $field;
|
31 |
-
}
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Get the attributes for a field.
|
35 |
-
*
|
36 |
-
* @param array $field Field parameters.
|
37 |
-
* @param mixed $value Meta value.
|
38 |
-
*
|
39 |
-
* @return array
|
40 |
-
*/
|
41 |
-
public static function get_attributes( $field, $value = null ) {
|
42 |
-
$attributes = parent::get_attributes( $field, $value );
|
43 |
-
$attributes = wp_parse_args(
|
44 |
-
$attributes,
|
45 |
-
array(
|
46 |
-
'size' => $field['size'],
|
47 |
-
'maxlength' => $field['maxlength'],
|
48 |
-
'pattern' => $field['pattern'],
|
49 |
-
'placeholder' => $field['placeholder'],
|
50 |
-
)
|
51 |
-
);
|
52 |
-
|
53 |
-
return $attributes;
|
54 |
-
}
|
55 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The text field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Text field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Text_Field extends RWMB_Input_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
public static function normalize( $field ) {
|
19 |
+
$field = parent::normalize( $field );
|
20 |
+
|
21 |
+
$field = wp_parse_args(
|
22 |
+
$field,
|
23 |
+
array(
|
24 |
+
'size' => 30,
|
25 |
+
'maxlength' => false,
|
26 |
+
'pattern' => false,
|
27 |
+
)
|
28 |
+
);
|
29 |
+
|
30 |
+
return $field;
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Get the attributes for a field.
|
35 |
+
*
|
36 |
+
* @param array $field Field parameters.
|
37 |
+
* @param mixed $value Meta value.
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public static function get_attributes( $field, $value = null ) {
|
42 |
+
$attributes = parent::get_attributes( $field, $value );
|
43 |
+
$attributes = wp_parse_args(
|
44 |
+
$attributes,
|
45 |
+
array(
|
46 |
+
'size' => $field['size'],
|
47 |
+
'maxlength' => $field['maxlength'],
|
48 |
+
'pattern' => $field['pattern'],
|
49 |
+
'placeholder' => $field['placeholder'],
|
50 |
+
)
|
51 |
+
);
|
52 |
+
|
53 |
+
return $attributes;
|
54 |
+
}
|
55 |
+
}
|
inc/libraries/meta-box/inc/fields/textarea.php
CHANGED
@@ -1,88 +1,88 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The textarea field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Textarea field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Textarea_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Get field HTML.
|
14 |
-
*
|
15 |
-
* @param mixed $meta Meta value.
|
16 |
-
* @param array $field Field parameters.
|
17 |
-
*
|
18 |
-
* @return string
|
19 |
-
*/
|
20 |
-
public static function html( $meta, $field ) {
|
21 |
-
$attributes = self::get_attributes( $field, $meta );
|
22 |
-
return sprintf(
|
23 |
-
'<textarea %s>%s</textarea>',
|
24 |
-
self::render_attributes( $attributes ),
|
25 |
-
$meta
|
26 |
-
);
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Escape meta for field output.
|
31 |
-
*
|
32 |
-
* @param mixed $meta Meta value.
|
33 |
-
* @return mixed
|
34 |
-
*/
|
35 |
-
public static function esc_meta( $meta ) {
|
36 |
-
return is_array( $meta ) ? array_map( 'esc_textarea', $meta ) : esc_textarea( $meta );
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Normalize parameters for field.
|
41 |
-
*
|
42 |
-
* @param array $field Field parameters.
|
43 |
-
* @return array
|
44 |
-
*/
|
45 |
-
public static function normalize( $field ) {
|
46 |
-
$field = parent::normalize( $field );
|
47 |
-
$field = wp_parse_args(
|
48 |
-
$field,
|
49 |
-
array(
|
50 |
-
'autocomplete' => false,
|
51 |
-
'cols' => 60,
|
52 |
-
'rows' => 3,
|
53 |
-
'maxlength' => false,
|
54 |
-
'wrap' => false,
|
55 |
-
'readonly' => false,
|
56 |
-
)
|
57 |
-
);
|
58 |
-
|
59 |
-
return $field;
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Get the attributes for a field.
|
64 |
-
*
|
65 |
-
* @param array $field Field parameters.
|
66 |
-
* @param mixed $value Meta value.
|
67 |
-
*
|
68 |
-
* @return array
|
69 |
-
*/
|
70 |
-
public static function get_attributes( $field, $value = null ) {
|
71 |
-
$attributes = parent::get_attributes( $field, $value );
|
72 |
-
$attributes = wp_parse_args(
|
73 |
-
$attributes,
|
74 |
-
array(
|
75 |
-
'autocomplete' => $field['autocomplete'],
|
76 |
-
'cols' => $field['cols'],
|
77 |
-
'rows' => $field['rows'],
|
78 |
-
'maxlength' => $field['maxlength'],
|
79 |
-
'wrap' => $field['wrap'],
|
80 |
-
'readonly' => $field['readonly'],
|
81 |
-
'placeholder' => $field['placeholder'],
|
82 |
-
)
|
83 |
-
);
|
84 |
-
$attributes['class'] .= ' large-text';
|
85 |
-
|
86 |
-
return $attributes;
|
87 |
-
}
|
88 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The textarea field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Textarea field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Textarea_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Get field HTML.
|
14 |
+
*
|
15 |
+
* @param mixed $meta Meta value.
|
16 |
+
* @param array $field Field parameters.
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
public static function html( $meta, $field ) {
|
21 |
+
$attributes = self::get_attributes( $field, $meta );
|
22 |
+
return sprintf(
|
23 |
+
'<textarea %s>%s</textarea>',
|
24 |
+
self::render_attributes( $attributes ),
|
25 |
+
$meta
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Escape meta for field output.
|
31 |
+
*
|
32 |
+
* @param mixed $meta Meta value.
|
33 |
+
* @return mixed
|
34 |
+
*/
|
35 |
+
public static function esc_meta( $meta ) {
|
36 |
+
return is_array( $meta ) ? array_map( 'esc_textarea', $meta ) : esc_textarea( $meta );
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Normalize parameters for field.
|
41 |
+
*
|
42 |
+
* @param array $field Field parameters.
|
43 |
+
* @return array
|
44 |
+
*/
|
45 |
+
public static function normalize( $field ) {
|
46 |
+
$field = parent::normalize( $field );
|
47 |
+
$field = wp_parse_args(
|
48 |
+
$field,
|
49 |
+
array(
|
50 |
+
'autocomplete' => false,
|
51 |
+
'cols' => 60,
|
52 |
+
'rows' => 3,
|
53 |
+
'maxlength' => false,
|
54 |
+
'wrap' => false,
|
55 |
+
'readonly' => false,
|
56 |
+
)
|
57 |
+
);
|
58 |
+
|
59 |
+
return $field;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Get the attributes for a field.
|
64 |
+
*
|
65 |
+
* @param array $field Field parameters.
|
66 |
+
* @param mixed $value Meta value.
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
public static function get_attributes( $field, $value = null ) {
|
71 |
+
$attributes = parent::get_attributes( $field, $value );
|
72 |
+
$attributes = wp_parse_args(
|
73 |
+
$attributes,
|
74 |
+
array(
|
75 |
+
'autocomplete' => $field['autocomplete'],
|
76 |
+
'cols' => $field['cols'],
|
77 |
+
'rows' => $field['rows'],
|
78 |
+
'maxlength' => $field['maxlength'],
|
79 |
+
'wrap' => $field['wrap'],
|
80 |
+
'readonly' => $field['readonly'],
|
81 |
+
'placeholder' => $field['placeholder'],
|
82 |
+
)
|
83 |
+
);
|
84 |
+
$attributes['class'] .= ' large-text';
|
85 |
+
|
86 |
+
return $attributes;
|
87 |
+
}
|
88 |
+
}
|
inc/libraries/meta-box/inc/fields/thickbox-image.php
CHANGED
@@ -1,80 +1,80 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Image upload field which uses thickbox library to upload.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
* @deprecated Use image_advanced instead
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* The thickbox image field class.
|
11 |
-
*/
|
12 |
-
class RWMB_Thickbox_Image_Field extends RWMB_Image_Field {
|
13 |
-
/**
|
14 |
-
* Add custom actions for the field.
|
15 |
-
*/
|
16 |
-
public static function add_actions() {
|
17 |
-
parent::add_actions();
|
18 |
-
add_filter( 'get_media_item_args', array( __CLASS__, 'allow_img_insertion' ) );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Always enable insert to post button in the popup.
|
23 |
-
*
|
24 |
-
* @link https://github.com/rilwis/meta-box/issues/809
|
25 |
-
* @link http://wordpress.stackexchange.com/q/22175/2051
|
26 |
-
* @param array $vars Media item arguments in the popup.
|
27 |
-
* @return array
|
28 |
-
*/
|
29 |
-
public static function allow_img_insertion( $vars ) {
|
30 |
-
$vars['send'] = true; // 'send' as in "Send to Editor".
|
31 |
-
return $vars;
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Enqueue scripts and styles.
|
36 |
-
*/
|
37 |
-
public static function admin_enqueue_scripts() {
|
38 |
-
parent::admin_enqueue_scripts();
|
39 |
-
|
40 |
-
add_thickbox();
|
41 |
-
wp_enqueue_script( 'media-upload' );
|
42 |
-
|
43 |
-
wp_enqueue_script( 'rwmb-thickbox-image', RWMB_JS_URL . 'thickbox-image.js', array( 'jquery' ), RWMB_VER, true );
|
44 |
-
}
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Get field HTML.
|
48 |
-
*
|
49 |
-
* @param mixed $meta Meta value.
|
50 |
-
* @param array $field Field parameters.
|
51 |
-
*
|
52 |
-
* @return string
|
53 |
-
*/
|
54 |
-
public static function html( $meta, $field ) {
|
55 |
-
$i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
|
56 |
-
|
57 |
-
// Uploaded images.
|
58 |
-
$html = parent::get_uploaded_files( $meta, $field );
|
59 |
-
|
60 |
-
// Show form upload.
|
61 |
-
$html .= "<a href='#' class='button rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
|
62 |
-
|
63 |
-
return $html;
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* Get field value.
|
68 |
-
* It's the combination of new (uploaded) images and saved images.
|
69 |
-
*
|
70 |
-
* @param mixed $new The submitted meta value.
|
71 |
-
* @param mixed $old The existing meta value.
|
72 |
-
* @param int $post_id The post ID.
|
73 |
-
* @param array $field The field parameters.
|
74 |
-
*
|
75 |
-
* @return array
|
76 |
-
*/
|
77 |
-
public static function value( $new, $old, $post_id, $field ) {
|
78 |
-
return array_filter( array_unique( array_merge( (array) $old, (array) $new ) ) );
|
79 |
-
}
|
80 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Image upload field which uses thickbox library to upload.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
* @deprecated Use image_advanced instead
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* The thickbox image field class.
|
11 |
+
*/
|
12 |
+
class RWMB_Thickbox_Image_Field extends RWMB_Image_Field {
|
13 |
+
/**
|
14 |
+
* Add custom actions for the field.
|
15 |
+
*/
|
16 |
+
public static function add_actions() {
|
17 |
+
parent::add_actions();
|
18 |
+
add_filter( 'get_media_item_args', array( __CLASS__, 'allow_img_insertion' ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Always enable insert to post button in the popup.
|
23 |
+
*
|
24 |
+
* @link https://github.com/rilwis/meta-box/issues/809
|
25 |
+
* @link http://wordpress.stackexchange.com/q/22175/2051
|
26 |
+
* @param array $vars Media item arguments in the popup.
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public static function allow_img_insertion( $vars ) {
|
30 |
+
$vars['send'] = true; // 'send' as in "Send to Editor".
|
31 |
+
return $vars;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Enqueue scripts and styles.
|
36 |
+
*/
|
37 |
+
public static function admin_enqueue_scripts() {
|
38 |
+
parent::admin_enqueue_scripts();
|
39 |
+
|
40 |
+
add_thickbox();
|
41 |
+
wp_enqueue_script( 'media-upload' );
|
42 |
+
|
43 |
+
wp_enqueue_script( 'rwmb-thickbox-image', RWMB_JS_URL . 'thickbox-image.js', array( 'jquery' ), RWMB_VER, true );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get field HTML.
|
48 |
+
*
|
49 |
+
* @param mixed $meta Meta value.
|
50 |
+
* @param array $field Field parameters.
|
51 |
+
*
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public static function html( $meta, $field ) {
|
55 |
+
$i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
|
56 |
+
|
57 |
+
// Uploaded images.
|
58 |
+
$html = parent::get_uploaded_files( $meta, $field );
|
59 |
+
|
60 |
+
// Show form upload.
|
61 |
+
$html .= "<a href='#' class='button rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
|
62 |
+
|
63 |
+
return $html;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Get field value.
|
68 |
+
* It's the combination of new (uploaded) images and saved images.
|
69 |
+
*
|
70 |
+
* @param mixed $new The submitted meta value.
|
71 |
+
* @param mixed $old The existing meta value.
|
72 |
+
* @param int $post_id The post ID.
|
73 |
+
* @param array $field The field parameters.
|
74 |
+
*
|
75 |
+
* @return array
|
76 |
+
*/
|
77 |
+
public static function value( $new, $old, $post_id, $field ) {
|
78 |
+
return array_filter( array_unique( array_merge( (array) $old, (array) $new ) ) );
|
79 |
+
}
|
80 |
+
}
|
inc/libraries/meta-box/inc/fields/time.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The time picker field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Time field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Time_Field extends RWMB_Datetime_Field {
|
12 |
-
/**
|
13 |
-
* Enqueue scripts and styles.
|
14 |
-
*/
|
15 |
-
public static function admin_enqueue_scripts() {
|
16 |
-
parent::admin_register_scripts();
|
17 |
-
wp_enqueue_style( 'jquery-ui-timepicker' );
|
18 |
-
wp_enqueue_script( 'rwmb-time' );
|
19 |
-
}
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Normalize parameters for field.
|
23 |
-
*
|
24 |
-
* @param array $field Field parameters.
|
25 |
-
* @return array
|
26 |
-
*/
|
27 |
-
public static function normalize( $field ) {
|
28 |
-
$field = parent::normalize( $field );
|
29 |
-
$field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
|
30 |
-
return $field;
|
31 |
-
}
|
32 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The time picker field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Time field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Time_Field extends RWMB_Datetime_Field {
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles.
|
14 |
+
*/
|
15 |
+
public static function admin_enqueue_scripts() {
|
16 |
+
parent::admin_register_scripts();
|
17 |
+
wp_enqueue_style( 'jquery-ui-timepicker' );
|
18 |
+
wp_enqueue_script( 'rwmb-time' );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Normalize parameters for field.
|
23 |
+
*
|
24 |
+
* @param array $field Field parameters.
|
25 |
+
* @return array
|
26 |
+
*/
|
27 |
+
public static function normalize( $field ) {
|
28 |
+
$field = parent::normalize( $field );
|
29 |
+
$field['js_options']['timeFormat'] = empty( $field['format'] ) ? $field['js_options']['timeFormat'] : $field['format'];
|
30 |
+
return $field;
|
31 |
+
}
|
32 |
+
}
|
inc/libraries/meta-box/inc/fields/user.php
CHANGED
@@ -1,80 +1,80 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The user select field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* User field class.
|
10 |
-
*/
|
11 |
-
class RWMB_User_Field extends RWMB_Object_Choice_Field {
|
12 |
-
/**
|
13 |
-
* Normalize parameters for field.
|
14 |
-
*
|
15 |
-
* @param array $field Field parameters.
|
16 |
-
*
|
17 |
-
* @return array
|
18 |
-
*/
|
19 |
-
public static function normalize( $field ) {
|
20 |
-
// Set default field args.
|
21 |
-
$field = wp_parse_args(
|
22 |
-
$field,
|
23 |
-
array(
|
24 |
-
'placeholder' => __( 'Select an user', 'meta-box' ),
|
25 |
-
'query_args' => array(),
|
26 |
-
'display_field' => 'display_name',
|
27 |
-
)
|
28 |
-
);
|
29 |
-
|
30 |
-
$field = parent::normalize( $field );
|
31 |
-
|
32 |
-
return $field;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Query users for field options.
|
37 |
-
*
|
38 |
-
* @param array $field Field settings.
|
39 |
-
* @return array Field options array.
|
40 |
-
*/
|
41 |
-
public static function query( $field ) {
|
42 |
-
$display_field = $field['display_field'];
|
43 |
-
$args = wp_parse_args(
|
44 |
-
$field['query_args'],
|
45 |
-
array(
|
46 |
-
'orderby' => $display_field,
|
47 |
-
'order' => 'asc',
|
48 |
-
'fields' => array( 'ID', $display_field ),
|
49 |
-
)
|
50 |
-
);
|
51 |
-
$users = get_users( $args );
|
52 |
-
$options = array();
|
53 |
-
foreach ( $users as $user ) {
|
54 |
-
$options[ $user->ID ] = array_merge(
|
55 |
-
array(
|
56 |
-
'value' => $user->ID,
|
57 |
-
'label' => $user->$display_field,
|
58 |
-
),
|
59 |
-
(array) $user
|
60 |
-
);
|
61 |
-
}
|
62 |
-
return $options;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
67 |
-
*
|
68 |
-
* @param array $field Field parameters.
|
69 |
-
* @param string $value The value.
|
70 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
71 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
72 |
-
*
|
73 |
-
* @return string
|
74 |
-
*/
|
75 |
-
public static function format_single_value( $field, $value, $args, $post_id ) {
|
76 |
-
$display_field = $field['display_field'];
|
77 |
-
$user = get_userdata( $value );
|
78 |
-
return '<a href="' . esc_url( get_author_posts_url( $value ) ) . '">' . esc_html( $user->$display_field ) . '</a>';
|
79 |
-
}
|
80 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The user select field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* User field class.
|
10 |
+
*/
|
11 |
+
class RWMB_User_Field extends RWMB_Object_Choice_Field {
|
12 |
+
/**
|
13 |
+
* Normalize parameters for field.
|
14 |
+
*
|
15 |
+
* @param array $field Field parameters.
|
16 |
+
*
|
17 |
+
* @return array
|
18 |
+
*/
|
19 |
+
public static function normalize( $field ) {
|
20 |
+
// Set default field args.
|
21 |
+
$field = wp_parse_args(
|
22 |
+
$field,
|
23 |
+
array(
|
24 |
+
'placeholder' => __( 'Select an user', 'meta-box' ),
|
25 |
+
'query_args' => array(),
|
26 |
+
'display_field' => 'display_name',
|
27 |
+
)
|
28 |
+
);
|
29 |
+
|
30 |
+
$field = parent::normalize( $field );
|
31 |
+
|
32 |
+
return $field;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Query users for field options.
|
37 |
+
*
|
38 |
+
* @param array $field Field settings.
|
39 |
+
* @return array Field options array.
|
40 |
+
*/
|
41 |
+
public static function query( $field ) {
|
42 |
+
$display_field = $field['display_field'];
|
43 |
+
$args = wp_parse_args(
|
44 |
+
$field['query_args'],
|
45 |
+
array(
|
46 |
+
'orderby' => $display_field,
|
47 |
+
'order' => 'asc',
|
48 |
+
'fields' => array( 'ID', $display_field ),
|
49 |
+
)
|
50 |
+
);
|
51 |
+
$users = get_users( $args );
|
52 |
+
$options = array();
|
53 |
+
foreach ( $users as $user ) {
|
54 |
+
$options[ $user->ID ] = array_merge(
|
55 |
+
array(
|
56 |
+
'value' => $user->ID,
|
57 |
+
'label' => $user->$display_field,
|
58 |
+
),
|
59 |
+
(array) $user
|
60 |
+
);
|
61 |
+
}
|
62 |
+
return $options;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Format a single value for the helper functions. Sub-fields should overwrite this method if necessary.
|
67 |
+
*
|
68 |
+
* @param array $field Field parameters.
|
69 |
+
* @param string $value The value.
|
70 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
71 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
72 |
+
*
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
public static function format_single_value( $field, $value, $args, $post_id ) {
|
76 |
+
$display_field = $field['display_field'];
|
77 |
+
$user = get_userdata( $value );
|
78 |
+
return '<a href="' . esc_url( get_author_posts_url( $value ) ) . '">' . esc_html( $user->$display_field ) . '</a>';
|
79 |
+
}
|
80 |
+
}
|
inc/libraries/meta-box/inc/fields/video.php
CHANGED
@@ -1,147 +1,147 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Video field which uses WordPress media popup to upload and select video.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
* @since 4.10
|
7 |
-
*/
|
8 |
-
|
9 |
-
/**
|
10 |
-
* The video field class.
|
11 |
-
*/
|
12 |
-
class RWMB_Video_Field extends RWMB_Media_Field {
|
13 |
-
/**
|
14 |
-
* Enqueue scripts and styles.
|
15 |
-
*/
|
16 |
-
public static function admin_enqueue_scripts() {
|
17 |
-
parent::admin_enqueue_scripts();
|
18 |
-
wp_enqueue_style( 'rwmb-video', RWMB_CSS_URL . 'video.css', array( 'rwmb-media' ), RWMB_VER );
|
19 |
-
wp_enqueue_script( 'rwmb-video', RWMB_JS_URL . 'video.js', array( 'rwmb-media' ), RWMB_VER, true );
|
20 |
-
self::localize_script(
|
21 |
-
'rwmb-video',
|
22 |
-
'i18nRwmbVideo',
|
23 |
-
array(
|
24 |
-
'extensions' => wp_get_video_extensions(),
|
25 |
-
)
|
26 |
-
);
|
27 |
-
}
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Normalize parameters for field.
|
31 |
-
*
|
32 |
-
* @param array $field Field parameters.
|
33 |
-
*
|
34 |
-
* @return array
|
35 |
-
*/
|
36 |
-
public static function normalize( $field ) {
|
37 |
-
$field['mime_type'] = 'video';
|
38 |
-
$field = parent::normalize( $field );
|
39 |
-
|
40 |
-
return $field;
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Get uploaded file information.
|
45 |
-
*
|
46 |
-
* @param int $file_id Attachment image ID (post ID). Required.
|
47 |
-
* @param array $args Array of arguments (for size).
|
48 |
-
*
|
49 |
-
* @return array|bool False if file not found. Array of image info on success.
|
50 |
-
*/
|
51 |
-
public static function file_info( $file_id, $args = array() ) {
|
52 |
-
if ( ! get_attached_file( $file_id ) ) {
|
53 |
-
return false;
|
54 |
-
}
|
55 |
-
$attachment = get_post( $file_id );
|
56 |
-
$url = wp_get_attachment_url( $attachment->ID );
|
57 |
-
$file_type = wp_check_filetype( $url, wp_get_mime_types() );
|
58 |
-
$data = array(
|
59 |
-
'ID' => $file_id,
|
60 |
-
'src' => $url,
|
61 |
-
'type' => $file_type['type'],
|
62 |
-
'title' => $attachment->post_title,
|
63 |
-
'caption' => $attachment->post_excerpt,
|
64 |
-
'description' => $attachment->post_content,
|
65 |
-
);
|
66 |
-
|
67 |
-
$data['meta'] = array();
|
68 |
-
$meta = wp_get_attachment_metadata( $attachment->ID );
|
69 |
-
if ( ! empty( $meta ) ) {
|
70 |
-
foreach ( wp_get_attachment_id3_keys( $attachment ) as $key => $label ) {
|
71 |
-
if ( ! empty( $meta[ $key ] ) ) {
|
72 |
-
$data['meta'][ $key ] = $meta[ $key ];
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) {
|
77 |
-
$data['dimensions'] = array(
|
78 |
-
'width' => $meta['width'],
|
79 |
-
'height' => $meta['height'],
|
80 |
-
);
|
81 |
-
} else {
|
82 |
-
$data['dimensions'] = array(
|
83 |
-
'width' => 640,
|
84 |
-
'height' => 360,
|
85 |
-
);
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
$thumb_id = get_post_thumbnail_id( $attachment->ID );
|
90 |
-
if ( ! empty( $thumb_id ) ) {
|
91 |
-
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'full' );
|
92 |
-
$data['image'] = compact( 'src', 'width', 'height' );
|
93 |
-
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'thumbnail' );
|
94 |
-
$data['thumb'] = compact( 'src', 'width', 'height' );
|
95 |
-
} else {
|
96 |
-
$src = wp_mime_type_icon( $attachment->ID );
|
97 |
-
$width = 48;
|
98 |
-
$height = 64;
|
99 |
-
$data['image'] = compact( 'src', 'width', 'height' );
|
100 |
-
$data['thumb'] = compact( 'src', 'width', 'height' );
|
101 |
-
}
|
102 |
-
|
103 |
-
return $data;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Format value for a clone.
|
108 |
-
*
|
109 |
-
* @param array $field Field parameters.
|
110 |
-
* @param string|array $value The field meta value.
|
111 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
112 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
113 |
-
*
|
114 |
-
* @return string
|
115 |
-
*/
|
116 |
-
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
117 |
-
$ids = implode( ',', wp_list_pluck( $value, 'ID' ) );
|
118 |
-
|
119 |
-
// Display single video.
|
120 |
-
if ( 1 === count( $value ) ) {
|
121 |
-
$video = reset( $value );
|
122 |
-
return wp_video_shortcode(
|
123 |
-
array(
|
124 |
-
'src' => $video['src'],
|
125 |
-
'width' => $video['dimensions']['width'],
|
126 |
-
'height' => $video['dimensions']['height'],
|
127 |
-
)
|
128 |
-
);
|
129 |
-
}
|
130 |
-
|
131 |
-
// Display multiple videos in a playlist.
|
132 |
-
return wp_playlist_shortcode(
|
133 |
-
array(
|
134 |
-
'ids' => $ids,
|
135 |
-
'type' => 'video',
|
136 |
-
)
|
137 |
-
);
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Template for media item.
|
142 |
-
*/
|
143 |
-
public static function print_templates() {
|
144 |
-
parent::print_templates();
|
145 |
-
require_once RWMB_INC_DIR . 'templates/video.php';
|
146 |
-
}
|
147 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Video field which uses WordPress media popup to upload and select video.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
* @since 4.10
|
7 |
+
*/
|
8 |
+
|
9 |
+
/**
|
10 |
+
* The video field class.
|
11 |
+
*/
|
12 |
+
class RWMB_Video_Field extends RWMB_Media_Field {
|
13 |
+
/**
|
14 |
+
* Enqueue scripts and styles.
|
15 |
+
*/
|
16 |
+
public static function admin_enqueue_scripts() {
|
17 |
+
parent::admin_enqueue_scripts();
|
18 |
+
wp_enqueue_style( 'rwmb-video', RWMB_CSS_URL . 'video.css', array( 'rwmb-media' ), RWMB_VER );
|
19 |
+
wp_enqueue_script( 'rwmb-video', RWMB_JS_URL . 'video.js', array( 'rwmb-media' ), RWMB_VER, true );
|
20 |
+
self::localize_script(
|
21 |
+
'rwmb-video',
|
22 |
+
'i18nRwmbVideo',
|
23 |
+
array(
|
24 |
+
'extensions' => wp_get_video_extensions(),
|
25 |
+
)
|
26 |
+
);
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Normalize parameters for field.
|
31 |
+
*
|
32 |
+
* @param array $field Field parameters.
|
33 |
+
*
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
public static function normalize( $field ) {
|
37 |
+
$field['mime_type'] = 'video';
|
38 |
+
$field = parent::normalize( $field );
|
39 |
+
|
40 |
+
return $field;
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get uploaded file information.
|
45 |
+
*
|
46 |
+
* @param int $file_id Attachment image ID (post ID). Required.
|
47 |
+
* @param array $args Array of arguments (for size).
|
48 |
+
*
|
49 |
+
* @return array|bool False if file not found. Array of image info on success.
|
50 |
+
*/
|
51 |
+
public static function file_info( $file_id, $args = array() ) {
|
52 |
+
if ( ! get_attached_file( $file_id ) ) {
|
53 |
+
return false;
|
54 |
+
}
|
55 |
+
$attachment = get_post( $file_id );
|
56 |
+
$url = wp_get_attachment_url( $attachment->ID );
|
57 |
+
$file_type = wp_check_filetype( $url, wp_get_mime_types() );
|
58 |
+
$data = array(
|
59 |
+
'ID' => $file_id,
|
60 |
+
'src' => $url,
|
61 |
+
'type' => $file_type['type'],
|
62 |
+
'title' => $attachment->post_title,
|
63 |
+
'caption' => $attachment->post_excerpt,
|
64 |
+
'description' => $attachment->post_content,
|
65 |
+
);
|
66 |
+
|
67 |
+
$data['meta'] = array();
|
68 |
+
$meta = wp_get_attachment_metadata( $attachment->ID );
|
69 |
+
if ( ! empty( $meta ) ) {
|
70 |
+
foreach ( wp_get_attachment_id3_keys( $attachment ) as $key => $label ) {
|
71 |
+
if ( ! empty( $meta[ $key ] ) ) {
|
72 |
+
$data['meta'][ $key ] = $meta[ $key ];
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) {
|
77 |
+
$data['dimensions'] = array(
|
78 |
+
'width' => $meta['width'],
|
79 |
+
'height' => $meta['height'],
|
80 |
+
);
|
81 |
+
} else {
|
82 |
+
$data['dimensions'] = array(
|
83 |
+
'width' => 640,
|
84 |
+
'height' => 360,
|
85 |
+
);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
$thumb_id = get_post_thumbnail_id( $attachment->ID );
|
90 |
+
if ( ! empty( $thumb_id ) ) {
|
91 |
+
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'full' );
|
92 |
+
$data['image'] = compact( 'src', 'width', 'height' );
|
93 |
+
list( $src, $width, $height ) = wp_get_attachment_image_src( $thumb_id, 'thumbnail' );
|
94 |
+
$data['thumb'] = compact( 'src', 'width', 'height' );
|
95 |
+
} else {
|
96 |
+
$src = wp_mime_type_icon( $attachment->ID );
|
97 |
+
$width = 48;
|
98 |
+
$height = 64;
|
99 |
+
$data['image'] = compact( 'src', 'width', 'height' );
|
100 |
+
$data['thumb'] = compact( 'src', 'width', 'height' );
|
101 |
+
}
|
102 |
+
|
103 |
+
return $data;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Format value for a clone.
|
108 |
+
*
|
109 |
+
* @param array $field Field parameters.
|
110 |
+
* @param string|array $value The field meta value.
|
111 |
+
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
112 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
113 |
+
*
|
114 |
+
* @return string
|
115 |
+
*/
|
116 |
+
public static function format_clone_value( $field, $value, $args, $post_id ) {
|
117 |
+
$ids = implode( ',', wp_list_pluck( $value, 'ID' ) );
|
118 |
+
|
119 |
+
// Display single video.
|
120 |
+
if ( 1 === count( $value ) ) {
|
121 |
+
$video = reset( $value );
|
122 |
+
return wp_video_shortcode(
|
123 |
+
array(
|
124 |
+
'src' => $video['src'],
|
125 |
+
'width' => $video['dimensions']['width'],
|
126 |
+
'height' => $video['dimensions']['height'],
|
127 |
+
)
|
128 |
+
);
|
129 |
+
}
|
130 |
+
|
131 |
+
// Display multiple videos in a playlist.
|
132 |
+
return wp_playlist_shortcode(
|
133 |
+
array(
|
134 |
+
'ids' => $ids,
|
135 |
+
'type' => 'video',
|
136 |
+
)
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Template for media item.
|
142 |
+
*/
|
143 |
+
public static function print_templates() {
|
144 |
+
parent::print_templates();
|
145 |
+
require_once RWMB_INC_DIR . 'templates/video.php';
|
146 |
+
}
|
147 |
+
}
|
inc/libraries/meta-box/inc/fields/wysiwyg.php
CHANGED
@@ -1,99 +1,99 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The WYSIWYG (editor) field.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* WYSIWYG (editor) field class.
|
10 |
-
*/
|
11 |
-
class RWMB_Wysiwyg_Field extends RWMB_Field {
|
12 |
-
/**
|
13 |
-
* Array of cloneable editors.
|
14 |
-
*
|
15 |
-
* @var array
|
16 |
-
*/
|
17 |
-
protected static $cloneable_editors = array();
|
18 |
-
|
19 |
-
/**
|
20 |
-
* Enqueue scripts and styles.
|
21 |
-
*/
|
22 |
-
public static function admin_enqueue_scripts() {
|
23 |
-
wp_enqueue_style( 'rwmb-wysiwyg', RWMB_CSS_URL . 'wysiwyg.css', array(), RWMB_VER );
|
24 |
-
wp_enqueue_script( 'rwmb-wysiwyg', RWMB_JS_URL . 'wysiwyg.js', array( 'jquery' ), RWMB_VER, true );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Change field value on save.
|
29 |
-
*
|
30 |
-
* @param mixed $new The submitted meta value.
|
31 |
-
* @param mixed $old The existing meta value.
|
32 |
-
* @param int $post_id The post ID.
|
33 |
-
* @param array $field The field parameters.
|
34 |
-
* @return string
|
35 |
-
*/
|
36 |
-
public static function value( $new, $old, $post_id, $field ) {
|
37 |
-
return $field['raw'] ? $new : wpautop( $new );
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Get field HTML.
|
42 |
-
*
|
43 |
-
* @param mixed $meta Meta value.
|
44 |
-
* @param array $field Field parameters.
|
45 |
-
* @return string
|
46 |
-
*/
|
47 |
-
public static function html( $meta, $field ) {
|
48 |
-
// Using output buffering because wp_editor() echos directly.
|
49 |
-
ob_start();
|
50 |
-
|
51 |
-
$field['options']['textarea_name'] = $field['field_name'];
|
52 |
-
$attributes = self::get_attributes( $field );
|
53 |
-
|
54 |
-
// Use new wp_editor() since WP 3.3.
|
55 |
-
wp_editor( $meta, $attributes['id'], $field['options'] );
|
56 |
-
|
57 |
-
return ob_get_clean();
|
58 |
-
}
|
59 |
-
|
60 |
-
/**
|
61 |
-
* Escape meta for field output.
|
62 |
-
*
|
63 |
-
* @param mixed $meta Meta value.
|
64 |
-
* @return mixed
|
65 |
-
*/
|
66 |
-
public static function esc_meta( $meta ) {
|
67 |
-
return $meta;
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Normalize parameters for field.
|
72 |
-
*
|
73 |
-
* @param array $field Field parameters.
|
74 |
-
* @return array
|
75 |
-
*/
|
76 |
-
public static function normalize( $field ) {
|
77 |
-
$field = parent::normalize( $field );
|
78 |
-
$field = wp_parse_args(
|
79 |
-
$field,
|
80 |
-
array(
|
81 |
-
'raw' => false,
|
82 |
-
'options' => array(),
|
83 |
-
)
|
84 |
-
);
|
85 |
-
|
86 |
-
$field['options'] = wp_parse_args(
|
87 |
-
$field['options'],
|
88 |
-
array(
|
89 |
-
'editor_class' => 'rwmb-wysiwyg',
|
90 |
-
'dfw' => true, // Use default WordPress full screen UI.
|
91 |
-
)
|
92 |
-
);
|
93 |
-
|
94 |
-
// Keep the filter to be compatible with previous versions.
|
95 |
-
$field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
|
96 |
-
|
97 |
-
return $field;
|
98 |
-
}
|
99 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The WYSIWYG (editor) field.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
/**
|
9 |
+
* WYSIWYG (editor) field class.
|
10 |
+
*/
|
11 |
+
class RWMB_Wysiwyg_Field extends RWMB_Field {
|
12 |
+
/**
|
13 |
+
* Array of cloneable editors.
|
14 |
+
*
|
15 |
+
* @var array
|
16 |
+
*/
|
17 |
+
protected static $cloneable_editors = array();
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Enqueue scripts and styles.
|
21 |
+
*/
|
22 |
+
public static function admin_enqueue_scripts() {
|
23 |
+
wp_enqueue_style( 'rwmb-wysiwyg', RWMB_CSS_URL . 'wysiwyg.css', array(), RWMB_VER );
|
24 |
+
wp_enqueue_script( 'rwmb-wysiwyg', RWMB_JS_URL . 'wysiwyg.js', array( 'jquery' ), RWMB_VER, true );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Change field value on save.
|
29 |
+
*
|
30 |
+
* @param mixed $new The submitted meta value.
|
31 |
+
* @param mixed $old The existing meta value.
|
32 |
+
* @param int $post_id The post ID.
|
33 |
+
* @param array $field The field parameters.
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public static function value( $new, $old, $post_id, $field ) {
|
37 |
+
return $field['raw'] ? $new : wpautop( $new );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Get field HTML.
|
42 |
+
*
|
43 |
+
* @param mixed $meta Meta value.
|
44 |
+
* @param array $field Field parameters.
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
public static function html( $meta, $field ) {
|
48 |
+
// Using output buffering because wp_editor() echos directly.
|
49 |
+
ob_start();
|
50 |
+
|
51 |
+
$field['options']['textarea_name'] = $field['field_name'];
|
52 |
+
$attributes = self::get_attributes( $field );
|
53 |
+
|
54 |
+
// Use new wp_editor() since WP 3.3.
|
55 |
+
wp_editor( $meta, $attributes['id'], $field['options'] );
|
56 |
+
|
57 |
+
return ob_get_clean();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Escape meta for field output.
|
62 |
+
*
|
63 |
+
* @param mixed $meta Meta value.
|
64 |
+
* @return mixed
|
65 |
+
*/
|
66 |
+
public static function esc_meta( $meta ) {
|
67 |
+
return $meta;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Normalize parameters for field.
|
72 |
+
*
|
73 |
+
* @param array $field Field parameters.
|
74 |
+
* @return array
|
75 |
+
*/
|
76 |
+
public static function normalize( $field ) {
|
77 |
+
$field = parent::normalize( $field );
|
78 |
+
$field = wp_parse_args(
|
79 |
+
$field,
|
80 |
+
array(
|
81 |
+
'raw' => false,
|
82 |
+
'options' => array(),
|
83 |
+
)
|
84 |
+
);
|
85 |
+
|
86 |
+
$field['options'] = wp_parse_args(
|
87 |
+
$field['options'],
|
88 |
+
array(
|
89 |
+
'editor_class' => 'rwmb-wysiwyg',
|
90 |
+
'dfw' => true, // Use default WordPress full screen UI.
|
91 |
+
)
|
92 |
+
);
|
93 |
+
|
94 |
+
// Keep the filter to be compatible with previous versions.
|
95 |
+
$field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
|
96 |
+
|
97 |
+
return $field;
|
98 |
+
}
|
99 |
+
}
|
inc/libraries/meta-box/inc/functions.php
CHANGED
@@ -1,385 +1,385 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Plugin public functions.
|
4 |
-
*
|
5 |
-
* @package Meta Box
|
6 |
-
*/
|
7 |
-
|
8 |
-
if ( ! function_exists( 'rwmb_meta' ) ) {
|
9 |
-
/**
|
10 |
-
* Get post meta.
|
11 |
-
*
|
12 |
-
* @param string $key Meta key. Required.
|
13 |
-
* @param array $args Array of arguments. Optional.
|
14 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
15 |
-
*
|
16 |
-
* @return mixed
|
17 |
-
*/
|
18 |
-
function rwmb_meta( $key, $args = array(), $post_id = null ) {
|
19 |
-
$args = wp_parse_args( $args );
|
20 |
-
$field = rwmb_get_field_settings( $key, $args, $post_id );
|
21 |
-
|
22 |
-
/*
|
23 |
-
* If field is not found, which can caused by registering meta boxes for the backend only or conditional registration.
|
24 |
-
* Then fallback to the old method to retrieve meta (which uses get_post_meta() as the latest fallback).
|
25 |
-
*/
|
26 |
-
if ( false === $field ) {
|
27 |
-
return apply_filters( 'rwmb_meta', rwmb_meta_legacy( $key, $args, $post_id ) );
|
28 |
-
}
|
29 |
-
$meta = in_array( $field['type'], array( 'oembed', 'map', 'osm' ),
|
30 |
-
rwmb_the_value( $key, $args, $post_id, false ) :
|
31 |
-
rwmb_get_value( $key, $args, $post_id );
|
32 |
-
return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
if ( ! function_exists( 'rwmb_get_field_settings' ) ) {
|
37 |
-
/**
|
38 |
-
* Get field settings.
|
39 |
-
*
|
40 |
-
* @param string $key Meta key. Required.
|
41 |
-
* @param array $args Array of arguments. Optional.
|
42 |
-
* @param int|null $object_id Object ID. null for current post. Optional.
|
43 |
-
*
|
44 |
-
* @return array
|
45 |
-
*/
|
46 |
-
function rwmb_get_field_settings( $key, $args = array(), $object_id = null ) {
|
47 |
-
$args = wp_parse_args(
|
48 |
-
$args,
|
49 |
-
array(
|
50 |
-
'object_type' => 'post',
|
51 |
-
)
|
52 |
-
);
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Filter meta type from object type and object id.
|
56 |
-
*
|
57 |
-
* @var string Meta type, default is post type name.
|
58 |
-
* @var string Object type.
|
59 |
-
* @var string|int Object id.
|
60 |
-
*/
|
61 |
-
$type = apply_filters( 'rwmb_meta_type', '', $args['object_type'], $object_id );
|
62 |
-
if ( ! $type ) {
|
63 |
-
$type = get_post_type( $object_id );
|
64 |
-
}
|
65 |
-
|
66 |
-
return rwmb_get_registry( 'field' )->get( $key, $type, $args['object_type'] );
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
if ( ! function_exists( 'rwmb_meta_legacy' ) ) {
|
71 |
-
/**
|
72 |
-
* Get post meta.
|
73 |
-
*
|
74 |
-
* @param string $key Meta key. Required.
|
75 |
-
* @param array $args Array of arguments. Optional.
|
76 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
77 |
-
*
|
78 |
-
* @return mixed
|
79 |
-
*/
|
80 |
-
function rwmb_meta_legacy( $key, $args = array(), $post_id = null ) {
|
81 |
-
$args = wp_parse_args(
|
82 |
-
$args,
|
83 |
-
array(
|
84 |
-
'type' => 'text',
|
85 |
-
'multiple' => false,
|
86 |
-
'clone' => false,
|
87 |
-
)
|
88 |
-
);
|
89 |
-
$field = array(
|
90 |
-
'id' => $key,
|
91 |
-
'type' => $args['type'],
|
92 |
-
'clone' => $args['clone'],
|
93 |
-
'multiple' => $args['multiple'],
|
94 |
-
);
|
95 |
-
|
96 |
-
$method = 'get_value';
|
97 |
-
switch ( $args['type'] ) {
|
98 |
-
case 'taxonomy':
|
99 |
-
case 'taxonomy_advanced':
|
100 |
-
$field['taxonomy'] = $args['taxonomy'];
|
101 |
-
break;
|
102 |
-
case 'map':
|
103 |
-
case 'osm':
|
104 |
-
case 'oembed':
|
105 |
-
$method = 'the_value';
|
106 |
-
break;
|
107 |
-
}
|
108 |
-
$field = RWMB_Field::call( 'normalize', $field );
|
109 |
-
|
110 |
-
return RWMB_Field::call( $method, $field, $args, $post_id );
|
111 |
-
}
|
112 |
-
} // End if().
|
113 |
-
|
114 |
-
if ( ! function_exists( 'rwmb_get_value' ) ) {
|
115 |
-
/**
|
116 |
-
* Get value of custom field.
|
117 |
-
* This is used to replace old version of rwmb_meta key.
|
118 |
-
*
|
119 |
-
* @param string $field_id Field ID. Required.
|
120 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
121 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
122 |
-
*
|
123 |
-
* @return mixed false if field doesn't exist. Field value otherwise.
|
124 |
-
*/
|
125 |
-
function rwmb_get_value( $field_id, $args = array(), $post_id = null ) {
|
126 |
-
$args = wp_parse_args( $args );
|
127 |
-
$field = rwmb_get_field_settings( $field_id, $args, $post_id );
|
128 |
-
|
129 |
-
// Get field value.
|
130 |
-
$value = $field ? RWMB_Field::call( 'get_value', $field, $args, $post_id ) : false;
|
131 |
-
|
132 |
-
/*
|
133 |
-
* Allow developers to change the returned value of field.
|
134 |
-
* For version < 4.8.2, the filter name was 'rwmb_get_field'.
|
135 |
-
*
|
136 |
-
* @param mixed $value Field value.
|
137 |
-
* @param array $field Field parameters.
|
138 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
139 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
140 |
-
*/
|
141 |
-
$value = apply_filters( 'rwmb_get_value', $value, $field, $args, $post_id );
|
142 |
-
|
143 |
-
return $value;
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
-
if ( ! function_exists( 'rwmb_the_value' ) ) {
|
148 |
-
/**
|
149 |
-
* Display the value of a field
|
150 |
-
*
|
151 |
-
* @param string $field_id Field ID. Required.
|
152 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
153 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
154 |
-
* @param bool $echo Display field meta value? Default `true` which works in almost all cases. We use `false` for the [rwmb_meta] shortcode.
|
155 |
-
*
|
156 |
-
* @return string
|
157 |
-
*/
|
158 |
-
function rwmb_the_value( $field_id, $args = array(), $post_id = null, $echo = true ) {
|
159 |
-
$args = wp_parse_args( $args );
|
160 |
-
$field = rwmb_get_field_settings( $field_id, $args, $post_id );
|
161 |
-
|
162 |
-
if ( ! $field ) {
|
163 |
-
return '';
|
164 |
-
}
|
165 |
-
|
166 |
-
$output = RWMB_Field::call( 'the_value', $field, $args, $post_id );
|
167 |
-
|
168 |
-
/*
|
169 |
-
* Allow developers to change the returned value of field.
|
170 |
-
* For version < 4.8.2, the filter name was 'rwmb_get_field'.
|
171 |
-
*
|
172 |
-
* @param mixed $value Field HTML output.
|
173 |
-
* @param array $field Field parameters.
|
174 |
-
* @param array $args Additional arguments. Rarely used. See specific fields for details.
|
175 |
-
* @param int|null $post_id Post ID. null for current post. Optional.
|
176 |
-
*/
|
177 |
-
$output = apply_filters( 'rwmb_the_value', $output, $field, $args, $post_id );
|
178 |
-
|
179 |
-
if ( $echo ) {
|
180 |
-
echo $output; // WPCS: XSS OK.
|
181 |
-
}
|
182 |
-
|
183 |
-
return $output;
|
184 |
-
}
|
185 |
-
} // End if().
|
186 |
-
|
187 |
-
if ( ! function_exists( 'rwmb_get_object_fields' ) ) {
|
188 |
-
/**
|
189 |
-
* Get defined meta fields for object.
|
190 |
-
*
|
191 |
-
* @param int|string $type_or_id Object ID or post type / taxonomy (for terms) / user (for users).
|
192 |
-
* @param string $object_type Object type. Use post, term.
|
193 |
-
*
|
194 |
-
* @return array
|
195 |
-
*/
|
196 |
-
function rwmb_get_object_fields( $type_or_id, $object_type = 'post' ) {
|
197 |
-
$meta_boxes = rwmb_get_registry( 'meta_box' )->get_by( array( 'object_type' => $object_type ) );
|
198 |
-
array_walk( $meta_boxes, 'rwmb_check_meta_box_supports', array( $object_type, $type_or_id ) );
|
199 |
-
$meta_boxes = array_filter( $meta_boxes );
|
200 |
-
|
201 |
-
$fields = array();
|
202 |
-
foreach ( $meta_boxes as $meta_box ) {
|
203 |
-
foreach ( $meta_box->fields as $field ) {
|
204 |
-
$fields[ $field['id'] ] = $field;
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
return $fields;
|
209 |
-
}
|
210 |
-
}
|
211 |
-
|
212 |
-
if ( ! function_exists( 'rwmb_check_meta_box_supports' ) ) {
|
213 |
-
/**
|
214 |
-
* Check if a meta box supports an object.
|
215 |
-
*
|
216 |
-
* @param object $meta_box Meta Box object.
|
217 |
-
* @param int $key Not used.
|
218 |
-
* @param array $object_data Object data (type and ID).
|
219 |
-
*/
|
220 |
-
function rwmb_check_meta_box_supports( &$meta_box, $key, $object_data ) {
|
221 |
-
list( $object_type, $type_or_id ) = $object_data;
|
222 |
-
|
223 |
-
$type = null;
|
224 |
-
$prop = null;
|
225 |
-
switch ( $object_type ) {
|
226 |
-
case 'post':
|
227 |
-
$type = is_numeric( $type_or_id ) ? get_post_type( $type_or_id ) : $type_or_id;
|
228 |
-
$prop = 'post_types';
|
229 |
-
break;
|
230 |
-
case 'term':
|
231 |
-
$type = $type_or_id;
|
232 |
-
if ( is_numeric( $type_or_id ) ) {
|
233 |
-
$term = get_term( $type_or_id );
|
234 |
-
$type = is_array( $term ) ? $term->taxonomy : null;
|
235 |
-
}
|
236 |
-
$prop = 'taxonomies';
|
237 |
-
break;
|
238 |
-
}
|
239 |
-
if ( ! $type || ! in_array( $type, $meta_box->meta_box[ $prop ], true ) ) {
|
240 |
-
$meta_box = false;
|
241 |
-
}
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
-
if ( ! function_exists( 'rwmb_meta_shortcode' ) ) {
|
246 |
-
/**
|
247 |
-
* Shortcode to display meta value.
|
248 |
-
*
|
249 |
-
* @param array $atts Shortcode attributes, same as rwmb_meta() function, but has more "meta_key" parameter.
|
250 |
-
*
|
251 |
-
* @return string
|
252 |
-
*/
|
253 |
-
function rwmb_meta_shortcode( $atts ) {
|
254 |
-
$atts = wp_parse_args(
|
255 |
-
$atts,
|
256 |
-
array(
|
257 |
-
'post_id' => get_the_ID(),
|
258 |
-
)
|
259 |
-
);
|
260 |
-
if ( empty( $atts['meta_key'] ) ) {
|
261 |
-
return '';
|
262 |
-
}
|
263 |
-
|
264 |
-
$field_id = $atts['meta_key'];
|
265 |
-
$post_id = $atts['post_id'];
|
266 |
-
unset( $atts['meta_key'], $atts['post_id'] );
|
267 |
-
|
268 |
-
return rwmb_the_value( $field_id, $atts, $post_id, false );
|
269 |
-
}
|
270 |
-
|
271 |
-
add_shortcode( 'rwmb_meta', 'rwmb_meta_shortcode' );
|
272 |
-
}
|
273 |
-
|
274 |
-
if ( ! function_exists( 'rwmb_get_registry' ) ) {
|
275 |
-
/**
|
276 |
-
* Get the registry by type.
|
277 |
-
* Always return the same instance of the registry.
|
278 |
-
*
|
279 |
-
* @param string $type Registry type.
|
280 |
-
*
|
281 |
-
* @return object
|
282 |
-
*/
|
283 |
-
function rwmb_get_registry( $type ) {
|
284 |
-
static $data = array();
|
285 |
-
|
286 |
-
$type = str_replace( array( '-', '_' ), ' ', $type );
|
287 |
-
$class = 'RWMB_' . ucwords( $type ) . '_Registry';
|
288 |
-
$class = str_replace( ' ', '_', $class );
|
289 |
-
if ( ! isset( $data[ $type ] ) ) {
|
290 |
-
$data[ $type ] = new $class();
|
291 |
-
}
|
292 |
-
|
293 |
-
return $data[ $type ];
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
if ( ! function_exists( 'rwmb_get_storage_class_name' ) ) {
|
298 |
-
/**
|
299 |
-
* Get storage class name.
|
300 |
-
*
|
301 |
-
* @param string $object_type Object type. Use post or term.
|
302 |
-
* @return string
|
303 |
-
*/
|
304 |
-
function rwmb_get_storage_class_name( $object_type ) {
|
305 |
-
$object_type = str_replace( array( '-', '_' ), ' ', $object_type );
|
306 |
-
$object_type = ucwords( $object_type );
|
307 |
-
$object_type = str_replace( ' ', '_', $object_type );
|
308 |
-
$class_name = 'RWMB_' . $object_type . '_Storage';
|
309 |
-
|
310 |
-
if ( ! class_exists( $class_name ) ) {
|
311 |
-
$class_name = 'RWMB_Post_Storage';
|
312 |
-
}
|
313 |
-
|
314 |
-
return apply_filters( 'rwmb_storage_class_name', $class_name, $object_type );
|
315 |
-
}
|
316 |
-
}
|
317 |
-
|
318 |
-
if ( ! function_exists( 'rwmb_get_storage' ) ) {
|
319 |
-
/**
|
320 |
-
* Get storage instance.
|
321 |
-
*
|
322 |
-
* @param string $object_type Object type. Use post or term.
|
323 |
-
* @param RW_Meta_Box $meta_box Meta box object. Optional.
|
324 |
-
* @return RWMB_Storage_Interface
|
325 |
-
*/
|
326 |
-
function rwmb_get_storage( $object_type, $meta_box = null ) {
|
327 |
-
$class_name = rwmb_get_storage_class_name( $object_type );
|
328 |
-
$storage = rwmb_get_registry( 'storage' )->get( $class_name );
|
329 |
-
|
330 |
-
return apply_filters( 'rwmb_get_storage', $storage, $object_type, $meta_box );
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
if ( ! function_exists( 'rwmb_get_meta_box' ) ) {
|
335 |
-
/**
|
336 |
-
* Get meta box object from meta box data.
|
337 |
-
*
|
338 |
-
* @param array $meta_box Array of meta box data.
|
339 |
-
* @return RW_Meta_Box
|
340 |
-
*/
|
341 |
-
function rwmb_get_meta_box( $meta_box ) {
|
342 |
-
/**
|
343 |
-
* Allow filter meta box class name.
|
344 |
-
*
|
345 |
-
* @var string Meta box class name.
|
346 |
-
* @var array Meta box data.
|
347 |
-
*/
|
348 |
-
$class_name = apply_filters( 'rwmb_meta_box_class_name', 'RW_Meta_Box', $meta_box );
|
349 |
-
|
350 |
-
return new $class_name( $meta_box );
|
351 |
-
}
|
352 |
-
}
|
353 |
-
|
354 |
-
/**
|
355 |
-
* Helper functions
|
356 |
-
*/
|
357 |
-
|
358 |
-
if ( ! function_exists( 'rwmb_change_array_key' ) ) {
|
359 |
-
/**
|
360 |
-
* Change array key.
|
361 |
-
*
|
362 |
-
* @param array $array Input array.
|
363 |
-
* @param string $from From key.
|
364 |
-
* @param string $to To key.
|
365 |
-
*/
|
366 |
-
function rwmb_change_array_key( &$array, $from, $to ) {
|
367 |
-
if ( isset( $array[ $from ] ) ) {
|
368 |
-
$array[ $to ] = $array[ $from ];
|
369 |
-
}
|
370 |
-
unset( $array[ $from ] );
|
371 |
-
}
|
372 |
-
}
|
373 |
-
|
374 |
-
if ( ! function_exists( 'rwmb_csv_to_array' ) ) {
|
375 |
-
/**
|
376 |
-
* Convert a comma separated string to array.
|
377 |
-
*
|
378 |
-
* @param string $string Comma separated string.
|
379 |
-
*
|
380 |
-
* @return array
|
381 |
-
*/
|
382 |
-
function rwmb_csv_to_array( $string ) {
|
383 |
-
return is_array( $string ) ? $string : array_filter( array_map( 'trim', explode( ',', $string . ',' ) ) );
|
384 |
-
}
|
385 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Plugin public functions.
|
4 |
+
*
|
5 |
+
* @package Meta Box
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! function_exists( 'rwmb_meta' ) ) {
|
9 |
+
/**
|
10 |
+
* Get post meta.
|
11 |
+
*
|
12 |
+
* @param string $key Meta key. Required.
|
13 |
+
* @param array $args Array of arguments. Optional.
|
14 |
+
* @param int|null $post_id Post ID. null for current post. Optional.
|
15 |
+
*
|
16 |
+
* @return mixed
|
17 |
+
*/
|
18 |
+
function rwmb_meta( $key, $args = array(), $post_id = null ) {
|
19 |
+
$args = wp_parse_args( $args );
|
20 |
+
$field = rwmb_get_field_settings( $key, $args, $post_id );
|
21 |
+
|
22 |
+
/*
|
23 |
+
* If field is not found, which can caused by registering meta boxes for the backend only or conditional registration.
|
24 |
+
* Then fallback to the old method to retrieve meta (which uses get_post_meta() as the latest fallback).
|
25 |
+
*/
|
26 |
+
if ( false === $field ) {
|
27 |
+
return apply_filters( 'rwmb_meta', rwmb_meta_legacy( $key, $args, $post_id ) );
|
28 |
+
}
|
29 |
+
$meta = in_array( $field['type'], array( 'oembed', 'map', 'osm' ), tr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|