Version Description
- Added pagination for recent posts (blog) shortcode.
- Added heading shortcode.
- Added product carousel for WooCommerce.
- Added Custom post type itrans slider.
- Added itrans slider shortcode.
Download this release
Release Info
Developer | marsian |
Plugin | TemplatesNext ToolKit |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
- css/tx-admin-style.css +9 -1
- css/tx-style.css +356 -0
- custom-post-types/css/multi-post-thumbnails-admin.css +4 -0
- custom-post-types/itrans-slider.php +74 -0
- custom-post-types/js/media-modal.js +64 -0
- custom-post-types/js/multi-post-thumbnails-admin.js +51 -0
- custom-post-types/multi-post-thumbnails.php +459 -0
- inc/meta-box/css/autocomplete.css +14 -0
- inc/meta-box/css/color.css +7 -0
- inc/meta-box/css/divider.css +7 -0
- inc/meta-box/css/file.css +58 -0
- inc/meta-box/css/heading.css +12 -0
- inc/meta-box/css/image-select.css +21 -0
- inc/meta-box/css/image.css +67 -0
- inc/meta-box/css/jqueryui/jquery-ui-timepicker-addon.css +6 -0
- inc/meta-box/css/jqueryui/jquery.ui.core.css +38 -0
- inc/meta-box/css/jqueryui/jquery.ui.datepicker.css +68 -0
- inc/meta-box/css/jqueryui/jquery.ui.slider.css +24 -0
- inc/meta-box/css/jqueryui/jquery.ui.theme.css +249 -0
- inc/meta-box/css/oembed.css +11 -0
- inc/meta-box/css/plupload-image.css +25 -0
- inc/meta-box/css/range.css +4 -0
- inc/meta-box/css/select-advanced.css +4 -0
- inc/meta-box/css/select.css +4 -0
- inc/meta-box/css/select2/select2-spinner.gif +0 -0
- inc/meta-box/css/select2/select2.css +524 -0
- inc/meta-box/css/select2/select2.png +0 -0
- inc/meta-box/css/select2/select2x2.png +0 -0
- inc/meta-box/css/select2/spinner.gif +0 -0
- inc/meta-box/css/slider.css +13 -0
- inc/meta-box/css/style.css +77 -0
- inc/meta-box/css/taxonomy.css +10 -0
- inc/meta-box/css/wysiwyg.css +3 -0
- inc/meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- inc/meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- inc/meta-box/img/jqueryui/ui-icons_222222_256x240.png +0 -0
- inc/meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
- inc/meta-box/img/jqueryui/ui-icons_454545_256x240.png +0 -0
- inc/meta-box/img/jqueryui/ui-icons_888888_256x240.png +0 -0
- inc/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
- inc/meta-box/img/loader.gif +0 -0
- inc/meta-box/inc/common.php +61 -0
- inc/meta-box/inc/field.php +335 -0
- inc/meta-box/inc/fields/autocomplete.php +150 -0
- inc/meta-box/inc/fields/button.php +40 -0
- inc/meta-box/inc/fields/checkbox-list.php +105 -0
- inc/meta-box/inc/fields/checkbox.php +45 -0
- inc/meta-box/inc/fields/color.php +71 -0
- inc/meta-box/inc/fields/date.php +86 -0
- inc/meta-box/inc/fields/datetime.php +156 -0
- inc/meta-box/inc/fields/divider.php +45 -0
- inc/meta-box/inc/fields/email.php +47 -0
- inc/meta-box/inc/fields/fieldset-text.php +78 -0
- inc/meta-box/inc/fields/file-advanced.php +124 -0
- inc/meta-box/inc/fields/file-input.php +63 -0
- inc/meta-box/inc/fields/file.php +308 -0
- inc/meta-box/inc/fields/heading.php +48 -0
- inc/meta-box/inc/fields/hidden.php +27 -0
- inc/meta-box/inc/fields/image-advanced.php +130 -0
- inc/meta-box/inc/fields/image-select.php +63 -0
- inc/meta-box/inc/fields/image.php +162 -0
- inc/meta-box/inc/fields/map.php +57 -0
- inc/meta-box/inc/fields/number.php +47 -0
- inc/meta-box/inc/fields/oembed.php +82 -0
- inc/meta-box/inc/fields/password.php +31 -0
- inc/meta-box/inc/fields/plupload-image.php +197 -0
- inc/meta-box/inc/fields/post.php +156 -0
- inc/meta-box/inc/fields/radio.php +36 -0
- inc/meta-box/inc/fields/range.php +86 -0
- inc/meta-box/inc/fields/select-advanced.php +76 -0
- inc/meta-box/inc/fields/select.php +147 -0
- inc/meta-box/inc/fields/slider.php +68 -0
- inc/meta-box/inc/fields/taxonomy-advanced.php +62 -0
- inc/meta-box/inc/fields/taxonomy.php +263 -0
- inc/meta-box/inc/fields/text-list.php +109 -0
- inc/meta-box/inc/fields/text.php +77 -0
- inc/meta-box/inc/fields/textarea.php +47 -0
- inc/meta-box/inc/fields/thickbox-image.php +61 -0
- inc/meta-box/inc/fields/time.php +91 -0
- inc/meta-box/inc/fields/url.php +47 -0
- inc/meta-box/inc/fields/user.php +143 -0
- inc/meta-box/inc/fields/wysiwyg.php +108 -0
- inc/meta-box/inc/helpers.php +408 -0
- inc/meta-box/inc/init.php +43 -0
- inc/meta-box/inc/meta-box.php +454 -0
- inc/meta-box/js/autocomplete.js +62 -0
- inc/meta-box/js/autosave.js +19 -0
- inc/meta-box/js/clone.js +253 -0
- inc/meta-box/js/color.js +44 -0
- inc/meta-box/js/date.js +20 -0
- inc/meta-box/js/datetime.js +21 -0
- inc/meta-box/js/file-advanced.js +91 -0
- inc/meta-box/js/file-input.js +42 -0
- inc/meta-box/js/file.js +157 -0
- inc/meta-box/js/image-advanced.js +90 -0
- inc/meta-box/js/image-select.js +26 -0
- inc/meta-box/js/image.js +25 -0
- inc/meta-box/js/jquery.validate.min.js +2 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js +24 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js +59 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js +25 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js +21 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js +24 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js +22 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js +22 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js +22 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js +21 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js +26 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js +24 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js +24 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js +23 -0
- inc/meta-box/js/jqueryui/jquery-ui-timepicker-addon.js +71 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-af.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-bg.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ca.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-cs.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-de.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-el.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-es.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-et.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-eu.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fi.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fr.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-gl.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-he.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-hu.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-id.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-it.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ja.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ko.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-lt.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-nl.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-no.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pl.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt-BR.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ro.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ru.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sk.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sv.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-th.js +17 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-tr.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-uk.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-vi.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-CN.js +20 -0
- inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-TW.js +20 -0
- inc/meta-box/js/map.js +197 -0
- inc/meta-box/js/oembed.js +24 -0
- inc/meta-box/js/plupload-image.js +141 -0
- inc/meta-box/js/select-advanced.js +15 -0
- inc/meta-box/js/select2/select2.min.js +82 -0
- inc/meta-box/js/slider.js +39 -0
- inc/meta-box/js/taxonomy.js +31 -0
- inc/meta-box/js/thickbox-image.js +37 -0
- inc/meta-box/js/time.js +20 -0
- inc/meta-box/js/validate.js +26 -0
- inc/meta-box/lang/ar.mo +0 -0
- inc/meta-box/lang/ar.po +122 -0
- inc/meta-box/lang/de_DE.mo +0 -0
- inc/meta-box/lang/de_DE.po +160 -0
- inc/meta-box/lang/default.pot +174 -0
- inc/meta-box/lang/es.mo +0 -0
- inc/meta-box/lang/es.po +121 -0
- inc/meta-box/lang/it_IT.mo +0 -0
- inc/meta-box/lang/it_IT.po +126 -0
- inc/meta-box/lang/nb_NO.mo +0 -0
- inc/meta-box/lang/nb_NO.po +149 -0
- inc/meta-box/lang/nl.mo +0 -0
- inc/meta-box/lang/nl.po +130 -0
- inc/meta-box/lang/pt_BR.mo +0 -0
- inc/meta-box/lang/pt_BR.po +124 -0
- inc/meta-box/lang/sv_SE.mo +0 -0
- inc/meta-box/lang/sv_SE.po +118 -0
- inc/meta-box/lang/tr_TR.mo +0 -0
- inc/meta-box/lang/tr_TR.po +384 -0
- inc/meta-box/lang/vi.mo +0 -0
- inc/meta-box/lang/vi.po +411 -0
- inc/meta-box/lang/zh_CN.mo +0 -0
- inc/meta-box/lang/zh_CN.po +384 -0
- inc/meta-box/meta-box.php +49 -0
- inc/meta-box/readme.txt +372 -0
- inc/tnext-meta.php +218 -0
- js/tx-script.js +68 -1
- js/tx_main.js +7 -1
- readme.txt +8 -1
- shortcodes.php +208 -14
- tx-functions.php +345 -0
- tx-shortcodes.js +284 -23
- tx-toolkit.php +27 -1
css/tx-admin-style.css
CHANGED
@@ -120,6 +120,7 @@ ul.tx-fa-icons > li.active {
|
|
120 |
min-width: 480px;
|
121 |
}
|
122 |
|
|
|
123 |
#tx-column-form,
|
124 |
#tx-devider-form,
|
125 |
#tx-testimonial-form,
|
@@ -128,7 +129,14 @@ ul.tx-fa-icons > li.active {
|
|
128 |
#tx-service-form,
|
129 |
#tx-portfolio-form,
|
130 |
#tx-blog-form,
|
131 |
-
#tx-spacer-form
|
|
|
|
|
|
|
132 |
padding: 12px 16px;
|
133 |
min-width: 480px;
|
134 |
}
|
|
|
|
|
|
|
|
120 |
min-width: 480px;
|
121 |
}
|
122 |
|
123 |
+
.txx-sh-form,
|
124 |
#tx-column-form,
|
125 |
#tx-devider-form,
|
126 |
#tx-testimonial-form,
|
129 |
#tx-service-form,
|
130 |
#tx-portfolio-form,
|
131 |
#tx-blog-form,
|
132 |
+
#tx-spacer-form,
|
133 |
+
#tx-wooprods-form,
|
134 |
+
#tx-heading-form,
|
135 |
+
#tx-slider-form {
|
136 |
padding: 12px 16px;
|
137 |
min-width: 480px;
|
138 |
}
|
139 |
+
|
140 |
+
.nx-sh-cancel {
|
141 |
+
padding-top: 16px;
|
142 |
+
}
|
css/tx-style.css
CHANGED
@@ -391,6 +391,7 @@
|
|
391 |
text-align: right;
|
392 |
text-decoration: none;
|
393 |
padding-top: 6px;
|
|
|
394 |
}
|
395 |
|
396 |
.tx-post-row a.moretag:hover {
|
@@ -702,6 +703,361 @@
|
|
702 |
color: #fff;
|
703 |
}
|
704 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
|
706 |
@media (max-width: 999px) {
|
707 |
.folio-col-1 {
|
391 |
text-align: right;
|
392 |
text-decoration: none;
|
393 |
padding-top: 6px;
|
394 |
+
font-size: 12px;
|
395 |
}
|
396 |
|
397 |
.tx-post-row a.moretag:hover {
|
703 |
color: #fff;
|
704 |
}
|
705 |
|
706 |
+
.nx-paging {
|
707 |
+
display: block;
|
708 |
+
clear: both;
|
709 |
+
text-align: center;
|
710 |
+
margin: 16px 0px;
|
711 |
+
}
|
712 |
+
|
713 |
+
.nx-paging .nx-paging-inner {
|
714 |
+
display: inline-block;
|
715 |
+
margin: 0px auto;
|
716 |
+
}
|
717 |
+
|
718 |
+
.nx-paging > div.nx-paging-inner > a,
|
719 |
+
.nx-paging > div.nx-paging-inner > a:visited,
|
720 |
+
.nx-paging > div.nx-paging-inner > span {
|
721 |
+
display: inline-block;
|
722 |
+
height: 28px;
|
723 |
+
line-height: 28px;
|
724 |
+
padding: 0px 10px;
|
725 |
+
border: 1px solid #d7d7d7;
|
726 |
+
text-decoration: none;
|
727 |
+
color: #999999;
|
728 |
+
}
|
729 |
+
|
730 |
+
.nx-paging > div.nx-paging-inner > span {
|
731 |
+
color: #CCC;
|
732 |
+
border: 1px solid #e7e7e7;
|
733 |
+
}
|
734 |
+
|
735 |
+
.nx-paging > div.nx-paging-inner > a:hover {
|
736 |
+
background-color: #e7e7e7;
|
737 |
+
color: #373737;
|
738 |
+
}
|
739 |
+
|
740 |
+
.nx-paging > div.nx-paging-inner > a.prev.page-numbers {}
|
741 |
+
|
742 |
+
/*
|
743 |
+
* Heading
|
744 |
+
*/
|
745 |
+
|
746 |
+
.tx-heading {
|
747 |
+
border-bottom: 1px solid #CCC;
|
748 |
+
padding-bottom: 6px;
|
749 |
+
}
|
750 |
+
|
751 |
+
.tx-heading .tx-heading-tag {
|
752 |
+
font-weight: 500;
|
753 |
+
margin: 0px;
|
754 |
+
padding: 0px;
|
755 |
+
}
|
756 |
+
|
757 |
+
/*
|
758 |
+
* related Product
|
759 |
+
*/
|
760 |
+
|
761 |
+
.related.products .products .owl-controls .owl-buttons .owl-prev {}
|
762 |
+
|
763 |
+
.related.products {
|
764 |
+
position: relative;
|
765 |
+
overflow: hidden;
|
766 |
+
}
|
767 |
+
|
768 |
+
.related.products .products .owl-controls .owl-buttons {
|
769 |
+
position: absolute;
|
770 |
+
width: 100%;
|
771 |
+
left: 0px;
|
772 |
+
top: 45%;
|
773 |
+
}
|
774 |
+
|
775 |
+
.related.products .products .owl-controls .owl-buttons .owl-next,
|
776 |
+
.related.products .products .owl-controls .owl-buttons .owl-prev {
|
777 |
+
display: block;
|
778 |
+
height: 32px;
|
779 |
+
width: 24px;
|
780 |
+
line-height: 24px;
|
781 |
+
text-align: center;
|
782 |
+
color: #ffffff;
|
783 |
+
background-color: rgba(0,0,0,0.4);
|
784 |
+
position: absolute;
|
785 |
+
left: 0px;
|
786 |
+
top: 0px;
|
787 |
+
opacity: 0;
|
788 |
+
|
789 |
+
transition-property: all;
|
790 |
+
transition-duration: 0.4s;
|
791 |
+
transition-timing-function: ease-in-out;
|
792 |
+
transition-delay: 0.0s;
|
793 |
+
}
|
794 |
+
|
795 |
+
|
796 |
+
.related.products .products .owl-controls .owl-buttons .owl-next {
|
797 |
+
border-top-right-radius: 3px;
|
798 |
+
border-bottom-right-radius: 3px;
|
799 |
+
margin-left: -100px;
|
800 |
+
}
|
801 |
+
|
802 |
+
.related.products .products .owl-controls .owl-buttons .owl-prev {
|
803 |
+
left: auto;
|
804 |
+
right: 0px;
|
805 |
+
top: 0px;
|
806 |
+
border-top-left-radius: 3px;
|
807 |
+
border-bottom-left-radius: 3px;
|
808 |
+
margin-right: -100px;
|
809 |
+
}
|
810 |
+
|
811 |
+
|
812 |
+
.related.products .products .owl-controls .owl-buttons .owl-next span,
|
813 |
+
.related.products .products .owl-controls .owl-buttons .owl-prev span {
|
814 |
+
line-height: 32px;
|
815 |
+
}
|
816 |
+
|
817 |
+
.related.products .products:hover .owl-controls .owl-buttons .owl-next {
|
818 |
+
margin-left: 0px;
|
819 |
+
opacity: 1;
|
820 |
+
}
|
821 |
+
|
822 |
+
.related.products .products:hover .owl-controls .owl-buttons .owl-prev {
|
823 |
+
margin-right: 0px;
|
824 |
+
opacity: 1;
|
825 |
+
}
|
826 |
+
|
827 |
+
/*
|
828 |
+
* Slider
|
829 |
+
*/
|
830 |
+
|
831 |
+
.tx-slider .owl-controls .owl-buttons .owl-next span.genericon {}
|
832 |
+
.tx-slider .owl-wrapper .owl-item.active .tx-slider-item .tx-slider-box .tx-slide-content .tx-slide-details {}
|
833 |
+
|
834 |
+
|
835 |
+
|
836 |
+
.tx-slider {
|
837 |
+
position: relative;
|
838 |
+
overflow: hidden;
|
839 |
+
width: 100%;
|
840 |
+
height: auto;
|
841 |
+
}
|
842 |
+
|
843 |
+
.tx-slider img {
|
844 |
+
width: 100%;
|
845 |
+
max-width: 100%;
|
846 |
+
}
|
847 |
+
|
848 |
+
.tx-slider .owl-controls {
|
849 |
+
position: absolute;
|
850 |
+
left: 0px;
|
851 |
+
top: 0px;
|
852 |
+
height: 100%;
|
853 |
+
width: 100%;
|
854 |
+
z-index: 301;
|
855 |
+
}
|
856 |
+
|
857 |
+
.tx-slider .owl-controls .owl-buttons {
|
858 |
+
position: absolute;
|
859 |
+
top: 45%;
|
860 |
+
left: 0px;
|
861 |
+
width: 100%;
|
862 |
+
z-index: 302;
|
863 |
+
}
|
864 |
+
|
865 |
+
|
866 |
+
.tx-slider .owl-controls .owl-buttons .owl-next,
|
867 |
+
.tx-slider .owl-controls .owl-buttons .owl-prev {
|
868 |
+
display: block;
|
869 |
+
height: 40px;
|
870 |
+
width: 32px;
|
871 |
+
line-height: 32px;
|
872 |
+
text-align: center;
|
873 |
+
color: #ffffff;
|
874 |
+
background-color: rgba(0,0,0,0.6);
|
875 |
+
position: absolute;
|
876 |
+
left: 0px;
|
877 |
+
top: 0px;
|
878 |
+
|
879 |
+
transition-property: all;
|
880 |
+
transition-duration: 0.4s;
|
881 |
+
transition-timing-function: ease-in-out;
|
882 |
+
transition-delay: 0.0s;
|
883 |
+
}
|
884 |
+
|
885 |
+
|
886 |
+
.tx-slider .owl-controls .owl-buttons .owl-next {
|
887 |
+
border-top-right-radius: 3px;
|
888 |
+
border-bottom-right-radius: 3px;
|
889 |
+
margin-left: -100px;
|
890 |
+
}
|
891 |
+
|
892 |
+
.tx-slider .owl-controls .owl-buttons .owl-prev {
|
893 |
+
left: auto;
|
894 |
+
right: 0px;
|
895 |
+
top: 0px;
|
896 |
+
border-top-left-radius: 3px;
|
897 |
+
border-bottom-left-radius: 3px;
|
898 |
+
margin-right: -100px;
|
899 |
+
}
|
900 |
+
|
901 |
+
|
902 |
+
.tx-slider .owl-controls .owl-buttons .owl-next span,
|
903 |
+
.tx-slider .owl-controls .owl-buttons .owl-prev span {
|
904 |
+
line-height: 40px;
|
905 |
+
}
|
906 |
+
|
907 |
+
.tx-slider:hover .owl-controls .owl-buttons .owl-next {
|
908 |
+
margin-left: 0px;
|
909 |
+
}
|
910 |
+
|
911 |
+
.tx-slider:hover .owl-controls .owl-buttons .owl-prev {
|
912 |
+
margin-right: 0px;
|
913 |
+
}
|
914 |
+
|
915 |
+
.tx-slider .owl-wrapper .tx-slider-box {
|
916 |
+
position: relative;
|
917 |
+
}
|
918 |
+
|
919 |
+
.tx-slider .owl-wrapper .owl-item.active .tx-slider-item .tx-slider-box .tx-slide-content .tx-slide-details {}
|
920 |
+
|
921 |
+
.tx-slider .owl-wrapper .tx-slide-content {
|
922 |
+
display: block;
|
923 |
+
position: absolute;
|
924 |
+
left: 0px;
|
925 |
+
top: 0px;
|
926 |
+
margin: 0px auto;
|
927 |
+
height: 100%;
|
928 |
+
width: 100%;
|
929 |
+
z-index: 302;
|
930 |
+
text-align: left;
|
931 |
+
}
|
932 |
+
|
933 |
+
.tx-slider .owl-wrapper .tx-slide-content .tx-slide-content-inner {
|
934 |
+
display: block;
|
935 |
+
position: relative;
|
936 |
+
margin: 0px auto;
|
937 |
+
height: 100%;
|
938 |
+
width: 100%;
|
939 |
+
max-width: 1200px;
|
940 |
+
padding: 32px;
|
941 |
+
}
|
942 |
+
|
943 |
+
.tx-slide-title {
|
944 |
+
display: inline-block;
|
945 |
+
font-weight: 600;
|
946 |
+
font-size: 32px;
|
947 |
+
padding: 8px 16px;
|
948 |
+
color: #FFF;
|
949 |
+
background-color: rgba(0,0,0,0.4);
|
950 |
+
margin-bottom: 12px;
|
951 |
+
visibility: hidden;
|
952 |
+
}
|
953 |
+
|
954 |
+
.tx-slide-details p {
|
955 |
+
display: inline-block;
|
956 |
+
padding: 8px 16px;
|
957 |
+
color: #FFF;
|
958 |
+
background-color: rgba(0,0,0,0.4);
|
959 |
+
max-width: 50%;
|
960 |
+
margin-bottom: 12px;
|
961 |
+
visibility: hidden;
|
962 |
+
}
|
963 |
+
|
964 |
+
.tx-slide-button {
|
965 |
+
visibility: hidden;
|
966 |
+
}
|
967 |
+
|
968 |
+
.tx-slider .tx-slide-button a,
|
969 |
+
.tx-slider .tx-slide-button a:visited {
|
970 |
+
display: inline-table;
|
971 |
+
padding: 12px 16px;
|
972 |
+
background-color: #575757;
|
973 |
+
border-radius: 3px;
|
974 |
+
color: #ffffff;
|
975 |
+
text-decoration: none;
|
976 |
+
font-size: 12px;
|
977 |
+
}
|
978 |
+
|
979 |
+
.tx-slider .tx-slide-button a:hover {
|
980 |
+
text-decoration: none;
|
981 |
+
}
|
982 |
+
|
983 |
+
.owl-item .tx-slide-title {
|
984 |
+
transition-property: all;
|
985 |
+
transition-duration: 0.4s;
|
986 |
+
transition-timing-function: ease-in-out;
|
987 |
+
transition-delay: 0.2s;
|
988 |
+
opacity: 0;
|
989 |
+
}
|
990 |
+
|
991 |
+
.owl-item .tx-slide-details p {
|
992 |
+
transition-property: all;
|
993 |
+
transition-duration: 0.4s;
|
994 |
+
transition-timing-function: ease-in-out;
|
995 |
+
transition-delay: 0.5s;
|
996 |
+
opacity: 0;
|
997 |
+
margin-left: 120px;
|
998 |
+
}
|
999 |
+
|
1000 |
+
.tx-slider .owl-item .tx-slide-button {
|
1001 |
+
transition-property: all;
|
1002 |
+
transition-duration: 0.4s;
|
1003 |
+
transition-timing-function: ease-in-out;
|
1004 |
+
transition-delay: .8s;
|
1005 |
+
margin-top: 80px;
|
1006 |
+
opacity: 0;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
.owl-item.active .tx-slide-title {
|
1010 |
+
visibility: visible;
|
1011 |
+
opacity: 1;
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
.owl-item.active .tx-slide-details p {
|
1015 |
+
visibility: visible;
|
1016 |
+
opacity: 1;
|
1017 |
+
margin-left: 0px;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
.tx-slider .owl-item.active .tx-slide-button {
|
1021 |
+
visibility: visible;
|
1022 |
+
margin-top: 0px;
|
1023 |
+
opacity: 1;
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
.tx-slider .owl-pagination {
|
1027 |
+
display: block;
|
1028 |
+
width: 100%;
|
1029 |
+
position: absolute;
|
1030 |
+
bottom: 12px;
|
1031 |
+
left: 0px;
|
1032 |
+
text-align: center;
|
1033 |
+
transition-property: all;
|
1034 |
+
transition-duration: 0.4s;
|
1035 |
+
transition-timing-function: ease-in-out;
|
1036 |
+
transition-delay: .0s;
|
1037 |
+
opacity: 0;
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
.tx-slider:hover .owl-pagination {
|
1041 |
+
opacity: 1;
|
1042 |
+
}
|
1043 |
+
|
1044 |
+
.tx-slider .owl-pagination .owl-page {
|
1045 |
+
display: inline-block;
|
1046 |
+
margin: 0px 4px;
|
1047 |
+
}
|
1048 |
+
|
1049 |
+
.tx-slider .owl-pagination .owl-page span {
|
1050 |
+
display: block;
|
1051 |
+
background-color: rgba(0,0,0,0.4);
|
1052 |
+
height: 12px;
|
1053 |
+
width: 12px;
|
1054 |
+
border-radius: 6px;
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
.tx-slider .owl-pagination .owl-page.active span {
|
1058 |
+
background-color: rgba(0,0,0,0.8);
|
1059 |
+
}
|
1060 |
+
|
1061 |
|
1062 |
@media (max-width: 999px) {
|
1063 |
.folio-col-1 {
|
custom-post-types/css/multi-post-thumbnails-admin.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
img.mpt-thumbnail {
|
2 |
+
width: 100%;
|
3 |
+
height: auto;
|
4 |
+
}
|
custom-post-types/itrans-slider.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* ************************************************ */
|
4 |
+
/* Team Post Type Functions */
|
5 |
+
/* ************************************************ */
|
6 |
+
|
7 |
+
|
8 |
+
add_action('init', 'tx_itrans_slider_register');
|
9 |
+
|
10 |
+
function tx_itrans_slider_register() {
|
11 |
+
|
12 |
+
$labels = array(
|
13 |
+
'name' => _x('itrans Slider', 'post type general name', "nx-admin"),
|
14 |
+
'singular_name' => _x('itrans Slide', 'post type singular name', "nx-admin"),
|
15 |
+
'add_new' => _x('Add New', 'itrans Slide', "nx-admin"),
|
16 |
+
'add_new_item' => __('Add New itrans Slide', "nx-admin"),
|
17 |
+
'edit_item' => __('Edit itrans Slide', "nx-admin"),
|
18 |
+
'new_item' => __('New itrans Slide', "nx-admin"),
|
19 |
+
'view_item' => __('View itrans Slide', "nx-admin"),
|
20 |
+
'search_items' => __('Search itrans Slide', "nx-admin"),
|
21 |
+
'not_found' => __('No itrans slide have been added yet', "nx-admin"),
|
22 |
+
'not_found_in_trash' => __('Nothing found in Trash', "nx-admin"),
|
23 |
+
'parent_item_colon' => ''
|
24 |
+
);
|
25 |
+
|
26 |
+
$args = array(
|
27 |
+
'labels' => $labels,
|
28 |
+
'public' => true,
|
29 |
+
'show_ui' => true,
|
30 |
+
'show_in_menu' => true,
|
31 |
+
'show_in_nav_menus' => false,
|
32 |
+
'rewrite' => false,
|
33 |
+
'supports' => array('title', 'editor', 'thumbnail'),
|
34 |
+
'has_archive' => true,
|
35 |
+
'taxonomies' => array('itrans-slider-category')
|
36 |
+
);
|
37 |
+
|
38 |
+
register_post_type( 'itrans-slider' , $args );
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
+
function create_itrans_slider_taxonomy() {
|
43 |
+
|
44 |
+
$atts = array(
|
45 |
+
"label" => _x('itrans Slider Categories', 'category label', "nx-admin"),
|
46 |
+
"singular_label" => _x('itrans Slider Category', 'category singular label', "nx-admin"),
|
47 |
+
'public' => true,
|
48 |
+
'hierarchical' => true,
|
49 |
+
'show_ui' => true,
|
50 |
+
'show_in_nav_menus' => false,
|
51 |
+
'args' => array( 'orderby' => 'term_order' ),
|
52 |
+
'rewrite' => false,
|
53 |
+
'query_var' => true
|
54 |
+
);
|
55 |
+
|
56 |
+
register_taxonomy( 'itrans-slider-category', 'itrans-slider', $atts );
|
57 |
+
|
58 |
+
}
|
59 |
+
add_action( 'init', 'create_itrans_slider_taxonomy', 0 );
|
60 |
+
|
61 |
+
|
62 |
+
add_filter("manage_edit-itrans_slider_columns", "itrans_slider_edit_columns");
|
63 |
+
|
64 |
+
function itrans_slider_edit_columns($columns){
|
65 |
+
$columns = array(
|
66 |
+
"cb" => "<input type=\"checkbox\" />",
|
67 |
+
"thumbnail" => "",
|
68 |
+
"title" => __("Slide Title", "nx-admin"),
|
69 |
+
"description" => __("Description", "nx-admin"),
|
70 |
+
"team-category" => __("Categories", "nx-admin")
|
71 |
+
);
|
72 |
+
|
73 |
+
return $columns;
|
74 |
+
}
|
custom-post-types/js/media-modal.js
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*global window,jQuery,wp */
|
2 |
+
var MediaModal = function (options) {
|
3 |
+
'use strict';
|
4 |
+
this.settings = {
|
5 |
+
calling_selector: false,
|
6 |
+
cb: function (attachment) {}
|
7 |
+
};
|
8 |
+
var that = this,
|
9 |
+
frame = wp.media.frames.file_frame;
|
10 |
+
|
11 |
+
this.attachEvents = function attachEvents() {
|
12 |
+
jQuery(this.settings.calling_selector).on('click', this.openFrame);
|
13 |
+
};
|
14 |
+
|
15 |
+
this.openFrame = function openFrame(e) {
|
16 |
+
e.preventDefault();
|
17 |
+
|
18 |
+
// Create the media frame.
|
19 |
+
frame = wp.media.frames.file_frame = wp.media({
|
20 |
+
title: jQuery(this).data('uploader_title'),
|
21 |
+
button: {
|
22 |
+
text: jQuery(this).data('uploader_button_text')
|
23 |
+
},
|
24 |
+
library : {
|
25 |
+
type : 'image'
|
26 |
+
}
|
27 |
+
});
|
28 |
+
|
29 |
+
// Set filterable state to uploaded to get select to show (setting this
|
30 |
+
// when creating the frame doesn't work)
|
31 |
+
frame.on('toolbar:create:select', function(){
|
32 |
+
frame.state().set('filterable', 'uploaded');
|
33 |
+
});
|
34 |
+
|
35 |
+
// When an image is selected, run the callback.
|
36 |
+
frame.on('select', function () {
|
37 |
+
// We set multiple to false so only get one image from the uploader
|
38 |
+
var attachment = frame.state().get('selection').first().toJSON();
|
39 |
+
that.settings.cb(attachment);
|
40 |
+
});
|
41 |
+
|
42 |
+
frame.on('open activate', function() {
|
43 |
+
// Get the link/button/etc that called us
|
44 |
+
var $caller = jQuery(that.settings.calling_selector);
|
45 |
+
|
46 |
+
// Select the thumbnail if we have one
|
47 |
+
if ($caller.data('thumbnail_id')) {
|
48 |
+
var Attachment = wp.media.model.Attachment;
|
49 |
+
var selection = frame.state().get('selection');
|
50 |
+
selection.add(Attachment.get($caller.data('thumbnail_id')));
|
51 |
+
}
|
52 |
+
});
|
53 |
+
|
54 |
+
frame.open();
|
55 |
+
};
|
56 |
+
|
57 |
+
this.init = function init() {
|
58 |
+
this.settings = jQuery.extend(this.settings, options);
|
59 |
+
this.attachEvents();
|
60 |
+
};
|
61 |
+
this.init();
|
62 |
+
|
63 |
+
return this;
|
64 |
+
};
|
custom-post-types/js/multi-post-thumbnails-admin.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
window.MultiPostThumbnails = {
|
2 |
+
|
3 |
+
setThumbnailHTML: function(html, id, post_type){
|
4 |
+
jQuery('.inside', '#' + post_type + '-' + id).html(html);
|
5 |
+
},
|
6 |
+
|
7 |
+
setThumbnailID: function(thumb_id, id, post_type){
|
8 |
+
var field = jQuery('input[value=_' + post_type + '_' + id + '_thumbnail_id]', '#list-table');
|
9 |
+
if ( field.size() > 0 ) {
|
10 |
+
jQuery('#meta\\[' + field.attr('id').match(/[0-9]+/) + '\\]\\[value\\]').text(thumb_id);
|
11 |
+
}
|
12 |
+
},
|
13 |
+
|
14 |
+
removeThumbnail: function(id, post_type, nonce){
|
15 |
+
jQuery.post(ajaxurl, {
|
16 |
+
action:'set-' + post_type + '-' + id + '-thumbnail', post_id: jQuery('#post_ID').val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie)
|
17 |
+
}, function(str){
|
18 |
+
if ( str == '0' ) {
|
19 |
+
alert( setPostThumbnailL10n.error );
|
20 |
+
} else {
|
21 |
+
MultiPostThumbnails.setThumbnailHTML(str, id, post_type);
|
22 |
+
}
|
23 |
+
}
|
24 |
+
);
|
25 |
+
},
|
26 |
+
|
27 |
+
|
28 |
+
setAsThumbnail: function(thumb_id, id, post_type, nonce){
|
29 |
+
var $link = jQuery('a#' + post_type + '-' + id + '-thumbnail-' + thumb_id);
|
30 |
+
$link.data('thumbnail_id', thumb_id);
|
31 |
+
$link.text( setPostThumbnailL10n.saving );
|
32 |
+
jQuery.post(ajaxurl, {
|
33 |
+
action:'set-' + post_type + '-' + id + '-thumbnail', post_id: post_id, thumbnail_id: thumb_id, _ajax_nonce: nonce, cookie: encodeURIComponent(document.cookie)
|
34 |
+
}, function(str){
|
35 |
+
var win = window.dialogArguments || opener || parent || top;
|
36 |
+
$link.text( setPostThumbnailL10n.setThumbnail );
|
37 |
+
if ( str == '0' ) {
|
38 |
+
alert( setPostThumbnailL10n.error );
|
39 |
+
} else {
|
40 |
+
$link.show();
|
41 |
+
$link.text( setPostThumbnailL10n.done );
|
42 |
+
$link.fadeOut( 2000, function() {
|
43 |
+
jQuery('tr.' + post_type + '-' + id + '-thumbnail').hide();
|
44 |
+
});
|
45 |
+
win.MultiPostThumbnails.setThumbnailID(thumb_id, id, post_type);
|
46 |
+
win.MultiPostThumbnails.setThumbnailHTML(str, id, post_type);
|
47 |
+
}
|
48 |
+
}
|
49 |
+
);
|
50 |
+
}
|
51 |
+
}
|
custom-post-types/multi-post-thumbnails.php
ADDED
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* Copyright 2010 Chris Scott (cscott@voceconnect.com)
|
4 |
+
|
5 |
+
This program is free software; you can redistribute it and/or modify
|
6 |
+
it under the terms of the GNU General Public License, version 2, as
|
7 |
+
published by the Free Software Foundation.
|
8 |
+
|
9 |
+
This program is distributed in the hope that it will be useful,
|
10 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
+
GNU General Public License for more details.
|
13 |
+
|
14 |
+
You should have received a copy of the GNU General Public License
|
15 |
+
along with this program; if not, write to the Free Software
|
16 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
+
*/
|
18 |
+
|
19 |
+
|
20 |
+
if (!class_exists('MultiPostThumbnails')) {
|
21 |
+
|
22 |
+
class MultiPostThumbnails {
|
23 |
+
|
24 |
+
public function __construct($args = array()) {
|
25 |
+
$this->register($args);
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Register a new post thumbnail.
|
30 |
+
*
|
31 |
+
* Required $args contents:
|
32 |
+
*
|
33 |
+
* label - The name of the post thumbnail to display in the admin metabox
|
34 |
+
*
|
35 |
+
* id - Used to build the CSS class for the admin meta box. Needs to be unique and valid in a CSS class selector.
|
36 |
+
*
|
37 |
+
* Optional $args contents:
|
38 |
+
*
|
39 |
+
* post_type - The post type to register this thumbnail for. Defaults to post.
|
40 |
+
*
|
41 |
+
* priority - The admin metabox priority. Defaults to 'low'.
|
42 |
+
*
|
43 |
+
* context - The admin metabox context. Defaults to 'side'.
|
44 |
+
*
|
45 |
+
* @param array|string $args See above description.
|
46 |
+
* @return void
|
47 |
+
*/
|
48 |
+
public function register($args = array()) {
|
49 |
+
global $wp_version;
|
50 |
+
|
51 |
+
$defaults = array(
|
52 |
+
'label' => null,
|
53 |
+
'id' => null,
|
54 |
+
'post_type' => 'post',
|
55 |
+
'priority' => 'low',
|
56 |
+
'context' => 'side',
|
57 |
+
);
|
58 |
+
|
59 |
+
$args = wp_parse_args($args, $defaults);
|
60 |
+
|
61 |
+
// Create and set properties
|
62 |
+
foreach($args as $k => $v) {
|
63 |
+
$this->$k = $v;
|
64 |
+
}
|
65 |
+
|
66 |
+
// Need these args to be set at a minimum
|
67 |
+
if (null === $this->label || null === $this->id) {
|
68 |
+
if (WP_DEBUG) {
|
69 |
+
trigger_error(sprintf(__("The 'label' and 'id' values of the 'args' parameter of '%s::%s()' are required", 'multiple-post-thumbnails'), __CLASS__, __FUNCTION__));
|
70 |
+
}
|
71 |
+
return;
|
72 |
+
}
|
73 |
+
|
74 |
+
// add theme support if not already added
|
75 |
+
if (!current_theme_supports('post-thumbnails')) {
|
76 |
+
add_theme_support( 'post-thumbnails' );
|
77 |
+
}
|
78 |
+
|
79 |
+
add_action('add_meta_boxes', array($this, 'add_metabox'));
|
80 |
+
if (version_compare($wp_version, '3.5', '<')) {
|
81 |
+
add_filter('attachment_fields_to_edit', array($this, 'add_attachment_field'), 20, 2);
|
82 |
+
}
|
83 |
+
add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
|
84 |
+
add_action('admin_print_scripts-post.php', array($this, 'admin_header_scripts'));
|
85 |
+
add_action('admin_print_scripts-post-new.php', array($this, 'admin_header_scripts'));
|
86 |
+
add_action("wp_ajax_set-{$this->post_type}-{$this->id}-thumbnail", array($this, 'set_thumbnail'));
|
87 |
+
add_action('delete_attachment', array($this, 'action_delete_attachment'));
|
88 |
+
add_filter('is_protected_meta', array($this, 'filter_is_protected_meta'), 20, 2);
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* get the meta key used to store a post's thumbnail
|
93 |
+
*
|
94 |
+
* @return string
|
95 |
+
*/
|
96 |
+
public function get_meta_key() {
|
97 |
+
return "{$this->post_type}_{$this->id}_thumbnail_id";
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Add admin metabox for thumbnail chooser
|
102 |
+
*
|
103 |
+
* @return void
|
104 |
+
*/
|
105 |
+
public function add_metabox() {
|
106 |
+
add_meta_box("{$this->post_type}-{$this->id}", __($this->label, 'multiple-post-thumbnails'), array($this, 'thumbnail_meta_box'), $this->post_type, $this->context, $this->priority);
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Output the thumbnail meta box
|
111 |
+
*
|
112 |
+
* @return string HTML output
|
113 |
+
*/
|
114 |
+
public function thumbnail_meta_box() {
|
115 |
+
global $post;
|
116 |
+
|
117 |
+
$thumbnail_id = get_post_meta($post->ID, $this->get_meta_key(), true);
|
118 |
+
echo $this->post_thumbnail_html($thumbnail_id);
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Throw this in the media attachment fields
|
123 |
+
*
|
124 |
+
* @param string $form_fields
|
125 |
+
* @param string $post
|
126 |
+
* @return void
|
127 |
+
*/
|
128 |
+
public function add_attachment_field($form_fields, $post) {
|
129 |
+
$calling_post_id = 0;
|
130 |
+
if (isset($_GET['post_id']))
|
131 |
+
$calling_post_id = absint($_GET['post_id']);
|
132 |
+
elseif (isset($_POST) && count($_POST)) // Like for async-upload where $_GET['post_id'] isn't set
|
133 |
+
$calling_post_id = $post->post_parent;
|
134 |
+
|
135 |
+
if (!$calling_post_id)
|
136 |
+
return $form_fields;
|
137 |
+
|
138 |
+
// check the post type to see if link needs to be added
|
139 |
+
$calling_post = get_post($calling_post_id);
|
140 |
+
if (is_null($calling_post) || $calling_post->post_type != $this->post_type) {
|
141 |
+
return $form_fields;
|
142 |
+
}
|
143 |
+
|
144 |
+
$referer = wp_get_referer();
|
145 |
+
$query_vars = wp_parse_args(parse_url($referer, PHP_URL_QUERY));
|
146 |
+
|
147 |
+
if( (isset($_REQUEST['context']) && $_REQUEST['context'] != $this->id) || (isset($query_vars['context']) && $query_vars['context'] != $this->id) )
|
148 |
+
return $form_fields;
|
149 |
+
|
150 |
+
$ajax_nonce = wp_create_nonce("set_post_thumbnail-{$this->post_type}-{$this->id}-{$calling_post_id}");
|
151 |
+
$link = sprintf('<a id="%4$s-%1$s-thumbnail-%2$s" class="%1$s-thumbnail" href="#" onclick="MultiPostThumbnails.setAsThumbnail(\'%2$s\', \'%1$s\', \'%4$s\', \'%5$s\');return false;">' . __( 'Set as %3$s', 'multiple-post-thumbnails' ) . '</a>', $this->id, $post->ID, $this->label, $this->post_type, $ajax_nonce);
|
152 |
+
$form_fields["{$this->post_type}-{$this->id}-thumbnail"] = array(
|
153 |
+
'label' => $this->label,
|
154 |
+
'input' => 'html',
|
155 |
+
'html' => $link);
|
156 |
+
return $form_fields;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Enqueue admin JavaScripts
|
161 |
+
*
|
162 |
+
* @return void
|
163 |
+
*/
|
164 |
+
public function enqueue_admin_scripts( $hook ) {
|
165 |
+
global $wp_version, $post_ID;
|
166 |
+
|
167 |
+
// only load on select pages
|
168 |
+
if ( ! in_array( $hook, array( 'post-new.php', 'post.php', 'media-upload-popup' ) ) )
|
169 |
+
return;
|
170 |
+
|
171 |
+
if (version_compare($wp_version, '3.5', '<')) {
|
172 |
+
add_thickbox();
|
173 |
+
wp_enqueue_script( "mpt-featured-image", $this->plugins_url( 'js/multi-post-thumbnails-admin.js', __FILE__ ), array( 'jquery', 'media-upload' ) );
|
174 |
+
} else { // 3.5+ media modal
|
175 |
+
wp_enqueue_media( array( 'post' => ( $post_ID ? $post_ID : null ) ) );
|
176 |
+
wp_enqueue_script( "mpt-featured-image", $this->plugins_url( 'js/multi-post-thumbnails-admin.js', __FILE__ ), array( 'jquery', 'set-post-thumbnail' ) );
|
177 |
+
wp_enqueue_script( "mpt-featured-image-modal", $this->plugins_url( 'js/media-modal.js', __FILE__ ), array( 'jquery', 'media-models' ) );
|
178 |
+
}
|
179 |
+
|
180 |
+
wp_enqueue_style( "mpt-admin-css", $this->plugins_url( 'css/multi-post-thumbnails-admin.css', __FILE__ ) );
|
181 |
+
}
|
182 |
+
|
183 |
+
public function admin_header_scripts() {
|
184 |
+
$post_id = get_the_ID();
|
185 |
+
echo "<script>var post_id = $post_id;</script>";
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Deletes the post meta data for posts when an attachment used as a
|
190 |
+
* multiple post thumbnail is deleted from the Media Libray
|
191 |
+
*
|
192 |
+
* @global object $wpdb
|
193 |
+
* @param int $post_id
|
194 |
+
*/
|
195 |
+
public function action_delete_attachment($post_id) {
|
196 |
+
global $wpdb;
|
197 |
+
|
198 |
+
$wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = '%s' AND meta_value = %d", $this->get_meta_key(), $post_id ));
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* make the meta for storing thumbnails protected so it doesn't show in the Custom Fields metabox
|
203 |
+
*
|
204 |
+
* @param boolean $protected Passed in from filter
|
205 |
+
* @param type $meta_key Passed in from filter
|
206 |
+
* @return boolean
|
207 |
+
*/
|
208 |
+
public function filter_is_protected_meta($protected, $meta_key) {
|
209 |
+
if (apply_filters('mpt_unprotect_meta', false)) {
|
210 |
+
return $protected;
|
211 |
+
}
|
212 |
+
|
213 |
+
if ($meta_key == $this->get_meta_key()) {
|
214 |
+
$protected = true;
|
215 |
+
}
|
216 |
+
|
217 |
+
return $protected;
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* allow the plugin to be in the plugins directory or the theme directory
|
222 |
+
*
|
223 |
+
* @param string $relative_path Relative file path to the plugin file to get the URL of
|
224 |
+
* @param string $plugin_path Absolute file path to the plugin base directory
|
225 |
+
* @return string the URL of the plugin file
|
226 |
+
*/
|
227 |
+
private function plugins_url($relative_path, $plugin_path) {
|
228 |
+
$template_dir = get_template_directory();
|
229 |
+
|
230 |
+
foreach ( array('template_dir', 'plugin_path') as $var ) {
|
231 |
+
$$var = str_replace('\\' ,'/', $$var); // sanitize for Win32 installs
|
232 |
+
$$var = preg_replace('|/+|', '/', $$var);
|
233 |
+
}
|
234 |
+
if(0 === strpos($plugin_path, $template_dir)) {
|
235 |
+
$url = get_template_directory_uri();
|
236 |
+
$folder = str_replace($template_dir, '', dirname($plugin_path));
|
237 |
+
if ( '.' != $folder ) {
|
238 |
+
$url .= '/' . ltrim($folder, '/');
|
239 |
+
}
|
240 |
+
if ( !empty($relative_path) && is_string($relative_path) && strpos($relative_path, '..') === false ) {
|
241 |
+
$url .= '/' . ltrim($relative_path, '/');
|
242 |
+
}
|
243 |
+
return $url;
|
244 |
+
} else {
|
245 |
+
return plugins_url($relative_path, $plugin_path);
|
246 |
+
}
|
247 |
+
}
|
248 |
+
|
249 |
+
/**
|
250 |
+
* Check if post has an image attached.
|
251 |
+
*
|
252 |
+
* @param string $post_type The post type.
|
253 |
+
* @param string $id The id used to register the thumbnail.
|
254 |
+
* @param string $post_id Optional. Post ID.
|
255 |
+
* @return bool Whether post has an image attached.
|
256 |
+
*/
|
257 |
+
public static function has_post_thumbnail($post_type, $id, $post_id = null) {
|
258 |
+
if (null === $post_id) {
|
259 |
+
$post_id = get_the_ID();
|
260 |
+
}
|
261 |
+
|
262 |
+
if (!$post_id) {
|
263 |
+
return false;
|
264 |
+
}
|
265 |
+
|
266 |
+
return get_post_meta($post_id, "{$post_type}_{$id}_thumbnail_id", true);
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Display Post Thumbnail.
|
271 |
+
*
|
272 |
+
* @param string $post_type The post type.
|
273 |
+
* @param string $thumb_id The id used to register the thumbnail.
|
274 |
+
* @param string $post_id Optional. Post ID.
|
275 |
+
* @param int $size Optional. Image size. Defaults to 'post-thumbnail', which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );.
|
276 |
+
* @param string|array $attr Optional. Query string or array of attributes.
|
277 |
+
* @param bool $link_to_original Optional. Wrap link to original image around thumbnail?
|
278 |
+
*/
|
279 |
+
public static function the_post_thumbnail($post_type, $thumb_id, $post_id = null, $size = 'post-thumbnail', $attr = '', $link_to_original = false) {
|
280 |
+
echo self::get_the_post_thumbnail($post_type, $thumb_id, $post_id, $size, $attr, $link_to_original);
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Retrieve Post Thumbnail.
|
285 |
+
*
|
286 |
+
* @param string $post_type The post type.
|
287 |
+
* @param string $thumb_id The id used to register the thumbnail.
|
288 |
+
* @param int $post_id Optional. Post ID.
|
289 |
+
* @param string $size Optional. Image size. Defaults to 'thumbnail'.
|
290 |
+
* @param bool $link_to_original Optional. Wrap link to original image around thumbnail?
|
291 |
+
* @param string|array $attr Optional. Query string or array of attributes.
|
292 |
+
*/
|
293 |
+
public static function get_the_post_thumbnail($post_type, $thumb_id, $post_id = NULL, $size = 'post-thumbnail', $attr = '' , $link_to_original = false) {
|
294 |
+
global $id;
|
295 |
+
$post_id = (NULL === $post_id) ? get_the_ID() : $post_id;
|
296 |
+
$post_thumbnail_id = self::get_post_thumbnail_id($post_type, $thumb_id, $post_id);
|
297 |
+
$size = apply_filters("{$post_type}_{$post_id}_thumbnail_size", $size);
|
298 |
+
if ($post_thumbnail_id) {
|
299 |
+
do_action("begin_fetch_multi_{$post_type}_thumbnail_html", $post_id, $post_thumbnail_id, $size); // for "Just In Time" filtering of all of wp_get_attachment_image()'s filters
|
300 |
+
$html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr );
|
301 |
+
do_action("end_fetch_multi_{$post_type}_thumbnail_html", $post_id, $post_thumbnail_id, $size);
|
302 |
+
} else {
|
303 |
+
$html = '';
|
304 |
+
}
|
305 |
+
|
306 |
+
if ($link_to_original && $html) {
|
307 |
+
$html = sprintf('<a href="%s">%s</a>', wp_get_attachment_url($post_thumbnail_id), $html);
|
308 |
+
}
|
309 |
+
|
310 |
+
return apply_filters("{$post_type}_{$thumb_id}_thumbnail_html", $html, $post_id, $post_thumbnail_id, $size, $attr);
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Retrieve Post Thumbnail ID.
|
315 |
+
*
|
316 |
+
* @param string $post_type The post type.
|
317 |
+
* @param string $id The id used to register the thumbnail.
|
318 |
+
* @param int $post_id Post ID.
|
319 |
+
* @return int
|
320 |
+
*/
|
321 |
+
public static function get_post_thumbnail_id($post_type, $id, $post_id) {
|
322 |
+
return get_post_meta($post_id, "{$post_type}_{$id}_thumbnail_id", true);
|
323 |
+
}
|
324 |
+
|
325 |
+
/**
|
326 |
+
*
|
327 |
+
* @param string $post_type The post type.
|
328 |
+
* @param string $id The id used to register the thumbnail.
|
329 |
+
* @param int $post_id Optional. The post ID. If not set, will attempt to get it.
|
330 |
+
* @param string $size Optional. The thumbnail size to use. If set, use wp_get_attachment_image_src() instead of wp_get_attachment_url()
|
331 |
+
* @return mixed Thumbnail url or false if the post doesn't have a thumbnail for the given post type, and id.
|
332 |
+
*/
|
333 |
+
public static function get_post_thumbnail_url($post_type, $id, $post_id = 0, $size = null) {
|
334 |
+
if (!$post_id) {
|
335 |
+
$post_id = get_the_ID();
|
336 |
+
}
|
337 |
+
|
338 |
+
$post_thumbnail_id = self::get_post_thumbnail_id($post_type, $id, $post_id);
|
339 |
+
|
340 |
+
if ($size) {
|
341 |
+
if ($url = wp_get_attachment_image_src($post_thumbnail_id, $size)) {
|
342 |
+
$url = $url[0];
|
343 |
+
} else {
|
344 |
+
$url = '';
|
345 |
+
}
|
346 |
+
} else {
|
347 |
+
$url = wp_get_attachment_url($post_thumbnail_id);
|
348 |
+
}
|
349 |
+
|
350 |
+
return $url;
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Output the post thumbnail HTML for the metabox and AJAX callbacks
|
355 |
+
*
|
356 |
+
* @param string $thumbnail_id The thumbnail's post ID.
|
357 |
+
* @return string HTML
|
358 |
+
*/
|
359 |
+
private function post_thumbnail_html($thumbnail_id = null) {
|
360 |
+
global $content_width, $_wp_additional_image_sizes, $post_ID, $wp_version;
|
361 |
+
|
362 |
+
$url_class = "";
|
363 |
+
$ajax_nonce = wp_create_nonce("set_post_thumbnail-{$this->post_type}-{$this->id}-{$post_ID}");
|
364 |
+
|
365 |
+
if (version_compare($wp_version, '3.5', '<')) {
|
366 |
+
// Use the old thickbox for versions prior to 3.5
|
367 |
+
$image_library_url = get_upload_iframe_src('image');
|
368 |
+
// if TB_iframe is not moved to end of query string, thickbox will remove all query args after it.
|
369 |
+
$image_library_url = add_query_arg( array( 'context' => $this->id, 'TB_iframe' => 1 ), remove_query_arg( 'TB_iframe', $image_library_url ) );
|
370 |
+
$url_class = "thickbox";
|
371 |
+
} else {
|
372 |
+
// Use the media modal for 3.5 and up
|
373 |
+
$image_library_url = "#";
|
374 |
+
$modal_js = sprintf(
|
375 |
+
'var mm_%3$s = new MediaModal({
|
376 |
+
calling_selector : "#set-%1$s-%2$s-thumbnail",
|
377 |
+
cb : function(attachment){
|
378 |
+
MultiPostThumbnails.setAsThumbnail(attachment.id, "%2$s", "%1$s", "%4$s");
|
379 |
+
}
|
380 |
+
});',
|
381 |
+
$this->post_type, $this->id, md5($this->id), $ajax_nonce
|
382 |
+
);
|
383 |
+
}
|
384 |
+
$format_string = '<p class="hide-if-no-js"><a title="%1$s" href="%2$s" id="set-%3$s-%4$s-thumbnail" class="%5$s" data-thumbnail_id="%7$s" data-uploader_title="%1$s" data-uploader_button_text="%1$s">%%s</a></p>';
|
385 |
+
$set_thumbnail_link = sprintf( $format_string, sprintf( esc_attr__( "Set %s" , 'multiple-post-thumbnails' ), $this->label ), $image_library_url, $this->post_type, $this->id, $url_class, $this->label, $thumbnail_id );
|
386 |
+
$content = sprintf( $set_thumbnail_link, sprintf( esc_html__( "Set %s", 'multiple-post-thumbnails' ), $this->label ) );
|
387 |
+
|
388 |
+
if ($thumbnail_id && get_post($thumbnail_id)) {
|
389 |
+
$old_content_width = $content_width;
|
390 |
+
$content_width = 266;
|
391 |
+
$attr = array( 'class' => 'mpt-thumbnail' );
|
392 |
+
|
393 |
+
if ( !isset($_wp_additional_image_sizes["{$this->post_type}-{$this->id}-thumbnail"])) {
|
394 |
+
$thumbnail_html = wp_get_attachment_image( $thumbnail_id, array($content_width, $content_width), false, $attr );
|
395 |
+
} else {
|
396 |
+
$thumbnail_html = wp_get_attachment_image( $thumbnail_id, "{$this->post_type}-{$this->id}-thumbnail", false, $attr );
|
397 |
+
}
|
398 |
+
|
399 |
+
if (!empty($thumbnail_html)) {
|
400 |
+
$content = sprintf($set_thumbnail_link, $thumbnail_html);
|
401 |
+
$format_string = '<p class="hide-if-no-js"><a href="#" id="remove-%1$s-%2$s-thumbnail" onclick="MultiPostThumbnails.removeThumbnail(\'%2$s\', \'%1$s\', \'%4$s\');return false;">%3$s</a></p>';
|
402 |
+
$content .= sprintf( $format_string, $this->post_type, $this->id, sprintf( esc_html__( "Remove %s", 'multiple-post-thumbnails' ), $this->label ), $ajax_nonce );
|
403 |
+
}
|
404 |
+
$content_width = $old_content_width;
|
405 |
+
}
|
406 |
+
|
407 |
+
if (version_compare($wp_version, '3.5', '>=')) {
|
408 |
+
$content .= sprintf('<script>%s</script>', $modal_js);
|
409 |
+
}
|
410 |
+
|
411 |
+
return apply_filters( sprintf( '%s_%s_admin_post_thumbnail_html', $this->post_type, $this->id ), $content, $post_ID, $thumbnail_id );
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* Set/remove the post thumbnail. AJAX handler.
|
416 |
+
*
|
417 |
+
* @return string Updated post thumbnail HTML.
|
418 |
+
*/
|
419 |
+
public function set_thumbnail() {
|
420 |
+
global $post_ID; // have to do this so get_upload_iframe_src() can grab it
|
421 |
+
$post_ID = intval($_POST['post_id']);
|
422 |
+
if ( !current_user_can('edit_post', $post_ID))
|
423 |
+
die('-1');
|
424 |
+
$thumbnail_id = intval($_POST['thumbnail_id']);
|
425 |
+
|
426 |
+
check_ajax_referer("set_post_thumbnail-{$this->post_type}-{$this->id}-{$post_ID}");
|
427 |
+
|
428 |
+
if ($thumbnail_id == '-1') {
|
429 |
+
delete_post_meta($post_ID, $this->get_meta_key());
|
430 |
+
die($this->post_thumbnail_html(null));
|
431 |
+
}
|
432 |
+
|
433 |
+
if ($thumbnail_id && get_post($thumbnail_id)) {
|
434 |
+
$thumbnail_html = wp_get_attachment_image($thumbnail_id, 'thumbnail');
|
435 |
+
if (!empty($thumbnail_html)) {
|
436 |
+
$this->set_meta($post_ID, $this->post_type, $this->id, $thumbnail_id);
|
437 |
+
die($this->post_thumbnail_html($thumbnail_id));
|
438 |
+
}
|
439 |
+
}
|
440 |
+
|
441 |
+
die('0');
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* set thumbnail meta
|
446 |
+
*
|
447 |
+
* @param int $post_ID
|
448 |
+
* @param string $post_type
|
449 |
+
* @param string $thumbnail_id ID used to register the thumbnail
|
450 |
+
* @param int $thumbnail_post_id ID of the attachment to use as the thumbnail
|
451 |
+
* @return bool result of update_post_meta
|
452 |
+
*/
|
453 |
+
public static function set_meta($post_ID, $post_type, $thumbnail_id, $thumbnail_post_id) {
|
454 |
+
return update_post_meta($post_ID, "{$post_type}_{$thumbnail_id}_thumbnail_id", $thumbnail_post_id);
|
455 |
+
}
|
456 |
+
|
457 |
+
}
|
458 |
+
|
459 |
+
}
|
inc/meta-box/css/autocomplete.css
ADDED
@@ -0,0 +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 |
+
}
|
inc/meta-box/css/color.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rwmb-color-picker {
|
2 |
+
display: none; /* Hidden by default */
|
3 |
+
z-index: 100;
|
4 |
+
background: rgb(238, 238, 238);
|
5 |
+
border: 1px solid rgb(204, 204, 204);
|
6 |
+
position: absolute;
|
7 |
+
}
|
inc/meta-box/css/divider.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* =Styles for 'divider' field
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-divider-wrapper hr {
|
5 |
+
border: none;
|
6 |
+
border-top: 1px solid #e6e6e6;
|
7 |
+
}
|
inc/meta-box/css/file.css
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rwmb-file li {
|
2 |
+
width: 250px;
|
3 |
+
margin: 0 10px 10px 0;
|
4 |
+
-webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
|
5 |
+
transition: width .25s, opacity .25s;
|
6 |
+
}
|
7 |
+
.rwmb-file .rwmb-icon {
|
8 |
+
width: 60px;
|
9 |
+
text-align: center;
|
10 |
+
vertical-align: middle;
|
11 |
+
overflow: hidden;
|
12 |
+
}
|
13 |
+
.rwmb-file .rwmb-icon img {
|
14 |
+
max-height: 60px;
|
15 |
+
max-width: 60px;
|
16 |
+
}
|
17 |
+
.rwmb-file .rwmb-info {
|
18 |
+
width: 180px;
|
19 |
+
vertical-align: top;
|
20 |
+
overflow: hidden;
|
21 |
+
}
|
22 |
+
.rwmb-file .rwmb-info p {
|
23 |
+
margin: .1em 0;
|
24 |
+
}
|
25 |
+
.rwmb-file .rwmb-info a {
|
26 |
+
font-weight: bold;
|
27 |
+
text-decoration: none;
|
28 |
+
}
|
29 |
+
.rwmb-file li,
|
30 |
+
.rwmb-file .rwmb-icon,
|
31 |
+
.rwmb-file .rwmb-info {
|
32 |
+
display: inline-block;
|
33 |
+
}
|
34 |
+
.rwmb-file .rwmb-icon,
|
35 |
+
.rwmb-file .rwmb-info {
|
36 |
+
margin: 0 0 2px 2px;
|
37 |
+
}
|
38 |
+
|
39 |
+
.rwmb-file li.removed {
|
40 |
+
width: 0;
|
41 |
+
margin: 0;
|
42 |
+
opacity: 0;
|
43 |
+
-webkit-opacity: 0;
|
44 |
+
-moz-opacity: 0;
|
45 |
+
-o-opacity: 0;
|
46 |
+
}
|
47 |
+
|
48 |
+
.rwmb-file li.removed:after {
|
49 |
+
content: ' ';
|
50 |
+
position: absolute;
|
51 |
+
top: 0;
|
52 |
+
left: 0;
|
53 |
+
right: 0;
|
54 |
+
bottom: 0;
|
55 |
+
z-index: 2;
|
56 |
+
opacity: .4;
|
57 |
+
background-color: #f00;
|
58 |
+
}
|
inc/meta-box/css/heading.css
ADDED
@@ -0,0 +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 |
+
}
|
inc/meta-box/css/image-select.css
ADDED
@@ -0,0 +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 input {
|
20 |
+
display: none;
|
21 |
+
}
|
inc/meta-box/css/image.css
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Uploaded image */
|
2 |
+
.rwmb-images {
|
3 |
+
overflow: hidden;
|
4 |
+
}
|
5 |
+
.rwmb-images li {
|
6 |
+
margin: 0 10px 10px 0;
|
7 |
+
float: left;
|
8 |
+
width: 150px;
|
9 |
+
height: 150px;
|
10 |
+
text-align: center;
|
11 |
+
cursor: move;
|
12 |
+
position: relative;
|
13 |
+
-webkit-transition: width .25s, opacity .25s, -webkit-opacity .25s;
|
14 |
+
transition: width .25s, opacity .25s;
|
15 |
+
}
|
16 |
+
.rwmb-images img {
|
17 |
+
width: 150px;
|
18 |
+
height: 150px;
|
19 |
+
}
|
20 |
+
.rwmb-image-bar {
|
21 |
+
color: #fff;
|
22 |
+
font-weight: bold;
|
23 |
+
background: #000;
|
24 |
+
background: rgba(0, 0, 0, .5);
|
25 |
+
position: absolute;
|
26 |
+
top: 0;
|
27 |
+
right: 0;
|
28 |
+
padding: 5px;
|
29 |
+
display: none;
|
30 |
+
text-align: center;
|
31 |
+
}
|
32 |
+
li:hover .rwmb-image-bar {
|
33 |
+
display: block;
|
34 |
+
}
|
35 |
+
.rwmb-image-bar a {
|
36 |
+
color: #fff;
|
37 |
+
font-weight: bold;
|
38 |
+
text-decoration: none;
|
39 |
+
vertical-align: middle;
|
40 |
+
}
|
41 |
+
.rwmb-image-bar a.rwmb-delete-file {
|
42 |
+
font-size: 23px;
|
43 |
+
width: 18px;
|
44 |
+
font-weight: normal;
|
45 |
+
}
|
46 |
+
.rwmb-images li.removed {
|
47 |
+
width: 0;
|
48 |
+
margin: 0;
|
49 |
+
opacity: 0;
|
50 |
+
-webkit-opacity: 0;
|
51 |
+
-moz-opacity: 0;
|
52 |
+
-o-opacity: 0;
|
53 |
+
}
|
54 |
+
.rwmb-images li.removed:after {
|
55 |
+
content: ' ';
|
56 |
+
position: absolute;
|
57 |
+
top: 0;
|
58 |
+
left: 0;
|
59 |
+
right: 0;
|
60 |
+
bottom: 0;
|
61 |
+
z-index: 2;
|
62 |
+
opacity: .4;
|
63 |
+
background-color: #f00;
|
64 |
+
}
|
65 |
+
.rwmb-images li.ui-state-highlight {
|
66 |
+
background: #ddd;
|
67 |
+
}
|
inc/meta-box/css/jqueryui/jquery-ui-timepicker-addon.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
2 |
+
.ui-timepicker-div dl { text-align: left; }
|
3 |
+
.ui-timepicker-div dl dt { height: 25px; }
|
4 |
+
.ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; }
|
5 |
+
.ui-timepicker-div td { font-size: 90%; }
|
6 |
+
.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
inc/meta-box/css/jqueryui/jquery.ui.core.css
ADDED
@@ -0,0 +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%; }
|
inc/meta-box/css/jqueryui/jquery.ui.datepicker.css
ADDED
@@ -0,0 +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 |
+
}
|
inc/meta-box/css/jqueryui/jquery.ui.slider.css
ADDED
@@ -0,0 +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; }
|
inc/meta-box/css/jqueryui/jquery.ui.theme.css
ADDED
@@ -0,0 +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; }
|
inc/meta-box/css/oembed.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rwmb-oembed-wrapper .spinner {
|
2 |
+
float: none;
|
3 |
+
vertical-align: top;
|
4 |
+
display: inline-block;
|
5 |
+
}
|
6 |
+
.rwmb-oembed-wrapper .embed-code {
|
7 |
+
margin-top: 1em;
|
8 |
+
}
|
9 |
+
.rwmb-oembed-wrapper .embed-code iframe {
|
10 |
+
max-width: 100%;
|
11 |
+
}
|
inc/meta-box/css/plupload-image.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
div.rwmb-drag-drop {
|
2 |
+
border: 4px dashed #ddd;
|
3 |
+
height: 200px;
|
4 |
+
}
|
5 |
+
|
6 |
+
div.rwmb-image-uploading-bar {
|
7 |
+
position: absolute;
|
8 |
+
width: 100%;
|
9 |
+
height: 0;
|
10 |
+
bottom: 0;
|
11 |
+
}
|
12 |
+
div.rwmb-image-uploading-status {
|
13 |
+
position: absolute;
|
14 |
+
}
|
15 |
+
li.rwmb-image-error {
|
16 |
+
border: 3px solid #c00;
|
17 |
+
background: #903838;
|
18 |
+
}
|
19 |
+
.rwmb-image-uploading-status .rwmb-loader {
|
20 |
+
width: 64px;
|
21 |
+
height: 64px;
|
22 |
+
top: 43px;
|
23 |
+
left: 43px;
|
24 |
+
position: relative;
|
25 |
+
}
|
inc/meta-box/css/range.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
input[type='range'] {
|
2 |
+
border-radius: 2px;
|
3 |
+
border: 1px solid #dfdfdf;
|
4 |
+
}
|
inc/meta-box/css/select-advanced.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
#post-body .rwmb-select-advanced {
|
2 |
+
height: auto;
|
3 |
+
min-width: 200px;
|
4 |
+
}
|
inc/meta-box/css/select.css
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
#post-body .rwmb-select {
|
2 |
+
height: auto;
|
3 |
+
min-width: 200px;
|
4 |
+
}
|
inc/meta-box/css/select2/select2-spinner.gif
ADDED
Binary file
|
inc/meta-box/css/select2/select2.css
ADDED
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
3 |
+
*/
|
4 |
+
.select2-container {
|
5 |
+
position: relative;
|
6 |
+
display: inline-block;
|
7 |
+
/* inline-block for ie7 */
|
8 |
+
zoom: 1;
|
9 |
+
*display: inline;
|
10 |
+
vertical-align: top;
|
11 |
+
}
|
12 |
+
|
13 |
+
.select2-container,
|
14 |
+
.select2-drop,
|
15 |
+
.select2-search,
|
16 |
+
.select2-search input{
|
17 |
+
/*
|
18 |
+
Force border-box so that % widths fit the parent
|
19 |
+
container without overlap because of margin/padding.
|
20 |
+
|
21 |
+
More Info : http://www.quirksmode.org/css/box.html
|
22 |
+
*/
|
23 |
+
-moz-box-sizing: border-box; /* firefox */
|
24 |
+
-ms-box-sizing: border-box; /* ie */
|
25 |
+
-webkit-box-sizing: border-box; /* webkit */
|
26 |
+
-khtml-box-sizing: border-box; /* konqueror */
|
27 |
+
box-sizing: border-box; /* css3 */
|
28 |
+
}
|
29 |
+
|
30 |
+
.select2-container .select2-choice {
|
31 |
+
background-color: #fff;
|
32 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
|
33 |
+
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
34 |
+
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
|
35 |
+
background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
|
36 |
+
background-image: -ms-linear-gradient(top, #eeeeee 0%, #ffffff 50%);
|
37 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#ffffff', GradientType = 0);
|
38 |
+
background-image: linear-gradient(top, #eeeeee 0%, #ffffff 50%);
|
39 |
+
-webkit-border-radius: 4px;
|
40 |
+
-moz-border-radius: 4px;
|
41 |
+
border-radius: 4px;
|
42 |
+
-moz-background-clip: padding;
|
43 |
+
-webkit-background-clip: padding-box;
|
44 |
+
background-clip: padding-box;
|
45 |
+
border: 1px solid #aaa;
|
46 |
+
display: block;
|
47 |
+
overflow: hidden;
|
48 |
+
white-space: nowrap;
|
49 |
+
position: relative;
|
50 |
+
height: 26px;
|
51 |
+
line-height: 26px;
|
52 |
+
padding: 0 0 0 8px;
|
53 |
+
color: #444;
|
54 |
+
text-decoration: none;
|
55 |
+
}
|
56 |
+
|
57 |
+
.select2-container.select2-drop-above .select2-choice
|
58 |
+
{
|
59 |
+
border-bottom-color: #aaa;
|
60 |
+
-webkit-border-radius:0px 0px 4px 4px;
|
61 |
+
-moz-border-radius:0px 0px 4px 4px;
|
62 |
+
border-radius:0px 0px 4px 4px;
|
63 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
|
64 |
+
background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
65 |
+
background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
|
66 |
+
background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
|
67 |
+
background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
68 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
|
69 |
+
background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
|
70 |
+
}
|
71 |
+
|
72 |
+
.select2-container .select2-choice span {
|
73 |
+
margin-right: 26px;
|
74 |
+
display: block;
|
75 |
+
overflow: hidden;
|
76 |
+
white-space: nowrap;
|
77 |
+
-o-text-overflow: ellipsis;
|
78 |
+
-ms-text-overflow: ellipsis;
|
79 |
+
text-overflow: ellipsis;
|
80 |
+
}
|
81 |
+
|
82 |
+
.select2-container .select2-choice abbr {
|
83 |
+
display: block;
|
84 |
+
position: absolute;
|
85 |
+
right: 26px;
|
86 |
+
top: 8px;
|
87 |
+
width: 12px;
|
88 |
+
height: 12px;
|
89 |
+
font-size: 1px;
|
90 |
+
background: url('select2.png') right top no-repeat;
|
91 |
+
cursor: pointer;
|
92 |
+
text-decoration: none;
|
93 |
+
border:0;
|
94 |
+
outline: 0;
|
95 |
+
}
|
96 |
+
.select2-container .select2-choice abbr:hover {
|
97 |
+
background-position: right -11px;
|
98 |
+
cursor: pointer;
|
99 |
+
}
|
100 |
+
|
101 |
+
.select2-drop {
|
102 |
+
background: #fff;
|
103 |
+
color: #000;
|
104 |
+
border: 1px solid #aaa;
|
105 |
+
border-top: 0;
|
106 |
+
position: absolute;
|
107 |
+
top: 100%;
|
108 |
+
-webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
109 |
+
-moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
110 |
+
-o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
111 |
+
box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
|
112 |
+
z-index: 9999;
|
113 |
+
width:100%;
|
114 |
+
margin-top:-1px;
|
115 |
+
|
116 |
+
-webkit-border-radius: 0 0 4px 4px;
|
117 |
+
-moz-border-radius: 0 0 4px 4px;
|
118 |
+
border-radius: 0 0 4px 4px;
|
119 |
+
}
|
120 |
+
|
121 |
+
.select2-drop.select2-drop-above {
|
122 |
+
-webkit-border-radius: 4px 4px 0px 0px;
|
123 |
+
-moz-border-radius: 4px 4px 0px 0px;
|
124 |
+
border-radius: 4px 4px 0px 0px;
|
125 |
+
margin-top:1px;
|
126 |
+
border-top: 1px solid #aaa;
|
127 |
+
border-bottom: 0;
|
128 |
+
|
129 |
+
-webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
130 |
+
-moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
131 |
+
-o-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
132 |
+
box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
|
133 |
+
}
|
134 |
+
|
135 |
+
.select2-container .select2-choice div {
|
136 |
+
-webkit-border-radius: 0 4px 4px 0;
|
137 |
+
-moz-border-radius: 0 4px 4px 0;
|
138 |
+
border-radius: 0 4px 4px 0;
|
139 |
+
-moz-background-clip: padding;
|
140 |
+
-webkit-background-clip: padding-box;
|
141 |
+
background-clip: padding-box;
|
142 |
+
background: #ccc;
|
143 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
|
144 |
+
background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
145 |
+
background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
|
146 |
+
background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
|
147 |
+
background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
148 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#cccccc', endColorstr = '#eeeeee', GradientType = 0);
|
149 |
+
background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
|
150 |
+
border-left: 1px solid #aaa;
|
151 |
+
position: absolute;
|
152 |
+
right: 0;
|
153 |
+
top: 0;
|
154 |
+
display: block;
|
155 |
+
height: 100%;
|
156 |
+
width: 18px;
|
157 |
+
}
|
158 |
+
|
159 |
+
.select2-container .select2-choice div b {
|
160 |
+
background: url('select2.png') no-repeat 0 1px;
|
161 |
+
display: block;
|
162 |
+
width: 100%;
|
163 |
+
height: 100%;
|
164 |
+
}
|
165 |
+
|
166 |
+
.select2-search {
|
167 |
+
display: inline-block;
|
168 |
+
white-space: nowrap;
|
169 |
+
z-index: 10000;
|
170 |
+
min-height: 26px;
|
171 |
+
width: 100%;
|
172 |
+
margin: 0;
|
173 |
+
padding-left: 4px;
|
174 |
+
padding-right: 4px;
|
175 |
+
}
|
176 |
+
|
177 |
+
.select2-search-hidden {
|
178 |
+
display: block;
|
179 |
+
position: absolute;
|
180 |
+
left: -10000px;
|
181 |
+
}
|
182 |
+
|
183 |
+
.select2-search input {
|
184 |
+
background: #fff url('select2.png') no-repeat 100% -22px;
|
185 |
+
background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
186 |
+
background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
187 |
+
background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
188 |
+
background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
189 |
+
background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
190 |
+
background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
191 |
+
padding: 4px 20px 4px 5px;
|
192 |
+
outline: 0;
|
193 |
+
border: 1px solid #aaa;
|
194 |
+
font-family: sans-serif;
|
195 |
+
font-size: 1em;
|
196 |
+
width:100%;
|
197 |
+
margin:0;
|
198 |
+
height:auto !important;
|
199 |
+
min-height: 26px;
|
200 |
+
-webkit-box-shadow: none;
|
201 |
+
-moz-box-shadow: none;
|
202 |
+
box-shadow: none;
|
203 |
+
border-radius: 0;
|
204 |
+
-moz-border-radius: 0;
|
205 |
+
-webkit-border-radius: 0;
|
206 |
+
}
|
207 |
+
|
208 |
+
.select2-drop.select2-drop-above .select2-search input
|
209 |
+
{
|
210 |
+
margin-top:4px;
|
211 |
+
}
|
212 |
+
|
213 |
+
.select2-search input.select2-active {
|
214 |
+
background: #fff url('spinner.gif') no-repeat 100%;
|
215 |
+
background: url('spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
|
216 |
+
background: url('spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
217 |
+
background: url('spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
|
218 |
+
background: url('spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
|
219 |
+
background: url('spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
220 |
+
background: url('spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
|
221 |
+
}
|
222 |
+
|
223 |
+
|
224 |
+
.select2-container-active .select2-choice,
|
225 |
+
.select2-container-active .select2-choices {
|
226 |
+
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
227 |
+
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
228 |
+
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
229 |
+
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
230 |
+
border: 1px solid #5897fb;
|
231 |
+
outline: none;
|
232 |
+
}
|
233 |
+
|
234 |
+
.select2-dropdown-open .select2-choice {
|
235 |
+
border: 1px solid #aaa;
|
236 |
+
border-bottom-color: transparent;
|
237 |
+
-webkit-box-shadow: 0 1px 0 #fff inset;
|
238 |
+
-moz-box-shadow : 0 1px 0 #fff inset;
|
239 |
+
-o-box-shadow : 0 1px 0 #fff inset;
|
240 |
+
box-shadow : 0 1px 0 #fff inset;
|
241 |
+
background-color: #eee;
|
242 |
+
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
|
243 |
+
background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
244 |
+
background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
|
245 |
+
background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
|
246 |
+
background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
247 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
|
248 |
+
background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
|
249 |
+
-webkit-border-bottom-left-radius : 0;
|
250 |
+
-webkit-border-bottom-right-radius: 0;
|
251 |
+
-moz-border-radius-bottomleft : 0;
|
252 |
+
-moz-border-radius-bottomright: 0;
|
253 |
+
border-bottom-left-radius : 0;
|
254 |
+
border-bottom-right-radius: 0;
|
255 |
+
}
|
256 |
+
|
257 |
+
.select2-dropdown-open .select2-choice div {
|
258 |
+
background: transparent;
|
259 |
+
border-left: none;
|
260 |
+
}
|
261 |
+
.select2-dropdown-open .select2-choice div b {
|
262 |
+
background-position: -18px 1px;
|
263 |
+
}
|
264 |
+
|
265 |
+
/* results */
|
266 |
+
.select2-results {
|
267 |
+
margin: 4px 4px 4px 0;
|
268 |
+
padding: 0 0 0 4px;
|
269 |
+
position: relative;
|
270 |
+
overflow-x: hidden;
|
271 |
+
overflow-y: auto;
|
272 |
+
max-height: 200px;
|
273 |
+
}
|
274 |
+
|
275 |
+
.select2-results ul.select2-result-sub {
|
276 |
+
margin: 0 0 0 0;
|
277 |
+
}
|
278 |
+
|
279 |
+
.select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
|
280 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
|
281 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
|
282 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
|
283 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
|
284 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
|
285 |
+
.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
|
286 |
+
|
287 |
+
.select2-results li {
|
288 |
+
list-style: none;
|
289 |
+
display: list-item;
|
290 |
+
}
|
291 |
+
|
292 |
+
.select2-results li.select2-result-with-children > .select2-result-label {
|
293 |
+
font-weight: bold;
|
294 |
+
}
|
295 |
+
|
296 |
+
.select2-results .select2-result-label {
|
297 |
+
padding: 3px 7px 4px;
|
298 |
+
margin: 0;
|
299 |
+
cursor: pointer;
|
300 |
+
}
|
301 |
+
|
302 |
+
.select2-results .select2-highlighted {
|
303 |
+
background: #3875d7;
|
304 |
+
color: #fff;
|
305 |
+
}
|
306 |
+
.select2-results li em {
|
307 |
+
background: #feffde;
|
308 |
+
font-style: normal;
|
309 |
+
}
|
310 |
+
.select2-results .select2-highlighted em {
|
311 |
+
background: transparent;
|
312 |
+
}
|
313 |
+
.select2-results .select2-no-results,
|
314 |
+
.select2-results .select2-searching,
|
315 |
+
.select2-results .select2-selection-limit {
|
316 |
+
background: #f4f4f4;
|
317 |
+
display: list-item;
|
318 |
+
}
|
319 |
+
|
320 |
+
/*
|
321 |
+
disabled look for already selected choices in the results dropdown
|
322 |
+
.select2-results .select2-disabled.select2-highlighted {
|
323 |
+
color: #666;
|
324 |
+
background: #f4f4f4;
|
325 |
+
display: list-item;
|
326 |
+
cursor: default;
|
327 |
+
}
|
328 |
+
.select2-results .select2-disabled {
|
329 |
+
background: #f4f4f4;
|
330 |
+
display: list-item;
|
331 |
+
cursor: default;
|
332 |
+
}
|
333 |
+
*/
|
334 |
+
.select2-results .select2-disabled {
|
335 |
+
display: none;
|
336 |
+
}
|
337 |
+
|
338 |
+
.select2-more-results.select2-active {
|
339 |
+
background: #f4f4f4 url('spinner.gif') no-repeat 100%;
|
340 |
+
}
|
341 |
+
|
342 |
+
.select2-more-results {
|
343 |
+
background: #f4f4f4;
|
344 |
+
display: list-item;
|
345 |
+
}
|
346 |
+
|
347 |
+
/* disabled styles */
|
348 |
+
|
349 |
+
.select2-container.select2-container-disabled .select2-choice {
|
350 |
+
background-color: #f4f4f4;
|
351 |
+
background-image: none;
|
352 |
+
border: 1px solid #ddd;
|
353 |
+
cursor: default;
|
354 |
+
}
|
355 |
+
|
356 |
+
.select2-container.select2-container-disabled .select2-choice div {
|
357 |
+
background-color: #f4f4f4;
|
358 |
+
background-image: none;
|
359 |
+
border-left: 0;
|
360 |
+
}
|
361 |
+
|
362 |
+
|
363 |
+
/* multiselect */
|
364 |
+
|
365 |
+
.select2-container-multi .select2-choices {
|
366 |
+
background-color: #fff;
|
367 |
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
|
368 |
+
background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
369 |
+
background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
370 |
+
background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
371 |
+
background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
372 |
+
background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
|
373 |
+
border: 1px solid #aaa;
|
374 |
+
margin: 0;
|
375 |
+
padding: 0;
|
376 |
+
cursor: text;
|
377 |
+
overflow: hidden;
|
378 |
+
height: auto !important;
|
379 |
+
height: 1%;
|
380 |
+
position: relative;
|
381 |
+
}
|
382 |
+
|
383 |
+
.select2-container-multi .select2-choices {
|
384 |
+
min-height: 26px;
|
385 |
+
}
|
386 |
+
|
387 |
+
.select2-container-multi.select2-container-active .select2-choices {
|
388 |
+
-webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
|
389 |
+
-moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
390 |
+
-o-box-shadow : 0 0 5px rgba(0,0,0,.3);
|
391 |
+
box-shadow : 0 0 5px rgba(0,0,0,.3);
|
392 |
+
border: 1px solid #5897fb;
|
393 |
+
outline: none;
|
394 |
+
}
|
395 |
+
.select2-container-multi .select2-choices li {
|
396 |
+
float: left;
|
397 |
+
list-style: none;
|
398 |
+
}
|
399 |
+
.select2-container-multi .select2-choices .select2-search-field {
|
400 |
+
white-space: nowrap;
|
401 |
+
margin: 0;
|
402 |
+
padding: 0;
|
403 |
+
}
|
404 |
+
|
405 |
+
.select2-container-multi .select2-choices .select2-search-field input {
|
406 |
+
color: #666;
|
407 |
+
background: transparent !important;
|
408 |
+
font-family: sans-serif;
|
409 |
+
font-size: 100%;
|
410 |
+
height: auto;
|
411 |
+
padding: 5px;
|
412 |
+
margin: 1px 0;
|
413 |
+
outline: 0;
|
414 |
+
border: 0;
|
415 |
+
-webkit-box-shadow: none;
|
416 |
+
-moz-box-shadow : none;
|
417 |
+
-o-box-shadow : none;
|
418 |
+
box-shadow : none;
|
419 |
+
}
|
420 |
+
|
421 |
+
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
|
422 |
+
background: #fff url('spinner.gif') no-repeat 100% !important;
|
423 |
+
}
|
424 |
+
|
425 |
+
.select2-default {
|
426 |
+
color: #999 !important;
|
427 |
+
}
|
428 |
+
|
429 |
+
.select2-container-multi .select2-choices .select2-search-choice {
|
430 |
+
-webkit-border-radius: 3px;
|
431 |
+
-moz-border-radius : 3px;
|
432 |
+
border-radius : 3px;
|
433 |
+
-moz-background-clip : padding;
|
434 |
+
-webkit-background-clip: padding-box;
|
435 |
+
background-clip : padding-box;
|
436 |
+
background-color: #e4e4e4;
|
437 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
|
438 |
+
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
|
439 |
+
background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
440 |
+
background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
441 |
+
background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
442 |
+
background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
443 |
+
background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
|
444 |
+
-webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
445 |
+
-moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
446 |
+
box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
|
447 |
+
color: #333;
|
448 |
+
border: 1px solid #aaaaaa;
|
449 |
+
line-height: 13px;
|
450 |
+
padding: 3px 5px 3px 18px;
|
451 |
+
margin: 3px 0 3px 5px;
|
452 |
+
position: relative;
|
453 |
+
cursor: default;
|
454 |
+
}
|
455 |
+
.select2-container-multi .select2-choices .select2-search-choice span {
|
456 |
+
cursor: default;
|
457 |
+
}
|
458 |
+
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
459 |
+
background: #d4d4d4;
|
460 |
+
}
|
461 |
+
|
462 |
+
.select2-search-choice-close {
|
463 |
+
display: block;
|
464 |
+
position: absolute;
|
465 |
+
right: 3px;
|
466 |
+
top: 4px;
|
467 |
+
width: 12px;
|
468 |
+
height: 13px;
|
469 |
+
font-size: 1px;
|
470 |
+
background: url('select2.png') right top no-repeat;
|
471 |
+
outline: none;
|
472 |
+
}
|
473 |
+
|
474 |
+
.select2-container-multi .select2-search-choice-close {
|
475 |
+
left: 3px;
|
476 |
+
}
|
477 |
+
|
478 |
+
|
479 |
+
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
480 |
+
background-position: right -11px;
|
481 |
+
}
|
482 |
+
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
|
483 |
+
background-position: right -11px;
|
484 |
+
}
|
485 |
+
|
486 |
+
/* disabled styles */
|
487 |
+
|
488 |
+
.select2-container-multi.select2-container-disabled .select2-choices{
|
489 |
+
background-color: #f4f4f4;
|
490 |
+
background-image: none;
|
491 |
+
border: 1px solid #ddd;
|
492 |
+
cursor: default;
|
493 |
+
}
|
494 |
+
|
495 |
+
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
|
496 |
+
background-image: none;
|
497 |
+
background-color: #f4f4f4;
|
498 |
+
border: 1px solid #ddd;
|
499 |
+
padding: 3px 5px 3px 5px;
|
500 |
+
}
|
501 |
+
|
502 |
+
.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
|
503 |
+
display: none;
|
504 |
+
}
|
505 |
+
/* end multiselect */
|
506 |
+
|
507 |
+
.select2-result-selectable .select2-match,
|
508 |
+
.select2-result-unselectable .select2-result-selectable .select2-match { text-decoration: underline; }
|
509 |
+
.select2-result-unselectable .select2-match { text-decoration: none; }
|
510 |
+
|
511 |
+
.select2-offscreen { position: absolute; left: -10000px; }
|
512 |
+
|
513 |
+
/* Retina-ize icons */
|
514 |
+
|
515 |
+
@media only screen and (-webkit-min-device-pixel-ratio: 1.5) {
|
516 |
+
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
|
517 |
+
background-image: url(select2x2.png) !important;
|
518 |
+
background-repeat: no-repeat !important;
|
519 |
+
background-size: 60px 40px !important;
|
520 |
+
}
|
521 |
+
.select2-search input {
|
522 |
+
background-position: 100% -21px !important;
|
523 |
+
}
|
524 |
+
}
|
inc/meta-box/css/select2/select2.png
ADDED
Binary file
|
inc/meta-box/css/select2/select2x2.png
ADDED
Binary file
|
inc/meta-box/css/select2/spinner.gif
ADDED
Binary file
|
inc/meta-box/css/slider.css
ADDED
@@ -0,0 +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/meta-box/css/style.css
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* =Styles for 'normal' meta boxes
|
2 |
+
-------------------------------------------------------------- */
|
3 |
+
|
4 |
+
.rwmb-field {
|
5 |
+
margin: 0 0 10px;
|
6 |
+
}
|
7 |
+
.rwmb-label,
|
8 |
+
.rwmb-input {
|
9 |
+
display: inline-block;
|
10 |
+
vertical-align: top;
|
11 |
+
}
|
12 |
+
.rwmb-label {
|
13 |
+
width: 24%;
|
14 |
+
}
|
15 |
+
.rwmb-label.required > span {
|
16 |
+
color: #c00;
|
17 |
+
font-weight: bold;
|
18 |
+
}
|
19 |
+
|
20 |
+
/* 75% if field has label, 100% if no label */
|
21 |
+
.rwmb-input {
|
22 |
+
width: 100%;
|
23 |
+
}
|
24 |
+
.rwmb-label ~ .rwmb-input {
|
25 |
+
width: 75%;
|
26 |
+
}
|
27 |
+
.rwmb-input h4 {
|
28 |
+
margin: 0;
|
29 |
+
}
|
30 |
+
.rwmb-textarea {
|
31 |
+
resize: vertical;
|
32 |
+
}
|
33 |
+
|
34 |
+
/* Clone */
|
35 |
+
.rwmb-clone {
|
36 |
+
min-height: 24px;
|
37 |
+
margin-bottom: 5px;
|
38 |
+
position: relative;
|
39 |
+
}
|
40 |
+
.rwmb-clone > input[type='radio'],
|
41 |
+
.rwmb-clone > input[type='checkbox'] {
|
42 |
+
margin: 6px 0 0 4px;
|
43 |
+
}
|
44 |
+
.rwmb-button {
|
45 |
+
float: right;
|
46 |
+
}
|
47 |
+
.rwmb-button.remove-clone {
|
48 |
+
position: absolute;
|
49 |
+
top: 0;
|
50 |
+
right: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Fix empty block below admin footer (issue #24) */
|
54 |
+
#ui-datepicker-div {
|
55 |
+
display: none;
|
56 |
+
}
|
57 |
+
|
58 |
+
/* jQuery validation */
|
59 |
+
label.error {
|
60 |
+
padding-left: 3px;
|
61 |
+
color: red;
|
62 |
+
}
|
63 |
+
input.error,
|
64 |
+
textarea.error,
|
65 |
+
select.error {
|
66 |
+
border: #c00 solid 1px !important;
|
67 |
+
background: #ffebe8 !important;
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
/* =Styles for 'side' meta boxes
|
72 |
+
-------------------------------------------------------------- */
|
73 |
+
|
74 |
+
#side-sortables .rwmb-label,
|
75 |
+
#side-sortables .rwmb-input {
|
76 |
+
width: 100%;
|
77 |
+
}
|
inc/meta-box/css/taxonomy.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.rw-taxonomy-tree {
|
2 |
+
margin-left: 15px;
|
3 |
+
margin-top: 5px;
|
4 |
+
}
|
5 |
+
.rw-taxonomy-tree.active {
|
6 |
+
display: inline-block;
|
7 |
+
}
|
8 |
+
.rw-taxonomy-tree.disabled {
|
9 |
+
display: none;
|
10 |
+
}
|
inc/meta-box/css/wysiwyg.css
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
.rwmb-field .mceIframeContainer {
|
2 |
+
background: #fff;
|
3 |
+
}
|
inc/meta-box/img/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_glass_75_dadada_1x400.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-icons_222222_256x240.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-icons_454545_256x240.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-icons_888888_256x240.png
ADDED
Binary file
|
inc/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png
ADDED
Binary file
|
inc/meta-box/img/loader.gif
ADDED
Binary file
|
inc/meta-box/inc/common.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Common' ) )
|
6 |
+
{
|
7 |
+
/**
|
8 |
+
* Common functions for the plugin
|
9 |
+
* Independent from meta box/field classes
|
10 |
+
*/
|
11 |
+
class RWMB_Common
|
12 |
+
{
|
13 |
+
/**
|
14 |
+
* Do actions when class is loaded
|
15 |
+
*
|
16 |
+
* @return void
|
17 |
+
*/
|
18 |
+
public static function on_load()
|
19 |
+
{
|
20 |
+
self::load_textdomain();
|
21 |
+
|
22 |
+
$plugin = 'meta-box/meta-box.php';
|
23 |
+
add_filter( "plugin_action_links_$plugin", array( __CLASS__, 'plugin_links' ) );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Load plugin translation
|
28 |
+
*
|
29 |
+
* @return void
|
30 |
+
*/
|
31 |
+
public static function load_textdomain()
|
32 |
+
{
|
33 |
+
// l18n translation files
|
34 |
+
$locale = get_locale();
|
35 |
+
$dir = trailingslashit( RWMB_DIR . 'lang' );
|
36 |
+
$mofile = "{$dir}{$locale}.mo";
|
37 |
+
|
38 |
+
// In themes/plugins/mu-plugins directory
|
39 |
+
load_textdomain( 'rwmb', $mofile );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add links to Documentation and Extensions in plugin's list of action links
|
44 |
+
*
|
45 |
+
* @since 4.3.11
|
46 |
+
*
|
47 |
+
* @param array $links Array of action links
|
48 |
+
*
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
public static function plugin_links( $links )
|
52 |
+
{
|
53 |
+
$links[] = '<a href="http://metabox.io/docs/">' . __( 'Documentation', 'meta-box' ) . '</a>';
|
54 |
+
$links[] = '<a href="http://metabox.io/plugins/">' . __( 'Extensions', 'meta-box' ) . '</a>';
|
55 |
+
return $links;
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
59 |
+
|
60 |
+
RWMB_Common::on_load();
|
61 |
+
}
|
inc/meta-box/inc/field.php
ADDED
@@ -0,0 +1,335 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! class_exists( 'RWMB_Field ' ) )
|
3 |
+
{
|
4 |
+
class RWMB_Field
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* Add actions
|
8 |
+
*
|
9 |
+
* @return void
|
10 |
+
*/
|
11 |
+
static function add_actions()
|
12 |
+
{
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Enqueue scripts and styles
|
17 |
+
*
|
18 |
+
* @return void
|
19 |
+
*/
|
20 |
+
static function admin_enqueue_scripts()
|
21 |
+
{
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Show field HTML
|
26 |
+
* Filters are put inside this method, not inside methods such as "meta", "html", "begin_html", etc.
|
27 |
+
* That ensures the returned value are always been applied filters
|
28 |
+
* This method is not meant to be overwritten in specific fields
|
29 |
+
*
|
30 |
+
* @param array $field
|
31 |
+
* @param bool $saved
|
32 |
+
*
|
33 |
+
* @return string
|
34 |
+
*/
|
35 |
+
static function show( $field, $saved )
|
36 |
+
{
|
37 |
+
global $post;
|
38 |
+
|
39 |
+
$field_class = RW_Meta_Box::get_class_name( $field );
|
40 |
+
$meta = call_user_func( array( $field_class, 'meta' ), $post->ID, $saved, $field );
|
41 |
+
|
42 |
+
// Apply filter to field meta value
|
43 |
+
// 1st filter applies to all fields
|
44 |
+
// 2nd filter applies to all fields with the same type
|
45 |
+
// 3rd filter applies to current field only
|
46 |
+
$meta = apply_filters( 'rwmb_field_meta', $meta, $field, $saved );
|
47 |
+
$meta = apply_filters( "rwmb_{$field['type']}_meta", $meta, $field, $saved );
|
48 |
+
$meta = apply_filters( "rwmb_{$field['id']}_meta", $meta, $field, $saved );
|
49 |
+
|
50 |
+
$type = $field['type'];
|
51 |
+
$id = $field['id'];
|
52 |
+
|
53 |
+
$begin = call_user_func( array( $field_class, 'begin_html' ), $meta, $field );
|
54 |
+
|
55 |
+
// Apply filter to field begin HTML
|
56 |
+
// 1st filter applies to all fields
|
57 |
+
// 2nd filter applies to all fields with the same type
|
58 |
+
// 3rd filter applies to current field only
|
59 |
+
$begin = apply_filters( 'rwmb_begin_html', $begin, $field, $meta );
|
60 |
+
$begin = apply_filters( "rwmb_{$type}_begin_html", $begin, $field, $meta );
|
61 |
+
$begin = apply_filters( "rwmb_{$id}_begin_html", $begin, $field, $meta );
|
62 |
+
|
63 |
+
// Separate code for cloneable and non-cloneable fields to make easy to maintain
|
64 |
+
|
65 |
+
// Cloneable fields
|
66 |
+
if ( $field['clone'] )
|
67 |
+
{
|
68 |
+
$meta = (array) $meta;
|
69 |
+
|
70 |
+
$field_html = '';
|
71 |
+
|
72 |
+
foreach ( $meta as $index => $sub_meta )
|
73 |
+
{
|
74 |
+
$sub_field = $field;
|
75 |
+
$sub_field['field_name'] = $field['field_name'] . "[{$index}]";
|
76 |
+
if ( $index > 0 )
|
77 |
+
{
|
78 |
+
if ( isset( $sub_field['address_field'] ) )
|
79 |
+
$sub_field['address_field'] = $field['address_field'] . "_{$index}";
|
80 |
+
$sub_field['id'] = $field['id'] . "_{$index}";
|
81 |
+
}
|
82 |
+
if ( $field['multiple'] )
|
83 |
+
$sub_field['field_name'] .= '[]';
|
84 |
+
|
85 |
+
// Wrap field HTML in a div with class="rwmb-clone" if needed
|
86 |
+
$input_html = '<div class="rwmb-clone">';
|
87 |
+
|
88 |
+
// Call separated methods for displaying each type of field
|
89 |
+
$input_html .= call_user_func( array( $field_class, 'html' ), $sub_meta, $sub_field );
|
90 |
+
|
91 |
+
// Apply filter to field HTML
|
92 |
+
// 1st filter applies to all fields with the same type
|
93 |
+
// 2nd filter applies to current field only
|
94 |
+
$input_html = apply_filters( "rwmb_{$type}_html", $input_html, $field, $sub_meta );
|
95 |
+
$input_html = apply_filters( "rwmb_{$id}_html", $input_html, $field, $sub_meta );
|
96 |
+
|
97 |
+
// Remove clone button
|
98 |
+
$input_html .= call_user_func( array( $field_class, 'remove_clone_button' ), $sub_meta, $sub_field );
|
99 |
+
|
100 |
+
$input_html .= '</div>';
|
101 |
+
|
102 |
+
$field_html .= $input_html;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
// Non-cloneable fields
|
106 |
+
else
|
107 |
+
{
|
108 |
+
// Call separated methods for displaying each type of field
|
109 |
+
$field_html = call_user_func( array( $field_class, 'html' ), $meta, $field );
|
110 |
+
|
111 |
+
// Apply filter to field HTML
|
112 |
+
// 1st filter applies to all fields with the same type
|
113 |
+
// 2nd filter applies to current field only
|
114 |
+
$field_html = apply_filters( "rwmb_{$type}_html", $field_html, $field, $meta );
|
115 |
+
$field_html = apply_filters( "rwmb_{$id}_html", $field_html, $field, $meta );
|
116 |
+
}
|
117 |
+
|
118 |
+
$end = call_user_func( array( $field_class, 'end_html' ), $meta, $field );
|
119 |
+
|
120 |
+
// Apply filter to field end HTML
|
121 |
+
// 1st filter applies to all fields
|
122 |
+
// 2nd filter applies to all fields with the same type
|
123 |
+
// 3rd filter applies to current field only
|
124 |
+
$end = apply_filters( 'rwmb_end_html', $end, $field, $meta );
|
125 |
+
$end = apply_filters( "rwmb_{$type}_end_html", $end, $field, $meta );
|
126 |
+
$end = apply_filters( "rwmb_{$id}_end_html", $end, $field, $meta );
|
127 |
+
|
128 |
+
// Apply filter to field wrapper
|
129 |
+
// This allow users to change whole HTML markup of the field wrapper (i.e. table row)
|
130 |
+
// 1st filter applies to all fields
|
131 |
+
// 1st filter applies to all fields with the same type
|
132 |
+
// 2nd filter applies to current field only
|
133 |
+
$html = apply_filters( 'rwmb_wrapper_html', "{$begin}{$field_html}{$end}", $field, $meta );
|
134 |
+
$html = apply_filters( "rwmb_{$type}_wrapper_html", $html, $field, $meta );
|
135 |
+
$html = apply_filters( "rwmb_{$id}_wrapper_html", $html, $field, $meta );
|
136 |
+
|
137 |
+
// Display label and input in DIV and allow user-defined classes to be appended
|
138 |
+
$classes = array( 'rwmb-field', "rwmb-{$type}-wrapper" );
|
139 |
+
if ( 'hidden' === $field['type'] )
|
140 |
+
$classes[] = 'hidden';
|
141 |
+
if ( ! empty( $field['required'] ) )
|
142 |
+
$classes[] = 'required';
|
143 |
+
if ( ! empty( $field['class'] ) )
|
144 |
+
$classes[] = $field['class'];
|
145 |
+
|
146 |
+
$outer_html = sprintf(
|
147 |
+
$field['before'] . '<div class="%s">%s</div>' . $field['after'],
|
148 |
+
implode( ' ', $classes ),
|
149 |
+
$html
|
150 |
+
);
|
151 |
+
|
152 |
+
// Allow to change output of outer div
|
153 |
+
// 1st filter applies to all fields
|
154 |
+
// 1st filter applies to all fields with the same type
|
155 |
+
// 2nd filter applies to current field only
|
156 |
+
$outer_html = apply_filters( 'rwmb_outer_html', $outer_html, $field, $meta );
|
157 |
+
$outer_html = apply_filters( "rwmb_{$type}_outer_html", $outer_html, $field, $meta );
|
158 |
+
$outer_html = apply_filters( "rwmb_{$id}_outer_html", $outer_html, $field, $meta );
|
159 |
+
|
160 |
+
echo $outer_html;
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Get field HTML
|
165 |
+
*
|
166 |
+
* @param mixed $meta
|
167 |
+
* @param array $field
|
168 |
+
*
|
169 |
+
* @return string
|
170 |
+
*/
|
171 |
+
static function html( $meta, $field )
|
172 |
+
{
|
173 |
+
return '';
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Show begin HTML markup for fields
|
178 |
+
*
|
179 |
+
* @param mixed $meta
|
180 |
+
* @param array $field
|
181 |
+
*
|
182 |
+
* @return string
|
183 |
+
*/
|
184 |
+
static function begin_html( $meta, $field )
|
185 |
+
{
|
186 |
+
if ( empty( $field['name'] ) )
|
187 |
+
return '<div class="rwmb-input">';
|
188 |
+
|
189 |
+
return sprintf(
|
190 |
+
'<div class="rwmb-label">
|
191 |
+
<label for="%s">%s</label>
|
192 |
+
</div>
|
193 |
+
<div class="rwmb-input">',
|
194 |
+
$field['id'],
|
195 |
+
$field['name']
|
196 |
+
);
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Show end HTML markup for fields
|
201 |
+
*
|
202 |
+
* @param mixed $meta
|
203 |
+
* @param array $field
|
204 |
+
*
|
205 |
+
* @return string
|
206 |
+
*/
|
207 |
+
static function end_html( $meta, $field )
|
208 |
+
{
|
209 |
+
$button = $field['clone'] ? call_user_func( array( RW_Meta_Box::get_class_name( $field ), 'add_clone_button' ) ) : '';
|
210 |
+
$desc = $field['desc'] ? "<p id='{$field['id']}_description' class='description'>{$field['desc']}</p>" : '';
|
211 |
+
|
212 |
+
// Closes the container
|
213 |
+
$html = "{$button}{$desc}</div>";
|
214 |
+
|
215 |
+
return $html;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Add clone button
|
220 |
+
*
|
221 |
+
* @return string $html
|
222 |
+
*/
|
223 |
+
static function add_clone_button()
|
224 |
+
{
|
225 |
+
return '<a href="#" class="rwmb-button button-primary add-clone">' . __( '+', 'meta-box' ) . '</a>';
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Remove clone button
|
230 |
+
*
|
231 |
+
* @return string $html
|
232 |
+
*/
|
233 |
+
static function remove_clone_button()
|
234 |
+
{
|
235 |
+
return '<a href="#" class="rwmb-button button remove-clone">' . __( '–', 'meta-box' ) . '</a>';
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Get meta value
|
240 |
+
*
|
241 |
+
* @param int $post_id
|
242 |
+
* @param bool $saved
|
243 |
+
* @param array $field
|
244 |
+
*
|
245 |
+
* @return mixed
|
246 |
+
*/
|
247 |
+
static function meta( $post_id, $saved, $field )
|
248 |
+
{
|
249 |
+
$meta = get_post_meta( $post_id, $field['id'], ! $field['multiple'] );
|
250 |
+
|
251 |
+
// Use $field['std'] only when the meta box hasn't been saved (i.e. the first time we run)
|
252 |
+
$meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
253 |
+
|
254 |
+
// Escape attributes for non-wysiwyg fields
|
255 |
+
if ( 'wysiwyg' !== $field['type'] )
|
256 |
+
$meta = is_array( $meta ) ? array_map( 'esc_attr', $meta ) : esc_attr( $meta );
|
257 |
+
|
258 |
+
return $meta;
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Set value of meta before saving into database
|
263 |
+
*
|
264 |
+
* @param mixed $new
|
265 |
+
* @param mixed $old
|
266 |
+
* @param int $post_id
|
267 |
+
* @param array $field
|
268 |
+
*
|
269 |
+
* @return int
|
270 |
+
*/
|
271 |
+
static function value( $new, $old, $post_id, $field )
|
272 |
+
{
|
273 |
+
return $new;
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Save meta value
|
278 |
+
*
|
279 |
+
* @param $new
|
280 |
+
* @param $old
|
281 |
+
* @param $post_id
|
282 |
+
* @param $field
|
283 |
+
*/
|
284 |
+
static function save( $new, $old, $post_id, $field )
|
285 |
+
{
|
286 |
+
$name = $field['id'];
|
287 |
+
|
288 |
+
if ( '' === $new || array() === $new )
|
289 |
+
{
|
290 |
+
delete_post_meta( $post_id, $name );
|
291 |
+
|
292 |
+
return;
|
293 |
+
}
|
294 |
+
|
295 |
+
if ( $field['multiple'] )
|
296 |
+
{
|
297 |
+
foreach ( $new as $new_value )
|
298 |
+
{
|
299 |
+
if ( ! in_array( $new_value, $old ) )
|
300 |
+
add_post_meta( $post_id, $name, $new_value, false );
|
301 |
+
}
|
302 |
+
foreach ( $old as $old_value )
|
303 |
+
{
|
304 |
+
if ( ! in_array( $old_value, $new ) )
|
305 |
+
delete_post_meta( $post_id, $name, $old_value );
|
306 |
+
}
|
307 |
+
}
|
308 |
+
else
|
309 |
+
{
|
310 |
+
if ( $field['clone'] )
|
311 |
+
{
|
312 |
+
$new = (array) $new;
|
313 |
+
foreach ( $new as $k => $v )
|
314 |
+
{
|
315 |
+
if ( '' === $v )
|
316 |
+
unset( $new[$k] );
|
317 |
+
}
|
318 |
+
}
|
319 |
+
update_post_meta( $post_id, $name, $new );
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Normalize parameters for field
|
325 |
+
*
|
326 |
+
* @param array $field
|
327 |
+
*
|
328 |
+
* @return array
|
329 |
+
*/
|
330 |
+
static function normalize_field( $field )
|
331 |
+
{
|
332 |
+
return $field;
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
inc/meta-box/inc/fields/autocomplete.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Autocomplete_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Autocomplete_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-autocomplete', TX_RWMB_CSS_URL . 'autocomplete.css', array( 'wp-admin' ), TX_RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-autocomplete', TX_RWMB_JS_URL . 'autocomplete.js', array( 'jquery-ui-autocomplete' ), TX_RWMB_VER, true );
|
18 |
+
wp_localize_script( 'rwmb-autocomplete', 'RWMB_Autocomplete', array( 'delete' => __( 'Delete', 'meta-box' ) ) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Get field HTML
|
23 |
+
*
|
24 |
+
* @param mixed $meta
|
25 |
+
* @param array $field
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
static function html( $meta, $field )
|
30 |
+
{
|
31 |
+
if ( ! is_array( $meta ) )
|
32 |
+
$meta = array( $meta );
|
33 |
+
|
34 |
+
$options = array();
|
35 |
+
foreach ( $field['options'] as $value => $label )
|
36 |
+
{
|
37 |
+
$options[] = array(
|
38 |
+
'value' => $value,
|
39 |
+
'label' => $label,
|
40 |
+
);
|
41 |
+
}
|
42 |
+
|
43 |
+
// Input field that triggers autocomplete.
|
44 |
+
// This field doesn't store field values, so it doesn't have "name" attribute.
|
45 |
+
// The value(s) of the field is store in hidden input(s). See below.
|
46 |
+
$html = sprintf(
|
47 |
+
'<input type="text" class="rwmb-autocomplete" id="%s" data-name="%s" data-options="%s" size="%s">',
|
48 |
+
$field['id'],
|
49 |
+
$field['field_name'],
|
50 |
+
esc_attr( json_encode( $options ) ),
|
51 |
+
$field['size']
|
52 |
+
);
|
53 |
+
|
54 |
+
$html .= '<div class="rwmb-autocomplete-results">';
|
55 |
+
|
56 |
+
// Each value is displayed with label and 'Delete' option
|
57 |
+
// The hidden input has to have ".rwmb-*" class to make clone work
|
58 |
+
$tpl = '
|
59 |
+
<div class="rwmb-autocomplete-result">
|
60 |
+
<div class="label">%s</div>
|
61 |
+
<div class="actions">%s</div>
|
62 |
+
<input type="hidden" class="rwmb-autocomplete-value" name="%s" value="%s">
|
63 |
+
</div>
|
64 |
+
';
|
65 |
+
foreach ( $field['options'] as $value => $label )
|
66 |
+
{
|
67 |
+
if ( in_array( $value, $meta ) )
|
68 |
+
{
|
69 |
+
$html .= sprintf(
|
70 |
+
$tpl,
|
71 |
+
$label,
|
72 |
+
__( 'Delete', 'meta-box' ),
|
73 |
+
$field['field_name'],
|
74 |
+
$value
|
75 |
+
);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
$html .= '</div>'; // .rwmb-autocomplete-results
|
79 |
+
|
80 |
+
return $html;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Get meta value
|
85 |
+
* If field is cloneable, value is saved as a single entry in DB
|
86 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
87 |
+
*
|
88 |
+
* @see "save" method for better understanding
|
89 |
+
*
|
90 |
+
* @param $post_id
|
91 |
+
* @param $saved
|
92 |
+
* @param $field
|
93 |
+
*
|
94 |
+
* @return array
|
95 |
+
*/
|
96 |
+
static function meta( $post_id, $saved, $field )
|
97 |
+
{
|
98 |
+
$meta = get_post_meta( $post_id, $field['id'], $field['clone'] );
|
99 |
+
$meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
100 |
+
|
101 |
+
return $meta;
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Save meta value
|
106 |
+
* If field is cloneable, value is saved as a single entry in DB
|
107 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
108 |
+
*
|
109 |
+
* @param $new
|
110 |
+
* @param $old
|
111 |
+
* @param $post_id
|
112 |
+
* @param $field
|
113 |
+
*/
|
114 |
+
static function save( $new, $old, $post_id, $field )
|
115 |
+
{
|
116 |
+
if ( ! $field['clone'] )
|
117 |
+
{
|
118 |
+
parent::save( $new, $old, $post_id, $field );
|
119 |
+
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
|
123 |
+
if ( empty( $new ) )
|
124 |
+
delete_post_meta( $post_id, $field['id'] );
|
125 |
+
else
|
126 |
+
update_post_meta( $post_id, $field['id'], $new );
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Normalize parameters for field
|
131 |
+
*
|
132 |
+
* @param array $field
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
static function normalize_field( $field )
|
137 |
+
{
|
138 |
+
$field = wp_parse_args( $field, array(
|
139 |
+
'size' => 30,
|
140 |
+
) );
|
141 |
+
|
142 |
+
$field['multiple'] = true;
|
143 |
+
$field['field_name'] = $field['id'];
|
144 |
+
if ( ! $field['clone'] )
|
145 |
+
$field['field_name'] .= '[]';
|
146 |
+
|
147 |
+
return $field;
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
inc/meta-box/inc/fields/button.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Button_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Button_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<a href="#" id="%s" class="button hide-if-no-js">%s</a>',
|
21 |
+
$field['id'],
|
22 |
+
$field['std']
|
23 |
+
);
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Normalize parameters for field
|
28 |
+
*
|
29 |
+
* @param array $field
|
30 |
+
*
|
31 |
+
* @return array
|
32 |
+
*/
|
33 |
+
static function normalize_field( $field )
|
34 |
+
{
|
35 |
+
$field['std'] = $field['std'] ? $field['std'] : __( 'Click me', 'meta-box' );
|
36 |
+
|
37 |
+
return $field;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
inc/meta-box/inc/fields/checkbox-list.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Checkbox_List_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Checkbox_List_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
$meta = (array) $meta;
|
20 |
+
$html = array();
|
21 |
+
$tpl = '<label><input type="checkbox" class="rwmb-checkbox-list" name="%s" value="%s"%s> %s</label>';
|
22 |
+
|
23 |
+
foreach ( $field['options'] as $value => $label )
|
24 |
+
{
|
25 |
+
$html[] = sprintf(
|
26 |
+
$tpl,
|
27 |
+
$field['field_name'],
|
28 |
+
$value,
|
29 |
+
checked( in_array( $value, $meta ), 1, false ),
|
30 |
+
$label
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
return implode( '<br>', $html );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get meta value
|
39 |
+
* If field is cloneable, value is saved as a single entry in DB
|
40 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
41 |
+
*
|
42 |
+
* @see "save" method for better understanding
|
43 |
+
*
|
44 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
45 |
+
*
|
46 |
+
* @param $post_id
|
47 |
+
* @param $saved
|
48 |
+
* @param $field
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
static function meta( $post_id, $saved, $field )
|
53 |
+
{
|
54 |
+
$meta = get_post_meta( $post_id, $field['id'], $field['clone'] );
|
55 |
+
$meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
56 |
+
$meta = array_map( 'esc_attr', (array) $meta );
|
57 |
+
|
58 |
+
return $meta;
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Save meta value
|
63 |
+
* If field is cloneable, value is saved as a single entry in DB
|
64 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
65 |
+
*
|
66 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
67 |
+
*
|
68 |
+
* @param $new
|
69 |
+
* @param $old
|
70 |
+
* @param $post_id
|
71 |
+
* @param $field
|
72 |
+
*/
|
73 |
+
static function save( $new, $old, $post_id, $field )
|
74 |
+
{
|
75 |
+
if ( ! $field['clone'] )
|
76 |
+
{
|
77 |
+
parent::save( $new, $old, $post_id, $field );
|
78 |
+
|
79 |
+
return;
|
80 |
+
}
|
81 |
+
|
82 |
+
if ( empty( $new ) )
|
83 |
+
delete_post_meta( $post_id, $field['id'] );
|
84 |
+
else
|
85 |
+
update_post_meta( $post_id, $field['id'], $new );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Normalize parameters for field
|
90 |
+
*
|
91 |
+
* @param array $field
|
92 |
+
*
|
93 |
+
* @return array
|
94 |
+
*/
|
95 |
+
static function normalize_field( $field )
|
96 |
+
{
|
97 |
+
$field['multiple'] = true;
|
98 |
+
$field['field_name'] = $field['id'];
|
99 |
+
if ( ! $field['clone'] )
|
100 |
+
$field['field_name'] .= '[]';
|
101 |
+
|
102 |
+
return $field;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
inc/meta-box/inc/fields/checkbox.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Checkbox_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Checkbox_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<input type="checkbox" class="rwmb-checkbox" name="%s" id="%s" value="1" %s>',
|
21 |
+
$field['field_name'],
|
22 |
+
$field['id'],
|
23 |
+
checked( ! empty( $meta ), 1, false )
|
24 |
+
);
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Set the value of checkbox to 1 or 0 instead of 'checked' and empty string
|
29 |
+
* This prevents using default value once the checkbox has been unchecked
|
30 |
+
*
|
31 |
+
* @link https://github.com/rilwis/meta-box/issues/6
|
32 |
+
*
|
33 |
+
* @param mixed $new
|
34 |
+
* @param mixed $old
|
35 |
+
* @param int $post_id
|
36 |
+
* @param array $field
|
37 |
+
*
|
38 |
+
* @return int
|
39 |
+
*/
|
40 |
+
static function value( $new, $old, $post_id, $field )
|
41 |
+
{
|
42 |
+
return empty( $new ) ? 0 : 1;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
inc/meta-box/inc/fields/color.php
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Color_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Color_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-color', TX_RWMB_CSS_URL . 'color.css', array( 'wp-color-picker' ), TX_RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-color', TX_RWMB_JS_URL . 'color.js', array( 'wp-color-picker' ), TX_RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML
|
22 |
+
*
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function html( $meta, $field )
|
29 |
+
{
|
30 |
+
return sprintf(
|
31 |
+
'<input class="rwmb-color" type="text" name="%s" id="%s" value="%s" size="%s" />
|
32 |
+
<div class="rwmb-color-picker"></div>',
|
33 |
+
$field['field_name'],
|
34 |
+
empty( $field['clone'] ) ? $field['id'] : '',
|
35 |
+
$meta,
|
36 |
+
$field['size']
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Don't save '#' when no color is chosen
|
42 |
+
*
|
43 |
+
* @param mixed $new
|
44 |
+
* @param mixed $old
|
45 |
+
* @param int $post_id
|
46 |
+
* @param array $field
|
47 |
+
*
|
48 |
+
* @return int
|
49 |
+
*/
|
50 |
+
static function value( $new, $old, $post_id, $field )
|
51 |
+
{
|
52 |
+
return '#' === $new ? '' : $new;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Normalize parameters for field
|
57 |
+
*
|
58 |
+
* @param array $field
|
59 |
+
*
|
60 |
+
* @return array
|
61 |
+
*/
|
62 |
+
static function normalize_field( $field )
|
63 |
+
{
|
64 |
+
$field = wp_parse_args( $field, array(
|
65 |
+
'size' => 7,
|
66 |
+
) );
|
67 |
+
|
68 |
+
return $field;
|
69 |
+
}
|
70 |
+
}
|
71 |
+
}
|
inc/meta-box/inc/fields/date.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Date_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Date_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
$url = TX_RWMB_CSS_URL . 'jqueryui';
|
17 |
+
wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
+
wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
+
wp_enqueue_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
20 |
+
|
21 |
+
// Load localized scripts
|
22 |
+
$locale = str_replace( '_', '-', get_locale() );
|
23 |
+
$file_paths = array( 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js' );
|
24 |
+
// Also check alternate i18n filename (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
|
25 |
+
if ( strlen( $locale ) > 2 )
|
26 |
+
$file_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr( $locale, 0, 2 ) . '.js';
|
27 |
+
$deps = array( 'jquery-ui-datepicker' );
|
28 |
+
foreach ( $file_paths as $file_path )
|
29 |
+
{
|
30 |
+
if ( file_exists( RWMB_DIR . 'js/' . $file_path ) )
|
31 |
+
{
|
32 |
+
wp_register_script( 'jquery-ui-datepicker-i18n', TX_RWMB_JS_URL . $file_path, $deps, '1.8.17', true );
|
33 |
+
$deps[] = 'jquery-ui-datepicker-i18n';
|
34 |
+
break;
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
wp_enqueue_script( 'rwmb-date', TX_RWMB_JS_URL . 'date.js', $deps, TX_RWMB_VER, true );
|
39 |
+
wp_localize_script( 'rwmb-date', 'RWMB_Datepicker', array( 'lang' => $locale ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get field HTML
|
44 |
+
*
|
45 |
+
* @param mixed $meta
|
46 |
+
* @param array $field
|
47 |
+
*
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
static function html( $meta, $field )
|
51 |
+
{
|
52 |
+
return sprintf(
|
53 |
+
'<input type="text" class="rwmb-date" name="%s" value="%s" id="%s" size="%s" data-options="%s" />',
|
54 |
+
$field['field_name'],
|
55 |
+
$meta,
|
56 |
+
isset( $field['clone'] ) && $field['clone'] ? '' : $field['id'],
|
57 |
+
$field['size'],
|
58 |
+
esc_attr( json_encode( $field['js_options'] ) )
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Normalize parameters for field
|
64 |
+
*
|
65 |
+
* @param array $field
|
66 |
+
*
|
67 |
+
* @return array
|
68 |
+
*/
|
69 |
+
static function normalize_field( $field )
|
70 |
+
{
|
71 |
+
$field = wp_parse_args( $field, array(
|
72 |
+
'size' => 30,
|
73 |
+
'js_options' => array(),
|
74 |
+
) );
|
75 |
+
|
76 |
+
// Deprecate 'format', but keep it for backward compatible
|
77 |
+
// Use 'js_options' instead
|
78 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
79 |
+
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
80 |
+
'showButtonPanel' => true,
|
81 |
+
) );
|
82 |
+
|
83 |
+
return $field;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
inc/meta-box/inc/fields/datetime.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Datetime_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Datetime_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
$url = TX_RWMB_CSS_URL . 'jqueryui';
|
17 |
+
wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
+
wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
+
wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
20 |
+
wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
21 |
+
wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7' );
|
22 |
+
|
23 |
+
wp_register_script( 'jquery-ui-timepicker', TX_RWMB_JS_URL . 'jqueryui/jquery-ui-timepicker-addon.js', array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7', true );
|
24 |
+
|
25 |
+
// Load localized scripts
|
26 |
+
$locale = str_replace( '_', '-', get_locale() );
|
27 |
+
$date_paths = array( 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . $locale . '.js' );
|
28 |
+
$time_paths = array( 'jqueryui/timepicker-i18n/jquery-ui-timepicker-' . $locale . '.js' );
|
29 |
+
if ( strlen( $locale ) > 2 )
|
30 |
+
{
|
31 |
+
// Also check alternate i18n filenames
|
32 |
+
// (e.g. jquery.ui.datepicker-de.js instead of jquery.ui.datepicker-de-DE.js)
|
33 |
+
$date_paths[] = 'jqueryui/datepicker-i18n/jquery.ui.datepicker-' . substr( $locale, 0, 2 ) . '.js';
|
34 |
+
$time_paths[] = 'jqueryui/timepicker-i18n/jquery-ui-timepicker-' . substr( $locale, 0, 2 ) . '.js';
|
35 |
+
}
|
36 |
+
$deps = array( 'jquery-ui-datepicker', 'jquery-ui-timepicker' );
|
37 |
+
foreach ( $date_paths as $date_path )
|
38 |
+
{
|
39 |
+
if ( file_exists( RWMB_DIR . 'js/' . $date_path ) )
|
40 |
+
{
|
41 |
+
wp_register_script( 'jquery-ui-datepicker-i18n', TX_RWMB_JS_URL . $date_path, array( 'jquery-ui-datepicker' ), '1.8.17', true );
|
42 |
+
$deps[] = 'jquery-ui-datepicker-i18n';
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
foreach ( $time_paths as $time_path )
|
47 |
+
{
|
48 |
+
if ( file_exists( RWMB_DIR . 'js/' . $time_path ) )
|
49 |
+
{
|
50 |
+
wp_register_script( 'jquery-ui-timepicker-i18n', TX_RWMB_JS_URL . $time_path, array( 'jquery-ui-timepicker' ), '1.8.17', true );
|
51 |
+
$deps[] = 'jquery-ui-timepicker-i18n';
|
52 |
+
break;
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
wp_enqueue_script( 'rwmb-datetime', TX_RWMB_JS_URL . 'datetime.js', $deps, TX_RWMB_VER, true );
|
57 |
+
wp_localize_script( 'rwmb-datetime', 'RWMB_Datetimepicker', array( 'lang' => $locale ) );
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get field HTML
|
62 |
+
*
|
63 |
+
* @param mixed $meta
|
64 |
+
* @param array $field
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
static function html( $meta, $field )
|
69 |
+
{
|
70 |
+
return sprintf(
|
71 |
+
'<input type="text" class="rwmb-datetime" name="%s" value="%s" id="%s" size="%s" data-options="%s">',
|
72 |
+
$field['field_name'],
|
73 |
+
isset( $field['timestamp'] ) && $field['timestamp'] ? date( self::translate_format( $field ), $meta ) : $meta,
|
74 |
+
isset( $field['clone'] ) && $field['clone'] ? '' : $field['id'],
|
75 |
+
$field['size'],
|
76 |
+
esc_attr( json_encode( $field['js_options'] ) )
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Calculates the timestamp from the datetime string and returns it
|
82 |
+
* if $field['timestamp'] is set or the datetime string if not
|
83 |
+
*
|
84 |
+
* @param mixed $new
|
85 |
+
* @param mixed $old
|
86 |
+
* @param int $post_id
|
87 |
+
* @param array $field
|
88 |
+
*
|
89 |
+
* @return string|int
|
90 |
+
*/
|
91 |
+
static function value( $new, $old, $post_id, $field )
|
92 |
+
{
|
93 |
+
if ( ! $field['timestamp'] )
|
94 |
+
return $new;
|
95 |
+
|
96 |
+
$d = DateTime::createFromFormat( self::translate_format( $field ), $new );
|
97 |
+
|
98 |
+
return $d ? $d->getTimestamp() : 0;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Normalize parameters for field
|
103 |
+
*
|
104 |
+
* @param array $field
|
105 |
+
*
|
106 |
+
* @return array
|
107 |
+
*/
|
108 |
+
static function normalize_field( $field )
|
109 |
+
{
|
110 |
+
$field = wp_parse_args( $field, array(
|
111 |
+
'size' => 30,
|
112 |
+
'js_options' => array(),
|
113 |
+
'timestamp' => false,
|
114 |
+
) );
|
115 |
+
|
116 |
+
// Deprecate 'format', but keep it for backward compatible
|
117 |
+
// Use 'js_options' instead
|
118 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
119 |
+
'dateFormat' => empty( $field['format'] ) ? 'yy-mm-dd' : $field['format'],
|
120 |
+
'timeFormat' => 'hh:mm',
|
121 |
+
'showButtonPanel' => true,
|
122 |
+
'separator' => ' ',
|
123 |
+
) );
|
124 |
+
|
125 |
+
return $field;
|
126 |
+
}
|
127 |
+
|
128 |
+
// Missing: 't' => '', T' => '', 'm' => '', 's' => ''
|
129 |
+
static $time_format_translation = array(
|
130 |
+
'H' => 'H', 'HH' => 'H', 'h' => 'H', 'hh' => 'H',
|
131 |
+
'mm' => 'i', 'ss' => 's', 'l' => 'u', 'tt' => 'a', 'TT' => 'A',
|
132 |
+
);
|
133 |
+
|
134 |
+
// Missing: 'o' => '', '!' => '', 'oo' => '', '@' => '', "''" => "'"
|
135 |
+
static $date_format_translation = array(
|
136 |
+
'd' => 'j', 'dd' => 'd', 'oo' => 'z', 'D' => 'D', 'DD' => 'l',
|
137 |
+
'm' => 'n', 'mm' => 'm', 'M' => 'M', 'MM' => 'F', 'y' => 'y', 'yy' => 'Y',
|
138 |
+
);
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Returns a date() compatible format string from the JavaScript format
|
142 |
+
*
|
143 |
+
* @see http://www.php.net/manual/en/function.date.php
|
144 |
+
*
|
145 |
+
* @param array $field
|
146 |
+
*
|
147 |
+
* @return string
|
148 |
+
*/
|
149 |
+
static function translate_format( $field )
|
150 |
+
{
|
151 |
+
return strtr( $field['js_options']['dateFormat'], self::$date_format_translation )
|
152 |
+
. $field['js_options']['separator']
|
153 |
+
. strtr( $field['js_options']['timeFormat'], self::$time_format_translation );
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
inc/meta-box/inc/fields/divider.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Divider_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Divider_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-divider', TX_RWMB_CSS_URL . 'divider.css', array(), TX_RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields
|
21 |
+
*
|
22 |
+
* @param mixed $meta
|
23 |
+
* @param array $field
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
static function begin_html( $meta, $field )
|
28 |
+
{
|
29 |
+
return '<hr>';
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Show end HTML markup for fields
|
34 |
+
*
|
35 |
+
* @param mixed $meta
|
36 |
+
* @param array $field
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
static function end_html( $meta, $field )
|
41 |
+
{
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
inc/meta-box/inc/fields/email.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_Email_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Email_Field extends RWMB_Text_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Get field HTML
|
14 |
+
*
|
15 |
+
* @param mixed $meta
|
16 |
+
* @param array $field
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
static function html( $meta, $field )
|
21 |
+
{
|
22 |
+
return sprintf(
|
23 |
+
'<input type="email" class="rwmb-email" name="%s" id="%s" value="%s" size="%s" placeholder="%s"/>',
|
24 |
+
$field['field_name'],
|
25 |
+
$field['id'],
|
26 |
+
$meta,
|
27 |
+
$field['size'],
|
28 |
+
$field['placeholder']
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Sanitize email
|
34 |
+
*
|
35 |
+
* @param mixed $new
|
36 |
+
* @param mixed $old
|
37 |
+
* @param int $post_id
|
38 |
+
* @param array $field
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
static function value( $new, $old, $post_id, $field )
|
43 |
+
{
|
44 |
+
return sanitize_email( $new );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
inc/meta-box/inc/fields/fieldset-text.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Fieldset_Text_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Fieldset_Text_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
if ( count( $meta ) == 1 && trim( $meta[0] ) == '' )
|
20 |
+
$meta = '';
|
21 |
+
|
22 |
+
$html = array();
|
23 |
+
$before = '<fieldset><legend>' . $field['desc'] . '</legend>';
|
24 |
+
$after = '</fieldset>';
|
25 |
+
|
26 |
+
$tpl = '<label>%s <input type="text" class="rwmb-fieldset-text" name="%s[%s][%d]" placeholder="%s" value="%s" /></label>';
|
27 |
+
|
28 |
+
for ( $n = 0; $n < $field['rows']; $n ++ )
|
29 |
+
{
|
30 |
+
foreach ( $field['options'] as $k => $v )
|
31 |
+
{
|
32 |
+
$fid = $field['id'];
|
33 |
+
if ( is_array( $meta ) && ! empty( $meta ) )
|
34 |
+
$html[] = sprintf( $tpl, $k, $fid, $v, $n, $k, $meta[$v][$n] );
|
35 |
+
else
|
36 |
+
$html[] = sprintf( $tpl, $k, $fid, $v, $n, $k, '' );
|
37 |
+
}
|
38 |
+
$html[] = '<br>';
|
39 |
+
}
|
40 |
+
|
41 |
+
$out = $before . implode( ' ', $html ) . $after;
|
42 |
+
|
43 |
+
return $out;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Get meta value
|
48 |
+
*
|
49 |
+
* @param $post_id
|
50 |
+
* @param $saved
|
51 |
+
* @param $field
|
52 |
+
*
|
53 |
+
* @return array
|
54 |
+
*/
|
55 |
+
static function meta( $post_id, $saved, $field )
|
56 |
+
{
|
57 |
+
$meta = get_post_meta( $post_id, $field['id'] );
|
58 |
+
|
59 |
+
if ( is_array( $meta ) && ! empty( $meta ) )
|
60 |
+
$meta = $meta[0];
|
61 |
+
|
62 |
+
return $meta;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Save meta value
|
67 |
+
*
|
68 |
+
* @param $new
|
69 |
+
* @param $old
|
70 |
+
* @param $post_id
|
71 |
+
* @param $field
|
72 |
+
*/
|
73 |
+
static function save( $new, $old, $post_id, $field )
|
74 |
+
{
|
75 |
+
update_post_meta( $post_id, $field['id'], $new, $old );
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
inc/meta-box/inc/fields/file-advanced.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
require_once TX_RWMB_FIELDS_DIR . 'file.php';
|
6 |
+
if ( ! class_exists( 'RWMB_File_Advanced_Field' ) )
|
7 |
+
{
|
8 |
+
class RWMB_File_Advanced_Field extends RWMB_File_Field
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Enqueue scripts and styles
|
12 |
+
*
|
13 |
+
* @return void
|
14 |
+
*/
|
15 |
+
static function admin_enqueue_scripts()
|
16 |
+
{
|
17 |
+
parent::admin_enqueue_scripts();
|
18 |
+
|
19 |
+
// Make sure scripts for new media uploader in WordPress 3.5 is enqueued
|
20 |
+
wp_enqueue_media();
|
21 |
+
wp_enqueue_script( 'rwmb-file-advanced', TX_RWMB_JS_URL . 'file-advanced.js', array( 'jquery', 'underscore' ), TX_RWMB_VER, true );
|
22 |
+
wp_localize_script( 'rwmb-file-advanced', 'rwmbFileAdvanced', array(
|
23 |
+
'frameTitle' => __( 'Select Files', 'meta-box' ),
|
24 |
+
) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Add actions
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
static function add_actions()
|
33 |
+
{
|
34 |
+
parent::add_actions();
|
35 |
+
|
36 |
+
// Attach images via Ajax
|
37 |
+
add_action( 'wp_ajax_rwmb_attach_file', array( __CLASS__, 'wp_ajax_attach_file' ) );
|
38 |
+
add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
static function wp_ajax_attach_file()
|
42 |
+
{
|
43 |
+
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
44 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
45 |
+
$attachment_ids = isset( $_POST['attachment_ids'] ) ? (array) $_POST['attachment_ids'] : array();
|
46 |
+
|
47 |
+
check_ajax_referer( "rwmb-attach-file_{$field_id}" );
|
48 |
+
foreach ( $attachment_ids as $attachment_id )
|
49 |
+
{
|
50 |
+
add_post_meta( $post_id, $field_id, $attachment_id, false );
|
51 |
+
}
|
52 |
+
|
53 |
+
wp_send_json_success();
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Get field HTML
|
58 |
+
*
|
59 |
+
* @param mixed $meta
|
60 |
+
* @param array $field
|
61 |
+
*
|
62 |
+
* @return string
|
63 |
+
*/
|
64 |
+
static function html( $meta, $field )
|
65 |
+
{
|
66 |
+
$i18n_title = apply_filters( 'rwmb_file_advanced_select_string', _x( 'Select or Upload Files', 'file upload', 'meta-box' ), $field );
|
67 |
+
$attach_nonce = wp_create_nonce( "rwmb-attach-file_{$field['id']}" );
|
68 |
+
|
69 |
+
// Uploaded files
|
70 |
+
$html = self::get_uploaded_files( $meta, $field );
|
71 |
+
|
72 |
+
// Show form upload
|
73 |
+
$classes = array( 'button', 'rwmb-file-advanced-upload', 'hide-if-no-js', 'new-files' );
|
74 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
75 |
+
$classes[] = 'hidden';
|
76 |
+
|
77 |
+
$classes = implode( ' ', $classes );
|
78 |
+
$html .= "<a href='#' class='{$classes}' data-attach_file_nonce={$attach_nonce}>{$i18n_title}</a>";
|
79 |
+
|
80 |
+
return $html;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Get field value
|
85 |
+
* It's the combination of new (uploaded) images and saved images
|
86 |
+
*
|
87 |
+
* @param array $new
|
88 |
+
* @param array $old
|
89 |
+
* @param int $post_id
|
90 |
+
* @param array $field
|
91 |
+
*
|
92 |
+
* @return array|mixed
|
93 |
+
*/
|
94 |
+
static function value( $new, $old, $post_id, $field )
|
95 |
+
{
|
96 |
+
$new = (array) $new;
|
97 |
+
|
98 |
+
return array_unique( array_merge( $old, $new ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
static function print_templates()
|
102 |
+
{
|
103 |
+
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
|
104 |
+
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
|
105 |
+
?>
|
106 |
+
<script id="tmpl-rwmb-file-advanced" type="text/html">
|
107 |
+
<# _.each( attachments, function( attachment ) { #>
|
108 |
+
<li id="item_{{{ attachment.id }}}">
|
109 |
+
<div class="rwmb-icon">
|
110 |
+
<img src="<# if ( attachment.type == 'image' ){ #>{{{ attachment.sizes.thumbnail.url }}}<# } else { #>{{{ attachment.icon }}}<# } #>">
|
111 |
+
</div>
|
112 |
+
<div class="rwmb-info">
|
113 |
+
<a href="{{{ attachment.url }}}" target="_blank">{{{ attachment.title }}}</a>
|
114 |
+
<p>{{{ attachment.mime }}}</p>
|
115 |
+
<a title="<?php echo esc_attr( $i18n_edit ); ?>" href="{{{ attachment.editLink }}}" target="_blank"><?php echo esc_html( $i18n_edit ); ?></a> |
|
116 |
+
<a title="<?php echo esc_attr( $i18n_delete ); ?>" class="rwmb-delete-file" href="#" data-attachment_id="{{{ attachment.id }}}"><?php echo esc_html( $i18n_delete ); ?></a>
|
117 |
+
</div>
|
118 |
+
</li>
|
119 |
+
<# } ); #>
|
120 |
+
</script>
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
}
|
124 |
+
}
|
inc/meta-box/inc/fields/file-input.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! class_exists( 'RWMB_File_Input_Field' ) )
|
3 |
+
{
|
4 |
+
class RWMB_File_Input_Field extends RWMB_Field
|
5 |
+
{
|
6 |
+
/**
|
7 |
+
* Enqueue scripts and styles
|
8 |
+
*
|
9 |
+
* @return void
|
10 |
+
*/
|
11 |
+
static function admin_enqueue_scripts()
|
12 |
+
{
|
13 |
+
// Make sure scripts for new media uploader in WordPress 3.5 is enqueued
|
14 |
+
wp_enqueue_media();
|
15 |
+
wp_enqueue_script( 'rwmb-file-input', TX_RWMB_JS_URL . 'file-input.js', array( 'jquery' ), TX_RWMB_VER, true );
|
16 |
+
wp_localize_script( 'rwmb-file-input', 'rwmbFileInput', array(
|
17 |
+
'frameTitle' => __( 'Select File', 'meta-box' ),
|
18 |
+
) );
|
19 |
+
}
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Get field HTML
|
23 |
+
*
|
24 |
+
* @param mixed $meta
|
25 |
+
* @param array $field
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
static function html( $meta, $field )
|
30 |
+
{
|
31 |
+
return sprintf(
|
32 |
+
'<input type="text" class="rwmb-file-input" name="%s" id="%s" value="%s" placeholder="%s" size="%s">
|
33 |
+
<a href="#" class="rwmb-file-input-select button-primary">%s</a>
|
34 |
+
<a href="#" class="rwmb-file-input-remove button %s">%s</a>',
|
35 |
+
$field['field_name'],
|
36 |
+
$field['id'],
|
37 |
+
$meta,
|
38 |
+
$field['placeholder'],
|
39 |
+
$field['size'],
|
40 |
+
__( 'Select', 'meta-box' ),
|
41 |
+
$meta ? '' : 'hidden',
|
42 |
+
__( 'Remove', 'meta-box' )
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Normalize parameters for field
|
48 |
+
*
|
49 |
+
* @param array $field
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
static function normalize_field( $field )
|
54 |
+
{
|
55 |
+
$field = wp_parse_args( $field, array(
|
56 |
+
'size' => 30,
|
57 |
+
'placeholder' => '',
|
58 |
+
) );
|
59 |
+
|
60 |
+
return $field;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
inc/meta-box/inc/fields/file.php
ADDED
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_File_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_File_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-file', TX_RWMB_CSS_URL . 'file.css', array(), TX_RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-file', TX_RWMB_JS_URL . 'file.js', array( 'jquery' ), TX_RWMB_VER, true );
|
18 |
+
wp_localize_script( 'rwmb-file', 'rwmbFile', array(
|
19 |
+
'maxFileUploadsSingle' => __( 'You may only upload maximum %d file', 'meta-box' ),
|
20 |
+
'maxFileUploadsPlural' => __( 'You may only upload maximum %d files', 'meta-box' ),
|
21 |
+
) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Add actions
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
static function add_actions()
|
30 |
+
{
|
31 |
+
// Add data encoding type for file uploading
|
32 |
+
add_action( 'post_edit_form_tag', array( __CLASS__, 'post_edit_form_tag' ) );
|
33 |
+
|
34 |
+
// Delete file via Ajax
|
35 |
+
add_action( 'wp_ajax_rwmb_delete_file', array( __CLASS__, 'wp_ajax_delete_file' ) );
|
36 |
+
|
37 |
+
// allow reordering
|
38 |
+
add_action( 'wp_ajax_rwmb_reorder_files', array( __CLASS__, 'wp_ajax_reorder_files' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Ajax callback for reordering images
|
43 |
+
*
|
44 |
+
* @return void
|
45 |
+
*/
|
46 |
+
static function wp_ajax_reorder_files()
|
47 |
+
{
|
48 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
49 |
+
$order = isset( $_POST['order'] ) ? $_POST['order'] : '';
|
50 |
+
$post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
|
51 |
+
|
52 |
+
check_ajax_referer( "rwmb-reorder-files_{$field_id}" );
|
53 |
+
|
54 |
+
parse_str( $order, $items );
|
55 |
+
|
56 |
+
delete_post_meta( $post_id, $field_id );
|
57 |
+
|
58 |
+
foreach ( $items['item'] as $item )
|
59 |
+
{
|
60 |
+
add_post_meta( $post_id, $field_id, $item, false );
|
61 |
+
}
|
62 |
+
|
63 |
+
wp_send_json_success();
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Add data encoding type for file uploading
|
68 |
+
*
|
69 |
+
* @return void
|
70 |
+
*/
|
71 |
+
static function post_edit_form_tag()
|
72 |
+
{
|
73 |
+
echo ' enctype="multipart/form-data"';
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Ajax callback for deleting files.
|
78 |
+
* Modified from a function used by "Verve Meta Boxes" plugin
|
79 |
+
*
|
80 |
+
* @link http://goo.gl/LzYSq
|
81 |
+
* @return void
|
82 |
+
*/
|
83 |
+
static function wp_ajax_delete_file()
|
84 |
+
{
|
85 |
+
$post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
|
86 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
87 |
+
$attachment_id = isset( $_POST['attachment_id'] ) ? intval( $_POST['attachment_id'] ) : 0;
|
88 |
+
$force_delete = isset( $_POST['force_delete'] ) ? intval( $_POST['force_delete'] ) : 0;
|
89 |
+
|
90 |
+
check_ajax_referer( "rwmb-delete-file_{$field_id}" );
|
91 |
+
|
92 |
+
delete_post_meta( $post_id, $field_id, $attachment_id );
|
93 |
+
$ok = $force_delete ? wp_delete_attachment( $attachment_id ) : true;
|
94 |
+
|
95 |
+
if ( $ok )
|
96 |
+
wp_send_json_success();
|
97 |
+
else
|
98 |
+
wp_send_json_error( __( 'Error: Cannot delete file', 'meta-box' ) );
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get field HTML
|
103 |
+
*
|
104 |
+
* @param mixed $meta
|
105 |
+
* @param array $field
|
106 |
+
*
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
static function html( $meta, $field )
|
110 |
+
{
|
111 |
+
$i18n_title = apply_filters( 'rwmb_file_upload_string', _x( 'Upload Files', 'file upload', 'meta-box' ), $field );
|
112 |
+
$i18n_more = apply_filters( 'rwmb_file_add_string', _x( '+ Add new file', 'file upload', 'meta-box' ), $field );
|
113 |
+
|
114 |
+
// Uploaded files
|
115 |
+
$html = self::get_uploaded_files( $meta, $field );
|
116 |
+
$new_file_classes = array( 'new-files' );
|
117 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
118 |
+
$new_file_classes[] = 'hidden';
|
119 |
+
|
120 |
+
// Show form upload
|
121 |
+
$html .= sprintf(
|
122 |
+
'<div class="%s">
|
123 |
+
<h4>%s</h4>
|
124 |
+
<div class="file-input"><input type="file" name="%s[]" /></div>
|
125 |
+
<a class="rwmb-add-file" href="#"><strong>%s</strong></a>
|
126 |
+
</div>',
|
127 |
+
implode( ' ', $new_file_classes ),
|
128 |
+
$i18n_title,
|
129 |
+
$field['id'],
|
130 |
+
$i18n_more
|
131 |
+
);
|
132 |
+
|
133 |
+
return $html;
|
134 |
+
}
|
135 |
+
|
136 |
+
static function get_uploaded_files( $files, $field )
|
137 |
+
{
|
138 |
+
$reorder_nonce = wp_create_nonce( "rwmb-reorder-files_{$field['id']}" );
|
139 |
+
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
140 |
+
|
141 |
+
$classes = array( 'rwmb-file', 'rwmb-uploaded' );
|
142 |
+
if ( count( $files ) <= 0 )
|
143 |
+
$classes[] = 'hidden';
|
144 |
+
$ol = '<ul class="%s" 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">';
|
145 |
+
$html = sprintf(
|
146 |
+
$ol,
|
147 |
+
implode( ' ', $classes ),
|
148 |
+
$field['id'],
|
149 |
+
$delete_nonce,
|
150 |
+
$reorder_nonce,
|
151 |
+
$field['force_delete'] ? 1 : 0,
|
152 |
+
$field['max_file_uploads'],
|
153 |
+
$field['mime_type']
|
154 |
+
);
|
155 |
+
|
156 |
+
foreach ( $files as $attachment_id )
|
157 |
+
{
|
158 |
+
$html .= self::file_html( $attachment_id );
|
159 |
+
}
|
160 |
+
|
161 |
+
$html .= '</ul>';
|
162 |
+
|
163 |
+
return $html;
|
164 |
+
}
|
165 |
+
|
166 |
+
static function file_html( $attachment_id )
|
167 |
+
{
|
168 |
+
$i18n_delete = apply_filters( 'rwmb_file_delete_string', _x( 'Delete', 'file upload', 'meta-box' ) );
|
169 |
+
$i18n_edit = apply_filters( 'rwmb_file_edit_string', _x( 'Edit', 'file upload', 'meta-box' ) );
|
170 |
+
$li = '
|
171 |
+
<li id="item_%s">
|
172 |
+
<div class="rwmb-icon">%s</div>
|
173 |
+
<div class="rwmb-info">
|
174 |
+
<a href="%s" target="_blank">%s</a>
|
175 |
+
<p>%s</p>
|
176 |
+
<a title="%s" href="%s" target="_blank">%s</a> |
|
177 |
+
<a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">%s</a>
|
178 |
+
</div>
|
179 |
+
</li>';
|
180 |
+
|
181 |
+
$mime_type = get_post_mime_type( $attachment_id );
|
182 |
+
|
183 |
+
return sprintf(
|
184 |
+
$li,
|
185 |
+
$attachment_id,
|
186 |
+
wp_get_attachment_image( $attachment_id, array( 60, 60 ), true ),
|
187 |
+
wp_get_attachment_url( $attachment_id ),
|
188 |
+
get_the_title( $attachment_id ),
|
189 |
+
$mime_type,
|
190 |
+
$i18n_edit,
|
191 |
+
get_edit_post_link( $attachment_id ),
|
192 |
+
$i18n_edit,
|
193 |
+
$i18n_delete,
|
194 |
+
$attachment_id,
|
195 |
+
$i18n_delete
|
196 |
+
);
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Get meta values to save
|
201 |
+
*
|
202 |
+
* @param mixed $new
|
203 |
+
* @param mixed $old
|
204 |
+
* @param int $post_id
|
205 |
+
* @param array $field
|
206 |
+
*
|
207 |
+
* @return array|mixed
|
208 |
+
*/
|
209 |
+
static function value( $new, $old, $post_id, $field )
|
210 |
+
{
|
211 |
+
$name = $field['id'];
|
212 |
+
if ( empty( $_FILES[$name] ) )
|
213 |
+
return $new;
|
214 |
+
|
215 |
+
$new = array();
|
216 |
+
$files = self::fix_file_array( $_FILES[$name] );
|
217 |
+
|
218 |
+
foreach ( $files as $file_item )
|
219 |
+
{
|
220 |
+
$file = wp_handle_upload( $file_item, array( 'test_form' => false ) );
|
221 |
+
|
222 |
+
if ( ! isset( $file['file'] ) )
|
223 |
+
continue;
|
224 |
+
|
225 |
+
$file_name = $file['file'];
|
226 |
+
|
227 |
+
$attachment = array(
|
228 |
+
'post_mime_type' => $file['type'],
|
229 |
+
'guid' => $file['url'],
|
230 |
+
'post_parent' => $post_id,
|
231 |
+
'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $file_name ) ),
|
232 |
+
'post_content' => '',
|
233 |
+
);
|
234 |
+
$id = wp_insert_attachment( $attachment, $file_name, $post_id );
|
235 |
+
|
236 |
+
if ( ! is_wp_error( $id ) )
|
237 |
+
{
|
238 |
+
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file_name ) );
|
239 |
+
|
240 |
+
// Save file ID in meta field
|
241 |
+
$new[] = $id;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
return array_unique( array_merge( $old, $new ) );
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Fixes the odd indexing of multiple file uploads from the format:
|
250 |
+
* $_FILES['field']['key']['index']
|
251 |
+
* To the more standard and appropriate:
|
252 |
+
* $_FILES['field']['index']['key']
|
253 |
+
*
|
254 |
+
* @param array $files
|
255 |
+
*
|
256 |
+
* @return array
|
257 |
+
*/
|
258 |
+
static function fix_file_array( $files )
|
259 |
+
{
|
260 |
+
$output = array();
|
261 |
+
foreach ( $files as $key => $list )
|
262 |
+
{
|
263 |
+
foreach ( $list as $index => $value )
|
264 |
+
{
|
265 |
+
$output[$index][$key] = $value;
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
return $output;
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* Normalize parameters for field
|
274 |
+
*
|
275 |
+
* @param array $field
|
276 |
+
*
|
277 |
+
* @return array
|
278 |
+
*/
|
279 |
+
static function normalize_field( $field )
|
280 |
+
{
|
281 |
+
$field = wp_parse_args( $field, array(
|
282 |
+
'std' => array(),
|
283 |
+
'force_delete' => false,
|
284 |
+
'max_file_uploads' => 0,
|
285 |
+
'mime_type' => '',
|
286 |
+
) );
|
287 |
+
$field['multiple'] = true;
|
288 |
+
|
289 |
+
return $field;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Standard meta retrieval
|
294 |
+
*
|
295 |
+
* @param int $post_id
|
296 |
+
* @param array $field
|
297 |
+
* @param bool $saved
|
298 |
+
*
|
299 |
+
* @return mixed
|
300 |
+
*/
|
301 |
+
static function meta( $post_id, $saved, $field )
|
302 |
+
{
|
303 |
+
$meta = parent::meta( $post_id, $saved, $field );
|
304 |
+
|
305 |
+
return empty( $meta ) ? array() : (array) $meta;
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
inc/meta-box/inc/fields/heading.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Heading_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Heading_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-heading', TX_RWMB_CSS_URL . 'heading.css', array(), TX_RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Show begin HTML markup for fields
|
21 |
+
*
|
22 |
+
* @param mixed $meta
|
23 |
+
* @param array $field
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
static function begin_html( $meta, $field )
|
28 |
+
{
|
29 |
+
return sprintf(
|
30 |
+
'<h4>%s</h4>',
|
31 |
+
$field['name']
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Show end HTML markup for fields
|
37 |
+
*
|
38 |
+
* @param mixed $meta
|
39 |
+
* @param array $field
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
static function end_html( $meta, $field )
|
44 |
+
{
|
45 |
+
return '';
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
inc/meta-box/inc/fields/hidden.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Hidden_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Hidden_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<input type="hidden" class="rwmb-hidden" name="%s" id="%s" value="%s" />',
|
21 |
+
$field['field_name'],
|
22 |
+
$field['id'],
|
23 |
+
$meta
|
24 |
+
);
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
inc/meta-box/inc/fields/image-advanced.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
require_once TX_RWMB_FIELDS_DIR . 'image.php';
|
6 |
+
if ( ! class_exists( 'RWMB_Image_Advanced_Field' ) )
|
7 |
+
{
|
8 |
+
class RWMB_Image_Advanced_Field extends RWMB_Image_Field
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Enqueue scripts and styles
|
12 |
+
*
|
13 |
+
* @return void
|
14 |
+
*/
|
15 |
+
static function admin_enqueue_scripts()
|
16 |
+
{
|
17 |
+
parent::admin_enqueue_scripts();
|
18 |
+
|
19 |
+
// Make sure scripts for new media uploader in WordPress 3.5 is enqueued
|
20 |
+
wp_enqueue_media();
|
21 |
+
wp_enqueue_script( 'rwmb-image-advanced', TX_RWMB_JS_URL . 'image-advanced.js', array( 'jquery', 'underscore' ), TX_RWMB_VER, true );
|
22 |
+
wp_localize_script( 'rwmb-image-advanced', 'rwmbImageAdvanced', array(
|
23 |
+
'frameTitle' => __( 'Select Images', 'meta-box' ),
|
24 |
+
) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Add actions
|
29 |
+
*
|
30 |
+
* @return void
|
31 |
+
*/
|
32 |
+
static function add_actions()
|
33 |
+
{
|
34 |
+
// Do same actions as file field
|
35 |
+
parent::add_actions();
|
36 |
+
|
37 |
+
// Attach images via Ajax
|
38 |
+
add_action( 'wp_ajax_rwmb_attach_media', array( __CLASS__, 'wp_ajax_attach_media' ) );
|
39 |
+
add_action( 'print_media_templates', array( __CLASS__, 'print_templates' ) );
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Ajax callback for attaching media to field
|
44 |
+
*
|
45 |
+
* @return void
|
46 |
+
*/
|
47 |
+
static function wp_ajax_attach_media()
|
48 |
+
{
|
49 |
+
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
50 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
51 |
+
$attachment_ids = isset( $_POST['attachment_ids'] ) ? (array) $_POST['attachment_ids'] : array();
|
52 |
+
|
53 |
+
check_ajax_referer( "rwmb-attach-media_{$field_id}" );
|
54 |
+
foreach ( $attachment_ids as $attachment_id )
|
55 |
+
{
|
56 |
+
add_post_meta( $post_id, $field_id, $attachment_id, false );
|
57 |
+
}
|
58 |
+
wp_send_json_success();
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Get field HTML
|
63 |
+
*
|
64 |
+
* @param mixed $meta
|
65 |
+
* @param array $field
|
66 |
+
*
|
67 |
+
* @return string
|
68 |
+
*/
|
69 |
+
static function html( $meta, $field )
|
70 |
+
{
|
71 |
+
$i18n_title = apply_filters( 'rwmb_image_advanced_select_string', _x( 'Select or Upload Images', 'image upload', 'meta-box' ), $field );
|
72 |
+
$attach_nonce = wp_create_nonce( "rwmb-attach-media_{$field['id']}" );
|
73 |
+
|
74 |
+
// Uploaded images
|
75 |
+
$html = self::get_uploaded_images( $meta, $field );
|
76 |
+
|
77 |
+
// Show form upload
|
78 |
+
$classes = array( 'button', 'rwmb-image-advanced-upload', 'hide-if-no-js', 'new-files' );
|
79 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
80 |
+
$classes[] = 'hidden';
|
81 |
+
|
82 |
+
$classes = implode( ' ', $classes );
|
83 |
+
$html .= "<a href='#' class='{$classes}' data-attach_media_nonce={$attach_nonce}>{$i18n_title}</a>";
|
84 |
+
|
85 |
+
return $html;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Get field value
|
90 |
+
* It's the combination of new (uploaded) images and saved images
|
91 |
+
*
|
92 |
+
* @param array $new
|
93 |
+
* @param array $old
|
94 |
+
* @param int $post_id
|
95 |
+
* @param array $field
|
96 |
+
*
|
97 |
+
* @return array|mixed
|
98 |
+
*/
|
99 |
+
static function value( $new, $old, $post_id, $field )
|
100 |
+
{
|
101 |
+
$new = (array) $new;
|
102 |
+
|
103 |
+
return array_unique( array_merge( $old, $new ) );
|
104 |
+
}
|
105 |
+
|
106 |
+
static function print_templates()
|
107 |
+
{
|
108 |
+
$i18n_delete = apply_filters( 'rwmb_image_delete_string', _x( 'Delete', 'image upload', 'meta-box' ) );
|
109 |
+
$i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'meta-box' ) );
|
110 |
+
?>
|
111 |
+
<script id="tmpl-rwmb-image-advanced" type="text/html">
|
112 |
+
<# _.each( attachments, function( attachment ) { #>
|
113 |
+
<li id="item_{{{ attachment.id }}}">
|
114 |
+
<# if ( attachment.sizes.hasOwnProperty( 'thumbnail' ) ) { #>
|
115 |
+
<img src="{{{ attachment.sizes.thumbnail.url }}}">
|
116 |
+
<# } else { #>
|
117 |
+
<img src="{{{ attachment.sizes.full.url }}}">
|
118 |
+
<# } #>
|
119 |
+
<div class="rwmb-image-bar">
|
120 |
+
<a title="<?php echo esc_attr( $i18n_edit ); ?>" class="rwmb-edit-file" href="{{{ attachment.editLink }}}" target="_blank"><?php echo esc_html( $i18n_edit ); ?></a> |
|
121 |
+
<a title="<?php echo esc_attr( $i18n_delete ); ?>" class="rwmb-delete-file" href="#" data-attachment_id="{{{ attachment.id }}}">×</a>
|
122 |
+
</div>
|
123 |
+
</li>
|
124 |
+
<# } ); #>
|
125 |
+
</script>
|
126 |
+
<?php
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
}
|
inc/meta-box/inc/fields/image-select.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Image_Select_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Image_Select_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-image-select', TX_RWMB_CSS_URL . 'image-select.css', array(), TX_RWMB_VER );
|
17 |
+
wp_enqueue_script( 'rwmb-image-select', TX_RWMB_JS_URL . 'image-select.js', array( 'jquery' ), TX_RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML
|
22 |
+
*
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function html( $meta, $field )
|
29 |
+
{
|
30 |
+
$html = array();
|
31 |
+
$tpl = '<label class="rwmb-image-select"><img src="%s"><input type="%s" class="hidden" name="%s" value="%s"%s></label>';
|
32 |
+
|
33 |
+
$meta = (array) $meta;
|
34 |
+
foreach ( $field['options'] as $value => $image )
|
35 |
+
{
|
36 |
+
$html[] = sprintf(
|
37 |
+
$tpl,
|
38 |
+
$image,
|
39 |
+
$field['multiple'] ? 'checkbox' : 'radio',
|
40 |
+
$field['field_name'],
|
41 |
+
$value,
|
42 |
+
checked( in_array( $value, $meta ), true, false )
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
return implode( ' ', $html );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Normalize parameters for field
|
51 |
+
*
|
52 |
+
* @param array $field
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
static function normalize_field( $field )
|
57 |
+
{
|
58 |
+
$field['field_name'] .= $field['multiple'] ? '[]' : '';
|
59 |
+
|
60 |
+
return $field;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
inc/meta-box/inc/fields/image.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Image_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Image_Field extends RWMB_File_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
// Enqueue same scripts and styles as for file field
|
17 |
+
parent::admin_enqueue_scripts();
|
18 |
+
|
19 |
+
wp_enqueue_style( 'rwmb-image', TX_RWMB_CSS_URL . 'image.css', array(), TX_RWMB_VER );
|
20 |
+
wp_enqueue_script( 'rwmb-image', TX_RWMB_JS_URL . 'image.js', array( 'jquery-ui-sortable' ), TX_RWMB_VER, true );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Add actions
|
25 |
+
*
|
26 |
+
* @return void
|
27 |
+
*/
|
28 |
+
static function add_actions()
|
29 |
+
{
|
30 |
+
// Do same actions as file field
|
31 |
+
parent::add_actions();
|
32 |
+
|
33 |
+
// Reorder images via Ajax
|
34 |
+
add_action( 'wp_ajax_rwmb_reorder_images', array( __CLASS__, 'wp_ajax_reorder_images' ) );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Ajax callback for reordering images
|
39 |
+
*
|
40 |
+
* @return void
|
41 |
+
*/
|
42 |
+
static function wp_ajax_reorder_images()
|
43 |
+
{
|
44 |
+
$field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;
|
45 |
+
$order = isset( $_POST['order'] ) ? $_POST['order'] : '';
|
46 |
+
$post_id = isset( $_POST['post_id'] ) ? intval( $_POST['post_id'] ) : 0;
|
47 |
+
|
48 |
+
check_ajax_referer( "rwmb-reorder-images_{$field_id}" );
|
49 |
+
|
50 |
+
parse_str( $order, $items );
|
51 |
+
|
52 |
+
delete_post_meta( $post_id, $field_id );
|
53 |
+
foreach ( $items['item'] as $item )
|
54 |
+
{
|
55 |
+
add_post_meta( $post_id, $field_id, $item, false );
|
56 |
+
}
|
57 |
+
wp_send_json_success();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get field HTML
|
62 |
+
*
|
63 |
+
* @param mixed $meta
|
64 |
+
* @param array $field
|
65 |
+
*
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
static function html( $meta, $field )
|
69 |
+
{
|
70 |
+
$i18n_title = apply_filters( 'rwmb_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
|
71 |
+
$i18n_more = apply_filters( 'rwmb_image_add_string', _x( '+ Add new image', 'image upload', 'meta-box' ), $field );
|
72 |
+
|
73 |
+
// Uploaded images
|
74 |
+
$html = self::get_uploaded_images( $meta, $field );
|
75 |
+
|
76 |
+
// Show form upload
|
77 |
+
$html .= sprintf(
|
78 |
+
'<h4>%s</h4>
|
79 |
+
<div class="new-files">
|
80 |
+
<div class="file-input"><input type="file" name="%s[]" /></div>
|
81 |
+
<a class="rwmb-add-file" href="#"><strong>%s</strong></a>
|
82 |
+
</div>',
|
83 |
+
$i18n_title,
|
84 |
+
$field['id'],
|
85 |
+
$i18n_more
|
86 |
+
);
|
87 |
+
|
88 |
+
return $html;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get HTML markup for uploaded images
|
93 |
+
*
|
94 |
+
* @param array $images
|
95 |
+
* @param array $field
|
96 |
+
*
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
static function get_uploaded_images( $images, $field )
|
100 |
+
{
|
101 |
+
$reorder_nonce = wp_create_nonce( "rwmb-reorder-images_{$field['id']}" );
|
102 |
+
$delete_nonce = wp_create_nonce( "rwmb-delete-file_{$field['id']}" );
|
103 |
+
$classes = array( 'rwmb-images', 'rwmb-uploaded' );
|
104 |
+
if ( count( $images ) <= 0 )
|
105 |
+
$classes[] = 'hidden';
|
106 |
+
$ul = '<ul class="%s" data-field_id="%s" data-delete_nonce="%s" data-reorder_nonce="%s" data-force_delete="%s" data-max_file_uploads="%s">';
|
107 |
+
$html = sprintf(
|
108 |
+
$ul,
|
109 |
+
implode( ' ', $classes ),
|
110 |
+
$field['id'],
|
111 |
+
$delete_nonce,
|
112 |
+
$reorder_nonce,
|
113 |
+
$field['force_delete'] ? 1 : 0,
|
114 |
+
$field['max_file_uploads']
|
115 |
+
);
|
116 |
+
|
117 |
+
foreach ( $images as $image )
|
118 |
+
{
|
119 |
+
$html .= self::img_html( $image );
|
120 |
+
}
|
121 |
+
|
122 |
+
$html .= '</ul>';
|
123 |
+
|
124 |
+
return $html;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Get HTML markup for ONE uploaded image
|
129 |
+
*
|
130 |
+
* @param int $image Image ID
|
131 |
+
*
|
132 |
+
* @return string
|
133 |
+
*/
|
134 |
+
static function img_html( $image )
|
135 |
+
{
|
136 |
+
$i18n_delete = apply_filters( 'rwmb_image_delete_string', _x( 'Delete', 'image upload', 'meta-box' ) );
|
137 |
+
$i18n_edit = apply_filters( 'rwmb_image_edit_string', _x( 'Edit', 'image upload', 'meta-box' ) );
|
138 |
+
$li = '
|
139 |
+
<li id="item_%s">
|
140 |
+
<img src="%s" />
|
141 |
+
<div class="rwmb-image-bar">
|
142 |
+
<a title="%s" class="rwmb-edit-file" href="%s" target="_blank">%s</a> |
|
143 |
+
<a title="%s" class="rwmb-delete-file" href="#" data-attachment_id="%s">×</a>
|
144 |
+
</div>
|
145 |
+
</li>
|
146 |
+
';
|
147 |
+
|
148 |
+
$src = wp_get_attachment_image_src( $image, 'thumbnail' );
|
149 |
+
$src = $src[0];
|
150 |
+
$link = get_edit_post_link( $image );
|
151 |
+
|
152 |
+
return sprintf(
|
153 |
+
$li,
|
154 |
+
$image,
|
155 |
+
$src,
|
156 |
+
$i18n_edit, $link, $i18n_edit,
|
157 |
+
$i18n_delete, $image
|
158 |
+
);
|
159 |
+
}
|
160 |
+
|
161 |
+
}
|
162 |
+
}
|
inc/meta-box/inc/fields/map.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Map_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Map_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_script( 'googlemap', 'https://maps.google.com/maps/api/js?sensor=false', array(), '', true );
|
17 |
+
wp_enqueue_script( 'rwmb-map', TX_RWMB_JS_URL . 'map.js', array( 'jquery', 'jquery-ui-autocomplete', 'googlemap' ), TX_RWMB_VER, true );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get field HTML
|
22 |
+
*
|
23 |
+
* @param mixed $meta
|
24 |
+
* @param array $field
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
static function html( $meta, $field )
|
29 |
+
{
|
30 |
+
$address = isset( $field['address_field'] ) ? $field['address_field'] : false;
|
31 |
+
|
32 |
+
$html = '<div class="rwmb-map-field">';
|
33 |
+
|
34 |
+
$html .= sprintf(
|
35 |
+
'<div class="rwmb-map-canvas" style="%s"%s></div>
|
36 |
+
<input type="hidden" name="%s" class="rwmb-map-coordinate" value="%s">',
|
37 |
+
isset( $field['style'] ) ? $field['style'] : '',
|
38 |
+
isset( $field['std'] ) ? " data-default-loc=\"{$field['std']}\"" : '',
|
39 |
+
$field['field_name'],
|
40 |
+
$meta
|
41 |
+
);
|
42 |
+
|
43 |
+
if ( $address )
|
44 |
+
{
|
45 |
+
$html .= sprintf(
|
46 |
+
'<button class="button rwmb-map-goto-address-button" value="%s">%s</button>',
|
47 |
+
is_array( $address ) ? implode( ',', $address ) : $address,
|
48 |
+
__( 'Find Address', 'meta-box' )
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
$html .= '</div>';
|
53 |
+
|
54 |
+
return $html;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
inc/meta-box/inc/fields/number.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Number_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Number_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<input type="number" class="rwmb-number" name="%s" id="%s" value="%s" step="%s" min="%s" placeholder="%s"/>',
|
21 |
+
$field['field_name'],
|
22 |
+
empty( $field['clone'] ) ? $field['id'] : '',
|
23 |
+
$meta,
|
24 |
+
$field['step'],
|
25 |
+
$field['min'],
|
26 |
+
$field['placeholder']
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Normalize parameters for field
|
32 |
+
*
|
33 |
+
* @param array $field
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
static function normalize_field( $field )
|
38 |
+
{
|
39 |
+
$field = wp_parse_args( $field, array(
|
40 |
+
'step' => 1,
|
41 |
+
'min' => 0,
|
42 |
+
) );
|
43 |
+
|
44 |
+
return $field;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
inc/meta-box/inc/fields/oembed.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'url.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_OEmbed_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_OEmbed_Field extends RWMB_URL_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
wp_enqueue_style( 'rwmb-oembed', TX_RWMB_CSS_URL . 'oembed.css' );
|
20 |
+
wp_enqueue_script( 'rwmb-oembed', TX_RWMB_JS_URL . 'oembed.js', array(), TX_RWMB_VER, true );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Add actions
|
25 |
+
*
|
26 |
+
* @return void
|
27 |
+
*/
|
28 |
+
static function add_actions()
|
29 |
+
{
|
30 |
+
add_action( 'wp_ajax_rwmb_get_embed', array( __CLASS__, 'wp_ajax_get_embed' ) );
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Ajax callback for returning oEmbed HTML
|
35 |
+
*
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
static function wp_ajax_get_embed()
|
39 |
+
{
|
40 |
+
$url = isset( $_POST['url'] ) ? $_POST['url'] : '';
|
41 |
+
wp_send_json_success( self::get_embed( $url ) );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get embed html from url
|
46 |
+
*
|
47 |
+
* @param string $url
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
static function get_embed( $url )
|
52 |
+
{
|
53 |
+
$embed = @wp_oembed_get( $url );
|
54 |
+
|
55 |
+
return $embed ? $embed : __( 'Embed HTML not available.', 'meta-box' );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get field HTML
|
60 |
+
*
|
61 |
+
* @param mixed $meta
|
62 |
+
* @param array $field
|
63 |
+
*
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
static function html( $meta, $field )
|
67 |
+
{
|
68 |
+
return sprintf(
|
69 |
+
'<input type="url" class="rwmb-oembed" name="%s" id="%s" value="%s" size="%s">
|
70 |
+
<a href="#" class="show-embed button">%s</a>
|
71 |
+
<span class="spinner"></span>
|
72 |
+
<div class="embed-code">%s</div>',
|
73 |
+
$field['field_name'],
|
74 |
+
$field['id'],
|
75 |
+
$meta,
|
76 |
+
$field['size'],
|
77 |
+
__( 'Preview', 'meta-box' ),
|
78 |
+
$meta ? self::get_embed( $meta ) : ''
|
79 |
+
);
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
inc/meta-box/inc/fields/password.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_Password_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Password_Field extends RWMB_Text_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Get field HTML
|
14 |
+
*
|
15 |
+
* @param mixed $meta
|
16 |
+
* @param array $field
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
static function html( $meta, $field )
|
21 |
+
{
|
22 |
+
return sprintf(
|
23 |
+
'<input type="password" class="rwmb-password" name="%s" id="%s" value="%s" size="%s" />',
|
24 |
+
$field['field_name'],
|
25 |
+
$field['id'],
|
26 |
+
$meta,
|
27 |
+
$field['size']
|
28 |
+
);
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
inc/meta-box/inc/fields/plupload-image.php
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
require_once TX_RWMB_FIELDS_DIR . 'image.php';
|
5 |
+
if ( ! class_exists( 'RWMB_Plupload_Image_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Plupload_Image_Field extends RWMB_Image_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Add field actions
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function add_actions()
|
15 |
+
{
|
16 |
+
parent::add_actions();
|
17 |
+
add_action( 'wp_ajax_rwmb_plupload_image_upload', array( __CLASS__, 'handle_upload' ) );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Upload
|
22 |
+
* Ajax callback function
|
23 |
+
*
|
24 |
+
* @return string Error or (XML-)response
|
25 |
+
*/
|
26 |
+
static function handle_upload()
|
27 |
+
{
|
28 |
+
global $wpdb;
|
29 |
+
$post_id = isset( $_REQUEST['post_id'] ) ? intval( $_REQUEST['post_id'] ) : 0;
|
30 |
+
$field_id = isset( $_REQUEST['field_id'] ) ? $_REQUEST['field_id'] : '';
|
31 |
+
|
32 |
+
check_ajax_referer( "rwmb-upload-images_{$field_id}" );
|
33 |
+
|
34 |
+
// You can use WP's wp_handle_upload() function:
|
35 |
+
$file = $_FILES['async-upload'];
|
36 |
+
$file_attr = wp_handle_upload( $file, array( 'test_form' => false ) );
|
37 |
+
//Get next menu_order
|
38 |
+
$meta = get_post_meta( $post_id, $field_id, false );
|
39 |
+
if ( empty( $meta ) )
|
40 |
+
{
|
41 |
+
$next = 0;
|
42 |
+
}
|
43 |
+
else
|
44 |
+
{
|
45 |
+
$meta = implode( ',', (array) $meta );
|
46 |
+
$max = $wpdb->get_var( "
|
47 |
+
SELECT MAX(menu_order) FROM {$wpdb->posts}
|
48 |
+
WHERE post_type = 'attachment'
|
49 |
+
AND ID in ({$meta})
|
50 |
+
" );
|
51 |
+
$next = is_numeric( $max ) ? (int) $max + 1 : 0;
|
52 |
+
}
|
53 |
+
|
54 |
+
$attachment = array(
|
55 |
+
'guid' => $file_attr['url'],
|
56 |
+
'post_mime_type' => $file_attr['type'],
|
57 |
+
'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $file['name'] ) ),
|
58 |
+
'post_content' => '',
|
59 |
+
'post_status' => 'inherit',
|
60 |
+
'menu_order' => $next,
|
61 |
+
);
|
62 |
+
|
63 |
+
// Adds file as attachment to WordPress
|
64 |
+
$id = wp_insert_attachment( $attachment, $file_attr['file'], $post_id );
|
65 |
+
if ( ! is_wp_error( $id ) )
|
66 |
+
{
|
67 |
+
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file_attr['file'] ) );
|
68 |
+
|
69 |
+
// Save file ID in meta field
|
70 |
+
add_post_meta( $post_id, $field_id, $id, false );
|
71 |
+
wp_send_json_success( self::img_html( $id ) );
|
72 |
+
}
|
73 |
+
|
74 |
+
exit;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Enqueue scripts and styles
|
79 |
+
*
|
80 |
+
* @return void
|
81 |
+
*/
|
82 |
+
static function admin_enqueue_scripts()
|
83 |
+
{
|
84 |
+
// Enqueue same scripts and styles as for file field
|
85 |
+
parent::admin_enqueue_scripts();
|
86 |
+
wp_enqueue_style( 'rwmb-plupload-image', TX_RWMB_CSS_URL . 'plupload-image.css', array( 'wp-admin' ), TX_RWMB_VER );
|
87 |
+
wp_enqueue_script( 'rwmb-plupload-image', TX_RWMB_JS_URL . 'plupload-image.js', array( 'jquery-ui-sortable', 'wp-ajax-response', 'plupload-all' ), TX_RWMB_VER, true );
|
88 |
+
wp_localize_script( 'rwmb-plupload-image', 'RWMB', array( 'url' => RWMB_URL ) );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get field HTML
|
93 |
+
*
|
94 |
+
* @param mixed $meta
|
95 |
+
* @param array $field
|
96 |
+
*
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
static function html( $meta, $field )
|
100 |
+
{
|
101 |
+
if ( ! is_array( $meta ) )
|
102 |
+
$meta = ( array ) $meta;
|
103 |
+
|
104 |
+
// Filter to change the drag & drop box background string
|
105 |
+
$i18n_drop = apply_filters( 'rwmb_plupload_image_drop_string', _x( 'Drop images here', 'image upload', 'meta-box' ), $field );
|
106 |
+
$i18n_or = apply_filters( 'rwmb_plupload_image_or_string', _x( 'or', 'image upload', 'meta-box' ), $field );
|
107 |
+
$i18n_select = apply_filters( 'rwmb_plupload_image_select_string', _x( 'Select Files', 'image upload', 'meta-box' ), $field );
|
108 |
+
|
109 |
+
// Uploaded images
|
110 |
+
|
111 |
+
// Check for max_file_uploads
|
112 |
+
$classes = array( 'rwmb-drag-drop', 'drag-drop', 'hide-if-no-js', 'new-files' );
|
113 |
+
if ( ! empty( $field['max_file_uploads'] ) && count( $meta ) >= (int) $field['max_file_uploads'] )
|
114 |
+
$classes[] = 'hidden';
|
115 |
+
|
116 |
+
|
117 |
+
$html = self::get_uploaded_images( $meta, $field );
|
118 |
+
|
119 |
+
// Show form upload
|
120 |
+
$html .= sprintf(
|
121 |
+
'<div id="%s-dragdrop" class="%s" data-upload_nonce="%s" data-js_options="%s">
|
122 |
+
<div class = "drag-drop-inside">
|
123 |
+
<p class="drag-drop-info">%s</p>
|
124 |
+
<p>%s</p>
|
125 |
+
<p class="drag-drop-buttons"><input id="%s-browse-button" type="button" value="%s" class="button" /></p>
|
126 |
+
</div>
|
127 |
+
</div>',
|
128 |
+
$field['id'],
|
129 |
+
implode( ' ', $classes ),
|
130 |
+
wp_create_nonce( "rwmb-upload-images_{$field['id']}" ),
|
131 |
+
esc_attr( json_encode( $field['js_options'] ) ),
|
132 |
+
$i18n_drop,
|
133 |
+
$i18n_or,
|
134 |
+
$field['id'],
|
135 |
+
$i18n_select
|
136 |
+
);
|
137 |
+
|
138 |
+
return $html;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Get field value
|
143 |
+
* It's the combination of new (uploaded) images and saved images
|
144 |
+
*
|
145 |
+
* @param array $new
|
146 |
+
* @param array $old
|
147 |
+
* @param int $post_id
|
148 |
+
* @param array $field
|
149 |
+
*
|
150 |
+
* @return array|mixed
|
151 |
+
*/
|
152 |
+
static function value( $new, $old, $post_id, $field )
|
153 |
+
{
|
154 |
+
$new = (array) $new;
|
155 |
+
|
156 |
+
return array_unique( array_merge( $old, $new ) );
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Normalize parameters for field
|
161 |
+
*
|
162 |
+
* @param array $field
|
163 |
+
*
|
164 |
+
* @return array
|
165 |
+
*/
|
166 |
+
static function normalize_field( $field )
|
167 |
+
{
|
168 |
+
$field['js_options'] = array(
|
169 |
+
'runtimes' => 'html5,silverlight,flash,html4',
|
170 |
+
'file_data_name' => 'async-upload',
|
171 |
+
//'container' => $field['id'] . '-container',
|
172 |
+
'browse_button' => $field['id'] . '-browse-button',
|
173 |
+
'drop_element' => $field['id'] . '-dragdrop',
|
174 |
+
'multiple_queues' => true,
|
175 |
+
'max_file_size' => wp_max_upload_size() . 'b',
|
176 |
+
'url' => admin_url( 'admin-ajax.php' ),
|
177 |
+
'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
|
178 |
+
'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
|
179 |
+
'multipart' => true,
|
180 |
+
'urlstream_upload' => true,
|
181 |
+
'filters' => array(
|
182 |
+
array(
|
183 |
+
'title' => _x( 'Allowed Image Files', 'image upload', 'meta-box' ),
|
184 |
+
'extensions' => 'jpg,jpeg,gif,png',
|
185 |
+
),
|
186 |
+
),
|
187 |
+
'multipart_params' => array(
|
188 |
+
'field_id' => $field['id'],
|
189 |
+
'action' => 'rwmb_plupload_image_upload',
|
190 |
+
)
|
191 |
+
);
|
192 |
+
$field = parent::normalize_field( $field );
|
193 |
+
|
194 |
+
return $field;
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
inc/meta-box/inc/fields/post.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "select" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'select-advanced.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_Post_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Post_Field extends RWMB_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get field HTML
|
24 |
+
*
|
25 |
+
* @param mixed $meta
|
26 |
+
* @param array $field
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
static function html( $meta, $field )
|
31 |
+
{
|
32 |
+
$field['options'] = self::get_options( $field );
|
33 |
+
switch ( $field['field_type'] )
|
34 |
+
{
|
35 |
+
case 'select':
|
36 |
+
return RWMB_Select_Field::html( $meta, $field );
|
37 |
+
case 'select_advanced':
|
38 |
+
default:
|
39 |
+
return RWMB_Select_Advanced_Field::html( $meta, $field );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Normalize parameters for field
|
45 |
+
*
|
46 |
+
* @param array $field
|
47 |
+
*
|
48 |
+
* @return array
|
49 |
+
*/
|
50 |
+
static function normalize_field( $field )
|
51 |
+
{
|
52 |
+
$default_post_type = __( 'Post', 'meta-box' );
|
53 |
+
if ( is_string( $field['post_type'] ) )
|
54 |
+
{
|
55 |
+
$post_type_object = get_post_type_object( $field['post_type'] );
|
56 |
+
$default_post_type = $post_type_object->labels->singular_name;
|
57 |
+
}
|
58 |
+
|
59 |
+
$field = wp_parse_args( $field, array(
|
60 |
+
'post_type' => 'post',
|
61 |
+
'field_type' => 'select_advanced',
|
62 |
+
'parent' => false,
|
63 |
+
'query_args' => array(),
|
64 |
+
) );
|
65 |
+
|
66 |
+
$field['std'] = empty( $field['std'] ) ? sprintf( __( 'Select a %s', 'meta-box' ), $default_post_type ) : $field['std'];
|
67 |
+
|
68 |
+
if ( $field['parent'] )
|
69 |
+
{
|
70 |
+
$field['multiple'] = false;
|
71 |
+
$field['field_name'] = 'parent_id';
|
72 |
+
}
|
73 |
+
|
74 |
+
$field['query_args'] = wp_parse_args( $field['query_args'], array(
|
75 |
+
'post_type' => $field['post_type'],
|
76 |
+
'post_status' => 'publish',
|
77 |
+
'posts_per_page' => - 1,
|
78 |
+
) );
|
79 |
+
|
80 |
+
switch ( $field['field_type'] )
|
81 |
+
{
|
82 |
+
case 'select':
|
83 |
+
return RWMB_Select_Field::normalize_field( $field );
|
84 |
+
break;
|
85 |
+
case 'select_advanced':
|
86 |
+
default:
|
87 |
+
return RWMB_Select_Advanced_Field::normalize_field( $field );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get meta value
|
93 |
+
* If field is cloneable, value is saved as a single entry in DB
|
94 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
95 |
+
*
|
96 |
+
* @see "save" method for better understanding
|
97 |
+
*
|
98 |
+
* @param $post_id
|
99 |
+
* @param $saved
|
100 |
+
* @param $field
|
101 |
+
*
|
102 |
+
* @return array
|
103 |
+
*/
|
104 |
+
static function meta( $post_id, $saved, $field )
|
105 |
+
{
|
106 |
+
if ( isset( $field['parent'] ) && $field['parent'] )
|
107 |
+
{
|
108 |
+
$post = get_post( $post_id );
|
109 |
+
|
110 |
+
return $post->post_parent;
|
111 |
+
}
|
112 |
+
|
113 |
+
return RWMB_Select_Field::meta( $post_id, $saved, $field );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Save meta value
|
118 |
+
* If field is cloneable, value is saved as a single entry in DB
|
119 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
120 |
+
*
|
121 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
122 |
+
*
|
123 |
+
* @param $new
|
124 |
+
* @param $old
|
125 |
+
* @param $post_id
|
126 |
+
* @param $field
|
127 |
+
*/
|
128 |
+
static function save( $new, $old, $post_id, $field )
|
129 |
+
{
|
130 |
+
return RWMB_Select_Field::save( $new, $old, $post_id, $field );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Get posts
|
135 |
+
*
|
136 |
+
* @param array $field
|
137 |
+
*
|
138 |
+
* @return array
|
139 |
+
*/
|
140 |
+
static function get_options( $field )
|
141 |
+
{
|
142 |
+
$options = array();
|
143 |
+
$query = new WP_Query( $field['query_args'] );
|
144 |
+
if ( $query->have_posts() )
|
145 |
+
{
|
146 |
+
while ( $query->have_posts() )
|
147 |
+
{
|
148 |
+
$post = $query->next_post();
|
149 |
+
$options[$post->ID] = $post->post_title;
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
return $options;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
inc/meta-box/inc/fields/radio.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Radio_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Radio_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
$html = array();
|
20 |
+
$tpl = '<label><input type="radio" class="rwmb-radio" name="%s" value="%s"%s> %s</label>';
|
21 |
+
|
22 |
+
foreach ( $field['options'] as $value => $label )
|
23 |
+
{
|
24 |
+
$html[] = sprintf(
|
25 |
+
$tpl,
|
26 |
+
$field['field_name'],
|
27 |
+
$value,
|
28 |
+
checked( $value, $meta, false ),
|
29 |
+
$label
|
30 |
+
);
|
31 |
+
}
|
32 |
+
|
33 |
+
return implode( ' ', $html );
|
34 |
+
}
|
35 |
+
}
|
36 |
+
}
|
inc/meta-box/inc/fields/range.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Range_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Range_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-range', TX_RWMB_CSS_URL . 'range.css', array(), TX_RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML
|
21 |
+
*
|
22 |
+
* @param mixed $meta
|
23 |
+
* @param array $field
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
static function html( $meta, $field )
|
28 |
+
{
|
29 |
+
return sprintf(
|
30 |
+
'<input type="range" class="rwmb-range" name="%s" id="%s" value="%s" min="%s" max="%s" step="%s" />',
|
31 |
+
$field['field_name'],
|
32 |
+
$field['id'],
|
33 |
+
$meta,
|
34 |
+
$field['min'],
|
35 |
+
$field['max'],
|
36 |
+
$field['step']
|
37 |
+
);
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Normalize parameters for field.
|
42 |
+
*
|
43 |
+
* @param array $field
|
44 |
+
*
|
45 |
+
* @return array
|
46 |
+
*/
|
47 |
+
static function normalize_field( $field )
|
48 |
+
{
|
49 |
+
$field = wp_parse_args( $field, array(
|
50 |
+
'min' => 0,
|
51 |
+
'max' => 10,
|
52 |
+
'step' => 1,
|
53 |
+
) );
|
54 |
+
|
55 |
+
return $field;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Ensure number in range.
|
60 |
+
*
|
61 |
+
* @param mixed $new
|
62 |
+
* @param mixed $old
|
63 |
+
* @param int $post_id
|
64 |
+
* @param array $field
|
65 |
+
*
|
66 |
+
* @return int
|
67 |
+
*/
|
68 |
+
static function value( $new, $old, $post_id, $field )
|
69 |
+
{
|
70 |
+
$new = intval( $new );
|
71 |
+
$min = intval( $field['min'] );
|
72 |
+
$max = intval( $field['max'] );
|
73 |
+
|
74 |
+
if ( $new < $min )
|
75 |
+
{
|
76 |
+
return $min;
|
77 |
+
}
|
78 |
+
elseif ( $new > $max )
|
79 |
+
{
|
80 |
+
return $max;
|
81 |
+
}
|
82 |
+
|
83 |
+
return $new;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
inc/meta-box/inc/fields/select-advanced.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "select" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'select.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_Select_Advanced_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_Select_Advanced_Field extends RWMB_Select_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
wp_enqueue_style( 'select2', TX_RWMB_CSS_URL . 'select2/select2.css', array(), '3.2' );
|
20 |
+
wp_enqueue_style( 'rwmb-select-advanced', TX_RWMB_CSS_URL . 'select-advanced.css', array(), TX_RWMB_VER );
|
21 |
+
|
22 |
+
wp_register_script( 'select2', TX_RWMB_JS_URL . 'select2/select2.min.js', array(), '3.2', true );
|
23 |
+
wp_enqueue_script( 'rwmb-select-advanced', TX_RWMB_JS_URL . 'select-advanced.js', array( 'select2' ), TX_RWMB_VER, true );
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get field HTML
|
28 |
+
*
|
29 |
+
* @param mixed $meta
|
30 |
+
* @param array $field
|
31 |
+
*
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
static function html( $meta, $field )
|
35 |
+
{
|
36 |
+
$html = sprintf(
|
37 |
+
'<select class="rwmb-select-advanced" name="%s" id="%s" size="%s"%s data-options="%s">',
|
38 |
+
$field['field_name'],
|
39 |
+
$field['id'],
|
40 |
+
$field['size'],
|
41 |
+
$field['multiple'] ? ' multiple="multiple"' : '',
|
42 |
+
esc_attr( json_encode( $field['js_options'] ) )
|
43 |
+
);
|
44 |
+
|
45 |
+
$html .= self::options_html( $field, $meta );
|
46 |
+
|
47 |
+
$html .= '</select>';
|
48 |
+
|
49 |
+
return $html;
|
50 |
+
}
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Normalize parameters for field
|
54 |
+
*
|
55 |
+
* @param array $field
|
56 |
+
*
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
static function normalize_field( $field )
|
60 |
+
{
|
61 |
+
$field = parent::normalize_field( $field );
|
62 |
+
|
63 |
+
$field = wp_parse_args( $field, array(
|
64 |
+
'js_options' => array(),
|
65 |
+
) );
|
66 |
+
|
67 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
68 |
+
'allowClear' => true,
|
69 |
+
'width' => 'resolve',
|
70 |
+
'placeholder' => $field['placeholder'],
|
71 |
+
) );
|
72 |
+
|
73 |
+
return $field;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
inc/meta-box/inc/fields/select.php
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Select_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Select_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
wp_enqueue_style( 'rwmb-select', TX_RWMB_CSS_URL . 'select.css', array(), TX_RWMB_VER );
|
17 |
+
}
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get field HTML
|
21 |
+
*
|
22 |
+
* @param mixed $meta
|
23 |
+
* @param array $field
|
24 |
+
*
|
25 |
+
* @return string
|
26 |
+
*/
|
27 |
+
static function html( $meta, $field )
|
28 |
+
{
|
29 |
+
$html = sprintf(
|
30 |
+
'<select class="rwmb-select" name="%s" id="%s" size="%s"%s>',
|
31 |
+
$field['field_name'],
|
32 |
+
$field['id'],
|
33 |
+
$field['size'],
|
34 |
+
$field['multiple'] ? ' multiple="multiple"' : ''
|
35 |
+
);
|
36 |
+
|
37 |
+
$html .= self::options_html( $field, $meta );
|
38 |
+
|
39 |
+
$html .= '</select>';
|
40 |
+
|
41 |
+
return $html;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Get meta value
|
46 |
+
* If field is cloneable, value is saved as a single entry in DB
|
47 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
48 |
+
*
|
49 |
+
* @see "save" method for better understanding
|
50 |
+
*
|
51 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
52 |
+
*
|
53 |
+
* @param $post_id
|
54 |
+
* @param $saved
|
55 |
+
* @param $field
|
56 |
+
*
|
57 |
+
* @return array
|
58 |
+
*/
|
59 |
+
static function meta( $post_id, $saved, $field )
|
60 |
+
{
|
61 |
+
$single = $field['clone'] || ! $field['multiple'];
|
62 |
+
$meta = get_post_meta( $post_id, $field['id'], $single );
|
63 |
+
$meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
64 |
+
|
65 |
+
$meta = array_map( 'esc_attr', (array) $meta );
|
66 |
+
|
67 |
+
return $meta;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Save meta value
|
72 |
+
* If field is cloneable, value is saved as a single entry in DB
|
73 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
74 |
+
*
|
75 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
76 |
+
*
|
77 |
+
* @param $new
|
78 |
+
* @param $old
|
79 |
+
* @param $post_id
|
80 |
+
* @param $field
|
81 |
+
*/
|
82 |
+
static function save( $new, $old, $post_id, $field )
|
83 |
+
{
|
84 |
+
if ( ! $field['clone'] )
|
85 |
+
{
|
86 |
+
parent::save( $new, $old, $post_id, $field );
|
87 |
+
|
88 |
+
return;
|
89 |
+
}
|
90 |
+
|
91 |
+
if ( empty( $new ) )
|
92 |
+
delete_post_meta( $post_id, $field['id'] );
|
93 |
+
else
|
94 |
+
update_post_meta( $post_id, $field['id'], $new );
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Normalize parameters for field
|
99 |
+
*
|
100 |
+
* @param array $field
|
101 |
+
*
|
102 |
+
* @return array
|
103 |
+
*/
|
104 |
+
static function normalize_field( $field )
|
105 |
+
{
|
106 |
+
$field = wp_parse_args( $field, array(
|
107 |
+
'desc' => '',
|
108 |
+
'name' => $field['id'],
|
109 |
+
'size' => $field['multiple'] ? 5 : 0,
|
110 |
+
'placeholder' => '',
|
111 |
+
) );
|
112 |
+
if ( ! $field['clone'] && $field['multiple'] )
|
113 |
+
$field['field_name'] .= '[]';
|
114 |
+
|
115 |
+
return $field;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Creates html for options
|
120 |
+
*
|
121 |
+
* @param array $field
|
122 |
+
* @param mixed $meta
|
123 |
+
*
|
124 |
+
* @return array
|
125 |
+
*/
|
126 |
+
static function options_html( $field, $meta )
|
127 |
+
{
|
128 |
+
$html = '';
|
129 |
+
if ( $field['placeholder'] )
|
130 |
+
$html = 'select' == $field['type'] ? "<option value=''>{$field['placeholder']}</option>" : '<option></option>';
|
131 |
+
|
132 |
+
$option = '<option value="%s"%s>%s</option>';
|
133 |
+
|
134 |
+
foreach ( $field['options'] as $value => $label )
|
135 |
+
{
|
136 |
+
$html .= sprintf(
|
137 |
+
$option,
|
138 |
+
$value,
|
139 |
+
selected( in_array( $value, (array) $meta ), true, false ),
|
140 |
+
$label
|
141 |
+
);
|
142 |
+
}
|
143 |
+
|
144 |
+
return $html;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
inc/meta-box/inc/fields/slider.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Slider_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Slider_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
$url = TX_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', TX_RWMB_CSS_URL . 'slider.css' );
|
21 |
+
|
22 |
+
wp_enqueue_script( 'rwmb-slider', TX_RWMB_JS_URL . 'slider.js', array( 'jquery-ui-slider', 'jquery-ui-widget', 'jquery-ui-mouse', 'jquery-ui-core' ), TX_RWMB_VER, true );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get div HTML
|
27 |
+
*
|
28 |
+
* @param mixed $meta
|
29 |
+
* @param array $field
|
30 |
+
*
|
31 |
+
* @return string
|
32 |
+
*/
|
33 |
+
static function html( $meta, $field )
|
34 |
+
{
|
35 |
+
return sprintf(
|
36 |
+
'<div class="clearfix">
|
37 |
+
<div class="rwmb-slider" id="%s" data-options="%s"></div>
|
38 |
+
<span class="rwmb-slider-value-label">%s<span>%s</span>%s</span>
|
39 |
+
<input type="hidden" name="%s" value="%s" class="rwmb-slider-value">
|
40 |
+
</div>',
|
41 |
+
$field['id'], esc_attr( json_encode( $field['js_options'] ) ),
|
42 |
+
$field['prefix'], $meta, $field['suffix'],
|
43 |
+
$field['field_name'], $meta
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Normalize parameters for field
|
49 |
+
*
|
50 |
+
* @param array $field
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
static function normalize_field( $field )
|
55 |
+
{
|
56 |
+
$field = wp_parse_args( $field, array(
|
57 |
+
'prefix' => '',
|
58 |
+
'suffix' => '',
|
59 |
+
'js_options' => array(),
|
60 |
+
) );
|
61 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
62 |
+
'range' => 'min', // range = 'min' will add a dark background to sliding part, better UI
|
63 |
+
) );
|
64 |
+
|
65 |
+
return $field;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
inc/meta-box/inc/fields/taxonomy-advanced.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
require_once TX_RWMB_FIELDS_DIR . 'taxonomy.php';
|
5 |
+
|
6 |
+
if ( ! class_exists( 'RWMB_Taxonomy_Advanced_Field' ) )
|
7 |
+
{
|
8 |
+
class RWMB_Taxonomy_Advanced_Field extends RWMB_Taxonomy_Field
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Get meta values to save
|
12 |
+
* Save terms in custom field, no more by setting post terms
|
13 |
+
* Save in form of comma-separated IDs
|
14 |
+
*
|
15 |
+
* @param mixed $new
|
16 |
+
* @param mixed $old
|
17 |
+
* @param int $post_id
|
18 |
+
* @param array $field
|
19 |
+
*
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
static function value( $new, $old, $post_id, $field )
|
23 |
+
{
|
24 |
+
return implode( ',', array_unique( $new ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Save meta value
|
29 |
+
*
|
30 |
+
* @param mixed $new
|
31 |
+
* @param mixed $old
|
32 |
+
* @param int $post_id
|
33 |
+
* @param array $field
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
static function save( $new, $old, $post_id, $field )
|
38 |
+
{
|
39 |
+
if ( $new )
|
40 |
+
update_post_meta( $post_id, $field['id'], $new );
|
41 |
+
else
|
42 |
+
delete_post_meta( $post_id, $field['id'] );
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Standard meta retrieval
|
47 |
+
*
|
48 |
+
* @param int $post_id
|
49 |
+
* @param bool $saved
|
50 |
+
* @param array $field
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
static function meta( $post_id, $saved, $field )
|
55 |
+
{
|
56 |
+
$meta = get_post_meta( $post_id, $field['id'], true );
|
57 |
+
$meta = array_map( 'intval', array_filter( explode( ',', $meta . ',' ) ) );
|
58 |
+
|
59 |
+
return $meta;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
inc/meta-box/inc/fields/taxonomy.php
ADDED
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
require_once TX_RWMB_FIELDS_DIR . 'select-advanced.php';
|
5 |
+
require_once TX_RWMB_FIELDS_DIR . 'checkbox-list.php';
|
6 |
+
|
7 |
+
if ( ! class_exists( 'RWMB_Taxonomy_Field' ) )
|
8 |
+
{
|
9 |
+
class RWMB_Taxonomy_Field extends RWMB_Field
|
10 |
+
{
|
11 |
+
/**
|
12 |
+
* Enqueue scripts and styles
|
13 |
+
*
|
14 |
+
* @return void
|
15 |
+
*/
|
16 |
+
static function admin_enqueue_scripts()
|
17 |
+
{
|
18 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
19 |
+
wp_enqueue_style( 'rwmb-taxonomy', TX_RWMB_CSS_URL . 'taxonomy.css', array(), TX_RWMB_VER );
|
20 |
+
wp_enqueue_script( 'rwmb-taxonomy', TX_RWMB_JS_URL . 'taxonomy.js', array( 'jquery', 'rwmb-select-advanced', 'wp-ajax-response' ), TX_RWMB_VER, true );
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Add default value for 'taxonomy' field
|
25 |
+
*
|
26 |
+
* @param $field
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
static function normalize_field( $field )
|
31 |
+
{
|
32 |
+
$default_args = array(
|
33 |
+
'hide_empty' => false,
|
34 |
+
);
|
35 |
+
|
36 |
+
// Set default args
|
37 |
+
$field['options']['args'] = ! isset( $field['options']['args'] ) ? $default_args : wp_parse_args( $field['options']['args'], $default_args );
|
38 |
+
|
39 |
+
$tax = get_taxonomy( $field['options']['taxonomy'] );
|
40 |
+
$field['placeholder'] = empty( $field['placeholder'] ) ? sprintf( __( 'Select a %s', 'meta-box' ), $tax->labels->singular_name ) : $field['placeholder'];
|
41 |
+
|
42 |
+
switch ( $field['options']['type'] )
|
43 |
+
{
|
44 |
+
case 'select_advanced':
|
45 |
+
$field = RWMB_Select_Advanced_Field::normalize_field( $field );
|
46 |
+
break;
|
47 |
+
case 'checkbox_list':
|
48 |
+
case 'checkbox_tree':
|
49 |
+
$field = RWMB_Checkbox_List_Field::normalize_field( $field );
|
50 |
+
break;
|
51 |
+
case 'select':
|
52 |
+
case 'select_tree':
|
53 |
+
$field = RWMB_Select_Field::normalize_field( $field );
|
54 |
+
break;
|
55 |
+
default:
|
56 |
+
$field['options']['type'] = 'select';
|
57 |
+
$field = RWMB_Select_Field::normalize_field( $field );
|
58 |
+
}
|
59 |
+
|
60 |
+
if ( in_array( $field['options']['type'], array( 'checkbox_tree', 'select_tree' ) ) )
|
61 |
+
{
|
62 |
+
if ( isset( $field['options']['args']['parent'] ) )
|
63 |
+
{
|
64 |
+
$field['options']['parent'] = $field['options']['args']['parent'];
|
65 |
+
unset( $field['options']['args']['parent'] );
|
66 |
+
}
|
67 |
+
else
|
68 |
+
{
|
69 |
+
$field['options']['parent'] = 0;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
$field['field_name'] = "{$field['id']}[]";
|
74 |
+
|
75 |
+
return $field;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get field HTML
|
80 |
+
*
|
81 |
+
* @param $field
|
82 |
+
* @param $meta
|
83 |
+
*
|
84 |
+
* @return string
|
85 |
+
*/
|
86 |
+
static function html( $meta, $field )
|
87 |
+
{
|
88 |
+
$options = $field['options'];
|
89 |
+
$terms = get_terms( $options['taxonomy'], $options['args'] );
|
90 |
+
|
91 |
+
$field['options'] = self::get_options( $terms );
|
92 |
+
|
93 |
+
$html = '';
|
94 |
+
|
95 |
+
switch ( $options['type'] )
|
96 |
+
{
|
97 |
+
case 'checkbox_list':
|
98 |
+
$html = RWMB_Checkbox_List_Field::html( $meta, $field );
|
99 |
+
break;
|
100 |
+
case 'checkbox_tree':
|
101 |
+
$elements = self::process_terms( $terms );
|
102 |
+
$html .= self::walk_checkbox_tree( $meta, $field, $elements, $options['parent'], true );
|
103 |
+
break;
|
104 |
+
case 'select_tree':
|
105 |
+
$elements = self::process_terms( $terms );
|
106 |
+
$html .= self::walk_select_tree( $meta, $field, $elements, $options['parent'], true );
|
107 |
+
break;
|
108 |
+
case 'select_advanced':
|
109 |
+
$html = RWMB_Select_Advanced_Field::html( $meta, $field );
|
110 |
+
break;
|
111 |
+
case 'select':
|
112 |
+
default:
|
113 |
+
$html = RWMB_Select_Field::html( $meta, $field );
|
114 |
+
}
|
115 |
+
|
116 |
+
return $html;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Walker for displaying checkboxes in tree format
|
121 |
+
*
|
122 |
+
* @param $meta
|
123 |
+
* @param $field
|
124 |
+
* @param $elements
|
125 |
+
* @param int $parent
|
126 |
+
* @param bool $active
|
127 |
+
*
|
128 |
+
* @return string
|
129 |
+
*/
|
130 |
+
static function walk_checkbox_tree( $meta, $field, $elements, $parent = 0, $active = false )
|
131 |
+
{
|
132 |
+
if ( ! isset( $elements[$parent] ) )
|
133 |
+
return;
|
134 |
+
$terms = $elements[$parent];
|
135 |
+
$field['options'] = self::get_options( $terms );
|
136 |
+
$hidden = $active ? '' : 'hidden';
|
137 |
+
|
138 |
+
$html = "<ul class = 'rw-taxonomy-tree {$hidden}'>";
|
139 |
+
$li = '<li><label><input type="checkbox" name="%s" value="%s"%s> %s</label>';
|
140 |
+
foreach ( $terms as $term )
|
141 |
+
{
|
142 |
+
$html .= sprintf(
|
143 |
+
$li,
|
144 |
+
$field['field_name'],
|
145 |
+
$term->term_id,
|
146 |
+
checked( in_array( $term->term_id, $meta ), true, false ),
|
147 |
+
$term->name
|
148 |
+
);
|
149 |
+
$html .= self::walk_checkbox_tree( $meta, $field, $elements, $term->term_id, $active && in_array( $term->term_id, $meta ) ) . '</li>';
|
150 |
+
}
|
151 |
+
$html .= '</ul>';
|
152 |
+
|
153 |
+
return $html;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Walker for displaying select in tree format
|
158 |
+
*
|
159 |
+
* @param $meta
|
160 |
+
* @param $field
|
161 |
+
* @param $elements
|
162 |
+
* @param int $parent
|
163 |
+
* @param bool $active
|
164 |
+
*
|
165 |
+
* @return string
|
166 |
+
*/
|
167 |
+
static function walk_select_tree( $meta, $field, $elements, $parent = 0, $active = false )
|
168 |
+
{
|
169 |
+
if ( ! isset( $elements[$parent] ) )
|
170 |
+
return;
|
171 |
+
$terms = $elements[$parent];
|
172 |
+
$field['options'] = self::get_options( $terms );
|
173 |
+
|
174 |
+
$classes = array( 'rw-taxonomy-tree' );
|
175 |
+
$classes[] = $active ? 'active' : 'disabled';
|
176 |
+
$classes[] = "rwmb-taxonomy-{$parent}";
|
177 |
+
|
178 |
+
$html = '<div class="' . implode( ' ', $classes ) . '">';
|
179 |
+
$html .= RWMB_Select_Field::html( $meta, $field );
|
180 |
+
foreach ( $terms as $term )
|
181 |
+
{
|
182 |
+
$html .= self::walk_select_tree( $meta, $field, $elements, $term->term_id, $active && in_array( $term->term_id, $meta ) );
|
183 |
+
}
|
184 |
+
$html .= '</div>';
|
185 |
+
|
186 |
+
return $html;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Processes terms into indexed array for walker functions
|
191 |
+
*
|
192 |
+
* @param $terms
|
193 |
+
*
|
194 |
+
* @internal param $field
|
195 |
+
* @return array
|
196 |
+
*/
|
197 |
+
static function process_terms( $terms )
|
198 |
+
{
|
199 |
+
$elements = array();
|
200 |
+
foreach ( $terms as $term )
|
201 |
+
{
|
202 |
+
$elements[$term->parent][] = $term;
|
203 |
+
}
|
204 |
+
|
205 |
+
return $elements;
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* Get options for selects, checkbox list, etc via the terms
|
210 |
+
*
|
211 |
+
* @param array $terms Array of term objects
|
212 |
+
*
|
213 |
+
* @return array
|
214 |
+
*/
|
215 |
+
static function get_options( $terms = array() )
|
216 |
+
{
|
217 |
+
$options = array();
|
218 |
+
foreach ( $terms as $term )
|
219 |
+
{
|
220 |
+
$options[$term->term_id] = $term->name;
|
221 |
+
}
|
222 |
+
|
223 |
+
return $options;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Save meta value
|
228 |
+
*
|
229 |
+
* @param mixed $new
|
230 |
+
* @param mixed $old
|
231 |
+
* @param int $post_id
|
232 |
+
* @param array $field
|
233 |
+
*
|
234 |
+
* @return string
|
235 |
+
*/
|
236 |
+
static function save( $new, $old, $post_id, $field )
|
237 |
+
{
|
238 |
+
$new = array_unique( array_map( 'intval', (array) $new ) );
|
239 |
+
$new = empty( $new ) ? null : $new;
|
240 |
+
wp_set_object_terms( $post_id, $new, $field['options']['taxonomy'] );
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* Standard meta retrieval
|
245 |
+
*
|
246 |
+
* @param int $post_id
|
247 |
+
* @param bool $saved
|
248 |
+
* @param array $field
|
249 |
+
*
|
250 |
+
* @return array
|
251 |
+
*/
|
252 |
+
static function meta( $post_id, $saved, $field )
|
253 |
+
{
|
254 |
+
$options = $field['options'];
|
255 |
+
|
256 |
+
$meta = wp_get_post_terms( $post_id, $options['taxonomy'] );
|
257 |
+
$meta = is_array( $meta ) ? $meta : (array) $meta;
|
258 |
+
$meta = wp_list_pluck( $meta, 'term_id' );
|
259 |
+
|
260 |
+
return $meta;
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
inc/meta-box/inc/fields/text-list.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Text_List_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Text_List_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
$html = '';
|
20 |
+
$input = '<label><input type="text" class="rwmb-text-list" name="%s" id="%s" value="%s" placeholder="%s" /> %s</label>';
|
21 |
+
|
22 |
+
$i = 0;
|
23 |
+
foreach ( $field['options'] as $value => $label )
|
24 |
+
{
|
25 |
+
$html .= sprintf(
|
26 |
+
$input,
|
27 |
+
$field['field_name'],
|
28 |
+
$field['id'],
|
29 |
+
$meta[$i],
|
30 |
+
$value,
|
31 |
+
$label
|
32 |
+
);
|
33 |
+
$i ++;
|
34 |
+
}
|
35 |
+
|
36 |
+
return $html;
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get meta value
|
41 |
+
* If field is cloneable, value is saved as a single entry in DB
|
42 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
43 |
+
*
|
44 |
+
* @see "save" method for better understanding
|
45 |
+
*
|
46 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
47 |
+
*
|
48 |
+
* @param $post_id
|
49 |
+
* @param $saved
|
50 |
+
* @param $field
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
static function meta( $post_id, $saved, $field )
|
55 |
+
{
|
56 |
+
$single = $field['clone'] || ! $field['multiple'];
|
57 |
+
$meta = get_post_meta( $post_id, $field['id'], $single );
|
58 |
+
$meta = ( ! $saved && '' === $meta || array() === $meta ) ? $field['std'] : $meta;
|
59 |
+
|
60 |
+
$meta = array_map( 'esc_attr', (array) $meta );
|
61 |
+
|
62 |
+
return $meta;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Save meta value
|
67 |
+
* If field is cloneable, value is saved as a single entry in DB
|
68 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
69 |
+
*
|
70 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
71 |
+
*
|
72 |
+
* @param $new
|
73 |
+
* @param $old
|
74 |
+
* @param $post_id
|
75 |
+
* @param $field
|
76 |
+
*/
|
77 |
+
static function save( $new, $old, $post_id, $field )
|
78 |
+
{
|
79 |
+
if ( ! $field['clone'] )
|
80 |
+
{
|
81 |
+
parent::save( $new, $old, $post_id, $field );
|
82 |
+
|
83 |
+
return;
|
84 |
+
}
|
85 |
+
|
86 |
+
if ( empty( $new ) )
|
87 |
+
delete_post_meta( $post_id, $field['id'] );
|
88 |
+
else
|
89 |
+
update_post_meta( $post_id, $field['id'], $new );
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Normalize parameters for field
|
94 |
+
*
|
95 |
+
* @param array $field
|
96 |
+
*
|
97 |
+
* @return array
|
98 |
+
*/
|
99 |
+
static function normalize_field( $field )
|
100 |
+
{
|
101 |
+
$field['multiple'] = true;
|
102 |
+
$field['field_name'] = $field['id'];
|
103 |
+
if ( ! $field['clone'] )
|
104 |
+
$field['field_name'] .= '[]';
|
105 |
+
|
106 |
+
return $field;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
inc/meta-box/inc/fields/text.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Text_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Text_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<input type="text" class="rwmb-text" name="%s" id="%s" value="%s" placeholder="%s" size="%s" %s>%s',
|
21 |
+
$field['field_name'],
|
22 |
+
$field['id'],
|
23 |
+
$meta,
|
24 |
+
$field['placeholder'],
|
25 |
+
$field['size'],
|
26 |
+
$field['datalist'] ? "list='{$field['datalist']['id']}'" : '',
|
27 |
+
self::datalist_html( $field )
|
28 |
+
);
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Normalize parameters for field
|
33 |
+
*
|
34 |
+
* @param array $field
|
35 |
+
*
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
static function normalize_field( $field )
|
39 |
+
{
|
40 |
+
$field = wp_parse_args( $field, array(
|
41 |
+
'size' => 30,
|
42 |
+
'datalist' => false,
|
43 |
+
'placeholder' => '',
|
44 |
+
) );
|
45 |
+
|
46 |
+
return $field;
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Create datalist, if any
|
51 |
+
*
|
52 |
+
* @param array $field
|
53 |
+
*
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
static function datalist_html( $field )
|
57 |
+
{
|
58 |
+
if ( ! $field['datalist'] )
|
59 |
+
return '';
|
60 |
+
|
61 |
+
$datalist = $field['datalist'];
|
62 |
+
$html = sprintf(
|
63 |
+
'<datalist id="%s">',
|
64 |
+
$datalist['id']
|
65 |
+
);
|
66 |
+
|
67 |
+
foreach ( $datalist['options'] as $option )
|
68 |
+
{
|
69 |
+
$html .= sprintf( '<option value="%s"></option>', $option );
|
70 |
+
}
|
71 |
+
|
72 |
+
$html .= '</datalist>';
|
73 |
+
|
74 |
+
return $html;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
inc/meta-box/inc/fields/textarea.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Textarea_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Textarea_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Get field HTML
|
11 |
+
*
|
12 |
+
* @param mixed $meta
|
13 |
+
* @param array $field
|
14 |
+
*
|
15 |
+
* @return string
|
16 |
+
*/
|
17 |
+
static function html( $meta, $field )
|
18 |
+
{
|
19 |
+
return sprintf(
|
20 |
+
'<textarea class="rwmb-textarea large-text" name="%s" id="%s" cols="%s" rows="%s" placeholder="%s">%s</textarea>',
|
21 |
+
$field['field_name'],
|
22 |
+
$field['id'],
|
23 |
+
$field['cols'],
|
24 |
+
$field['rows'],
|
25 |
+
$field['placeholder'],
|
26 |
+
$meta
|
27 |
+
);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Normalize parameters for field
|
32 |
+
*
|
33 |
+
* @param array $field
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
static function normalize_field( $field )
|
38 |
+
{
|
39 |
+
$field = wp_parse_args( $field, array(
|
40 |
+
'cols' => 60,
|
41 |
+
'rows' => 3,
|
42 |
+
) );
|
43 |
+
|
44 |
+
return $field;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
inc/meta-box/inc/fields/thickbox-image.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Thickbox_Image_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Thickbox_Image_Field extends RWMB_Image_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
parent::admin_enqueue_scripts();
|
17 |
+
|
18 |
+
add_thickbox();
|
19 |
+
wp_enqueue_script( 'media-upload' );
|
20 |
+
|
21 |
+
wp_enqueue_script( 'rwmb-thickbox-image', TX_RWMB_JS_URL . 'thickbox-image.js', array( 'jquery' ), TX_RWMB_VER, true );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Get field HTML
|
26 |
+
*
|
27 |
+
* @param mixed $meta
|
28 |
+
* @param array $field
|
29 |
+
*
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
static function html( $meta, $field )
|
33 |
+
{
|
34 |
+
$i18n_title = apply_filters( 'rwmb_thickbox_image_upload_string', _x( 'Upload Images', 'image upload', 'meta-box' ), $field );
|
35 |
+
|
36 |
+
// Uploaded images
|
37 |
+
$html = self::get_uploaded_images( $meta, $field );
|
38 |
+
|
39 |
+
// Show form upload
|
40 |
+
$html .= "<a href='#' class='button rwmb-thickbox-upload' data-field_id='{$field['id']}'>{$i18n_title}</a>";
|
41 |
+
|
42 |
+
return $html;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get field value
|
47 |
+
* It's the combination of new (uploaded) images and saved images
|
48 |
+
*
|
49 |
+
* @param array $new
|
50 |
+
* @param array $old
|
51 |
+
* @param int $post_id
|
52 |
+
* @param array $field
|
53 |
+
*
|
54 |
+
* @return array|mixed
|
55 |
+
*/
|
56 |
+
static function value( $new, $old, $post_id, $field )
|
57 |
+
{
|
58 |
+
return array_unique( array_merge( $old, $new ) );
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
inc/meta-box/inc/fields/time.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Time_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Time_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
/**
|
10 |
+
* Enqueue scripts and styles
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
static function admin_enqueue_scripts()
|
15 |
+
{
|
16 |
+
$url = TX_RWMB_CSS_URL . 'jqueryui';
|
17 |
+
wp_register_style( 'jquery-ui-core', "{$url}/jquery.ui.core.css", array(), '1.8.17' );
|
18 |
+
wp_register_style( 'jquery-ui-theme', "{$url}/jquery.ui.theme.css", array(), '1.8.17' );
|
19 |
+
wp_register_style( 'jquery-ui-datepicker', "{$url}/jquery.ui.datepicker.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
20 |
+
wp_register_style( 'jquery-ui-slider', "{$url}/jquery.ui.slider.css", array( 'jquery-ui-core', 'jquery-ui-theme' ), '1.8.17' );
|
21 |
+
wp_enqueue_style( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.css", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7' );
|
22 |
+
|
23 |
+
$url = TX_RWMB_JS_URL . 'jqueryui';
|
24 |
+
wp_register_script( 'jquery-ui-timepicker', "{$url}/jquery-ui-timepicker-addon.js", array( 'jquery-ui-datepicker', 'jquery-ui-slider' ), '0.9.7', true );
|
25 |
+
$deps = array( 'jquery-ui-timepicker' );
|
26 |
+
|
27 |
+
$locale = str_replace( '_', '-', get_locale() );
|
28 |
+
$timepicker_locale_js_url = '';
|
29 |
+
if ( file_exists( RWMB_DIR . "js/jqueryui/timepicker-i18n/jquery-ui-timepicker-{$locale}.js" ) )
|
30 |
+
{
|
31 |
+
$timepicker_locale_js_url = "{$url}/timepicker-i18n/jquery-ui-timepicker-{$locale}.js";
|
32 |
+
}
|
33 |
+
elseif ( strlen( $locale ) > 2 && file_exists( RWMB_DIR . 'js/jqueryui/timepicker-i18n/jquery-ui-timepicker-' . substr( $locale, 0, 2 ) . '.js' ) )
|
34 |
+
{
|
35 |
+
$timepicker_locale_js_url = "{$url}/timepicker-i18n/jquery-ui-timepicker-" . substr( $locale, 0, 2 ) . '.js';
|
36 |
+
}
|
37 |
+
if ( $timepicker_locale_js_url )
|
38 |
+
{
|
39 |
+
wp_register_script( 'jquery-ui-timepicker-i18n', $timepicker_locale_js_url, array( 'jquery-ui-timepicker' ), '0.9.7', true );
|
40 |
+
$deps = array( 'jquery-ui-timepicker-i18n' );
|
41 |
+
}
|
42 |
+
|
43 |
+
wp_enqueue_script( 'rwmb-time', TX_RWMB_JS_URL . 'time.js', $deps, TX_RWMB_VER, true );
|
44 |
+
wp_localize_script( 'rwmb-time', 'RWMB_Timepicker', array( 'lang' => $locale ) );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get field HTML
|
49 |
+
*
|
50 |
+
* @param mixed $meta
|
51 |
+
* @param array $field
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
static function html( $meta, $field )
|
56 |
+
{
|
57 |
+
return sprintf(
|
58 |
+
'<input type="text" class="rwmb-time" name="%s" value="%s" id="%s" size="%s" data-options="%s" />',
|
59 |
+
$field['field_name'],
|
60 |
+
$meta,
|
61 |
+
isset( $field['clone'] ) && $field['clone'] ? '' : $field['id'],
|
62 |
+
$field['size'],
|
63 |
+
esc_attr( json_encode( $field['js_options'] ) )
|
64 |
+
);
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Normalize parameters for field
|
69 |
+
*
|
70 |
+
* @param array $field
|
71 |
+
*
|
72 |
+
* @return array
|
73 |
+
*/
|
74 |
+
static function normalize_field( $field )
|
75 |
+
{
|
76 |
+
$field = wp_parse_args( $field, array(
|
77 |
+
'size' => 30,
|
78 |
+
'js_options' => array(),
|
79 |
+
) );
|
80 |
+
|
81 |
+
// Deprecate 'format', but keep it for backward compatible
|
82 |
+
// Use 'js_options' instead
|
83 |
+
$field['js_options'] = wp_parse_args( $field['js_options'], array(
|
84 |
+
'showButtonPanel' => true,
|
85 |
+
'timeFormat' => empty( $field['format'] ) ? 'hh:mm:ss' : $field['format'],
|
86 |
+
) );
|
87 |
+
|
88 |
+
return $field;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
}
|
inc/meta-box/inc/fields/url.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "text" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'text.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_URL_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_URL_Field extends RWMB_Text_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Get field HTML
|
14 |
+
*
|
15 |
+
* @param mixed $meta
|
16 |
+
* @param array $field
|
17 |
+
*
|
18 |
+
* @return string
|
19 |
+
*/
|
20 |
+
static function html( $meta, $field )
|
21 |
+
{
|
22 |
+
return sprintf(
|
23 |
+
'<input type="url" class="rwmb-url" name="%s" id="%s" value="%s" size="%s" placeholder="%s"/>',
|
24 |
+
$field['field_name'],
|
25 |
+
$field['id'],
|
26 |
+
$meta,
|
27 |
+
$field['size'],
|
28 |
+
$field['placeholder']
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Sanitize url
|
34 |
+
*
|
35 |
+
* @param mixed $new
|
36 |
+
* @param mixed $old
|
37 |
+
* @param int $post_id
|
38 |
+
* @param array $field
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
static function value( $new, $old, $post_id, $field )
|
43 |
+
{
|
44 |
+
return is_array( $new ) ? array_map( 'esc_url', $new ) : esc_url( $new );
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
inc/meta-box/inc/fields/user.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Make sure "select" field is loaded
|
6 |
+
require_once TX_RWMB_FIELDS_DIR . 'select-advanced.php';
|
7 |
+
|
8 |
+
if ( ! class_exists( 'RWMB_User_Field' ) )
|
9 |
+
{
|
10 |
+
class RWMB_User_Field extends RWMB_Field
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
RWMB_Select_Advanced_Field::admin_enqueue_scripts();
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get field HTML
|
24 |
+
*
|
25 |
+
* @param mixed $meta
|
26 |
+
* @param array $field
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
static function html( $meta, $field )
|
31 |
+
{
|
32 |
+
$field['options'] = self::get_options( $field );
|
33 |
+
switch ( $field['field_type'] )
|
34 |
+
{
|
35 |
+
case 'select':
|
36 |
+
return RWMB_Select_Field::html( $meta, $field );
|
37 |
+
break;
|
38 |
+
case 'select_advanced':
|
39 |
+
default:
|
40 |
+
return RWMB_Select_Advanced_Field::html( $meta, $field );
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Normalize parameters for field
|
46 |
+
*
|
47 |
+
* @param array $field
|
48 |
+
*
|
49 |
+
* @return array
|
50 |
+
*/
|
51 |
+
static function normalize_field( $field )
|
52 |
+
{
|
53 |
+
|
54 |
+
$default_post_type = __( 'User', 'meta-box' );
|
55 |
+
|
56 |
+
$field = wp_parse_args( $field, array(
|
57 |
+
'field_type' => 'select_advanced',
|
58 |
+
'parent' => false,
|
59 |
+
'query_args' => array(),
|
60 |
+
) );
|
61 |
+
|
62 |
+
$field['std'] = empty( $field['std'] ) ? sprintf( __( 'Select a %s', 'meta-box' ), $default_post_type ) : $field['std'];
|
63 |
+
|
64 |
+
$field['query_args'] = wp_parse_args( $field['query_args'], array(
|
65 |
+
'orderby' => 'display_name',
|
66 |
+
'order' => 'asc',
|
67 |
+
'role' => '',
|
68 |
+
'fields' => 'all',
|
69 |
+
) );
|
70 |
+
|
71 |
+
switch ( $field['field_type'] )
|
72 |
+
{
|
73 |
+
case 'select':
|
74 |
+
return RWMB_Select_Field::normalize_field( $field );
|
75 |
+
break;
|
76 |
+
case 'select_advanced':
|
77 |
+
default:
|
78 |
+
return RWMB_Select_Advanced_Field::normalize_field( $field );
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Get meta value
|
84 |
+
* If field is cloneable, value is saved as a single entry in DB
|
85 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
86 |
+
*
|
87 |
+
* @see "save" method for better understanding
|
88 |
+
*
|
89 |
+
* @param $post_id
|
90 |
+
* @param $saved
|
91 |
+
* @param $field
|
92 |
+
*
|
93 |
+
* @return array
|
94 |
+
*/
|
95 |
+
static function meta( $post_id, $saved, $field )
|
96 |
+
{
|
97 |
+
if ( isset( $field['parent'] ) && $field['parent'] )
|
98 |
+
{
|
99 |
+
$post = get_post( $post_id );
|
100 |
+
|
101 |
+
return $post->post_parent;
|
102 |
+
}
|
103 |
+
|
104 |
+
return RWMB_Select_Field::meta( $post_id, $saved, $field );
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Save meta value
|
109 |
+
* If field is cloneable, value is saved as a single entry in DB
|
110 |
+
* Otherwise value is saved as multiple entries (for backward compatibility)
|
111 |
+
*
|
112 |
+
* TODO: A good way to ALWAYS save values in single entry in DB, while maintaining backward compatibility
|
113 |
+
*
|
114 |
+
* @param $new
|
115 |
+
* @param $old
|
116 |
+
* @param $post_id
|
117 |
+
* @param $field
|
118 |
+
*/
|
119 |
+
static function save( $new, $old, $post_id, $field )
|
120 |
+
{
|
121 |
+
return RWMB_Select_Field::save( $new, $old, $post_id, $field );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get users
|
126 |
+
*
|
127 |
+
* @param array $field
|
128 |
+
*
|
129 |
+
* @return array
|
130 |
+
*/
|
131 |
+
static function get_options( $field )
|
132 |
+
{
|
133 |
+
$results = get_users( $field['query_args'] );
|
134 |
+
$options = array();
|
135 |
+
foreach ( $results as $result )
|
136 |
+
{
|
137 |
+
$options[$result->ID] = $result->display_name;
|
138 |
+
}
|
139 |
+
|
140 |
+
return $options;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
inc/meta-box/inc/fields/wysiwyg.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
if ( ! class_exists( 'RWMB_Wysiwyg_Field' ) )
|
6 |
+
{
|
7 |
+
class RWMB_Wysiwyg_Field extends RWMB_Field
|
8 |
+
{
|
9 |
+
|
10 |
+
static $cloneable_editors = array();
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Enqueue scripts and styles
|
14 |
+
*
|
15 |
+
* @return void
|
16 |
+
*/
|
17 |
+
static function admin_enqueue_scripts()
|
18 |
+
{
|
19 |
+
wp_enqueue_style( 'rwmb-meta-box-wysiwyg', TX_RWMB_CSS_URL . 'wysiwyg.css', array(), TX_RWMB_VER );
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Change field value on save
|
24 |
+
*
|
25 |
+
* @param mixed $new
|
26 |
+
* @param mixed $old
|
27 |
+
* @param int $post_id
|
28 |
+
* @param array $field
|
29 |
+
*
|
30 |
+
* @return string
|
31 |
+
*/
|
32 |
+
static function value( $new, $old, $post_id, $field )
|
33 |
+
{
|
34 |
+
if ( $field['raw'] )
|
35 |
+
{
|
36 |
+
$meta = $new;
|
37 |
+
}
|
38 |
+
else if ( $field['clone'] )
|
39 |
+
{
|
40 |
+
$meta = array_map( 'wpautop', $new );
|
41 |
+
}
|
42 |
+
else
|
43 |
+
{
|
44 |
+
$meta = wpautop( $new );
|
45 |
+
}
|
46 |
+
|
47 |
+
return $meta;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Get field HTML
|
52 |
+
*
|
53 |
+
* @param mixed $meta
|
54 |
+
* @param array $field
|
55 |
+
*
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
static function html( $meta, $field )
|
59 |
+
{
|
60 |
+
// Using output buffering because wp_editor() echos directly
|
61 |
+
ob_start();
|
62 |
+
|
63 |
+
$field['options']['textarea_name'] = $field['field_name'];
|
64 |
+
|
65 |
+
// Use new wp_editor() since WP 3.3
|
66 |
+
wp_editor( $meta, $field['id'], $field['options'] );
|
67 |
+
|
68 |
+
$editor = ob_get_clean();
|
69 |
+
if ( $field['clone'] )
|
70 |
+
{
|
71 |
+
self::$cloneable_editors[$field['id']] = $editor;
|
72 |
+
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'footer_scripts' ), 51 );
|
73 |
+
}
|
74 |
+
|
75 |
+
return $editor;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Normalize parameters for field
|
80 |
+
*
|
81 |
+
* @param array $field
|
82 |
+
*
|
83 |
+
* @return array
|
84 |
+
*/
|
85 |
+
static function normalize_field( $field )
|
86 |
+
{
|
87 |
+
$field = wp_parse_args( $field, array(
|
88 |
+
'raw' => false,
|
89 |
+
'options' => array(),
|
90 |
+
) );
|
91 |
+
|
92 |
+
$field['options'] = wp_parse_args( $field['options'], array(
|
93 |
+
'editor_class' => 'rwmb-wysiwyg',
|
94 |
+
'dfw' => true, // Use default WordPress full screen UI
|
95 |
+
) );
|
96 |
+
|
97 |
+
// Keep the filter to be compatible with previous versions
|
98 |
+
$field['options'] = apply_filters( 'rwmb_wysiwyg_settings', $field['options'] );
|
99 |
+
|
100 |
+
return $field;
|
101 |
+
}
|
102 |
+
|
103 |
+
static function footer_scripts()
|
104 |
+
{
|
105 |
+
echo '<script> var rwmb_cloneable_editors = ' . json_encode( self::$cloneable_editors ) . ';</script>';
|
106 |
+
}
|
107 |
+
}
|
108 |
+
}
|
inc/meta-box/inc/helpers.php
ADDED
@@ -0,0 +1,408 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* This file contains all helpers/public functions
|
4 |
+
* that can be used both on the back-end or front-end
|
5 |
+
*/
|
6 |
+
|
7 |
+
// Prevent loading this file directly
|
8 |
+
defined( 'ABSPATH' ) || exit;
|
9 |
+
|
10 |
+
if ( ! class_exists( 'RWMB_Helper' ) )
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Wrapper class for helper functions
|
14 |
+
*/
|
15 |
+
class RWMB_Helper
|
16 |
+
{
|
17 |
+
/**
|
18 |
+
* Do actions when class is loaded
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
static function on_load()
|
23 |
+
{
|
24 |
+
//add_shortcode( 'rwmb_meta', array( __CLASS__, 'shortcode' ) );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Shortcode to display meta value
|
29 |
+
*
|
30 |
+
* @param $atts Array of shortcode attributes, same as meta() function, but has more "meta_key" parameter
|
31 |
+
*
|
32 |
+
* @see meta() function below
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
static function shortcode( $atts )
|
37 |
+
{
|
38 |
+
$atts = wp_parse_args( $atts, array(
|
39 |
+
'type' => 'text',
|
40 |
+
'post_id' => get_the_ID(),
|
41 |
+
) );
|
42 |
+
if ( empty( $atts['meta_key'] ) )
|
43 |
+
return '';
|
44 |
+
|
45 |
+
$meta = self::meta( $atts['meta_key'], $atts, $atts['post_id'] );
|
46 |
+
|
47 |
+
// Get uploaded files info
|
48 |
+
if ( in_array( $atts['type'], array( 'file', 'file_advanced' ) ) )
|
49 |
+
{
|
50 |
+
$content = '<ul>';
|
51 |
+
foreach ( $meta as $file )
|
52 |
+
{
|
53 |
+
$content .= sprintf(
|
54 |
+
'<li><a href="%s" title="%s">%s</a></li>',
|
55 |
+
$file['url'],
|
56 |
+
$file['title'],
|
57 |
+
$file['name']
|
58 |
+
);
|
59 |
+
}
|
60 |
+
$content .= '</ul>';
|
61 |
+
}
|
62 |
+
|
63 |
+
// Get uploaded images info
|
64 |
+
elseif ( in_array( $atts['type'], array( 'image', 'plupload_image', 'thickbox_image', 'image_advanced' ) ) )
|
65 |
+
{
|
66 |
+
$content = '<ul>';
|
67 |
+
foreach ( $meta as $image )
|
68 |
+
{
|
69 |
+
// Link thumbnail to full size image?
|
70 |
+
if ( isset( $atts['link'] ) && $atts['link'] )
|
71 |
+
{
|
72 |
+
$content .= sprintf(
|
73 |
+
'<li><a href="%s" title="%s"><img src="%s" alt="%s" title="%s" /></a></li>',
|
74 |
+
$image['full_url'],
|
75 |
+
$image['title'],
|
76 |
+
$image['url'],
|
77 |
+
$image['alt'],
|
78 |
+
$image['title']
|
79 |
+
);
|
80 |
+
}
|
81 |
+
else
|
82 |
+
{
|
83 |
+
$content .= sprintf(
|
84 |
+
'<li><img src="%s" alt="%s" title="%s" /></li>',
|
85 |
+
$image['url'],
|
86 |
+
$image['alt'],
|
87 |
+
$image['title']
|
88 |
+
);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
$content .= '</ul>';
|
92 |
+
}
|
93 |
+
|
94 |
+
// Get post terms
|
95 |
+
elseif ( 'taxonomy' == $atts['type'] )
|
96 |
+
{
|
97 |
+
$content = '<ul>';
|
98 |
+
foreach ( $meta as $term )
|
99 |
+
{
|
100 |
+
$content .= sprintf(
|
101 |
+
'<li><a href="%s" title="%s">%s</a></li>',
|
102 |
+
get_term_link( $term, $atts['taxonomy'] ),
|
103 |
+
$term->name,
|
104 |
+
$term->name
|
105 |
+
);
|
106 |
+
}
|
107 |
+
$content .= '</ul>';
|
108 |
+
}
|
109 |
+
|
110 |
+
// Normal multiple fields: checkbox_list, select with multiple values
|
111 |
+
elseif ( is_array( $meta ) )
|
112 |
+
{
|
113 |
+
$content = '<ul><li>' . implode( '</li><li>', $meta ) . '</li></ul>';
|
114 |
+
}
|
115 |
+
|
116 |
+
else
|
117 |
+
{
|
118 |
+
$content = $meta;
|
119 |
+
}
|
120 |
+
|
121 |
+
return apply_filters( 'rwmb_shortcode', $content );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get post meta
|
126 |
+
*
|
127 |
+
* @param string $key Meta key. Required.
|
128 |
+
* @param int|null $post_id Post ID. null for current post. Optional
|
129 |
+
* @param array $args Array of arguments. Optional.
|
130 |
+
*
|
131 |
+
* @return mixed
|
132 |
+
*/
|
133 |
+
static function meta( $key, $args = array(), $post_id = null )
|
134 |
+
{
|
135 |
+
$post_id = empty( $post_id ) ? get_the_ID() : $post_id;
|
136 |
+
|
137 |
+
$args = wp_parse_args( $args, array(
|
138 |
+
'type' => 'text',
|
139 |
+
)
|
140 |
+
);
|
141 |
+
|
142 |
+
// Set 'multiple' for fields based on 'type'
|
143 |
+
if ( ! isset( $args['multiple'] ) )
|
144 |
+
$args['multiple'] = in_array( $args['type'], array( 'checkbox_list', 'file', 'file_advanced', 'image', 'image_advanced', 'plupload_image', 'thickbox_image' ) );
|
145 |
+
|
146 |
+
$meta = get_post_meta( $post_id, $key, ! $args['multiple'] );
|
147 |
+
|
148 |
+
// Get uploaded files info
|
149 |
+
if ( in_array( $args['type'], array( 'file', 'file_advanced' ) ) )
|
150 |
+
{
|
151 |
+
if ( is_array( $meta ) && ! empty( $meta ) )
|
152 |
+
{
|
153 |
+
$files = array();
|
154 |
+
foreach ( $meta as $id )
|
155 |
+
{
|
156 |
+
$files[$id] = self::file_info( $id );
|
157 |
+
}
|
158 |
+
$meta = $files;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
// Get uploaded images info
|
163 |
+
elseif ( in_array( $args['type'], array( 'image', 'plupload_image', 'thickbox_image', 'image_advanced' ) ) )
|
164 |
+
{
|
165 |
+
global $wpdb;
|
166 |
+
|
167 |
+
$meta = $wpdb->get_col( $wpdb->prepare( "
|
168 |
+
SELECT meta_value FROM $wpdb->postmeta
|
169 |
+
WHERE post_id = %d AND meta_key = '%s'
|
170 |
+
ORDER BY meta_id ASC
|
171 |
+
", $post_id, $key ) );
|
172 |
+
|
173 |
+
if ( is_array( $meta ) && ! empty( $meta ) )
|
174 |
+
{
|
175 |
+
$images = array();
|
176 |
+
foreach ( $meta as $id )
|
177 |
+
{
|
178 |
+
$images[$id] = self::image_info( $id, $args );
|
179 |
+
}
|
180 |
+
$meta = $images;
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
// Get terms
|
185 |
+
elseif ( 'taxonomy_advanced' == $args['type'] )
|
186 |
+
{
|
187 |
+
if ( ! empty( $args['taxonomy'] ) )
|
188 |
+
{
|
189 |
+
$term_ids = array_map( 'intval', array_filter( explode( ',', $meta . ',' ) ) );
|
190 |
+
|
191 |
+
// Allow to pass more arguments to "get_terms"
|
192 |
+
$func_args = wp_parse_args( array(
|
193 |
+
'include' => $term_ids,
|
194 |
+
'hide_empty' => false,
|
195 |
+
), $args );
|
196 |
+
unset( $func_args['type'], $func_args['taxonomy'], $func_args['multiple'] );
|
197 |
+
$meta = get_terms( $args['taxonomy'], $func_args );
|
198 |
+
}
|
199 |
+
else
|
200 |
+
{
|
201 |
+
$meta = array();
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
// Get post terms
|
206 |
+
elseif ( 'taxonomy' == $args['type'] )
|
207 |
+
{
|
208 |
+
$meta = empty( $args['taxonomy'] ) ? array() : wp_get_post_terms( $post_id, $args['taxonomy'] );
|
209 |
+
}
|
210 |
+
|
211 |
+
// Get map
|
212 |
+
elseif ( 'map' == $args['type'] )
|
213 |
+
{
|
214 |
+
$meta = self::map( $key, $args, $post_id );
|
215 |
+
}
|
216 |
+
|
217 |
+
return apply_filters( 'rwmb_meta', $meta, $key, $args, $post_id );
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Get uploaded file information
|
222 |
+
*
|
223 |
+
* @param int $id Attachment file ID (post ID). Required.
|
224 |
+
*
|
225 |
+
* @return array|bool False if file not found. Array of (id, name, path, url) on success
|
226 |
+
*/
|
227 |
+
static function file_info( $id )
|
228 |
+
{
|
229 |
+
$path = get_attached_file( $id );
|
230 |
+
|
231 |
+
return array(
|
232 |
+
'ID' => $id,
|
233 |
+
'name' => basename( $path ),
|
234 |
+
'path' => $path,
|
235 |
+
'url' => wp_get_attachment_url( $id ),
|
236 |
+
'title' => get_the_title( $id ),
|
237 |
+
);
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* Get uploaded image information
|
242 |
+
*
|
243 |
+
* @param int $id Attachment image ID (post ID). Required.
|
244 |
+
* @param array $args Array of arguments (for size). Required.
|
245 |
+
*
|
246 |
+
* @return array|bool False if file not found. Array of (id, name, path, url) on success
|
247 |
+
*/
|
248 |
+
static function image_info( $id, $args = array() )
|
249 |
+
{
|
250 |
+
$args = wp_parse_args( $args, array(
|
251 |
+
'size' => 'thumbnail',
|
252 |
+
) );
|
253 |
+
|
254 |
+
$img_src = wp_get_attachment_image_src( $id, $args['size'] );
|
255 |
+
if ( empty( $img_src ) )
|
256 |
+
return false;
|
257 |
+
|
258 |
+
$attachment = get_post( $id );
|
259 |
+
$path = get_attached_file( $id );
|
260 |
+
|
261 |
+
return array(
|
262 |
+
'ID' => $id,
|
263 |
+
'name' => basename( $path ),
|
264 |
+
'path' => $path,
|
265 |
+
'url' => $img_src[0],
|
266 |
+
'width' => $img_src[1],
|
267 |
+
'height' => $img_src[2],
|
268 |
+
'full_url' => wp_get_attachment_url( $id ),
|
269 |
+
'title' => $attachment->post_title,
|
270 |
+
'caption' => $attachment->post_excerpt,
|
271 |
+
'description' => $attachment->post_content,
|
272 |
+
'alt' => get_post_meta( $id, '_wp_attachment_image_alt', true ),
|
273 |
+
);
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Display map using Google API
|
278 |
+
*
|
279 |
+
* @param string $key Meta key
|
280 |
+
* @param array $args Map parameter
|
281 |
+
* @param int|null $post_id Post ID
|
282 |
+
*
|
283 |
+
* @return string
|
284 |
+
*/
|
285 |
+
static function map( $key, $args = array(), $post_id = null )
|
286 |
+
{
|
287 |
+
$post_id = empty( $post_id ) ? get_the_ID() : $post_id;
|
288 |
+
$loc = get_post_meta( $post_id, $key, true );
|
289 |
+
if ( ! $loc )
|
290 |
+
return '';
|
291 |
+
|
292 |
+
$parts = array_map( 'trim', explode( ',', $loc ) );
|
293 |
+
|
294 |
+
// No zoom entered, set it to 14 by default
|
295 |
+
if ( count( $parts ) < 3 )
|
296 |
+
$parts[2] = 14;
|
297 |
+
|
298 |
+
// Map parameters
|
299 |
+
$args = wp_parse_args( $args, array(
|
300 |
+
'width' => '640px',
|
301 |
+
'height' => '480px',
|
302 |
+
'marker' => true, // Display marker?
|
303 |
+
'marker_title' => '', // Marker title, when hover
|
304 |
+
'info_window' => '', // Content of info window (when click on marker). HTML allowed
|
305 |
+
'js_options' => array(),
|
306 |
+
) );
|
307 |
+
$args['js_options'] = wp_parse_args( $args['js_options'], array(
|
308 |
+
'zoom' => $parts[2], // Default to 'zoom' level set in admin, but can be overwritten
|
309 |
+
'mapTypeId' => 'ROADMAP', // Map type, see https://developers.google.com/maps/documentation/javascript/reference#MapTypeId
|
310 |
+
) );
|
311 |
+
|
312 |
+
// Counter to display multiple maps on same page
|
313 |
+
static $counter = 0;
|
314 |
+
|
315 |
+
$html = sprintf(
|
316 |
+
'<div id="rwmb-map-canvas-%d" style="width:%s;height:%s"></div>',
|
317 |
+
$counter,
|
318 |
+
$args['width'],
|
319 |
+
$args['height']
|
320 |
+
);
|
321 |
+
|
322 |
+
// Load Google Maps script only when needed
|
323 |
+
$html .= '<script>if ( typeof google !== "object" || typeof google.maps !== "object" )
|
324 |
+
document.write(\'<script src="//maps.google.com/maps/api/js?sensor=false"><\/script>\')</script>';
|
325 |
+
$html .= '<script>
|
326 |
+
( function()
|
327 |
+
{
|
328 |
+
';
|
329 |
+
|
330 |
+
$html .= sprintf( '
|
331 |
+
var center = new google.maps.LatLng( %s, %s ),
|
332 |
+
mapOptions = %s,
|
333 |
+
map;
|
334 |
+
|
335 |
+
switch ( mapOptions.mapTypeId )
|
336 |
+
{
|
337 |
+
case "ROADMAP":
|
338 |
+
mapOptions.mapTypeId = google.maps.MapTypeId.ROADMAP;
|
339 |
+
break;
|
340 |
+
case "SATELLITE":
|
341 |
+
mapOptions.mapTypeId = google.maps.MapTypeId.SATELLITE;
|
342 |
+
break;
|
343 |
+
case "HYBRID":
|
344 |
+
mapOptions.mapTypeId = google.maps.MapTypeId.HYBRID;
|
345 |
+
break;
|
346 |
+
case "TERRAIN":
|
347 |
+
mapOptions.mapTypeId = google.maps.MapTypeId.TERRAIN;
|
348 |
+
break;
|
349 |
+
}
|
350 |
+
mapOptions.center = center;
|
351 |
+
map = new google.maps.Map( document.getElementById( "rwmb-map-canvas-%d" ), mapOptions );
|
352 |
+
',
|
353 |
+
$parts[0], $parts[1],
|
354 |
+
json_encode( $args['js_options'] ),
|
355 |
+
$counter
|
356 |
+
);
|
357 |
+
|
358 |
+
if ( $args['marker'] )
|
359 |
+
{
|
360 |
+
$html .= sprintf( '
|
361 |
+
var marker = new google.maps.Marker( {
|
362 |
+
position: center,
|
363 |
+
map: map%s
|
364 |
+
} );',
|
365 |
+
$args['marker_title'] ? ', title: "' . $args['marker_title'] . '"' : ''
|
366 |
+
);
|
367 |
+
|
368 |
+
if ( $args['info_window'] )
|
369 |
+
{
|
370 |
+
$html .= sprintf( '
|
371 |
+
var infoWindow = new google.maps.InfoWindow( {
|
372 |
+
content: "%s"
|
373 |
+
} );
|
374 |
+
|
375 |
+
google.maps.event.addListener( marker, "click", function()
|
376 |
+
{
|
377 |
+
infoWindow.open( map, marker );
|
378 |
+
} );',
|
379 |
+
$args['info_window']
|
380 |
+
);
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
$html .= '} )();
|
385 |
+
</script>';
|
386 |
+
|
387 |
+
$counter ++;
|
388 |
+
|
389 |
+
return $html;
|
390 |
+
}
|
391 |
+
}
|
392 |
+
|
393 |
+
RWMB_Helper::on_load();
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* Get post meta
|
398 |
+
*
|
399 |
+
* @param string $key Meta key. Required.
|
400 |
+
* @param int|null $post_id Post ID. null for current post. Optional
|
401 |
+
* @param array $args Array of arguments. Optional.
|
402 |
+
*
|
403 |
+
* @return mixed
|
404 |
+
*/
|
405 |
+
function rwmb_meta( $key, $args = array(), $post_id = null )
|
406 |
+
{
|
407 |
+
return RWMB_Helper::meta( $key, $args, $post_id );
|
408 |
+
}
|
inc/meta-box/inc/init.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
add_action( 'admin_init', 'rwmb_register_meta_boxes' );
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Register meta boxes via a filter
|
6 |
+
* Advantages:
|
7 |
+
* - prevents incorrect hook
|
8 |
+
* - prevents duplicated global variables
|
9 |
+
* - allows users to remove/hide registered meta boxes
|
10 |
+
* - no need to check for class existences
|
11 |
+
*
|
12 |
+
* @return void
|
13 |
+
*/
|
14 |
+
function rwmb_register_meta_boxes()
|
15 |
+
{
|
16 |
+
$meta_boxes = apply_filters( 'rwmb_meta_boxes', array() );
|
17 |
+
foreach ( $meta_boxes as $meta_box )
|
18 |
+
{
|
19 |
+
new RW_Meta_Box( $meta_box );
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
add_action( 'edit_page_form', 'rwmb_fix_page_template' );
|
24 |
+
|
25 |
+
/**
|
26 |
+
* WordPress will prevent post data saving if a page template has been selected that does not exist
|
27 |
+
* This is especially a problem when switching to our theme, and old page templates are in the post data
|
28 |
+
* Unset the page template if the page does not exist to allow the post to save
|
29 |
+
*
|
30 |
+
* @param WP_Post $post
|
31 |
+
*
|
32 |
+
* @return void
|
33 |
+
* @since 4.3.10
|
34 |
+
*/
|
35 |
+
function rwmb_fix_page_template( $post )
|
36 |
+
{
|
37 |
+
$template = get_post_meta( $post->ID, '_wp_page_template', true );
|
38 |
+
$page_templates = wp_get_theme()->get_page_templates();
|
39 |
+
|
40 |
+
// If the template doesn't exists, remove the data to allow WordPress to save
|
41 |
+
if ( ! isset( $page_templates[$template] ) )
|
42 |
+
delete_post_meta( $post->ID, '_wp_page_template' );
|
43 |
+
}
|
inc/meta-box/inc/meta-box.php
ADDED
@@ -0,0 +1,454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Prevent loading this file directly
|
3 |
+
defined( 'ABSPATH' ) || exit;
|
4 |
+
|
5 |
+
// Meta Box Class
|
6 |
+
if ( ! class_exists( 'RW_Meta_Box' ) )
|
7 |
+
{
|
8 |
+
/**
|
9 |
+
* A class to rapid develop meta boxes for custom & built in content types
|
10 |
+
* Piggybacks on WordPress
|
11 |
+
*
|
12 |
+
* @author Rilwis
|
13 |
+
* @author Co-Authors @see https://github.com/rilwis/meta-box
|
14 |
+
* @license GNU GPL2+
|
15 |
+
* @package RW Meta Box
|
16 |
+
*/
|
17 |
+
class RW_Meta_Box
|
18 |
+
{
|
19 |
+
/**
|
20 |
+
* @var array Meta box information
|
21 |
+
*/
|
22 |
+
public $meta_box;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var array Fields information
|
26 |
+
*/
|
27 |
+
public $fields;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* @var array Contains all field types of current meta box
|
31 |
+
*/
|
32 |
+
public $types;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* @var array Validation information
|
36 |
+
*/
|
37 |
+
public $validation;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* @var bool Used to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
|
41 |
+
*/
|
42 |
+
public $saved = false;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Create meta box based on given data
|
46 |
+
*
|
47 |
+
* @see demo/demo.php file for details
|
48 |
+
*
|
49 |
+
* @param array $meta_box Meta box definition
|
50 |
+
*
|
51 |
+
* @return RW_Meta_Box
|
52 |
+
*/
|
53 |
+
function __construct( $meta_box )
|
54 |
+
{
|
55 |
+
// Run script only in admin area
|
56 |
+
if ( ! is_admin() )
|
57 |
+
return;
|
58 |
+
|
59 |
+
// Assign meta box values to local variables and add it's missed values
|
60 |
+
$this->meta_box = self::normalize( $meta_box );
|
61 |
+
$this->fields = &$this->meta_box['fields'];
|
62 |
+
$this->validation = &$this->meta_box['validation'];
|
63 |
+
|
64 |
+
// Allow users to show/hide meta box
|
65 |
+
// 1st action applies to all meta boxes
|
66 |
+
// 2nd action applies to only current meta box
|
67 |
+
$show = true;
|
68 |
+
$show = apply_filters( 'rwmb_show', $show, $this->meta_box );
|
69 |
+
$show = apply_filters( "rwmb_show_{$this->meta_box['id']}", $show, $this->meta_box );
|
70 |
+
if ( ! $show )
|
71 |
+
return;
|
72 |
+
|
73 |
+
// Enqueue common styles and scripts
|
74 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
75 |
+
|
76 |
+
// Add additional actions for fields
|
77 |
+
$fields = self::get_fields( $this->fields );
|
78 |
+
foreach ( $fields as $field )
|
79 |
+
{
|
80 |
+
call_user_func( array( self::get_class_name( $field ), 'add_actions' ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
// Add meta box
|
84 |
+
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
85 |
+
|
86 |
+
// Hide meta box if it's set 'default_hidden'
|
87 |
+
add_filter( 'default_hidden_meta_boxes', array( $this, 'hide' ), 10, 2 );
|
88 |
+
|
89 |
+
// Save post meta
|
90 |
+
add_action( 'save_post', array( $this, 'save_post' ) );
|
91 |
+
|
92 |
+
// Attachment uses other hooks
|
93 |
+
// @see wp_update_post(), wp_insert_attachment()
|
94 |
+
add_action( 'edit_attachment', array( $this, 'save_post' ) );
|
95 |
+
add_action( 'add_attachment', array( $this, 'save_post' ) );
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Enqueue common styles
|
100 |
+
*
|
101 |
+
* @return void
|
102 |
+
*/
|
103 |
+
function admin_enqueue_scripts()
|
104 |
+
{
|
105 |
+
$screen = get_current_screen();
|
106 |
+
|
107 |
+
// Enqueue scripts and styles for registered pages (post types) only
|
108 |
+
if ( 'post' != $screen->base || ! in_array( $screen->post_type, $this->meta_box['pages'] ) )
|
109 |
+
return;
|
110 |
+
|
111 |
+
wp_enqueue_style( 'rwmb', TX_RWMB_CSS_URL . 'style.css', array(), TX_RWMB_VER );
|
112 |
+
|
113 |
+
// Load clone script conditionally
|
114 |
+
$has_clone = false;
|
115 |
+
$fields = self::get_fields( $this->fields );
|
116 |
+
|
117 |
+
foreach ( $fields as $field )
|
118 |
+
{
|
119 |
+
if ( $field['clone'] )
|
120 |
+
$has_clone = true;
|
121 |
+
|
122 |
+
// Enqueue scripts and styles for fields
|
123 |
+
call_user_func( array( self::get_class_name( $field ), 'admin_enqueue_scripts' ) );
|
124 |
+
}
|
125 |
+
|
126 |
+
if ( $has_clone )
|
127 |
+
wp_enqueue_script( 'rwmb-clone', TX_RWMB_JS_URL . 'clone.js', array( 'jquery' ), TX_RWMB_VER, true );
|
128 |
+
|
129 |
+
if ( $this->validation )
|
130 |
+
{
|
131 |
+
wp_enqueue_script( 'jquery-validate', TX_RWMB_JS_URL . 'jquery.validate.min.js', array( 'jquery' ), TX_RWMB_VER, true );
|
132 |
+
wp_enqueue_script( 'rwmb-validate', TX_RWMB_JS_URL . 'validate.js', array( 'jquery-validate' ), TX_RWMB_VER, true );
|
133 |
+
}
|
134 |
+
|
135 |
+
// Auto save
|
136 |
+
if ( $this->meta_box['autosave'] )
|
137 |
+
wp_enqueue_script( 'rwmb-autosave', TX_RWMB_JS_URL . 'autosave.js', array( 'jquery' ), TX_RWMB_VER, true );
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Get all fields of a meta box, recursively
|
142 |
+
*
|
143 |
+
* @param array $fields
|
144 |
+
*
|
145 |
+
* @return array
|
146 |
+
*/
|
147 |
+
static function get_fields( $fields )
|
148 |
+
{
|
149 |
+
$all_fields = array();
|
150 |
+
foreach ( $fields as $field )
|
151 |
+
{
|
152 |
+
$all_fields[] = $field;
|
153 |
+
if ( isset( $field['fields'] ) )
|
154 |
+
$all_fields = array_merge( $all_fields, self::get_fields( $field['fields'] ) );
|
155 |
+
}
|
156 |
+
|
157 |
+
return $all_fields;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**************************************************
|
161 |
+
* SHOW META BOX
|
162 |
+
**************************************************/
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Add meta box for multiple post types
|
166 |
+
*
|
167 |
+
* @return void
|
168 |
+
*/
|
169 |
+
function add_meta_boxes()
|
170 |
+
{
|
171 |
+
foreach ( $this->meta_box['pages'] as $page )
|
172 |
+
{
|
173 |
+
add_meta_box(
|
174 |
+
$this->meta_box['id'],
|
175 |
+
$this->meta_box['title'],
|
176 |
+
array( $this, 'show' ),
|
177 |
+
$page,
|
178 |
+
$this->meta_box['context'],
|
179 |
+
$this->meta_box['priority']
|
180 |
+
);
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
/**
|
185 |
+
* Hide meta box if it's set 'default_hidden'
|
186 |
+
*
|
187 |
+
* @param array $hidden Array of default hidden meta boxes
|
188 |
+
* @param object $screen Current screen information
|
189 |
+
*
|
190 |
+
* @return array
|
191 |
+
*/
|
192 |
+
function hide( $hidden, $screen )
|
193 |
+
{
|
194 |
+
if (
|
195 |
+
'post' === $screen->base
|
196 |
+
&& in_array( $screen->post_type, $this->meta_box['pages'] )
|
197 |
+
&& $this->meta_box['default_hidden']
|
198 |
+
)
|
199 |
+
{
|
200 |
+
$hidden[] = $this->meta_box['id'];
|
201 |
+
}
|
202 |
+
|
203 |
+
return $hidden;
|
204 |
+
}
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Callback function to show fields in meta box
|
208 |
+
*
|
209 |
+
* @return void
|
210 |
+
*/
|
211 |
+
function show()
|
212 |
+
{
|
213 |
+
global $post;
|
214 |
+
|
215 |
+
$saved = self::has_been_saved( $post->ID, $this->fields );
|
216 |
+
|
217 |
+
// Container
|
218 |
+
printf(
|
219 |
+
'<div class="rwmb-meta-box" data-autosave="%s">',
|
220 |
+
$this->meta_box['autosave'] ? 'true' : 'false'
|
221 |
+
);
|
222 |
+
|
223 |
+
wp_nonce_field( "rwmb-save-{$this->meta_box['id']}", "nonce_{$this->meta_box['id']}" );
|
224 |
+
|
225 |
+
// Allow users to add custom code before meta box content
|
226 |
+
// 1st action applies to all meta boxes
|
227 |
+
// 2nd action applies to only current meta box
|
228 |
+
do_action( 'rwmb_before', $this );
|
229 |
+
do_action( "rwmb_before_{$this->meta_box['id']}", $this );
|
230 |
+
|
231 |
+
foreach ( $this->fields as $field )
|
232 |
+
{
|
233 |
+
call_user_func( array( self::get_class_name( $field ), 'show' ), $field, $saved );
|
234 |
+
}
|
235 |
+
|
236 |
+
// Include validation settings for this meta-box
|
237 |
+
if ( isset( $this->validation ) && $this->validation )
|
238 |
+
{
|
239 |
+
echo '
|
240 |
+
<script>
|
241 |
+
if ( typeof rwmb == "undefined" )
|
242 |
+
{
|
243 |
+
var rwmb = {
|
244 |
+
validationOptions : jQuery.parseJSON( \'' . json_encode( $this->validation ) . '\' ),
|
245 |
+
summaryMessage : "' . esc_js( __( 'Please correct the errors highlighted below and try again.', 'meta-box' ) ) . '"
|
246 |
+
};
|
247 |
+
}
|
248 |
+
else
|
249 |
+
{
|
250 |
+
var tempOptions = jQuery.parseJSON( \'' . json_encode( $this->validation ) . '\' );
|
251 |
+
jQuery.extend( true, rwmb.validationOptions, tempOptions );
|
252 |
+
}
|
253 |
+
</script>
|
254 |
+
';
|
255 |
+
}
|
256 |
+
|
257 |
+
// Allow users to add custom code after meta box content
|
258 |
+
// 1st action applies to all meta boxes
|
259 |
+
// 2nd action applies to only current meta box
|
260 |
+
do_action( 'rwmb_after', $this );
|
261 |
+
do_action( "rwmb_after_{$this->meta_box['id']}", $this );
|
262 |
+
|
263 |
+
// End container
|
264 |
+
echo '</div>';
|
265 |
+
}
|
266 |
+
|
267 |
+
/**************************************************
|
268 |
+
* SAVE META BOX
|
269 |
+
**************************************************/
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Save data from meta box
|
273 |
+
*
|
274 |
+
* @param int $post_id Post ID
|
275 |
+
*
|
276 |
+
* @return void
|
277 |
+
*/
|
278 |
+
function save_post( $post_id )
|
279 |
+
{
|
280 |
+
// Check if this function is called to prevent duplicated calls like revisions, manual hook to wp_insert_post, etc.
|
281 |
+
if ( $this->saved === true )
|
282 |
+
return;
|
283 |
+
$this->saved = true;
|
284 |
+
|
285 |
+
// Check whether form is submitted properly
|
286 |
+
$id = $this->meta_box['id'];
|
287 |
+
$nonce = isset( $_POST["nonce_{$id}"] ) ? sanitize_key( $_POST["nonce_{$id}"] ) : '';
|
288 |
+
if ( empty( $_POST["nonce_{$id}"] ) || ! wp_verify_nonce( $nonce, "rwmb-save-{$id}" ) )
|
289 |
+
return;
|
290 |
+
|
291 |
+
// Autosave
|
292 |
+
if ( defined( 'DOING_AUTOSAVE' ) && ! $this->meta_box['autosave'] )
|
293 |
+
return;
|
294 |
+
|
295 |
+
// Make sure meta is added to the post, not a revision
|
296 |
+
if ( $the_post = wp_is_post_revision( $post_id ) )
|
297 |
+
$post_id = $the_post;
|
298 |
+
|
299 |
+
// Before save action
|
300 |
+
do_action( 'rwmb_before_save_post', $post_id );
|
301 |
+
do_action( "rwmb_{$this->meta_box['id']}_before_save_post", $post_id );
|
302 |
+
|
303 |
+
foreach ( $this->fields as $field )
|
304 |
+
{
|
305 |
+
$name = $field['id'];
|
306 |
+
$old = get_post_meta( $post_id, $name, ! $field['multiple'] );
|
307 |
+
$new = isset( $_POST[$name] ) ? $_POST[$name] : ( $field['multiple'] ? array() : '' );
|
308 |
+
|
309 |
+
// Allow field class change the value
|
310 |
+
$new = call_user_func( array( self::get_class_name( $field ), 'value' ), $new, $old, $post_id, $field );
|
311 |
+
|
312 |
+
// Use filter to change field value
|
313 |
+
// 1st filter applies to all fields with the same type
|
314 |
+
// 2nd filter applies to current field only
|
315 |
+
$new = apply_filters( "rwmb_{$field['type']}_value", $new, $field, $old );
|
316 |
+
$new = apply_filters( "rwmb_{$name}_value", $new, $field, $old );
|
317 |
+
|
318 |
+
// Call defined method to save meta value, if there's no methods, call common one
|
319 |
+
call_user_func( array( self::get_class_name( $field ), 'save' ), $new, $old, $post_id, $field );
|
320 |
+
}
|
321 |
+
|
322 |
+
// After save action
|
323 |
+
do_action( 'rwmb_after_save_post', $post_id );
|
324 |
+
do_action( "rwmb_{$this->meta_box['id']}_after_save_post", $post_id );
|
325 |
+
}
|
326 |
+
|
327 |
+
/**************************************************
|
328 |
+
* HELPER FUNCTIONS
|
329 |
+
**************************************************/
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Normalize parameters for meta box
|
333 |
+
*
|
334 |
+
* @param array $meta_box Meta box definition
|
335 |
+
*
|
336 |
+
* @return array $meta_box Normalized meta box
|
337 |
+
*/
|
338 |
+
static function normalize( $meta_box )
|
339 |
+
{
|
340 |
+
// Set default values for meta box
|
341 |
+
$meta_box = wp_parse_args( $meta_box, array(
|
342 |
+
'id' => sanitize_title( $meta_box['title'] ),
|
343 |
+
'context' => 'normal',
|
344 |
+
'priority' => 'high',
|
345 |
+
'pages' => array( 'post' ),
|
346 |
+
'autosave' => false,
|
347 |
+
'default_hidden' => false,
|
348 |
+
) );
|
349 |
+
|
350 |
+
// Set default values for fields
|
351 |
+
$meta_box['fields'] = self::normalize_fields( $meta_box['fields'] );
|
352 |
+
|
353 |
+
// Allow to add default values for meta box
|
354 |
+
$meta_box = apply_filters( 'rwmb_normalize_meta_box', $meta_box );
|
355 |
+
$meta_box = apply_filters( "rwmb_normalize_{$meta_box['id']}_meta_box", $meta_box );
|
356 |
+
|
357 |
+
return $meta_box;
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* Normalize an array of fields
|
362 |
+
*
|
363 |
+
* @param array $fields Array of fields
|
364 |
+
*
|
365 |
+
* @return array $fields Normalized fields
|
366 |
+
*/
|
367 |
+
static function normalize_fields( $fields )
|
368 |
+
{
|
369 |
+
foreach ( $fields as &$field )
|
370 |
+
{
|
371 |
+
$field = wp_parse_args( $field, array(
|
372 |
+
'multiple' => false,
|
373 |
+
'clone' => false,
|
374 |
+
'std' => '',
|
375 |
+
'desc' => '',
|
376 |
+
'format' => '',
|
377 |
+
'before' => '',
|
378 |
+
'after' => '',
|
379 |
+
'field_name' => isset( $field['id'] ) ? $field['id'] : '',
|
380 |
+
'required' => false,
|
381 |
+
'placeholder' => '',
|
382 |
+
) );
|
383 |
+
|
384 |
+
do_action( 'rwmb_before_normalize_field', $field );
|
385 |
+
do_action( "rwmb_before_normalize_{$field['type']}_field", $field );
|
386 |
+
do_action( "rwmb_before_normalize_{$field['id']}_field", $field );
|
387 |
+
|
388 |
+
// Allow field class add/change default field values
|
389 |
+
$field = call_user_func( array( self::get_class_name( $field ), 'normalize_field' ), $field );
|
390 |
+
|
391 |
+
if ( isset( $field['fields'] ) )
|
392 |
+
$field['fields'] = self::normalize_fields( $field['fields'] );
|
393 |
+
|
394 |
+
// Allow to add default values for fields
|
395 |
+
$field = apply_filters( 'rwmb_normalize_field', $field );
|
396 |
+
$field = apply_filters( "rwmb_normalize_{$field['type']}_field", $field );
|
397 |
+
$field = apply_filters( "rwmb_normalize_{$field['id']}_field", $field );
|
398 |
+
|
399 |
+
do_action( 'rwmb_after_normalize_field', $field );
|
400 |
+
do_action( "rwmb_after_normalize_{$field['type']}_field", $field );
|
401 |
+
do_action( "rwmb_after_normalize_{$field['id']}_field", $field );
|
402 |
+
}
|
403 |
+
|
404 |
+
return $fields;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Get field class name
|
409 |
+
*
|
410 |
+
* @param array $field Field array
|
411 |
+
*
|
412 |
+
* @return bool|string Field class name OR false on failure
|
413 |
+
*/
|
414 |
+
static function get_class_name( $field )
|
415 |
+
{
|
416 |
+
// Convert underscores to whitespace so ucwords works as expected. Otherwise: plupload_image -> Plupload_image instead of Plupload_Image
|
417 |
+
$type = str_replace( '_', ' ', $field['type'] );
|
418 |
+
|
419 |
+
// Uppercase first words
|
420 |
+
$class = 'RWMB_' . ucwords( $type ) . '_Field';
|
421 |
+
|
422 |
+
// Relace whitespace with underscores
|
423 |
+
$class = str_replace( ' ', '_', $class );
|
424 |
+
|
425 |
+
return class_exists( $class ) ? $class : false;
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Check if meta box has been saved
|
430 |
+
* This helps saving empty value in meta fields (for text box, check box, etc.)
|
431 |
+
*
|
432 |
+
* @param int $post_id
|
433 |
+
* @param array $fields
|
434 |
+
*
|
435 |
+
* @return bool
|
436 |
+
*/
|
437 |
+
static function has_been_saved( $post_id, $fields )
|
438 |
+
{
|
439 |
+
foreach ( $fields as $field )
|
440 |
+
{
|
441 |
+
$value = get_post_meta( $post_id, $field['id'], ! $field['multiple'] );
|
442 |
+
if (
|
443 |
+
( ! $field['multiple'] && '' !== $value )
|
444 |
+
|| ( $field['multiple'] && array() !== $value )
|
445 |
+
)
|
446 |
+
{
|
447 |
+
return true;
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
return false;
|
452 |
+
}
|
453 |
+
}
|
454 |
+
}
|
inc/meta-box/js/autocomplete.js
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Update date picker element
|
7 |
+
* Used for static & dynamic added elements (when clone)
|
8 |
+
*/
|
9 |
+
function updateAutocomplete( e )
|
10 |
+
{
|
11 |
+
var $this = $( this ),
|
12 |
+
$result = $this.next(),
|
13 |
+
name = $this.data( 'name' );
|
14 |
+
|
15 |
+
// If the function is called on cloning, then change the field name and clear all results
|
16 |
+
// @see clone.js
|
17 |
+
if ( e.hasOwnProperty( 'type' ) && 'clone' == e.type )
|
18 |
+
{
|
19 |
+
name = name.replace( /\[(\d+)\]/, function ( match, p1 )
|
20 |
+
{
|
21 |
+
return '[' + ( parseInt( p1, 10 ) + 1 ) + ']';
|
22 |
+
} );
|
23 |
+
|
24 |
+
// Update the "data-name" attribute for further cloning
|
25 |
+
$this.attr( 'data-name', name );
|
26 |
+
|
27 |
+
// Clear all results
|
28 |
+
$result.html( '' );
|
29 |
+
}
|
30 |
+
|
31 |
+
$this.removeClass( 'ui-autocomplete-input' ).attr( 'id', '' )
|
32 |
+
.autocomplete( {
|
33 |
+
minLength: 0,
|
34 |
+
source : $this.data( 'options' ),
|
35 |
+
select : function ( event, ui )
|
36 |
+
{
|
37 |
+
$result.append(
|
38 |
+
'<div class="rwmb-autocomplete-result">' +
|
39 |
+
'<div class="label">' + ui.item.label + '</div>' +
|
40 |
+
'<div class="actions">' + RWMB_Autocomplete.delete + '</div>' +
|
41 |
+
'<input type="hidden" class="rwmb-autocomplete-value" name="' + name + '" value="' + ui.item.value + '">' +
|
42 |
+
'</div>'
|
43 |
+
);
|
44 |
+
|
45 |
+
// Reinitialize value
|
46 |
+
this.value = '';
|
47 |
+
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
} );
|
51 |
+
}
|
52 |
+
|
53 |
+
$( '.rwmb-autocomplete-wrapper input[type="text"]' ).each( updateAutocomplete );
|
54 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-autocomplete', updateAutocomplete );
|
55 |
+
|
56 |
+
// Handle remove action
|
57 |
+
$( document ).on( 'click', '.rwmb-autocomplete-result .actions', function ()
|
58 |
+
{
|
59 |
+
// remove result
|
60 |
+
$( this ).parent().remove();
|
61 |
+
} );
|
62 |
+
} );
|
inc/meta-box/js/autosave.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
$( document ).ajaxSend( function( e, xhr, s )
|
6 |
+
{
|
7 |
+
if ( typeof s.data !== 'undefined' && -1 !== s.data.indexOf( 'action=autosave' ) )
|
8 |
+
{
|
9 |
+
$( '.rwmb-meta-box').each( function()
|
10 |
+
{
|
11 |
+
var $meta_box = $( this );
|
12 |
+
if ( $meta_box.data( 'autosave' ) === true )
|
13 |
+
{
|
14 |
+
s.data += '&' + $meta_box.find( ':input' ).serialize();
|
15 |
+
}
|
16 |
+
} );
|
17 |
+
}
|
18 |
+
} );
|
19 |
+
} );
|
inc/meta-box/js/clone.js
ADDED
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Clone fields
|
7 |
+
* @param $container A div container which has all fields
|
8 |
+
* @return void
|
9 |
+
*/
|
10 |
+
function clone( $container )
|
11 |
+
{
|
12 |
+
var $clone_last = $container.find( '.rwmb-clone:last' ),
|
13 |
+
$clone = $clone_last.clone(),
|
14 |
+
$input;
|
15 |
+
|
16 |
+
$clone.insertAfter( $clone_last );
|
17 |
+
$input = $clone.find( ':input[class|="rwmb"]' );
|
18 |
+
|
19 |
+
// Increment each field type
|
20 |
+
$input.each( function ()
|
21 |
+
{
|
22 |
+
var $this = $( this );
|
23 |
+
|
24 |
+
if ( $this.attr( 'type' ) === 'radio' || $this.attr( 'type' ) === 'checkbox' )
|
25 |
+
{
|
26 |
+
// Reset 'checked' attribute
|
27 |
+
$this.removeAttr( 'checked' );
|
28 |
+
}
|
29 |
+
else
|
30 |
+
{
|
31 |
+
// Reset value
|
32 |
+
$this.val( '' );
|
33 |
+
}
|
34 |
+
|
35 |
+
// Get the field name, and increment
|
36 |
+
var name = $this.attr( 'name' ).replace( /\[(\d+)\]/, function ( match, p1 )
|
37 |
+
{
|
38 |
+
return '[' + ( parseInt( p1, 10 ) + 1 ) + ']';
|
39 |
+
} );
|
40 |
+
|
41 |
+
// Update the "name" attribute
|
42 |
+
$this.attr( 'name', name );
|
43 |
+
|
44 |
+
// Get the field id, and increment
|
45 |
+
// Not all fields require id, such as 'radio', 'checkbox_list'
|
46 |
+
var id = $this.attr( 'id' );
|
47 |
+
if ( id )
|
48 |
+
{
|
49 |
+
if ( /_(\d+)/.test( id ) )
|
50 |
+
{
|
51 |
+
id = id.replace( /_(\d+)/, function ( match, p1 )
|
52 |
+
{
|
53 |
+
return '_' + ( parseInt( p1, 10 ) + 1 );
|
54 |
+
} );
|
55 |
+
}
|
56 |
+
else
|
57 |
+
{
|
58 |
+
id += '_1';
|
59 |
+
}
|
60 |
+
|
61 |
+
// Update the "id" attribute
|
62 |
+
$this.attr( 'id', id );
|
63 |
+
}
|
64 |
+
|
65 |
+
// Update the address_button "value" attribute
|
66 |
+
var $address_button = $clone.find( '.rwmb-map-goto-address-button' );
|
67 |
+
if ( $address_button )
|
68 |
+
{
|
69 |
+
var value = $address_button.attr( 'value' );
|
70 |
+
if ( /_(\d+)/.test( value ) )
|
71 |
+
{
|
72 |
+
value = value.replace( /_(\d+)/, function ( match, p1 )
|
73 |
+
{
|
74 |
+
return '_' + ( parseInt( p1, 10 ) + 1 );
|
75 |
+
} );
|
76 |
+
}
|
77 |
+
else
|
78 |
+
{
|
79 |
+
value += '_1';
|
80 |
+
}
|
81 |
+
$address_button.attr( 'value', value );
|
82 |
+
}
|
83 |
+
} );
|
84 |
+
|
85 |
+
// Toggle remove buttons
|
86 |
+
toggleRemoveButtons( $input );
|
87 |
+
|
88 |
+
// Trigger custom clone event
|
89 |
+
$input.trigger( 'clone' );
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Hide remove buttons when there's only 1 of them
|
94 |
+
*
|
95 |
+
* @param $el jQuery element. If not supplied, the function will applies for all fields
|
96 |
+
*
|
97 |
+
* @return void
|
98 |
+
*/
|
99 |
+
function toggleRemoveButtons( $el )
|
100 |
+
{
|
101 |
+
var $button;
|
102 |
+
$el = $el || $( '.rwmb-field' );
|
103 |
+
$el.each( function ()
|
104 |
+
{
|
105 |
+
$button = $( this ).find( '.remove-clone' );
|
106 |
+
if ( $button.length < 2 )
|
107 |
+
{
|
108 |
+
$button.hide();
|
109 |
+
}
|
110 |
+
else
|
111 |
+
{
|
112 |
+
$button.show();
|
113 |
+
}
|
114 |
+
} );
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Clone WYSIWYG field
|
119 |
+
* @param $container
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
function cloneWYSIWYG( $container )
|
123 |
+
{
|
124 |
+
var $clone_first = $container.find( '.rwmb-clone:first' ),
|
125 |
+
$clone_last = $container.find( '.rwmb-clone:last' ),
|
126 |
+
$clone = $( '<div />' ).addClass( 'rwmb-clone' ),
|
127 |
+
field_name = $clone_last.find( 'textarea.wp-editor-area' ).attr( 'name' ),
|
128 |
+
field_id = field_name.replace( /\[(\d+)\]/, '' );
|
129 |
+
|
130 |
+
//Create some global vars
|
131 |
+
var new_index = 0;
|
132 |
+
var new_name = field_name.replace( /\[(\d+)\]/, function ( match, p1 )
|
133 |
+
{
|
134 |
+
new_index = ( parseInt( p1, 10 ) + 1 );
|
135 |
+
return '[' + new_index + ']';
|
136 |
+
} );
|
137 |
+
|
138 |
+
if ( typeof rwmb_cloneable_editors !== 'undefined' && typeof rwmb_cloneable_editors[field_id] !== 'undefined' )
|
139 |
+
{
|
140 |
+
//Get HTML of editor from global object
|
141 |
+
var cloned_editor = $( rwmb_cloneable_editors[field_id] );
|
142 |
+
|
143 |
+
//Fill new clone with html form global object
|
144 |
+
$clone.append( cloned_editor );
|
145 |
+
|
146 |
+
//Add remove button to clone
|
147 |
+
$clone.append( $clone_last.find( '.remove-clone' ).clone() );
|
148 |
+
|
149 |
+
//Add new clone after the last clone
|
150 |
+
$clone.insertAfter( $clone_last );
|
151 |
+
|
152 |
+
//Replace ID of field with new ID
|
153 |
+
var new_id = cloned_editor.attr( 'id' ).replace( /\[(\d+)\]/, '[' + new_index + ']' );
|
154 |
+
cloned_editor.attr( 'id', new_id );
|
155 |
+
|
156 |
+
//Replace all IDs within cloned field
|
157 |
+
cloned_editor.find( '[id*="' + field_id + '"]' ).each( function ()
|
158 |
+
{
|
159 |
+
var id = $( this ).attr( 'id' ).replace( /\[(\d+)\]/, '[' + new_index + ']' );
|
160 |
+
$( this ).attr( 'id', id );
|
161 |
+
} );
|
162 |
+
|
163 |
+
//Get the new textarea element
|
164 |
+
var textarea = $( cloned_editor ).find( 'textarea.wp-editor-area' );
|
165 |
+
|
166 |
+
// Update the "name" attribute
|
167 |
+
textarea.attr( 'name', new_name );
|
168 |
+
|
169 |
+
//Empty the textarea
|
170 |
+
textarea.html( '' );
|
171 |
+
|
172 |
+
//Update editor link, so we can add media to the new editor
|
173 |
+
cloned_editor.find( '#insert-media-button' ).data( 'editor', new_name );
|
174 |
+
|
175 |
+
|
176 |
+
//Get TinyMCE setting for our fields
|
177 |
+
var tmceinit = tinyMCEPreInit.mceInit[$clone_first.find( 'textarea.wp-editor-area' ).attr( 'name' )];
|
178 |
+
var tmceqtinit = tinyMCEPreInit.qtInit[$clone_first.find( 'textarea.wp-editor-area' ).attr( 'name' )];
|
179 |
+
|
180 |
+
//Replace id & elements with new created field names
|
181 |
+
tmceinit.elements = new_name;
|
182 |
+
tmceqtinit.id = new_name;
|
183 |
+
|
184 |
+
//Initialize TinyMCE
|
185 |
+
try
|
186 |
+
{
|
187 |
+
tinymce.init( tmceinit );
|
188 |
+
}
|
189 |
+
catch ( e )
|
190 |
+
{
|
191 |
+
}
|
192 |
+
if ( typeof(QTags) === 'function' )
|
193 |
+
{
|
194 |
+
try
|
195 |
+
{
|
196 |
+
quicktags( tmceqtinit );
|
197 |
+
}
|
198 |
+
catch ( e )
|
199 |
+
{
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
// Toggle remove buttons
|
204 |
+
toggleRemoveButtons( $clone );
|
205 |
+
|
206 |
+
//Trigger custom clone event
|
207 |
+
textarea.trigger( 'clone' );
|
208 |
+
}
|
209 |
+
|
210 |
+
}
|
211 |
+
|
212 |
+
|
213 |
+
// Add more clones
|
214 |
+
$( '.add-clone' ).on( 'click', function ( e )
|
215 |
+
{
|
216 |
+
e.preventDefault();
|
217 |
+
|
218 |
+
var $input = $( this ).parents( '.rwmb-input' );
|
219 |
+
|
220 |
+
if ( $( this ).parents( '.rwmb-field' ).hasClass( 'rwmb-wysiwyg-wrapper' ) )
|
221 |
+
{
|
222 |
+
cloneWYSIWYG( $input );
|
223 |
+
}
|
224 |
+
else
|
225 |
+
{
|
226 |
+
clone( $input );
|
227 |
+
}
|
228 |
+
|
229 |
+
toggleRemoveButtons( $input );
|
230 |
+
} );
|
231 |
+
|
232 |
+
// Remove clones
|
233 |
+
$( '.rwmb-input' ).on( 'click', '.remove-clone', function ( e )
|
234 |
+
{
|
235 |
+
e.preventDefault();
|
236 |
+
|
237 |
+
var $this = $( this ),
|
238 |
+
$input = $this.parents( '.rwmb-input' );
|
239 |
+
|
240 |
+
// Remove clone only if there're 2 or more of them
|
241 |
+
if ( $input.find( '.rwmb-clone' ).length <= 1 )
|
242 |
+
{
|
243 |
+
return;
|
244 |
+
}
|
245 |
+
|
246 |
+
$this.parent().remove();
|
247 |
+
|
248 |
+
// Toggle remove buttons
|
249 |
+
toggleRemoveButtons( $input );
|
250 |
+
} );
|
251 |
+
|
252 |
+
toggleRemoveButtons();
|
253 |
+
} );
|
inc/meta-box/js/color.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
function rwmb_update_color_picker()
|
6 |
+
{
|
7 |
+
var $this = $( this ),
|
8 |
+
$clone_container = $this.closest( '.rwmb-clone' ),
|
9 |
+
$color_picker = $this.siblings( '.rwmb-color-picker' );
|
10 |
+
|
11 |
+
// Make sure the value is displayed
|
12 |
+
if ( !$this.val() )
|
13 |
+
{
|
14 |
+
$this.val( '#' );
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( typeof $.wp === 'object' && typeof $.wp.wpColorPicker === 'function' )
|
18 |
+
{
|
19 |
+
if ( $clone_container.length > 0 )
|
20 |
+
{
|
21 |
+
$this.appendTo( $clone_container ).siblings( 'div.wp-picker-container' ).remove();
|
22 |
+
}
|
23 |
+
$this.wpColorPicker();
|
24 |
+
}
|
25 |
+
else
|
26 |
+
{
|
27 |
+
//We use farbtastic if the WordPress color picker widget doesn't exist
|
28 |
+
$color_picker.farbtastic( $this );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
$( ':input.rwmb-color' ).each( rwmb_update_color_picker );
|
33 |
+
$( '.rwmb-input' )
|
34 |
+
.on( 'clone', ':input.rwmb-color', rwmb_update_color_picker )
|
35 |
+
.on( 'focus', '.rwmb-color', function ()
|
36 |
+
{
|
37 |
+
$( this ).siblings( '.rwmb-color-picker' ).show();
|
38 |
+
return false;
|
39 |
+
} ).on( 'blur', '.rwmb-color', function ()
|
40 |
+
{
|
41 |
+
$( this ).siblings( '.rwmb-color-picker' ).hide();
|
42 |
+
return false;
|
43 |
+
} );
|
44 |
+
} );
|
inc/meta-box/js/date.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Update date picker element
|
7 |
+
* Used for static & dynamic added elements (when clone)
|
8 |
+
*/
|
9 |
+
function rwmb_update_date_picker()
|
10 |
+
{
|
11 |
+
var $this = $( this ),
|
12 |
+
options = $this.data( 'options' );
|
13 |
+
|
14 |
+
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
+
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datepicker( options );
|
16 |
+
}
|
17 |
+
|
18 |
+
$( ':input.rwmb-date' ).each( rwmb_update_date_picker );
|
19 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-date', rwmb_update_date_picker );
|
20 |
+
} );
|
inc/meta-box/js/datetime.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Update datetime picker element
|
7 |
+
* Used for static & dynamic added elements (when clone)
|
8 |
+
*/
|
9 |
+
function rwmb_update_datetime_picker()
|
10 |
+
{
|
11 |
+
var $this = $( this ),
|
12 |
+
options = $this.data( 'options' );
|
13 |
+
|
14 |
+
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
+
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).datetimepicker( options );
|
16 |
+
|
17 |
+
}
|
18 |
+
|
19 |
+
$( ':input.rwmb-datetime' ).each( rwmb_update_datetime_picker );
|
20 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-datetime', rwmb_update_datetime_picker );
|
21 |
+
} );
|
inc/meta-box/js/file-advanced.js
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
var template = $( '#tmpl-rwmb-file-advanced' ).html();
|
6 |
+
|
7 |
+
$( 'body' ).on( 'click', '.rwmb-file-advanced-upload', function ( e )
|
8 |
+
{
|
9 |
+
e.preventDefault();
|
10 |
+
|
11 |
+
var $uploadButton = $( this ),
|
12 |
+
$fileList = $uploadButton.siblings( '.rwmb-uploaded' ),
|
13 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' ),
|
14 |
+
mimeType = $fileList.data( 'mime_type' ),
|
15 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle,
|
16 |
+
frame,
|
17 |
+
frameOptions = {
|
18 |
+
className: 'media-frame rwmb-file-frame',
|
19 |
+
multiple : true,
|
20 |
+
title : rwmbFileAdvanced.frameTitle
|
21 |
+
};
|
22 |
+
|
23 |
+
msg = msg.replace( '%d', maxFileUploads );
|
24 |
+
|
25 |
+
// Create a media frame
|
26 |
+
if ( mimeType )
|
27 |
+
{
|
28 |
+
frameOptions.library = {
|
29 |
+
type: mimeType
|
30 |
+
};
|
31 |
+
}
|
32 |
+
frame = wp.media( frameOptions );
|
33 |
+
|
34 |
+
// Open media uploader
|
35 |
+
frame.open();
|
36 |
+
|
37 |
+
// Remove all attached 'select' event
|
38 |
+
frame.off( 'select' );
|
39 |
+
|
40 |
+
// Handle selection
|
41 |
+
frame.on( 'select', function ()
|
42 |
+
{
|
43 |
+
// Get selections
|
44 |
+
var selection = frame.state().get( 'selection' ).toJSON(),
|
45 |
+
uploaded = $fileList.children().length,
|
46 |
+
ids;
|
47 |
+
|
48 |
+
if ( maxFileUploads > 0 && ( uploaded + selection.length ) > maxFileUploads )
|
49 |
+
{
|
50 |
+
if ( uploaded < maxFileUploads )
|
51 |
+
{
|
52 |
+
selection = selection.slice( 0, maxFileUploads - uploaded );
|
53 |
+
}
|
54 |
+
alert( msg );
|
55 |
+
}
|
56 |
+
|
57 |
+
// Get only files that haven't been added to the list
|
58 |
+
// Also prevent duplication when send ajax request
|
59 |
+
selection = _.filter( selection, function ( attachment )
|
60 |
+
{
|
61 |
+
return $fileList.children( 'li#item_' + attachment.id ).length === 0;
|
62 |
+
} );
|
63 |
+
ids = _.pluck( selection, 'id' );
|
64 |
+
|
65 |
+
if ( ids.length > 0 )
|
66 |
+
{
|
67 |
+
// Attach attachment to field and get HTML
|
68 |
+
var data = {
|
69 |
+
action : 'rwmb_attach_file',
|
70 |
+
post_id : $( '#post_ID' ).val(),
|
71 |
+
field_id : $fileList.data( 'field_id' ),
|
72 |
+
attachment_ids: ids,
|
73 |
+
_ajax_nonce : $uploadButton.data( 'attach_file_nonce' )
|
74 |
+
};
|
75 |
+
$.post( ajaxurl, data, function ( r )
|
76 |
+
{
|
77 |
+
if ( r.success )
|
78 |
+
{
|
79 |
+
$fileList
|
80 |
+
.append( _.template( template, { attachments: selection }, {
|
81 |
+
evaluate : /<#([\s\S]+?)#>/g,
|
82 |
+
interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
|
83 |
+
escape : /\{\{([^\}]+?)\}\}(?!\})/g
|
84 |
+
} ) )
|
85 |
+
.trigger( 'update.rwmbFile' );
|
86 |
+
}
|
87 |
+
}, 'json' );
|
88 |
+
}
|
89 |
+
} );
|
90 |
+
} );
|
91 |
+
} );
|
inc/meta-box/js/file-input.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
var frame;
|
6 |
+
|
7 |
+
$( 'body' ).on( 'click', '.rwmb-file-input-select', function ( e )
|
8 |
+
{
|
9 |
+
e.preventDefault();
|
10 |
+
var $el = $( this );
|
11 |
+
|
12 |
+
// Create a frame only if needed
|
13 |
+
if ( !frame )
|
14 |
+
{
|
15 |
+
frame = wp.media( {
|
16 |
+
className: 'media-frame rwmb-file-frame',
|
17 |
+
multiple : false,
|
18 |
+
title : rwmbFileInput.frameTitle
|
19 |
+
} );
|
20 |
+
}
|
21 |
+
|
22 |
+
// Open media uploader
|
23 |
+
frame.open();
|
24 |
+
|
25 |
+
// Remove all attached 'select' event
|
26 |
+
frame.off( 'select' );
|
27 |
+
|
28 |
+
// Handle selection
|
29 |
+
frame.on( 'select', function ()
|
30 |
+
{
|
31 |
+
var url = frame.state().get( 'selection' ).first().toJSON().url;
|
32 |
+
$el.siblings( 'input' ).val( url ).siblings( 'a' ).removeClass( 'hidden' );
|
33 |
+
} );
|
34 |
+
} );
|
35 |
+
|
36 |
+
// Clear selected images
|
37 |
+
$( 'body' ).on( 'click', '.rwmb-file-input-remove', function ( e )
|
38 |
+
{
|
39 |
+
e.preventDefault();
|
40 |
+
$( this ).addClass( 'hidden' ).siblings( 'input' ).val( '' );
|
41 |
+
} );
|
42 |
+
} );
|
inc/meta-box/js/file.js
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
// Add more file
|
6 |
+
$( '.rwmb-add-file' ).each( function ()
|
7 |
+
{
|
8 |
+
var $this = $( this ),
|
9 |
+
$uploads = $this.siblings( '.file-input' ),
|
10 |
+
$first = $uploads.first(),
|
11 |
+
uploadCount = $uploads.length,
|
12 |
+
$fileList = $this.closest( '.rwmb-input' ).find( '.rwmb-uploaded' ),
|
13 |
+
fileCount = $fileList.children( 'li' ).length,
|
14 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' );
|
15 |
+
|
16 |
+
// Hide "Add New File" and input fields when loaded
|
17 |
+
if ( maxFileUploads > 0 )
|
18 |
+
{
|
19 |
+
if ( uploadCount + fileCount >= maxFileUploads )
|
20 |
+
{
|
21 |
+
$this.hide();
|
22 |
+
}
|
23 |
+
if ( fileCount >= maxFileUploads )
|
24 |
+
{
|
25 |
+
$uploads.hide();
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
$this.click( function ()
|
30 |
+
{
|
31 |
+
// Clone upload input only when needed
|
32 |
+
if ( maxFileUploads <= 0 || uploadCount + fileCount < maxFileUploads )
|
33 |
+
{
|
34 |
+
$first.clone().insertBefore( $this );
|
35 |
+
uploadCount++;
|
36 |
+
|
37 |
+
// If there're too many upload inputs, hide "Add New File"
|
38 |
+
if ( maxFileUploads > 0 && uploadCount + fileCount >= maxFileUploads )
|
39 |
+
{
|
40 |
+
$this.hide();
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
return false;
|
45 |
+
} );
|
46 |
+
} );
|
47 |
+
|
48 |
+
// Delete file via Ajax
|
49 |
+
$( '.rwmb-uploaded' ).on( 'click', '.rwmb-delete-file', function ()
|
50 |
+
{
|
51 |
+
var $this = $( this ),
|
52 |
+
$parent = $this.parents( 'li' ),
|
53 |
+
$container = $this.closest( '.rwmb-uploaded' ),
|
54 |
+
data = {
|
55 |
+
action : 'rwmb_delete_file',
|
56 |
+
_ajax_nonce : $container.data( 'delete_nonce' ),
|
57 |
+
post_id : $( '#post_ID' ).val(),
|
58 |
+
field_id : $container.data( 'field_id' ),
|
59 |
+
attachment_id: $this.data( 'attachment_id' ),
|
60 |
+
force_delete : $container.data( 'force_delete' )
|
61 |
+
};
|
62 |
+
|
63 |
+
$.post( ajaxurl, data, function ( r )
|
64 |
+
{
|
65 |
+
if ( !r.success )
|
66 |
+
{
|
67 |
+
alert( r.data );
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
$parent.addClass( 'removed' );
|
72 |
+
|
73 |
+
// If transition events not supported
|
74 |
+
var div = document.createElement( 'div' );
|
75 |
+
if (
|
76 |
+
!( 'ontransitionend' in window ) &&
|
77 |
+
( 'onwebkittransitionend' in window ) && !( 'onotransitionend' in div || navigator.appName === 'Opera' )
|
78 |
+
)
|
79 |
+
{
|
80 |
+
$parent.remove();
|
81 |
+
$container.trigger( 'update.rwmbFile' );
|
82 |
+
}
|
83 |
+
|
84 |
+
$( '.rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
|
85 |
+
{
|
86 |
+
$( this ).remove();
|
87 |
+
$container.trigger( 'update.rwmbFile' );
|
88 |
+
} );
|
89 |
+
}, 'json' );
|
90 |
+
|
91 |
+
return false;
|
92 |
+
} );
|
93 |
+
|
94 |
+
//Remove deleted file
|
95 |
+
$( '.rwmb-uploaded' ).on( 'transitionend webkitTransitionEnd otransitionend', 'li.removed', function ()
|
96 |
+
{
|
97 |
+
$( this ).remove();
|
98 |
+
} );
|
99 |
+
|
100 |
+
$( 'body' ).on( 'update.rwmbFile', '.rwmb-uploaded', function ()
|
101 |
+
{
|
102 |
+
var $fileList = $( this ),
|
103 |
+
maxFileUploads = $fileList.data( 'max_file_uploads' ),
|
104 |
+
$uploader = $fileList.siblings( '.new-files' ),
|
105 |
+
numFiles = $fileList.children().length;
|
106 |
+
|
107 |
+
if ( numFiles > 0 )
|
108 |
+
{
|
109 |
+
$fileList.removeClass( 'hidden' );
|
110 |
+
}
|
111 |
+
else
|
112 |
+
{
|
113 |
+
$fileList.addClass( 'hidden' );
|
114 |
+
}
|
115 |
+
|
116 |
+
// Return if maxFileUpload = 0
|
117 |
+
if ( maxFileUploads === 0 )
|
118 |
+
{
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
|
122 |
+
// Hide files button if reach max file uploads
|
123 |
+
if ( numFiles >= maxFileUploads )
|
124 |
+
{
|
125 |
+
$uploader.addClass( 'hidden' );
|
126 |
+
}
|
127 |
+
else
|
128 |
+
{
|
129 |
+
$uploader.removeClass( 'hidden' );
|
130 |
+
}
|
131 |
+
|
132 |
+
return false;
|
133 |
+
} );
|
134 |
+
|
135 |
+
// Reorder images
|
136 |
+
$( '.rwmb-file' ).each( function ()
|
137 |
+
{
|
138 |
+
var $this = $( this ),
|
139 |
+
data = {
|
140 |
+
action : 'rwmb_reorder_files',
|
141 |
+
_ajax_nonce: $this.data( 'reorder_nonce' ),
|
142 |
+
post_id : $( '#post_ID' ).val(),
|
143 |
+
field_id : $this.data( 'field_id' )
|
144 |
+
};
|
145 |
+
$this.sortable( {
|
146 |
+
placeholder: 'ui-state-highlight',
|
147 |
+
items : 'li',
|
148 |
+
update : function ()
|
149 |
+
{
|
150 |
+
|
151 |
+
data.order = $this.sortable( 'serialize' );
|
152 |
+
|
153 |
+
$.post( ajaxurl, data );
|
154 |
+
}
|
155 |
+
} );
|
156 |
+
} );
|
157 |
+
} );
|
inc/meta-box/js/image-advanced.js
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
// Use only one frame for all upload fields
|
6 |
+
var frame,
|
7 |
+
template = $( '#tmpl-rwmb-image-advanced' ).html();
|
8 |
+
|
9 |
+
$( 'body' ).on( 'click', '.rwmb-image-advanced-upload', function ( e )
|
10 |
+
{
|
11 |
+
e.preventDefault();
|
12 |
+
|
13 |
+
var $uploadButton = $( this ),
|
14 |
+
$imageList = $uploadButton.siblings( '.rwmb-images' ),
|
15 |
+
maxFileUploads = $imageList.data( 'max_file_uploads' ),
|
16 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle;
|
17 |
+
|
18 |
+
msg = msg.replace( '%d', maxFileUploads );
|
19 |
+
|
20 |
+
// Create a frame only if needed
|
21 |
+
if ( !frame )
|
22 |
+
{
|
23 |
+
frame = wp.media( {
|
24 |
+
className: 'media-frame rwmb-media-frame',
|
25 |
+
multiple : true,
|
26 |
+
title : rwmbImageAdvanced.frameTitle,
|
27 |
+
library : {
|
28 |
+
type: 'image'
|
29 |
+
}
|
30 |
+
} );
|
31 |
+
}
|
32 |
+
|
33 |
+
// Open media uploader
|
34 |
+
frame.open();
|
35 |
+
|
36 |
+
// Remove all attached 'select' event
|
37 |
+
frame.off( 'select' );
|
38 |
+
|
39 |
+
// Handle selection
|
40 |
+
frame.on( 'select', function ()
|
41 |
+
{
|
42 |
+
// Get selections
|
43 |
+
var selection = frame.state().get( 'selection' ).toJSON(),
|
44 |
+
uploaded = $imageList.children().length,
|
45 |
+
ids;
|
46 |
+
|
47 |
+
if ( maxFileUploads > 0 && ( uploaded + selection.length ) > maxFileUploads )
|
48 |
+
{
|
49 |
+
if ( uploaded < maxFileUploads )
|
50 |
+
{
|
51 |
+
selection = selection.slice( 0, maxFileUploads - uploaded );
|
52 |
+
}
|
53 |
+
alert( msg );
|
54 |
+
}
|
55 |
+
|
56 |
+
// Get only files that haven't been added to the list
|
57 |
+
// Also prevent duplication when send ajax request
|
58 |
+
selection = _.filter( selection, function ( attachment )
|
59 |
+
{
|
60 |
+
return $imageList.children( 'li#item_' + attachment.id ).length === 0;
|
61 |
+
} );
|
62 |
+
ids = _.pluck( selection, 'id' );
|
63 |
+
|
64 |
+
if ( ids.length > 0 )
|
65 |
+
{
|
66 |
+
var data = {
|
67 |
+
action : 'rwmb_attach_media',
|
68 |
+
post_id : $( '#post_ID' ).val(),
|
69 |
+
field_id : $imageList.data( 'field_id' ),
|
70 |
+
attachment_ids: ids,
|
71 |
+
_ajax_nonce : $uploadButton.data( 'attach_media_nonce' )
|
72 |
+
};
|
73 |
+
|
74 |
+
$.post( ajaxurl, data, function ( r )
|
75 |
+
{
|
76 |
+
if ( r.success )
|
77 |
+
{
|
78 |
+
$imageList
|
79 |
+
.append( _.template( template, { attachments: selection }, {
|
80 |
+
evaluate : /<#([\s\S]+?)#>/g,
|
81 |
+
interpolate: /\{\{\{([\s\S]+?)\}\}\}/g,
|
82 |
+
escape : /\{\{([^\}]+?)\}\}(?!\})/g
|
83 |
+
} ) )
|
84 |
+
.trigger( 'update.rwmbFile' );
|
85 |
+
}
|
86 |
+
}, 'json' );
|
87 |
+
}
|
88 |
+
} );
|
89 |
+
} );
|
90 |
+
} );
|
inc/meta-box/js/image-select.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
$( 'body' ).on( 'change', '.rwmb-image-select input', function ()
|
6 |
+
{
|
7 |
+
var $this = $( this ),
|
8 |
+
type = $this.attr( 'type' ),
|
9 |
+
selected = $this.is( ':checked' ),
|
10 |
+
$parent = $this.parent(),
|
11 |
+
$others = $parent.siblings();
|
12 |
+
if ( selected )
|
13 |
+
{
|
14 |
+
$parent.addClass( 'rwmb-active' );
|
15 |
+
if ( type === 'radio' )
|
16 |
+
{
|
17 |
+
$others.removeClass( 'rwmb-active' );
|
18 |
+
}
|
19 |
+
}
|
20 |
+
else
|
21 |
+
{
|
22 |
+
$parent.removeClass( 'rwmb-active' );
|
23 |
+
}
|
24 |
+
} );
|
25 |
+
$( '.rwmb-image-select input' ).trigger( 'change' );
|
26 |
+
} );
|
inc/meta-box/js/image.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
// Reorder images
|
6 |
+
$( '.rwmb-images' ).each( function ()
|
7 |
+
{
|
8 |
+
var $this = $( this ),
|
9 |
+
data = {
|
10 |
+
action : 'rwmb_reorder_images',
|
11 |
+
_ajax_nonce: $this.data( 'reorder_nonce' ),
|
12 |
+
post_id : $( '#post_ID' ).val(),
|
13 |
+
field_id : $this.data( 'field_id' )
|
14 |
+
};
|
15 |
+
$this.sortable( {
|
16 |
+
placeholder: 'ui-state-highlight',
|
17 |
+
items : 'li',
|
18 |
+
update : function ()
|
19 |
+
{
|
20 |
+
data.order = $this.sortable( 'serialize' );
|
21 |
+
$.post( ajaxurl, data );
|
22 |
+
}
|
23 |
+
} );
|
24 |
+
} );
|
25 |
+
} );
|
inc/meta-box/js/jquery.validate.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! jQuery Validation Plugin - v1.11.1 - 3/22/2013\n* https://github.com/jzaefferer/jquery-validation
|
2 |
+
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."),void 0;var i=t.data(this[0],"validator");return i?i:(this.attr("novalidate","novalidate"),i=new t.validator(e,this[0]),t.data(this[0],"validator",i),i.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){i.settings.submitHandler&&(i.submitButton=e.target),t(e.target).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.submit(function(e){function s(){var s;return i.settings.submitHandler?(i.submitButton&&(s=t("<input type='hidden'/>").attr("name",i.submitButton.name).val(t(i.submitButton).val()).appendTo(i.currentForm)),i.settings.submitHandler.call(i,i.currentForm,e),i.submitButton&&s.remove(),!1):!0}return i.settings.debug&&e.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,s()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):s():(i.focusInvalid(),!1)})),i)},valid:function(){if(t(this[0]).is("form"))return this.validate().form();var e=!0,i=t(this[0].form).validate();return this.each(function(){e=e&&i.element(this)}),e},removeAttrs:function(e){var i={},s=this;return t.each(e.split(/\s/),function(t,e){i[e]=s.attr(e),s.removeAttr(e)}),i},rules:function(e,i){var s=this[0];if(e){var r=t.data(s.form,"validator").settings,n=r.rules,a=t.validator.staticRules(s);switch(e){case"add":t.extend(a,t.validator.normalizeRule(i)),delete a.messages,n[s.name]=a,i.messages&&(r.messages[s.name]=t.extend(r.messages[s.name],i.messages));break;case"remove":if(!i)return delete n[s.name],a;var u={};return t.each(i.split(/\s/),function(t,e){u[e]=a[e],delete a[e]}),u}}var o=t.validator.normalizeRules(t.extend({},t.validator.classRules(s),t.validator.attributeRules(s),t.validator.dataRules(s),t.validator.staticRules(s)),s);if(o.required){var l=o.required;delete o.required,o=t.extend({required:l},o)}return o}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,i){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=i,this.init()},t.validator.format=function(e,i){return 1===arguments.length?function(){var i=t.makeArray(arguments);return i.unshift(e),t.validator.format.apply(this,i)}:(arguments.length>2&&i.constructor!==Array&&(i=t.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),t.each(i,function(t,i){e=e.replace(RegExp("\\{"+t+"\\}","g"),function(){return i})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(t)).hide())},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).addClass(i).removeClass(s):t(e).addClass(i).removeClass(s)},unhighlight:function(e,i,s){"radio"===e.type?this.findByName(e.name).removeClass(i).addClass(s):t(e).removeClass(i).addClass(s)}},setDefaults:function(e){t.extend(t.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var i=t.data(this[0].form,"validator"),s="on"+e.type.replace(/^validate/,"");i.settings[s]&&i.settings[s].call(i,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i=this.groups={};t.each(this.settings.groups,function(e,s){"string"==typeof s&&(s=s.split(/\s/)),t.each(s,function(t,s){i[s]=e})});var s=this.settings.rules;t.each(s,function(e,i){s[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",e).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){e=this.validationTargetFor(this.clean(e)),this.lastElement=e,this.prepareElement(e),this.currentElements=t(e);var i=this.check(e)!==!1;return i?delete this.invalid[e.name]:this.invalid[e.name]=!0,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var i in e)this.errorList.push({message:e[i],element:this.findByName(i)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e=0;for(var i in t)e++;return e},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in i||!e.objectLength(t(this).rules())?!1:(i[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.replace(" ",".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var i=t(e).attr("type"),s=t(e).val();return"radio"===i||"checkbox"===i?t("input[name='"+t(e).attr("name")+"']:checked").val():"string"==typeof s?s.replace(/\r/g,""):s},check:function(e){e=this.validationTargetFor(this.clean(e));var i,s=t(e).rules(),r=!1,n=this.elementValue(e);for(var a in s){var u={method:a,parameters:s[a]};try{if(i=t.validator.methods[a].call(this,n,e,u.parameters),"dependency-mismatch"===i){r=!0;continue}if(r=!1,"pending"===i)return this.toHide=this.toHide.not(this.errorsFor(e)),void 0;if(!i)return this.formatAndAdd(e,u),!1}catch(o){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+u.method+"' method.",o),o}}return r?void 0:(this.objectLength(s)&&this.successList.push(e),!0)},customDataMessage:function(e,i){return t(e).data("msg-"+i.toLowerCase())||e.attributes&&t(e).attr("data-msg-"+i.toLowerCase())},customMessage:function(t,e){var i=this.settings.messages[t];return i&&(i.constructor===String?i:i[e])},findDefined:function(){for(var t=0;arguments.length>t;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,i){return this.findDefined(this.customMessage(e.name,i),this.customDataMessage(e,i),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[i],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,i){var s=this.defaultMessage(e,i.method),r=/\$?\{(\d+)\}/g;"function"==typeof s?s=s.call(this,i.parameters,e):r.test(s)&&(s=t.validator.format(s.replace(r,"{$1}"),i.parameters)),this.errorList.push({message:s,element:e}),this.errorMap[e.name]=s,this.submitted[e.name]=s},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e;for(t=0;this.errorList[t];t++){var i=this.errorList[t];this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message)}if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return t(this.errorList).map(function(){return this.element})},showLabel:function(e,i){var s=this.errorsFor(e);s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=t("<"+this.settings.errorElement+">").attr("for",this.idOrName(e)).addClass(this.settings.errorClass).html(i||""),this.settings.wrapper&&(s=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(s).length||(this.settings.errorPlacement?this.settings.errorPlacement(s,t(e)):s.insertAfter(e))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var i=this.idOrName(e);return this.errors().filter(function(){return t(this).attr("for")===i})},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name).not(this.settings.ignore)[0]),t},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,i){switch(i.nodeName.toLowerCase()){case"select":return t("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,i){return!!t(e,i.form).length},"function":function(t,e){return t(e)}},optional:function(e){var i=this.elementValue(e);return!t.validator.methods.required.call(this,i,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,i){this.pendingRequest--,0>this.pendingRequest&&(this.pendingRequest=0),delete this.pending[e.name],i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,i){e.constructor===String?this.classRuleSettings[e]=i:t.extend(this.classRuleSettings,e)},classRules:function(e){var i={},s=t(e).attr("class");return s&&t.each(s.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(i,t.validator.classRuleSettings[this])}),i},attributeRules:function(e){var i={},s=t(e),r=s[0].getAttribute("type");for(var n in t.validator.methods){var a;"required"===n?(a=s.get(0).getAttribute(n),""===a&&(a=!0),a=!!a):a=s.attr(n),/min|max/.test(n)&&(null===r||/number|range|text/.test(r))&&(a=Number(a)),a?i[n]=a:r===n&&"range"!==r&&(i[n]=!0)}return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var i,s,r={},n=t(e);for(i in t.validator.methods)s=n.data("rule-"+i.toLowerCase()),void 0!==s&&(r[i]=s);return r},staticRules:function(e){var i={},s=t.data(e.form,"validator");return s.settings.rules&&(i=t.validator.normalizeRule(s.settings.rules[e.name])||{}),i},normalizeRules:function(e,i){return t.each(e,function(s,r){if(r===!1)return delete e[s],void 0;if(r.param||r.depends){var n=!0;switch(typeof r.depends){case"string":n=!!t(r.depends,i.form).length;break;case"function":n=r.depends.call(i,i)}n?e[s]=void 0!==r.param?r.param:!0:delete e[s]}}),t.each(e,function(s,r){e[s]=t.isFunction(r)?r(i):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var i;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(i=e[this].split(/[\s,]+/),e[this]=[Number(i[0]),Number(i[1])]))}),t.validator.autoCreateRanges&&(e.min&&e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),e.minlength&&e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var i={};t.each(e.split(/\s/),function(){i[this]=!0}),e=i}return e},addMethod:function(e,i,s){t.validator.methods[e]=i,t.validator.messages[e]=void 0!==s?s:t.validator.messages[e],3>i.length&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,i,s){if(!this.depend(s,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var r=t(i).val();return r&&r.length>0}return this.checkable(i)?this.getLength(e,i)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i.test(t)},url:function(t,e){return this.optional(e)||/^(https?|s?ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(""+new Date(t))},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var i=0,s=0,r=!1;t=t.replace(/\D/g,"");for(var n=t.length-1;n>=0;n--){var a=t.charAt(n);s=parseInt(a,10),r&&(s*=2)>9&&(s-=9),i+=s,r=!r}return 0===i%10},minlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s},maxlength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||s>=r},rangelength:function(e,i,s){var r=t.isArray(e)?e.length:this.getLength(t.trim(e),i);return this.optional(i)||r>=s[0]&&s[1]>=r},min:function(t,e,i){return this.optional(e)||t>=i},max:function(t,e,i){return this.optional(e)||i>=t},range:function(t,e,i){return this.optional(e)||t>=i[0]&&i[1]>=t},equalTo:function(e,i,s){var r=t(s);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(i).valid()}),e===r.val()},remote:function(e,i,s){if(this.optional(i))return"dependency-mismatch";var r=this.previousValue(i);if(this.settings.messages[i.name]||(this.settings.messages[i.name]={}),r.originalMessage=this.settings.messages[i.name].remote,this.settings.messages[i.name].remote=r.message,s="string"==typeof s&&{url:s}||s,r.old===e)return r.valid;r.old=e;var n=this;this.startRequest(i);var a={};return a[i.name]=e,t.ajax(t.extend(!0,{url:s,mode:"abort",port:"validate"+i.name,dataType:"json",data:a,success:function(s){n.settings.messages[i.name].remote=r.originalMessage;var a=s===!0||"true"===s;if(a){var u=n.formSubmitted;n.prepareElement(i),n.formSubmitted=u,n.successList.push(i),delete n.invalid[i.name],n.showErrors()}else{var o={},l=s||n.defaultMessage(i,"remote");o[i.name]=r.message=t.isFunction(l)?l(e):l,n.invalid[i.name]=!0,n.showErrors(o)}r.valid=a,n.stopRequest(i,a)}},s)),"pending"}}}),t.format=t.validator.format})(jQuery),function(t){var e={};if(t.ajaxPrefilter)t.ajaxPrefilter(function(t,i,s){var r=t.port;"abort"===t.mode&&(e[r]&&e[r].abort(),e[r]=s)});else{var i=t.ajax;t.ajax=function(s){var r=("mode"in s?s:t.ajaxSettings).mode,n=("port"in s?s:t.ajaxSettings).port;return"abort"===r?(e[n]&&e[n].abort(),e[n]=i.apply(this,arguments),e[n]):i.apply(this,arguments)}}}(jQuery),function(t){t.extend(t.fn,{validateDelegate:function(e,i,s){return this.bind(i,function(i){var r=t(i.target);return r.is(e)?s.apply(r,arguments):void 0})}})}(jQuery);
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-af.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Renier Pretorius. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['af'] = {
|
5 |
+
closeText: 'Selekteer',
|
6 |
+
prevText: 'Vorige',
|
7 |
+
nextText: 'Volgende',
|
8 |
+
currentText: 'Vandag',
|
9 |
+
monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
|
10 |
+
'Julie','Augustus','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
|
13 |
+
dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
|
14 |
+
dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
|
15 |
+
dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['af']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar-DZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
|
2 |
+
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar-DZ'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
9 |
+
currentText: 'اليوم',
|
10 |
+
monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
|
11 |
+
'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
|
12 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
13 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
14 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
15 |
+
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
16 |
+
weekHeader: 'أسبوع',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 6,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ar.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Arabic Translation for jQuery UI date picker plugin. */
|
2 |
+
/* Khaled Alhourani -- me@khaledalhourani.com */
|
3 |
+
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
9 |
+
currentText: 'اليوم',
|
10 |
+
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
|
11 |
+
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
|
12 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
13 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
14 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
15 |
+
dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
16 |
+
weekHeader: 'أسبوع',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 6,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ar']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-az.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
3 |
+
jQuery(function($) {
|
4 |
+
$.datepicker.regional['az'] = {
|
5 |
+
closeText: 'Bağla',
|
6 |
+
prevText: '<Geri',
|
7 |
+
nextText: 'İrəli>',
|
8 |
+
currentText: 'Bugün',
|
9 |
+
monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
|
10 |
+
'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
|
11 |
+
monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
|
12 |
+
'İyul','Avq','Sen','Okt','Noy','Dek'],
|
13 |
+
dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
|
14 |
+
dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
|
15 |
+
dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
|
16 |
+
weekHeader: 'Hf',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['az']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-be.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Belarusian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Pavel Selitskas <p.selitskas@gmail.com> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['be'] = {
|
5 |
+
closeText: 'Зачыніць',
|
6 |
+
prevText: '←Папяр.',
|
7 |
+
nextText: 'Наст.→',
|
8 |
+
currentText: 'Сёньня',
|
9 |
+
monthNames: ['Студзень','Люты','Сакавік','Красавік','Травень','Чэрвень',
|
10 |
+
'Ліпень','Жнівень','Верасень','Кастрычнік','Лістапад','Сьнежань'],
|
11 |
+
monthNamesShort: ['Сту','Лют','Сак','Кра','Тра','Чэр',
|
12 |
+
'Ліп','Жні','Вер','Кас','Ліс','Сьн'],
|
13 |
+
dayNames: ['нядзеля','панядзелак','аўторак','серада','чацьвер','пятніца','субота'],
|
14 |
+
dayNamesShort: ['ндз','пнд','аўт','срд','чцв','птн','сбт'],
|
15 |
+
dayNamesMin: ['Нд','Пн','Аў','Ср','Чц','Пт','Сб'],
|
16 |
+
weekHeader: 'Тд',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['be']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bg.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stoyan Kyosev (http://svest.org). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bg'] = {
|
5 |
+
closeText: 'затвори',
|
6 |
+
prevText: '<назад',
|
7 |
+
nextText: 'напред>',
|
8 |
+
nextBigText: '>>',
|
9 |
+
currentText: 'днес',
|
10 |
+
monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
|
11 |
+
'Юли','Август','Септември','Октомври','Ноември','Декември'],
|
12 |
+
monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
|
13 |
+
'Юли','Авг','Сеп','Окт','Нов','Дек'],
|
14 |
+
dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
|
15 |
+
dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
|
16 |
+
dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
|
17 |
+
weekHeader: 'Wk',
|
18 |
+
dateFormat: 'dd.mm.yy',
|
19 |
+
firstDay: 1,
|
20 |
+
isRTL: false,
|
21 |
+
showMonthAfterYear: false,
|
22 |
+
yearSuffix: ''};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['bg']);
|
24 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-bs.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kenan Konjo. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bs'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
|
10 |
+
'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['bs']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ca.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
|
2 |
+
/* Writers: (joan.leon@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ca'] = {
|
5 |
+
closeText: 'Tanca',
|
6 |
+
prevText: 'Anterior',
|
7 |
+
nextText: 'Següent',
|
8 |
+
currentText: 'Avui',
|
9 |
+
monthNames: ['gener','febrer','març','abril','maig','juny',
|
10 |
+
'juliol','agost','setembre','octubre','novembre','desembre'],
|
11 |
+
monthNamesShort: ['gen','feb','març','abr','maig','juny',
|
12 |
+
'jul','ag','set','oct','nov','des'],
|
13 |
+
dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
|
14 |
+
dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
|
15 |
+
dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
|
16 |
+
weekHeader: 'Set',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ca']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cs.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Tomas Muller (tomas@tomas-muller.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['cs'] = {
|
5 |
+
closeText: 'Zavřít',
|
6 |
+
prevText: '<Dříve',
|
7 |
+
nextText: 'Později>',
|
8 |
+
currentText: 'Nyní',
|
9 |
+
monthNames: ['leden','únor','březen','duben','květen','červen',
|
10 |
+
'červenec','srpen','září','říjen','listopad','prosinec'],
|
11 |
+
monthNamesShort: ['led','úno','bře','dub','kvě','čer',
|
12 |
+
'čvc','srp','zář','říj','lis','pro'],
|
13 |
+
dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
14 |
+
dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
15 |
+
dayNamesMin: ['ne','po','út','st','čt','pá','so'],
|
16 |
+
weekHeader: 'Týd',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['cs']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-cy-GB.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by William Griffiths. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['cy-GB'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
|
10 |
+
'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
|
11 |
+
monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
|
12 |
+
'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
|
13 |
+
dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
|
14 |
+
dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
|
15 |
+
dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
|
16 |
+
weekHeader: 'Wy',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['cy-GB']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-da.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Danish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jan Christensen ( deletestuff@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['da'] = {
|
5 |
+
closeText: 'Luk',
|
6 |
+
prevText: '<Forrige',
|
7 |
+
nextText: 'Næste>',
|
8 |
+
currentText: 'Idag',
|
9 |
+
monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','December'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
|
14 |
+
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
|
15 |
+
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
|
16 |
+
weekHeader: 'Uge',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['da']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-de.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Milian Wolff (mail@milianw.de). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['de'] = {
|
5 |
+
closeText: 'Schließen',
|
6 |
+
prevText: '<Zurück',
|
7 |
+
nextText: 'Vor>',
|
8 |
+
currentText: 'Heute',
|
9 |
+
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
13 |
+
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
14 |
+
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
15 |
+
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
16 |
+
weekHeader: 'KW',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['de']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-el.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['el'] = {
|
5 |
+
closeText: 'Κλείσιμο',
|
6 |
+
prevText: 'Προηγούμενος',
|
7 |
+
nextText: 'Επόμενος',
|
8 |
+
currentText: 'Τρέχων Μήνας',
|
9 |
+
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
|
10 |
+
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
|
11 |
+
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
|
12 |
+
'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
|
13 |
+
dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
|
14 |
+
dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
|
15 |
+
dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
|
16 |
+
weekHeader: 'Εβδ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['el']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-AU.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-AU'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-AU']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-GB.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stuart. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-GB'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-GB']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-en-NZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-NZ'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eo.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Esperanto initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Olivier M. (olivierweb@ifrance.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eo'] = {
|
5 |
+
closeText: 'Fermi',
|
6 |
+
prevText: '<Anta',
|
7 |
+
nextText: 'Sekv>',
|
8 |
+
currentText: 'Nuna',
|
9 |
+
monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
|
10 |
+
'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aŭg','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
|
14 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
|
15 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
|
16 |
+
weekHeader: 'Sb',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['eo']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-es.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
|
2 |
+
/* Traducido por Vester (xvester@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['es'] = {
|
5 |
+
closeText: 'Cerrar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Sig>',
|
8 |
+
currentText: 'Hoy',
|
9 |
+
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
|
10 |
+
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
|
11 |
+
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
|
12 |
+
'Jul','Ago','Sep','Oct','Nov','Dic'],
|
13 |
+
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['es']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-et.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['et'] = {
|
5 |
+
closeText: 'Sulge',
|
6 |
+
prevText: 'Eelnev',
|
7 |
+
nextText: 'Järgnev',
|
8 |
+
currentText: 'Täna',
|
9 |
+
monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
|
10 |
+
'Juuli','August','September','Oktoober','November','Detsember'],
|
11 |
+
monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
|
12 |
+
'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
|
13 |
+
dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
|
14 |
+
dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
|
15 |
+
dayNamesMin: ['P','E','T','K','N','R','L'],
|
16 |
+
weekHeader: 'näd',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['et']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-eu.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
|
2 |
+
/* Karrikas-ek itzulia (karrikas@karrikas.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eu'] = {
|
5 |
+
closeText: 'Egina',
|
6 |
+
prevText: '<Aur',
|
7 |
+
nextText: 'Hur>',
|
8 |
+
currentText: 'Gaur',
|
9 |
+
monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
|
10 |
+
'uztaila','abuztua','iraila','urria','azaroa','abendua'],
|
11 |
+
monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
|
12 |
+
'uzt.','abu.','ira.','urr.','aza.','abe.'],
|
13 |
+
dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
|
14 |
+
dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
|
15 |
+
dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
|
16 |
+
weekHeader: 'As',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['eu']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fa.js
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
|
2 |
+
/* Javad Mowlanezhad -- jmowla@gmail.com */
|
3 |
+
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
|
4 |
+
jQuery(function($) {
|
5 |
+
$.datepicker.regional['fa'] = {
|
6 |
+
closeText: 'بستن',
|
7 |
+
prevText: '<قبلی',
|
8 |
+
nextText: 'بعدی>',
|
9 |
+
currentText: 'امروز',
|
10 |
+
monthNames: [
|
11 |
+
'فروردين',
|
12 |
+
'ارديبهشت',
|
13 |
+
'خرداد',
|
14 |
+
'تير',
|
15 |
+
'مرداد',
|
16 |
+
'شهريور',
|
17 |
+
'مهر',
|
18 |
+
'آبان',
|
19 |
+
'آذر',
|
20 |
+
'دی',
|
21 |
+
'بهمن',
|
22 |
+
'اسفند'
|
23 |
+
],
|
24 |
+
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
25 |
+
dayNames: [
|
26 |
+
'يکشنبه',
|
27 |
+
'دوشنبه',
|
28 |
+
'سهشنبه',
|
29 |
+
'چهارشنبه',
|
30 |
+
'پنجشنبه',
|
31 |
+
'جمعه',
|
32 |
+
'شنبه'
|
33 |
+
],
|
34 |
+
dayNamesShort: [
|
35 |
+
'ی',
|
36 |
+
'د',
|
37 |
+
'س',
|
38 |
+
'چ',
|
39 |
+
'پ',
|
40 |
+
'ج',
|
41 |
+
'ش'
|
42 |
+
],
|
43 |
+
dayNamesMin: [
|
44 |
+
'ی',
|
45 |
+
'د',
|
46 |
+
'س',
|
47 |
+
'چ',
|
48 |
+
'پ',
|
49 |
+
'ج',
|
50 |
+
'ش'
|
51 |
+
],
|
52 |
+
weekHeader: 'هف',
|
53 |
+
dateFormat: 'yy/mm/dd',
|
54 |
+
firstDay: 6,
|
55 |
+
isRTL: true,
|
56 |
+
showMonthAfterYear: false,
|
57 |
+
yearSuffix: ''};
|
58 |
+
$.datepicker.setDefaults($.datepicker.regional['fa']);
|
59 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fi.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Harri Kilpiö (harrikilpio@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fi'] = {
|
5 |
+
closeText: 'Sulje',
|
6 |
+
prevText: '«Edellinen',
|
7 |
+
nextText: 'Seuraava»',
|
8 |
+
currentText: 'Tänään',
|
9 |
+
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
|
10 |
+
'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
|
11 |
+
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
|
12 |
+
'Heinä','Elo','Syys','Loka','Marras','Joulu'],
|
13 |
+
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
14 |
+
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
|
15 |
+
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
16 |
+
weekHeader: 'Vk',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fi']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fo.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Faroese initialisation for the jQuery UI date picker plugin */
|
2 |
+
/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fo'] = {
|
5 |
+
closeText: 'Lat aftur',
|
6 |
+
prevText: '<Fyrra',
|
7 |
+
nextText: 'Næsta>',
|
8 |
+
currentText: 'Í dag',
|
9 |
+
monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Des'],
|
13 |
+
dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
|
14 |
+
dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
|
15 |
+
dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
|
16 |
+
weekHeader: 'Vk',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fo']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CA.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Canadian-French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
jQuery(function ($) {
|
3 |
+
$.datepicker.regional['fr-CA'] = {
|
4 |
+
closeText: 'Fermer',
|
5 |
+
prevText: 'Précédent',
|
6 |
+
nextText: 'Suivant',
|
7 |
+
currentText: 'Aujourd\'hui',
|
8 |
+
monthNames: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin',
|
9 |
+
'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
|
10 |
+
monthNamesShort: ['janv.', 'févr.', 'mars', 'avril', 'mai', 'juin',
|
11 |
+
'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
|
12 |
+
dayNames: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
|
13 |
+
dayNamesShort: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
14 |
+
dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
|
15 |
+
weekHeader: 'Sem.',
|
16 |
+
dateFormat: 'yy-mm-dd',
|
17 |
+
firstDay: 0,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''
|
21 |
+
};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fr-CA']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr-CH.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fr-CH'] = {
|
5 |
+
closeText: 'Fermer',
|
6 |
+
prevText: '<Préc',
|
7 |
+
nextText: 'Suiv>',
|
8 |
+
currentText: 'Courant',
|
9 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
10 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
11 |
+
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
|
12 |
+
'Jul','Aoû','Sep','Oct','Nov','Déc'],
|
13 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
14 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
|
15 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-fr.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Keith Wood (kbwood{at}iinet.com.au),
|
3 |
+
Stéphane Nahmani (sholby@sholby.net),
|
4 |
+
Stéphane Raimbault <stephane.raimbault@gmail.com> */
|
5 |
+
jQuery(function($){
|
6 |
+
$.datepicker.regional['fr'] = {
|
7 |
+
closeText: 'Fermer',
|
8 |
+
prevText: 'Précédent',
|
9 |
+
nextText: 'Suivant',
|
10 |
+
currentText: 'Aujourd\'hui',
|
11 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
12 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
13 |
+
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
|
14 |
+
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
|
15 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
16 |
+
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
|
17 |
+
dayNamesMin: ['D','L','M','M','J','V','S'],
|
18 |
+
weekHeader: 'Sem.',
|
19 |
+
dateFormat: 'dd/mm/yy',
|
20 |
+
firstDay: 1,
|
21 |
+
isRTL: false,
|
22 |
+
showMonthAfterYear: false,
|
23 |
+
yearSuffix: ''};
|
24 |
+
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
25 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-gl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician localization for 'UI date picker' jQuery extension. */
|
2 |
+
/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['gl'] = {
|
5 |
+
closeText: 'Pechar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Seg>',
|
8 |
+
currentText: 'Hoxe',
|
9 |
+
monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
|
10 |
+
'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
|
11 |
+
monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
|
12 |
+
'Xul','Ago','Set','Out','Nov','Dec'],
|
13 |
+
dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['gl']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-he.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew initialisation for the UI Datepicker extension. */
|
2 |
+
/* Written by Amir Hardon (ahardon at gmail dot com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['he'] = {
|
5 |
+
closeText: 'סגור',
|
6 |
+
prevText: '<הקודם',
|
7 |
+
nextText: 'הבא>',
|
8 |
+
currentText: 'היום',
|
9 |
+
monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
|
10 |
+
'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
|
11 |
+
monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
|
12 |
+
'יולי','אוג','ספט','אוק','נוב','דצמ'],
|
13 |
+
dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
|
14 |
+
dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
15 |
+
dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['he']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hi.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hindi initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Michael Dawart. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hi'] = {
|
5 |
+
closeText: 'बंद',
|
6 |
+
prevText: 'पिछला',
|
7 |
+
nextText: 'अगला',
|
8 |
+
currentText: 'आज',
|
9 |
+
monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
|
10 |
+
'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
|
11 |
+
monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
|
12 |
+
'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
|
13 |
+
dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
|
14 |
+
dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
|
15 |
+
dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
|
16 |
+
weekHeader: 'हफ्ता',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hi']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Croatian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vjekoslav Nesek. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hr'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
|
10 |
+
'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
|
11 |
+
monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
|
12 |
+
'Srp','Kol','Ruj','Lis','Stu','Pro'],
|
13 |
+
dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Tje',
|
17 |
+
dateFormat: 'dd.mm.yy.',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hr']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hu.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hu'] = {
|
5 |
+
closeText: 'bezár',
|
6 |
+
prevText: 'vissza',
|
7 |
+
nextText: 'előre',
|
8 |
+
currentText: 'ma',
|
9 |
+
monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
|
10 |
+
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
|
12 |
+
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
|
14 |
+
dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
|
15 |
+
dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
16 |
+
weekHeader: 'Hét',
|
17 |
+
dateFormat: 'yy.mm.dd.',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hu']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-hy.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hy'] = {
|
5 |
+
closeText: 'Փակել',
|
6 |
+
prevText: '<Նախ.',
|
7 |
+
nextText: 'Հաջ.>',
|
8 |
+
currentText: 'Այսօր',
|
9 |
+
monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
|
10 |
+
'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
|
11 |
+
monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
|
12 |
+
'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
|
13 |
+
dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
|
14 |
+
dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
15 |
+
dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
16 |
+
weekHeader: 'ՇԲՏ',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hy']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-id.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Deden Fathurahman (dedenf@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['id'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<mundur',
|
7 |
+
nextText: 'maju>',
|
8 |
+
currentText: 'hari ini',
|
9 |
+
monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
|
10 |
+
'Juli','Agustus','September','Oktober','Nopember','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
12 |
+
'Jul','Agus','Sep','Okt','Nop','Des'],
|
13 |
+
dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
|
14 |
+
dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
|
15 |
+
dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
|
16 |
+
weekHeader: 'Mg',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['id']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-is.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Icelandic initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Haukur H. Thorsson (haukur@eskill.is). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['is'] = {
|
5 |
+
closeText: 'Loka',
|
6 |
+
prevText: '< Fyrri',
|
7 |
+
nextText: 'Næsti >',
|
8 |
+
currentText: 'Í dag',
|
9 |
+
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
|
10 |
+
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
|
12 |
+
'Júl','Ágú','Sep','Okt','Nóv','Des'],
|
13 |
+
dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
|
14 |
+
dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
|
15 |
+
dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
|
16 |
+
weekHeader: 'Vika',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['is']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-it.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['it'] = {
|
5 |
+
closeText: 'Chiudi',
|
6 |
+
prevText: '<Prec',
|
7 |
+
nextText: 'Succ>',
|
8 |
+
currentText: 'Oggi',
|
9 |
+
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
|
10 |
+
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
11 |
+
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
|
12 |
+
'Lug','Ago','Set','Ott','Nov','Dic'],
|
13 |
+
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['it']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ja.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kentaro SATO (kentaro@ranvis.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ja'] = {
|
5 |
+
closeText: '閉じる',
|
6 |
+
prevText: '<前',
|
7 |
+
nextText: '次>',
|
8 |
+
currentText: '今日',
|
9 |
+
monthNames: ['1月','2月','3月','4月','5月','6月',
|
10 |
+
'7月','8月','9月','10月','11月','12月'],
|
11 |
+
monthNamesShort: ['1月','2月','3月','4月','5月','6月',
|
12 |
+
'7月','8月','9月','10月','11月','12月'],
|
13 |
+
dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
|
14 |
+
dayNamesShort: ['日','月','火','水','木','金','土'],
|
15 |
+
dayNamesMin: ['日','月','火','水','木','金','土'],
|
16 |
+
weekHeader: '週',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ja']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ka.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Lado Lomidze (lado.lomidze@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ka'] = {
|
5 |
+
closeText: 'დახურვა',
|
6 |
+
prevText: '< წინა',
|
7 |
+
nextText: 'შემდეგი >',
|
8 |
+
currentText: 'დღეს',
|
9 |
+
monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
|
10 |
+
monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
|
11 |
+
dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
|
12 |
+
dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
|
13 |
+
dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
|
14 |
+
weekHeader: 'კვირა',
|
15 |
+
dateFormat: 'dd-mm-yy',
|
16 |
+
firstDay: 1,
|
17 |
+
isRTL: false,
|
18 |
+
showMonthAfterYear: false,
|
19 |
+
yearSuffix: ''};
|
20 |
+
$.datepicker.setDefaults($.datepicker.regional['ka']);
|
21 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-kk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['kk'] = {
|
5 |
+
closeText: 'Жабу',
|
6 |
+
prevText: '<Алдыңғы',
|
7 |
+
nextText: 'Келесі>',
|
8 |
+
currentText: 'Бүгін',
|
9 |
+
monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
|
10 |
+
'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
|
11 |
+
monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
|
12 |
+
'Шіл','Там','Қыр','Қаз','Қар','Жел'],
|
13 |
+
dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
|
14 |
+
dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
|
15 |
+
dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['kk']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-km.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Khmer initialisation for the jQuery calendar extension. */
|
2 |
+
/* Written by Chandara Om (chandara.teacher@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['km'] = {
|
5 |
+
closeText: 'ធ្វើរួច',
|
6 |
+
prevText: 'មុន',
|
7 |
+
nextText: 'បន្ទាប់',
|
8 |
+
currentText: 'ថ្ងៃនេះ',
|
9 |
+
monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
|
10 |
+
'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
|
11 |
+
monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
|
12 |
+
'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
|
13 |
+
dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
|
14 |
+
dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
|
15 |
+
dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
|
16 |
+
weekHeader: 'សប្ដាហ៍',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['km']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ko.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean initialisation for the jQuery calendar extension. */
|
2 |
+
/* Written by DaeKwon Kang (ncrash.dk@gmail.com), Edited by Genie. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ko'] = {
|
5 |
+
closeText: '닫기',
|
6 |
+
prevText: '이전달',
|
7 |
+
nextText: '다음달',
|
8 |
+
currentText: '오늘',
|
9 |
+
monthNames: ['1월','2월','3월','4월','5월','6월',
|
10 |
+
'7월','8월','9월','10월','11월','12월'],
|
11 |
+
monthNamesShort: ['1월','2월','3월','4월','5월','6월',
|
12 |
+
'7월','8월','9월','10월','11월','12월'],
|
13 |
+
dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
|
14 |
+
dayNamesShort: ['일','월','화','수','목','금','토'],
|
15 |
+
dayNamesMin: ['일','월','화','수','목','금','토'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '년'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ky.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Kyrgyz (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Sergey Kartashov (ebishkek@yandex.ru). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ky'] = {
|
5 |
+
closeText: 'Жабуу',
|
6 |
+
prevText: '<Мур',
|
7 |
+
nextText: 'Кий>',
|
8 |
+
currentText: 'Бүгүн',
|
9 |
+
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
10 |
+
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
11 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
12 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
13 |
+
dayNames: ['жекшемби', 'дүйшөмбү', 'шейшемби', 'шаршемби', 'бейшемби', 'жума', 'ишемби'],
|
14 |
+
dayNamesShort: ['жек', 'дүй', 'шей', 'шар', 'бей', 'жум', 'ише'],
|
15 |
+
dayNamesMin: ['Жк','Дш','Шш','Шр','Бш','Жм','Иш'],
|
16 |
+
weekHeader: 'Жум',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''
|
22 |
+
};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['ky']);
|
24 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lb.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Michel Weimerskirch <michel@weimerskirch.net> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lb'] = {
|
5 |
+
closeText: 'Fäerdeg',
|
6 |
+
prevText: 'Zréck',
|
7 |
+
nextText: 'Weider',
|
8 |
+
currentText: 'Haut',
|
9 |
+
monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
|
13 |
+
dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
|
14 |
+
dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
|
15 |
+
dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
|
16 |
+
weekHeader: 'W',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lb']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lt.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas@avalon.lt> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lt'] = {
|
5 |
+
closeText: 'Uždaryti',
|
6 |
+
prevText: '<Atgal',
|
7 |
+
nextText: 'Pirmyn>',
|
8 |
+
currentText: 'Šiandien',
|
9 |
+
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
|
10 |
+
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
|
11 |
+
monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
|
12 |
+
'Lie','Rugp','Rugs','Spa','Lap','Gru'],
|
13 |
+
dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
|
14 |
+
dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
|
15 |
+
dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lt']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-lv.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lv'] = {
|
5 |
+
closeText: 'Aizvērt',
|
6 |
+
prevText: 'Iepr',
|
7 |
+
nextText: 'Nāka',
|
8 |
+
currentText: 'Šodien',
|
9 |
+
monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
|
10 |
+
'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
|
12 |
+
'Jūl','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
|
14 |
+
dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
|
15 |
+
dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
|
16 |
+
weekHeader: 'Nav',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lv']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-mk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Macedonian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stojce Slavkovski. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['mk'] = {
|
5 |
+
closeText: 'Затвори',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Денес',
|
9 |
+
monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
|
10 |
+
'Јули','Август','Септември','Октомври','Ноември','Декември'],
|
11 |
+
monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
|
12 |
+
'Јул','Авг','Сеп','Окт','Ное','Дек'],
|
13 |
+
dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
|
14 |
+
dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
|
15 |
+
dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
|
16 |
+
weekHeader: 'Сед',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['mk']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ml.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Saji Nediyanchath (saji89@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ml'] = {
|
5 |
+
closeText: 'ശരി',
|
6 |
+
prevText: 'മുന്നത്തെ',
|
7 |
+
nextText: 'അടുത്തത് ',
|
8 |
+
currentText: 'ഇന്ന്',
|
9 |
+
monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
|
10 |
+
'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
|
11 |
+
monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
|
12 |
+
'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
|
13 |
+
dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
14 |
+
dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
15 |
+
dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
|
16 |
+
weekHeader: 'ആ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ml']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ms.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malaysian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ms'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<Sebelum',
|
7 |
+
nextText: 'Selepas>',
|
8 |
+
currentText: 'hari ini',
|
9 |
+
monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
|
10 |
+
'Julai','Ogos','September','Oktober','November','Disember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
|
12 |
+
'Jul','Ogo','Sep','Okt','Nov','Dis'],
|
13 |
+
dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
|
14 |
+
dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
|
15 |
+
dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
|
16 |
+
weekHeader: 'Mg',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ms']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nb.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian Bokmål initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Bjørn Johansen (post@bjornjohansen.no). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nb'] = {
|
5 |
+
closeText: 'Lukk',
|
6 |
+
prevText: '«Forrige',
|
7 |
+
nextText: 'Neste»',
|
8 |
+
currentText: 'I dag',
|
9 |
+
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
10 |
+
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
11 |
+
dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
|
12 |
+
dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
|
13 |
+
dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
|
14 |
+
weekHeader: 'Uke',
|
15 |
+
dateFormat: 'dd.mm.yy',
|
16 |
+
firstDay: 1,
|
17 |
+
isRTL: false,
|
18 |
+
showMonthAfterYear: false,
|
19 |
+
yearSuffix: ''
|
20 |
+
};
|
21 |
+
$.datepicker.setDefaults($.datepicker.regional['nb']);
|
22 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl-BE.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* David De Sloovere @DavidDeSloovere */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nl-BE'] = {
|
5 |
+
closeText: 'Sluiten',
|
6 |
+
prevText: '←',
|
7 |
+
nextText: '→',
|
8 |
+
currentText: 'Vandaag',
|
9 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
10 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
11 |
+
monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
|
12 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
13 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
14 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
15 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['nl-BE']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional.nl = {
|
5 |
+
closeText: 'Sluiten',
|
6 |
+
prevText: '←',
|
7 |
+
nextText: '→',
|
8 |
+
currentText: 'Vandaag',
|
9 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
10 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
11 |
+
monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
|
12 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
13 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
14 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
15 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional.nl);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-nn.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian Nynorsk initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Bjørn Johansen (post@bjornjohansen.no). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['nn'] = {
|
5 |
+
closeText: 'Lukk',
|
6 |
+
prevText: '«Førre',
|
7 |
+
nextText: 'Neste»',
|
8 |
+
currentText: 'I dag',
|
9 |
+
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
10 |
+
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
11 |
+
dayNamesShort: ['sun','mån','tys','ons','tor','fre','lau'],
|
12 |
+
dayNames: ['sundag','måndag','tysdag','onsdag','torsdag','fredag','laurdag'],
|
13 |
+
dayNamesMin: ['su','må','ty','on','to','fr','la'],
|
14 |
+
weekHeader: 'Veke',
|
15 |
+
dateFormat: 'dd.mm.yy',
|
16 |
+
firstDay: 1,
|
17 |
+
isRTL: false,
|
18 |
+
showMonthAfterYear: false,
|
19 |
+
yearSuffix: ''
|
20 |
+
};
|
21 |
+
$.datepicker.setDefaults($.datepicker.regional['nn']);
|
22 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-no.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['no'] = {
|
6 |
+
closeText: 'Lukk',
|
7 |
+
prevText: '«Forrige',
|
8 |
+
nextText: 'Neste»',
|
9 |
+
currentText: 'I dag',
|
10 |
+
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
11 |
+
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
12 |
+
dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
|
13 |
+
dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
|
14 |
+
dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
|
15 |
+
weekHeader: 'Uke',
|
16 |
+
dateFormat: 'dd.mm.yy',
|
17 |
+
firstDay: 1,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''
|
21 |
+
};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['no']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pl'] = {
|
5 |
+
closeText: 'Zamknij',
|
6 |
+
prevText: '<Poprzedni',
|
7 |
+
nextText: 'Następny>',
|
8 |
+
currentText: 'Dziś',
|
9 |
+
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
10 |
+
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
11 |
+
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
|
12 |
+
'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
13 |
+
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
14 |
+
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
15 |
+
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
16 |
+
weekHeader: 'Tydz',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt-BR.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pt-BR'] = {
|
5 |
+
closeText: 'Fechar',
|
6 |
+
prevText: '<Anterior',
|
7 |
+
nextText: 'Próximo>',
|
8 |
+
currentText: 'Hoje',
|
9 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
10 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
11 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
12 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
13 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
15 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-pt.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
jQuery(function($){
|
3 |
+
$.datepicker.regional['pt'] = {
|
4 |
+
closeText: 'Fechar',
|
5 |
+
prevText: '<Anterior',
|
6 |
+
nextText: 'Seguinte',
|
7 |
+
currentText: 'Hoje',
|
8 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
9 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
10 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
11 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
12 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
13 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
14 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
15 |
+
weekHeader: 'Sem',
|
16 |
+
dateFormat: 'dd/mm/yy',
|
17 |
+
firstDay: 0,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''};
|
21 |
+
$.datepicker.setDefaults($.datepicker.regional['pt']);
|
22 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-rm.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romansh initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['rm'] = {
|
5 |
+
closeText: 'Serrar',
|
6 |
+
prevText: '<Suandant',
|
7 |
+
nextText: 'Precedent>',
|
8 |
+
currentText: 'Actual',
|
9 |
+
monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
|
10 |
+
monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
|
11 |
+
dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
|
12 |
+
dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
|
13 |
+
dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
|
14 |
+
weekHeader: 'emna',
|
15 |
+
dateFormat: 'dd/mm/yy',
|
16 |
+
firstDay: 1,
|
17 |
+
isRTL: false,
|
18 |
+
showMonthAfterYear: false,
|
19 |
+
yearSuffix: ''};
|
20 |
+
$.datepicker.setDefaults($.datepicker.regional['rm']);
|
21 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ro.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian initialisation for the jQuery UI date picker plugin.
|
2 |
+
*
|
3 |
+
* Written by Edmond L. (ll_edmond@walla.com)
|
4 |
+
* and Ionut G. Stan (ionut.g.stan@gmail.com)
|
5 |
+
*/
|
6 |
+
jQuery(function($){
|
7 |
+
$.datepicker.regional['ro'] = {
|
8 |
+
closeText: 'Închide',
|
9 |
+
prevText: '« Luna precedentă',
|
10 |
+
nextText: 'Luna următoare »',
|
11 |
+
currentText: 'Azi',
|
12 |
+
monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
|
13 |
+
'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
|
14 |
+
monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
|
15 |
+
'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
16 |
+
dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
|
17 |
+
dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
|
18 |
+
dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
|
19 |
+
weekHeader: 'Săpt',
|
20 |
+
dateFormat: 'dd.mm.yy',
|
21 |
+
firstDay: 1,
|
22 |
+
isRTL: false,
|
23 |
+
showMonthAfterYear: false,
|
24 |
+
yearSuffix: ''};
|
25 |
+
$.datepicker.setDefaults($.datepicker.regional['ro']);
|
26 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ru.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Andrew Stromnov (stromnov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ru'] = {
|
5 |
+
closeText: 'Закрыть',
|
6 |
+
prevText: '<Пред',
|
7 |
+
nextText: 'След>',
|
8 |
+
currentText: 'Сегодня',
|
9 |
+
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
10 |
+
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
11 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
12 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
13 |
+
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
|
14 |
+
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
|
15 |
+
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
|
16 |
+
weekHeader: 'Нед',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ru']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vojtech Rinik (vojto@hmm.sk). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sk'] = {
|
5 |
+
closeText: 'Zavrieť',
|
6 |
+
prevText: '<Predchádzajúci',
|
7 |
+
nextText: 'Nasledujúci>',
|
8 |
+
currentText: 'Dnes',
|
9 |
+
monthNames: ['január','február','marec','apríl','máj','jún',
|
10 |
+
'júl','august','september','október','november','december'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
|
12 |
+
'Júl','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['nedeľa','pondelok','utorok','streda','štvrtok','piatok','sobota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
|
16 |
+
weekHeader: 'Ty',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sk']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sl.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jaka Jancar (jaka@kubje.org). */
|
3 |
+
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['sl'] = {
|
6 |
+
closeText: 'Zapri',
|
7 |
+
prevText: '<Prejšnji',
|
8 |
+
nextText: 'Naslednji>',
|
9 |
+
currentText: 'Trenutni',
|
10 |
+
monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
|
11 |
+
'Julij','Avgust','September','Oktober','November','December'],
|
12 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
13 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
14 |
+
dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
|
15 |
+
dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
|
16 |
+
dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
|
17 |
+
weekHeader: 'Teden',
|
18 |
+
dateFormat: 'dd.mm.yy',
|
19 |
+
firstDay: 1,
|
20 |
+
isRTL: false,
|
21 |
+
showMonthAfterYear: false,
|
22 |
+
yearSuffix: ''};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['sl']);
|
24 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sq.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Albanian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Flakron Bytyqi (flakron@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sq'] = {
|
5 |
+
closeText: 'mbylle',
|
6 |
+
prevText: '<mbrapa',
|
7 |
+
nextText: 'Përpara>',
|
8 |
+
currentText: 'sot',
|
9 |
+
monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
|
10 |
+
'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
|
11 |
+
monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
|
12 |
+
'Kor','Gus','Sht','Tet','Nën','Dhj'],
|
13 |
+
dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
|
14 |
+
dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
15 |
+
dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
16 |
+
weekHeader: 'Ja',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sq']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr-SR.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr-SR'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
|
10 |
+
'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Sed',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sr-SR']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr'] = {
|
5 |
+
closeText: 'Затвори',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Данас',
|
9 |
+
monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
|
10 |
+
'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
|
11 |
+
monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
|
12 |
+
'Јул','Авг','Сеп','Окт','Нов','Дец'],
|
13 |
+
dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
|
14 |
+
dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
|
15 |
+
dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
|
16 |
+
weekHeader: 'Сед',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sr']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-sv.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Anders Ekdahl ( anders@nomadiz.se). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sv'] = {
|
5 |
+
closeText: 'Stäng',
|
6 |
+
prevText: '«Förra',
|
7 |
+
nextText: 'Nästa»',
|
8 |
+
currentText: 'Idag',
|
9 |
+
monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
|
10 |
+
'Juli','Augusti','September','Oktober','November','December'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
|
14 |
+
dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
|
15 |
+
dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
|
16 |
+
weekHeader: 'Ve',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sv']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-ta.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by S A Sureshkumar (saskumar@live.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ta'] = {
|
5 |
+
closeText: 'மூடு',
|
6 |
+
prevText: 'முன்னையது',
|
7 |
+
nextText: 'அடுத்தது',
|
8 |
+
currentText: 'இன்று',
|
9 |
+
monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
|
10 |
+
'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
|
11 |
+
monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
|
12 |
+
'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
|
13 |
+
dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
|
14 |
+
dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
|
15 |
+
dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ta']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-th.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by pipo (pipo@sixhead.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['th'] = {
|
5 |
+
closeText: 'ปิด',
|
6 |
+
prevText: '« ย้อน',
|
7 |
+
nextText: 'ถัดไป »',
|
8 |
+
currentText: 'วันนี้',
|
9 |
+
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
|
10 |
+
'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
11 |
+
monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
|
12 |
+
'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
|
13 |
+
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
|
14 |
+
dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
15 |
+
dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['th']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tj.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Abdurahmon Saidov (saidovab@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tj'] = {
|
5 |
+
closeText: 'Идома',
|
6 |
+
prevText: '<Қафо',
|
7 |
+
nextText: 'Пеш>',
|
8 |
+
currentText: 'Имрӯз',
|
9 |
+
monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
|
10 |
+
'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
|
11 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
12 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
13 |
+
dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
|
14 |
+
dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
|
15 |
+
dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
|
16 |
+
weekHeader: 'Хф',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['tj']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-tr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tr'] = {
|
5 |
+
closeText: 'kapat',
|
6 |
+
prevText: '<geri',
|
7 |
+
nextText: 'ileri>',
|
8 |
+
currentText: 'bugün',
|
9 |
+
monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
|
10 |
+
'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
|
11 |
+
monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
|
12 |
+
'Tem','Ağu','Eyl','Eki','Kas','Ara'],
|
13 |
+
dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
|
14 |
+
dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
15 |
+
dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
16 |
+
weekHeader: 'Hf',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['tr']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-uk.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
3 |
+
/* Corrected by Igor Milla (igor.fsp.milla@gmail.com). */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['uk'] = {
|
6 |
+
closeText: 'Закрити',
|
7 |
+
prevText: '<',
|
8 |
+
nextText: '>',
|
9 |
+
currentText: 'Сьогодні',
|
10 |
+
monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
|
11 |
+
'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
|
12 |
+
monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
|
13 |
+
'Лип','Сер','Вер','Жов','Лис','Гру'],
|
14 |
+
dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
|
15 |
+
dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
|
16 |
+
dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
|
17 |
+
weekHeader: 'Тиж',
|
18 |
+
dateFormat: 'dd/mm/yy',
|
19 |
+
firstDay: 1,
|
20 |
+
isRTL: false,
|
21 |
+
showMonthAfterYear: false,
|
22 |
+
yearSuffix: ''};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['uk']);
|
24 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-vi.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['vi'] = {
|
5 |
+
closeText: 'Đóng',
|
6 |
+
prevText: '<Trước',
|
7 |
+
nextText: 'Tiếp>',
|
8 |
+
currentText: 'Hôm nay',
|
9 |
+
monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
|
10 |
+
'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
|
11 |
+
monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
|
12 |
+
'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
|
13 |
+
dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
|
14 |
+
dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
15 |
+
dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
16 |
+
weekHeader: 'Tu',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['vi']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-CN.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Cloudream (cloudream@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-CN'] = {
|
5 |
+
closeText: '关闭',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
12 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-HK.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by SCCY (samuelcychan@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-HK'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
12 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-HK']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/datepicker-i18n/jquery.ui.datepicker-zh-TW.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Ressol (ressol@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-TW'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一月','二月','三月','四月','五月','六月',
|
12 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
|
23 |
+
});
|
inc/meta-box/js/jqueryui/jquery-ui-timepicker-addon.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery timepicker addon
|
3 |
+
* By: Trent Richardson [http://trentrichardson.com]
|
4 |
+
* Version 0.9.7
|
5 |
+
* Last Modified: 10/02/2011
|
6 |
+
*
|
7 |
+
* Copyright 2011 Trent Richardson
|
8 |
+
* Dual licensed under the MIT and GPL licenses.
|
9 |
+
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
|
10 |
+
* http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
|
11 |
+
*
|
12 |
+
* HERES THE CSS:
|
13 |
+
* .ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }
|
14 |
+
* .ui-timepicker-div dl { text-align: left; }
|
15 |
+
* .ui-timepicker-div dl dt { height: 25px; }
|
16 |
+
* .ui-timepicker-div dl dd { margin: -25px 10px 10px 65px; }
|
17 |
+
* .ui-timepicker-div td { font-size: 90%; }
|
18 |
+
* .ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; }
|
19 |
+
*/
|
20 |
+
|
21 |
+
(function(e){function m(){this.regional=[];this.regional[""]={currentText:"Now",closeText:"Done",ampm:false,amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"hh:mm tt",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",timezoneText:"Time Zone"};this._defaults={showButtonPanel:true,timeOnly:false,showHour:true,showMinute:true,showSecond:false,showMillisec:false,showTimezone:false,showTime:true,stepHour:0.05,stepMinute:0.05,
|
22 |
+
stepSecond:0.05,stepMillisec:0.5,hour:0,minute:0,second:0,millisec:0,timezone:"+0000",hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,alwaysSetTime:true,separator:" ",altFieldTimeOnly:true,showTimepicker:true,timezoneIso8609:false,timezoneList:null};e.extend(this._defaults,this.regional[""])}e.extend(e.ui,{timepicker:{version:"0.9.7"}});e.extend(m.prototype,
|
23 |
+
{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,timezone:"+0000",hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,setDefaults:function(c){var a=this._defaults,
|
24 |
+
c=c||{};e.extend(a,c);for(var b in c)if(c[b]===null||c[b]===void 0)a[b]=c[b];return this},_newInst:function(c,a){var b=new m,d={},f;for(f in this._defaults){var g=c.attr("time:"+f);if(g)try{d[f]=eval(g)}catch(j){d[f]=g}}b._defaults=e.extend({},this._defaults,d,a,{beforeShow:function(c,d){e.isFunction(a.beforeShow)&&a.beforeShow(c,d,b)},onChangeMonthYear:function(d,f,g){b._updateDateTime(g);e.isFunction(a.onChangeMonthYear)&&a.onChangeMonthYear.call(c[0],d,f,g,b)},onClose:function(d,f){b.timeDefined===
|
25 |
+
true&&c.val()!=""&&b._updateDateTime(f);e.isFunction(a.onClose)&&a.onClose.call(c[0],d,f,b)},timepicker:b});b.amNames=e.map(b._defaults.amNames,function(a){return a.toUpperCase()});b.pmNames=e.map(b._defaults.pmNames,function(a){return a.toUpperCase()});if(b._defaults.timezoneList===null){d=[];for(f=-11;f<=12;f++)d.push((f>=0?"+":"-")+("0"+Math.abs(f).toString()).slice(-2)+"00");b._defaults.timezoneIso8609&&(d=e.map(d,function(a){return a=="+0000"?"Z":a.substring(0,3)+":"+a.substring(3)}));b._defaults.timezoneList=
|
26 |
+
d}b.hour=b._defaults.hour;b.minute=b._defaults.minute;b.second=b._defaults.second;b.millisec=b._defaults.millisec;b.ampm="";b.$input=c;if(a.altField)b.$altInput=e(a.altField).css({cursor:"pointer"}).focus(function(){c.trigger("focus")});if(b._defaults.minDate==0||b._defaults.minDateTime==0)b._defaults.minDate=new Date;if(b._defaults.maxDate==0||b._defaults.maxDateTime==0)b._defaults.maxDate=new Date;if(b._defaults.minDate!==void 0&&b._defaults.minDate instanceof Date)b._defaults.minDateTime=new Date(b._defaults.minDate.getTime());
|
27 |
+
if(b._defaults.minDateTime!==void 0&&b._defaults.minDateTime instanceof Date)b._defaults.minDate=new Date(b._defaults.minDateTime.getTime());if(b._defaults.maxDate!==void 0&&b._defaults.maxDate instanceof Date)b._defaults.maxDateTime=new Date(b._defaults.maxDate.getTime());if(b._defaults.maxDateTime!==void 0&&b._defaults.maxDateTime instanceof Date)b._defaults.maxDate=new Date(b._defaults.maxDateTime.getTime());return b},_addTimePicker:function(c){this.timeDefined=this._parseTime(this.$altInput&&
|
28 |
+
this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this._limitMinMaxDateTime(c,false);this._injectTimePicker()},_parseTime:function(c,a){var b=this._defaults.timeFormat.toString().replace(/h{1,2}/ig,"(\\d?\\d)").replace(/m{1,2}/ig,"(\\d?\\d)").replace(/s{1,2}/ig,"(\\d?\\d)").replace(/l{1}/ig,"(\\d?\\d?\\d)").replace(/t{1,2}/ig,this._getPatternAmpm()).replace(/z{1}/ig,"(z|[-+]\\d\\d:?\\d\\d)?").replace(/\s/g,"\\s?")+this._defaults.timeSuffix+"$",d=this._getFormatPositions(),
|
29 |
+
f="";if(!this.inst)this.inst=e.datepicker._getInst(this.$input[0]);if(a||!this._defaults.timeOnly)b=".{"+e.datepicker._get(this.inst,"dateFormat").length+",}"+this._defaults.separator.replace(RegExp("[.*+?|()\\[\\]{}\\\\]","g"),"\\$&")+b;if(b=c.match(RegExp(b,"i"))){if(d.t!==-1)b[d.t]===void 0||b[d.t].length===0?this.ampm=f="":(f=e.inArray(b[d.t].toUpperCase(),this.amNames)!==-1?"AM":"PM",this.ampm=this._defaults[f=="AM"?"amNames":"pmNames"][0]);if(d.h!==-1)this.hour=f=="AM"&&b[d.h]=="12"?0:f=="PM"&&
|
30 |
+
b[d.h]!="12"?(parseFloat(b[d.h])+12).toFixed(0):Number(b[d.h]);if(d.m!==-1)this.minute=Number(b[d.m]);if(d.s!==-1)this.second=Number(b[d.s]);if(d.l!==-1)this.millisec=Number(b[d.l]);if(d.z!==-1&&b[d.z]!==void 0){d=b[d.z].toUpperCase();switch(d.length){case 1:d=this._defaults.timezoneIso8609?"Z":"+0000";break;case 5:this._defaults.timezoneIso8609&&(d=d.substring(1)=="0000"?"Z":d.substring(0,3)+":"+d.substring(3));break;case 6:this._defaults.timezoneIso8609?d.substring(1)=="00:00"&&(d="Z"):d=d=="Z"||
|
31 |
+
d.substring(1)=="00:00"?"+0000":d.replace(/:/,"")}this.timezone=d}return true}return false},_getPatternAmpm:function(){var c=[];o=this._defaults;o.amNames&&e.merge(c,o.amNames);o.pmNames&&e.merge(c,o.pmNames);c=e.map(c,function(a){return a.replace(/[.*+?|()\[\]{}\\]/g,"\\$&")});return"("+c.join("|")+")?"},_getFormatPositions:function(){var c=this._defaults.timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z)/g),a={h:-1,m:-1,s:-1,l:-1,t:-1,z:-1};if(c)for(var b=0;b<c.length;b++)a[c[b].toString().charAt(0)]==
|
32 |
+
-1&&(a[c[b].toString().charAt(0)]=b+1);return a},_injectTimePicker:function(){var c=this.inst.dpDiv,a=this._defaults,b=this,d=(a.hourMax-(a.hourMax-a.hourMin)%a.stepHour).toFixed(0),f=(a.minuteMax-(a.minuteMax-a.minuteMin)%a.stepMinute).toFixed(0),g=(a.secondMax-(a.secondMax-a.secondMin)%a.stepSecond).toFixed(0),j=(a.millisecMax-(a.millisecMax-a.millisecMin)%a.stepMillisec).toFixed(0),h=this.inst.id.toString().replace(/([^A-Za-z0-9_])/g,"");if(c.find("div#ui-timepicker-div-"+h).length===0&&a.showTimepicker){var i=
|
33 |
+
'<div class="ui-timepicker-div" id="ui-timepicker-div-'+h+'"><dl><dt class="ui_tpicker_time_label" id="ui_tpicker_time_label_'+h+'"'+(a.showTime?"":' style="display:none;"')+">"+a.timeText+'</dt><dd class="ui_tpicker_time" id="ui_tpicker_time_'+h+'"'+(a.showTime?"":' style="display:none;"')+'></dd><dt class="ui_tpicker_hour_label" id="ui_tpicker_hour_label_'+h+'"'+(a.showHour?"":' style="display:none;"')+">"+a.hourText+"</dt>",q=0,r=0,m=0,s=0,l;if(a.showHour&&a.hourGrid>0){i+='<dd class="ui_tpicker_hour"><div id="ui_tpicker_hour_'+
|
34 |
+
h+'"'+(a.showHour?"":' style="display:none;"')+'></div><div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';for(var k=a.hourMin;k<=d;k+=parseInt(a.hourGrid,10)){q++;var n=a.ampm&&k>12?k-12:k;n<10&&(n="0"+n);a.ampm&&(k==0?n="12a":n+=k<12?"a":"p");i+="<td>"+n+"</td>"}i+="</tr></table></div></dd>"}else i+='<dd class="ui_tpicker_hour" id="ui_tpicker_hour_'+h+'"'+(a.showHour?"":' style="display:none;"')+"></dd>";i+='<dt class="ui_tpicker_minute_label" id="ui_tpicker_minute_label_'+
|
35 |
+
h+'"'+(a.showMinute?"":' style="display:none;"')+">"+a.minuteText+"</dt>";if(a.showMinute&&a.minuteGrid>0){i+='<dd class="ui_tpicker_minute ui_tpicker_minute_'+a.minuteGrid+'"><div id="ui_tpicker_minute_'+h+'"'+(a.showMinute?"":' style="display:none;"')+'></div><div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';for(k=a.minuteMin;k<=f;k+=parseInt(a.minuteGrid,10))r++,i+="<td>"+(k<10?"0":"")+k+"</td>";i+="</tr></table></div></dd>"}else i+='<dd class="ui_tpicker_minute" id="ui_tpicker_minute_'+
|
36 |
+
h+'"'+(a.showMinute?"":' style="display:none;"')+"></dd>";i+='<dt class="ui_tpicker_second_label" id="ui_tpicker_second_label_'+h+'"'+(a.showSecond?"":' style="display:none;"')+">"+a.secondText+"</dt>";if(a.showSecond&&a.secondGrid>0){i+='<dd class="ui_tpicker_second ui_tpicker_second_'+a.secondGrid+'"><div id="ui_tpicker_second_'+h+'"'+(a.showSecond?"":' style="display:none;"')+'></div><div style="padding-left: 1px"><table><tr>';for(var p=a.secondMin;p<=g;p+=parseInt(a.secondGrid,10))m++,i+="<td>"+
|
37 |
+
(p<10?"0":"")+p+"</td>";i+="</tr></table></div></dd>"}else i+='<dd class="ui_tpicker_second" id="ui_tpicker_second_'+h+'"'+(a.showSecond?"":' style="display:none;"')+"></dd>";i+='<dt class="ui_tpicker_millisec_label" id="ui_tpicker_millisec_label_'+h+'"'+(a.showMillisec?"":' style="display:none;"')+">"+a.millisecText+"</dt>";if(a.showMillisec&&a.millisecGrid>0){i+='<dd class="ui_tpicker_millisec ui_tpicker_millisec_'+a.millisecGrid+'"><div id="ui_tpicker_millisec_'+h+'"'+(a.showMillisec?"":' style="display:none;"')+
|
38 |
+
'></div><div style="padding-left: 1px"><table><tr>';for(k=a.millisecMin;k<=j;k+=parseInt(a.millisecGrid,10))s++,i+="<td>"+(k<10?"0":"")+p+"</td>";i+="</tr></table></div></dd>"}else i+='<dd class="ui_tpicker_millisec" id="ui_tpicker_millisec_'+h+'"'+(a.showMillisec?"":' style="display:none;"')+"></dd>";i+='<dt class="ui_tpicker_timezone_label" id="ui_tpicker_timezone_label_'+h+'"'+(a.showTimezone?"":' style="display:none;"')+">"+a.timezoneText+"</dt>";i+='<dd class="ui_tpicker_timezone" id="ui_tpicker_timezone_'+
|
39 |
+
h+'"'+(a.showTimezone?"":' style="display:none;"')+"></dd>";i+="</dl></div>";$tp=e(i);a.timeOnly===true&&($tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+a.timeOnlyTitle+"</div></div>"),c.find(".ui-datepicker-header, .ui-datepicker-calendar").hide());this.hour_slider=$tp.find("#ui_tpicker_hour_"+h).slider({orientation:"horizontal",value:this.hour,min:a.hourMin,max:d,step:a.stepHour,slide:function(a,c){b.hour_slider.slider("option","value",
|
40 |
+
c.value);b._onTimeChange()}});this.minute_slider=$tp.find("#ui_tpicker_minute_"+h).slider({orientation:"horizontal",value:this.minute,min:a.minuteMin,max:f,step:a.stepMinute,slide:function(a,c){b.minute_slider.slider("option","value",c.value);b._onTimeChange()}});this.second_slider=$tp.find("#ui_tpicker_second_"+h).slider({orientation:"horizontal",value:this.second,min:a.secondMin,max:g,step:a.stepSecond,slide:function(a,c){b.second_slider.slider("option","value",c.value);b._onTimeChange()}});this.millisec_slider=
|
41 |
+
$tp.find("#ui_tpicker_millisec_"+h).slider({orientation:"horizontal",value:this.millisec,min:a.millisecMin,max:j,step:a.stepMillisec,slide:function(a,c){b.millisec_slider.slider("option","value",c.value);b._onTimeChange()}});this.timezone_select=$tp.find("#ui_tpicker_timezone_"+h).append("<select></select>").find("select");e.fn.append.apply(this.timezone_select,e.map(a.timezoneList,function(a){return e("<option />").val(typeof a=="object"?a.value:a).text(typeof a=="object"?a.label:a)}));this.timezone_select.val(typeof this.timezone!=
|
42 |
+
"undefined"&&this.timezone!=null&&this.timezone!=""?this.timezone:a.timezone);this.timezone_select.change(function(){b._onTimeChange()});a.showHour&&a.hourGrid>0&&(l=100*q*a.hourGrid/(d-a.hourMin),$tp.find(".ui_tpicker_hour table").css({width:l+"%",marginLeft:l/(-2*q)+"%",borderCollapse:"collapse"}).find("td").each(function(){e(this).click(function(){var c=e(this).html();if(a.ampm)var d=c.substring(2).toLowerCase(),c=parseInt(c.substring(0,2),10),c=d=="a"?c==12?0:c:c==12?12:c+12;b.hour_slider.slider("option",
|
43 |
+
"value",c);b._onTimeChange();b._onSelectHandler()}).css({cursor:"pointer",width:100/q+"%",textAlign:"center",overflow:"hidden"})}));a.showMinute&&a.minuteGrid>0&&(l=100*r*a.minuteGrid/(f-a.minuteMin),$tp.find(".ui_tpicker_minute table").css({width:l+"%",marginLeft:l/(-2*r)+"%",borderCollapse:"collapse"}).find("td").each(function(){e(this).click(function(){b.minute_slider.slider("option","value",e(this).html());b._onTimeChange();b._onSelectHandler()}).css({cursor:"pointer",width:100/r+"%",textAlign:"center",
|
44 |
+
overflow:"hidden"})}));a.showSecond&&a.secondGrid>0&&$tp.find(".ui_tpicker_second table").css({width:l+"%",marginLeft:l/(-2*m)+"%",borderCollapse:"collapse"}).find("td").each(function(){e(this).click(function(){b.second_slider.slider("option","value",e(this).html());b._onTimeChange();b._onSelectHandler()}).css({cursor:"pointer",width:100/m+"%",textAlign:"center",overflow:"hidden"})});a.showMillisec&&a.millisecGrid>0&&$tp.find(".ui_tpicker_millisec table").css({width:l+"%",marginLeft:l/(-2*s)+"%",
|
45 |
+
borderCollapse:"collapse"}).find("td").each(function(){e(this).click(function(){b.millisec_slider.slider("option","value",e(this).html());b._onTimeChange();b._onSelectHandler()}).css({cursor:"pointer",width:100/s+"%",textAlign:"center",overflow:"hidden"})});d=c.find(".ui-datepicker-buttonpane");d.length?d.before($tp):c.append($tp);this.$timeObj=$tp.find("#ui_tpicker_time_"+h);if(this.inst!==null)c=this.timeDefined,this._onTimeChange(),this.timeDefined=c;c=function(){b._onSelectHandler()};this.hour_slider.bind("slidestop",
|
46 |
+
c);this.minute_slider.bind("slidestop",c);this.second_slider.bind("slidestop",c);this.millisec_slider.bind("slidestop",c)}},_limitMinMaxDateTime:function(c,a){var b=this._defaults,d=new Date(c.selectedYear,c.selectedMonth,c.selectedDay);if(this._defaults.showTimepicker){if(e.datepicker._get(c,"minDateTime")!==null&&e.datepicker._get(c,"minDateTime")!==void 0&&d){var f=e.datepicker._get(c,"minDateTime"),g=new Date(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===
|
47 |
+
null||this.secondMinOriginal===null||this.millisecMinOriginal===null)this.hourMinOriginal=b.hourMin,this.minuteMinOriginal=b.minuteMin,this.secondMinOriginal=b.secondMin,this.millisecMinOriginal=b.millisecMin;if(c.settings.timeOnly||g.getTime()==d.getTime())if(this._defaults.hourMin=f.getHours(),this.hour<=this._defaults.hourMin)if(this.hour=this._defaults.hourMin,this._defaults.minuteMin=f.getMinutes(),this.minute<=this._defaults.minuteMin)this.minute=this._defaults.minuteMin,this._defaults.secondMin=
|
48 |
+
f.getSeconds();else if(this.second<=this._defaults.secondMin)this.second=this._defaults.secondMin,this._defaults.millisecMin=f.getMilliseconds();else{if(this.millisec<this._defaults.millisecMin)this.millisec=this._defaults.millisecMin;this._defaults.millisecMin=this.millisecMinOriginal}else this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal;else this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=
|
49 |
+
this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal}if(e.datepicker._get(c,"maxDateTime")!==null&&e.datepicker._get(c,"maxDateTime")!==void 0&&d){f=e.datepicker._get(c,"maxDateTime");g=new Date(f.getFullYear(),f.getMonth(),f.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null)this.hourMaxOriginal=b.hourMax,this.minuteMaxOriginal=b.minuteMax,this.secondMaxOriginal=b.secondMax,
|
50 |
+
this.millisecMaxOriginal=b.millisecMax;if(c.settings.timeOnly||g.getTime()==d.getTime())if(this._defaults.hourMax=f.getHours(),this.hour>=this._defaults.hourMax)if(this.hour=this._defaults.hourMax,this._defaults.minuteMax=f.getMinutes(),this.minute>=this._defaults.minuteMax)this.minute=this._defaults.minuteMax,this._defaults.secondMax=f.getSeconds();else if(this.second>=this._defaults.secondMax)this.second=this._defaults.secondMax,this._defaults.millisecMax=f.getMilliseconds();else{if(this.millisec>
|
51 |
+
this._defaults.millisecMax)this.millisec=this._defaults.millisecMax;this._defaults.millisecMax=this.millisecMaxOriginal}else this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal;else this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal}a!==void 0&&a===true&&(b=(this._defaults.hourMax-
|
52 |
+
(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour).toFixed(0),d=(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute).toFixed(0),f=(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond).toFixed(0),g=(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec).toFixed(0),this.hour_slider&&this.hour_slider.slider("option",{min:this._defaults.hourMin,
|
53 |
+
max:b}).slider("value",this.hour),this.minute_slider&&this.minute_slider.slider("option",{min:this._defaults.minuteMin,max:d}).slider("value",this.minute),this.second_slider&&this.second_slider.slider("option",{min:this._defaults.secondMin,max:f}).slider("value",this.second),this.millisec_slider&&this.millisec_slider.slider("option",{min:this._defaults.millisecMin,max:g}).slider("value",this.millisec))}},_onTimeChange:function(){var c=this.hour_slider?this.hour_slider.slider("value"):false,a=this.minute_slider?
|
54 |
+
this.minute_slider.slider("value"):false,b=this.second_slider?this.second_slider.slider("value"):false,d=this.millisec_slider?this.millisec_slider.slider("value"):false,f=this.timezone_select?this.timezone_select.val():false,g=this._defaults;typeof c=="object"&&(c=false);typeof a=="object"&&(a=false);typeof b=="object"&&(b=false);typeof d=="object"&&(d=false);typeof f=="object"&&(f=false);c!==false&&(c=parseInt(c,10));a!==false&&(a=parseInt(a,10));b!==false&&(b=parseInt(b,10));d!==false&&(d=parseInt(d,
|
55 |
+
10));var j=g[c<12?"amNames":"pmNames"][0],h=c!=this.hour||a!=this.minute||b!=this.second||d!=this.millisec||this.ampm.length>0&&c<12!=(e.inArray(this.ampm.toUpperCase(),this.amNames)!==-1)||f!=this.timezone;if(h){if(c!==false)this.hour=c;if(a!==false)this.minute=a;if(b!==false)this.second=b;if(d!==false)this.millisec=d;if(f!==false)this.timezone=f;if(!this.inst)this.inst=e.datepicker._getInst(this.$input[0]);this._limitMinMaxDateTime(this.inst,true)}if(g.ampm)this.ampm=j;this._formatTime();this.$timeObj&&
|
56 |
+
this.$timeObj.text(this.formattedTime+g.timeSuffix);this.timeDefined=true;h&&this._updateDateTime()},_onSelectHandler:function(){var c=this._defaults.onSelect,a=this.$input?this.$input[0]:null;c&&a&&c.apply(a,[this.formattedDateTime,this])},_formatTime:function(c,a,b){if(b==void 0)b=this._defaults.ampm;var c=c||{hour:this.hour,minute:this.minute,second:this.second,millisec:this.millisec,ampm:this.ampm,timezone:this.timezone},d=(a||this._defaults.timeFormat).toString(),f=parseInt(c.hour,10);b&&(!e.inArray(c.ampm.toUpperCase(),
|
57 |
+
this.amNames)!==-1&&(f%=12),f===0&&(f=12));d=d.replace(/(?:hh?|mm?|ss?|[tT]{1,2}|[lz])/g,function(a){switch(a.toLowerCase()){case "hh":return("0"+f).slice(-2);case "h":return f;case "mm":return("0"+c.minute).slice(-2);case "m":return c.minute;case "ss":return("0"+c.second).slice(-2);case "s":return c.second;case "l":return("00"+c.millisec).slice(-3);case "z":return c.timezone;case "t":case "tt":if(b){var d=c.ampm;a.length==1&&(d=d.charAt(0));return a.charAt(0)=="T"?d.toUpperCase():d.toLowerCase()}return""}});
|
58 |
+
if(arguments.length)return d;else this.formattedTime=d},_updateDateTime:function(c){c=this.inst||c;dt=new Date(c.selectedYear,c.selectedMonth,c.selectedDay);dateFmt=e.datepicker._get(c,"dateFormat");formatCfg=e.datepicker._getFormatConfig(c);timeAvailable=dt!==null&&this.timeDefined;var a=this.formattedDate=e.datepicker.formatDate(dateFmt,dt===null?new Date:dt,formatCfg);if(!(c.lastVal!==void 0&&c.lastVal.length>0&&this.$input.val().length===0)){if(this._defaults.timeOnly===true)a=this.formattedTime;
|
59 |
+
else if(this._defaults.timeOnly!==true&&(this._defaults.alwaysSetTime||timeAvailable))a+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix;this.formattedDateTime=a;this._defaults.showTimepicker?this.$altInput&&this._defaults.altFieldTimeOnly===true?(this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate)):(this.$altInput&&this.$altInput.val(a),this.$input.val(a)):this.$input.val(this.formattedDate);this.$input.trigger("change")}}});e.fn.extend({timepicker:function(c){var c=
|
60 |
+
c||{},a=arguments;typeof c=="object"&&(a[0]=e.extend(c,{timeOnly:true}));return e(this).each(function(){e.fn.datetimepicker.apply(e(this),a)})},datetimepicker:function(c){var c=c||{},a=arguments;return typeof c=="string"?c=="getDate"?e.fn.datepicker.apply(e(this[0]),a):this.each(function(){var b=e(this);b.datepicker.apply(b,a)}):this.each(function(){var a=e(this);a.datepicker(e.timepicker._newInst(a,c)._defaults)})}});e.datepicker._base_selectDate=e.datepicker._selectDate;e.datepicker._selectDate=
|
61 |
+
function(c,a){var b=this._getInst(e(c)[0]),d=this._get(b,"timepicker");d?(d._limitMinMaxDateTime(b,true),b.inline=b.stay_open=true,this._base_selectDate(c,a),b.inline=b.stay_open=false,this._notifyChange(b),this._updateDatepicker(b)):this._base_selectDate(c,a)};e.datepicker._base_updateDatepicker=e.datepicker._updateDatepicker;e.datepicker._updateDatepicker=function(c){var a=c.input[0];if(!e.datepicker._curInst||!(e.datepicker._curInst!=c&&e.datepicker._datepickerShowing&&e.datepicker._lastInput!=
|
62 |
+
a))if(typeof c.stay_open!=="boolean"||c.stay_open===false)this._base_updateDatepicker(c),(a=this._get(c,"timepicker"))&&a._addTimePicker(c)};e.datepicker._base_doKeyPress=e.datepicker._doKeyPress;e.datepicker._doKeyPress=function(c){var a=e.datepicker._getInst(c.target),b=e.datepicker._get(a,"timepicker");if(b&&e.datepicker._get(a,"constrainInput")){var d=b._defaults.ampm,a=e.datepicker._possibleChars(e.datepicker._get(a,"dateFormat")),b=b._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,
|
63 |
+
d?"APM":"").replace(/Tt/g,d?"AaPpMm":"").replace(/tT/g,d?"AaPpMm":"").replace(/T/g,d?"AP":"").replace(/tt/g,d?"apm":"").replace(/t/g,d?"ap":"")+" "+b._defaults.separator+b._defaults.timeSuffix+(b._defaults.showTimezone?b._defaults.timezoneList.join(""):"")+b._defaults.amNames.join("")+b._defaults.pmNames.join("")+a,d=String.fromCharCode(c.charCode===void 0?c.keyCode:c.charCode);return c.ctrlKey||d<" "||!a||b.indexOf(d)>-1}return e.datepicker._base_doKeyPress(c)};e.datepicker._base_doKeyUp=e.datepicker._doKeyUp;
|
64 |
+
e.datepicker._doKeyUp=function(c){var a=e.datepicker._getInst(c.target),b=e.datepicker._get(a,"timepicker");if(b&&b._defaults.timeOnly&&a.input.val()!=a.lastVal)try{e.datepicker._updateDatepicker(a)}catch(d){e.datepicker.log(d)}return e.datepicker._base_doKeyUp(c)};e.datepicker._base_gotoToday=e.datepicker._gotoToday;e.datepicker._gotoToday=function(c){var a=this._getInst(e(c)[0]),b=a.dpDiv;this._base_gotoToday(c);var c=new Date,d=this._get(a,"timepicker");if(d._defaults.showTimezone&&d.timezone_select){var f=
|
65 |
+
c.getTimezoneOffset(),g=f>0?"-":"+",f=Math.abs(f),j=f%60,f=g+("0"+(f-j)/60).slice(-2)+("0"+j).slice(-2);d._defaults.timezoneIso8609&&(f=f.substring(0,3)+":"+f.substring(3));d.timezone_select.val(f)}this._setTime(a,c);e(".ui-datepicker-today",b).click()};e.datepicker._disableTimepickerDatepicker=function(c){var a=this._getInst(c),b=this._get(a,"timepicker");e(c).datepicker("getDate");if(b)b._defaults.showTimepicker=false,b._updateDateTime(a)};e.datepicker._enableTimepickerDatepicker=function(c){var a=
|
66 |
+
this._getInst(c),b=this._get(a,"timepicker");e(c).datepicker("getDate");if(b)b._defaults.showTimepicker=true,b._addTimePicker(a),b._updateDateTime(a)};e.datepicker._setTime=function(c,a){var b=this._get(c,"timepicker");if(b){var d=b._defaults,e=a?a.getHours():d.hour,g=a?a.getMinutes():d.minute,j=a?a.getSeconds():d.second,h=a?a.getMilliseconds():d.millisec;if(e<d.hourMin||e>d.hourMax||g<d.minuteMin||g>d.minuteMax||j<d.secondMin||j>d.secondMax||h<d.millisecMin||h>d.millisecMax)e=d.hourMin,g=d.minuteMin,
|
67 |
+
j=d.secondMin,h=d.millisecMin;b.hour=e;b.minute=g;b.second=j;b.millisec=h;b.hour_slider&&b.hour_slider.slider("value",e);b.minute_slider&&b.minute_slider.slider("value",g);b.second_slider&&b.second_slider.slider("value",j);b.millisec_slider&&b.millisec_slider.slider("value",h);b._onTimeChange();b._updateDateTime(c)}};e.datepicker._setTimeDatepicker=function(c,a,b){var c=this._getInst(c),d=this._get(c,"timepicker");d&&(this._setDateFromField(c),a&&(typeof a=="string"?(d._parseTime(a,b),a=new Date,
|
68 |
+
a.setHours(d.hour,d.minute,d.second,d.millisec)):a=new Date(a.getTime()),a.toString()=="Invalid Date"&&(a=void 0),this._setTime(c,a)))};e.datepicker._base_setDateDatepicker=e.datepicker._setDateDatepicker;e.datepicker._setDateDatepicker=function(c,a){var b=this._getInst(c),d=a instanceof Date?new Date(a.getTime()):a;this._updateDatepicker(b);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(c,d,true)};e.datepicker._base_getDateDatepicker=e.datepicker._getDateDatepicker;e.datepicker._getDateDatepicker=
|
69 |
+
function(c,a){var b=this._getInst(c),d=this._get(b,"timepicker");return d?(this._setDateFromField(b,a),(b=this._getDate(b))&&d._parseTime(e(c).val(),d.timeOnly)&&b.setHours(d.hour,d.minute,d.second,d.millisec),b):this._base_getDateDatepicker(c,a)};e.datepicker._base_parseDate=e.datepicker.parseDate;e.datepicker.parseDate=function(c,a,b){var d;try{d=this._base_parseDate(c,a,b)}catch(e){d=this._base_parseDate(c,a.substring(0,a.length-(e.length-e.indexOf(":")-2)),b)}return d};e.datepicker._base_formatDate=
|
70 |
+
e.datepicker._formatDate;e.datepicker._formatDate=function(c,a,b,d){var e=this._get(c,"timepicker");return e?(a&&this._base_formatDate(c,a,b,d),e._updateDateTime(),e.$input.val()):this._base_formatDate(c)};e.datepicker._base_optionDatepicker=e.datepicker._optionDatepicker;e.datepicker._optionDatepicker=function(c,a,b){var d=this._get(this._getInst(c),"timepicker");if(d){var e,g,j;if(typeof a=="string")a==="minDate"||a==="minDateTime"?e=b:a==="maxDate"||a==="maxDateTime"?g=b:a==="onSelect"&&(j=b);
|
71 |
+
else if(typeof a=="object")if(a.minDate)e=a.minDate;else if(a.minDateTime)e=a.minDateTime;else if(a.maxDate)g=a.maxDate;else if(a.maxDateTime)g=a.maxDateTime;if(e)e=e==0?new Date:new Date(e),d._defaults.minDate=e,d._defaults.minDateTime=e;else if(g)g=g==0?new Date:new Date(g),d._defaults.maxDate=g,d._defaults.maxDateTime=g;else if(j)d._defaults.onSelect=j}this._base_optionDatepicker(c,a,b)};e.timepicker=new m;e.timepicker.version="0.9.7"})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-af.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Deon Heyns */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['af'] = {
|
5 |
+
timeOnlyTitle: 'Kies Tyd',
|
6 |
+
timeText: 'Tyd ',
|
7 |
+
hourText: 'Ure ',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekondes',
|
10 |
+
millisecText: 'Millisekondes',
|
11 |
+
timezoneText: 'Tydsone',
|
12 |
+
currentText: 'Huidige Tyd',
|
13 |
+
closeText: 'Klaar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['af']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-bg.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Plamen Kovandjiev */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['bg'] = {
|
5 |
+
timeOnlyTitle: 'Изберете време',
|
6 |
+
timeText: 'Време',
|
7 |
+
hourText: 'Час',
|
8 |
+
minuteText: 'Минути',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Милисекунди',
|
11 |
+
timezoneText: 'Часови пояс',
|
12 |
+
currentText: 'Сега',
|
13 |
+
closeText: 'Затвори',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['bg']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ca.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Catalan translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergi Faber */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ca'] = {
|
5 |
+
timeOnlyTitle: 'Escollir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Hores',
|
8 |
+
minuteText: 'Minuts',
|
9 |
+
secondText: 'Segons',
|
10 |
+
millisecText: 'Milisegons',
|
11 |
+
timezoneText: 'Fus horari',
|
12 |
+
currentText: 'Ara',
|
13 |
+
closeText: 'Tancar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ca']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-cs.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ondřej Vodáček */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['cs'] = {
|
5 |
+
timeOnlyTitle: 'Vyberte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minuty',
|
9 |
+
secondText: 'Vteřiny',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
timezoneText: 'Časové pásmo',
|
12 |
+
currentText: 'Nyní',
|
13 |
+
closeText: 'Zavřít',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['dop.', 'AM', 'A'],
|
16 |
+
pmNames: ['odp.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['cs']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-de.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marvin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['de'] = {
|
5 |
+
timeOnlyTitle: 'Zeit Wählen',
|
6 |
+
timeText: 'Zeit',
|
7 |
+
hourText: 'Stunde',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Sekunde',
|
10 |
+
millisecText: 'Millisekunde',
|
11 |
+
timezoneText: 'Zeitzone',
|
12 |
+
currentText: 'Jetzt',
|
13 |
+
closeText: 'Fertig',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['vorm.', 'AM', 'A'],
|
16 |
+
pmNames: ['nachm.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['de']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-el.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hellenic translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Christos Pontikis */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['el'] = {
|
5 |
+
timeOnlyTitle: 'Επιλογή ώρας',
|
6 |
+
timeText: 'Ώρα',
|
7 |
+
hourText: 'Ώρες',
|
8 |
+
minuteText: 'Λεπτά',
|
9 |
+
secondText: 'Δευτερόλεπτα',
|
10 |
+
millisecText: 'μιλιδευτερόλεπτο',
|
11 |
+
timezoneText: 'Ζώνη ώρας',
|
12 |
+
currentText: 'Τώρα',
|
13 |
+
closeText: 'Κλείσιμο',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['π.μ.', 'AM', 'A'],
|
16 |
+
pmNames: ['μ.μ.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['el']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-es.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Spanish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Ianaré Sévi */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['es'] = {
|
5 |
+
timeOnlyTitle: 'Elegir una hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
timezoneText: 'Huso horario',
|
12 |
+
currentText: 'Ahora',
|
13 |
+
closeText: 'Cerrar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['es']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-et.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Karl Sutt (karl@sutt.ee) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['et'] = {
|
5 |
+
timeOnlyTitle: 'Vali aeg',
|
6 |
+
timeText: 'Aeg',
|
7 |
+
hourText: 'Tund',
|
8 |
+
minuteText: 'Minut',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekundis',
|
11 |
+
timezoneText: 'Ajavöönd',
|
12 |
+
currentText: 'Praegu',
|
13 |
+
closeText: 'Valmis',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['et']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-eu.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Basque trannslation for JQuery Timepicker Addon
|
2 |
+
/* Translated by Xabi Fer */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['eu'] = {
|
5 |
+
timeOnlyTitle: 'Aukeratu ordua',
|
6 |
+
timeText: 'Ordua',
|
7 |
+
hourText: 'Orduak',
|
8 |
+
minuteText: 'Minutuak',
|
9 |
+
secondText: 'Segunduak',
|
10 |
+
millisecText: 'Milisegunduak',
|
11 |
+
timezoneText: 'Ordu-eremua',
|
12 |
+
currentText: 'Orain',
|
13 |
+
closeText: 'Itxi',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['eu']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fi.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Juga Paazmaya (http://github.com/paazmaya) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fi'] = {
|
5 |
+
timeOnlyTitle: 'Valitse aika',
|
6 |
+
timeText: 'Aika',
|
7 |
+
hourText: 'Tunti',
|
8 |
+
minuteText: 'Minuutti',
|
9 |
+
secondText: 'Sekunti',
|
10 |
+
millisecText: 'Millisekunnin',
|
11 |
+
timezoneText: 'Aikavyöhyke',
|
12 |
+
currentText: 'Nyt',
|
13 |
+
closeText: 'Sulje',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['ap.', 'AM', 'A'],
|
16 |
+
pmNames: ['ip.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['fi']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-fr.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Thomas Lété */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['fr'] = {
|
5 |
+
timeOnlyTitle: 'Choisir une heure',
|
6 |
+
timeText: 'Heure',
|
7 |
+
hourText: 'Heures',
|
8 |
+
minuteText: 'Minutes',
|
9 |
+
secondText: 'Secondes',
|
10 |
+
millisecText: 'Millisecondes',
|
11 |
+
timezoneText: 'Fuseau horaire',
|
12 |
+
currentText: 'Maintenant',
|
13 |
+
closeText: 'Terminé',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['fr']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-gl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Barral */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['gl'] = {
|
5 |
+
timeOnlyTitle: 'Elixir unha hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milisegundos',
|
11 |
+
timezoneText: 'Fuso horario',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Pechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['gl']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-he.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Lior Lapid */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional["he"] = {
|
5 |
+
timeOnlyTitle: "בחירת זמן",
|
6 |
+
timeText: "שעה",
|
7 |
+
hourText: "שעות",
|
8 |
+
minuteText: "דקות",
|
9 |
+
secondText: "שניות",
|
10 |
+
millisecText: "אלפית השנייה",
|
11 |
+
timezoneText: "אזור זמן",
|
12 |
+
currentText: "עכשיו",
|
13 |
+
closeText:"סגור",
|
14 |
+
timeFormat: "HH:mm",
|
15 |
+
amNames: ['לפנה"צ', 'AM', 'A'],
|
16 |
+
pmNames: ['אחה"צ', 'PM', 'P'],
|
17 |
+
isRTL: true
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional["he"]);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-hu.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Vas Gábor */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['hu'] = {
|
5 |
+
timeOnlyTitle: 'Válasszon időpontot',
|
6 |
+
timeText: 'Idő',
|
7 |
+
hourText: 'Óra',
|
8 |
+
minuteText: 'Perc',
|
9 |
+
secondText: 'Másodperc',
|
10 |
+
millisecText: 'Milliszekundumos',
|
11 |
+
timezoneText: 'Időzóna',
|
12 |
+
currentText: 'Most',
|
13 |
+
closeText: 'Kész',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['de.', 'AM', 'A'],
|
16 |
+
pmNames: ['du.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['hu']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-id.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nia */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['id'] = {
|
5 |
+
timeOnlyTitle: 'Pilih Waktu',
|
6 |
+
timeText: 'Waktu',
|
7 |
+
hourText: 'Pukul',
|
8 |
+
minuteText: 'Menit',
|
9 |
+
secondText: 'Detik',
|
10 |
+
millisecText: 'Milidetik',
|
11 |
+
timezoneText: 'Zona Waktu',
|
12 |
+
currentText: 'Sekarang',
|
13 |
+
closeText: 'OK',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['id']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-it.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Marco "logicoder" Del Tongo */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['it'] = {
|
5 |
+
timeOnlyTitle: 'Scegli orario',
|
6 |
+
timeText: 'Orario',
|
7 |
+
hourText: 'Ora',
|
8 |
+
minuteText: 'Minuto',
|
9 |
+
secondText: 'Secondo',
|
10 |
+
millisecText: 'Millisecondo',
|
11 |
+
timezoneText: 'Fuso orario',
|
12 |
+
currentText: 'Adesso',
|
13 |
+
closeText: 'Chiudi',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['it']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ja.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Jun Omae */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ja'] = {
|
5 |
+
timeOnlyTitle: '時間を選択',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: 'ミリ秒',
|
11 |
+
timezoneText: 'タイムゾーン',
|
12 |
+
currentText: '現時刻',
|
13 |
+
closeText: '閉じる',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['午前', 'AM', 'A'],
|
16 |
+
pmNames: ['午後', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ja']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ko.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Genie */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ko'] = {
|
5 |
+
timeOnlyTitle: '시간 선택',
|
6 |
+
timeText: '시간',
|
7 |
+
hourText: '시',
|
8 |
+
minuteText: '분',
|
9 |
+
secondText: '초',
|
10 |
+
millisecText: '밀리초',
|
11 |
+
timezoneText: '표준 시간대',
|
12 |
+
currentText: '현재 시각',
|
13 |
+
closeText: '닫기',
|
14 |
+
timeFormat: 'tt h:mm',
|
15 |
+
amNames: ['오전', 'AM', 'A'],
|
16 |
+
pmNames: ['오후', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ko']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-lt.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Irmantas Šiupšinskas */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['lt'] = {
|
5 |
+
timeOnlyTitle: 'Pasirinkite laiką',
|
6 |
+
timeText: 'Laikas',
|
7 |
+
hourText: 'Valandos',
|
8 |
+
minuteText: 'Minutės',
|
9 |
+
secondText: 'Sekundės',
|
10 |
+
millisecText: 'Milisekundės',
|
11 |
+
timezoneText: 'Laiko zona',
|
12 |
+
currentText: 'Dabar',
|
13 |
+
closeText: 'Uždaryti',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['priešpiet', 'AM', 'A'],
|
16 |
+
pmNames: ['popiet', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['lt']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-nl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Martijn van der Lee */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['nl'] = {
|
5 |
+
timeOnlyTitle: 'Tijdstip',
|
6 |
+
timeText: 'Tijd',
|
7 |
+
hourText: 'Uur',
|
8 |
+
minuteText: 'Minuut',
|
9 |
+
secondText: 'Seconde',
|
10 |
+
millisecText: 'Milliseconde',
|
11 |
+
timezoneText: 'Tijdzone',
|
12 |
+
currentText: 'Vandaag',
|
13 |
+
closeText: 'Sluiten',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['nl']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-no.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Morten Hauan (http://hauan.me) */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['no'] = {
|
5 |
+
timeOnlyTitle: 'Velg tid',
|
6 |
+
timeText: 'Tid',
|
7 |
+
hourText: 'Time',
|
8 |
+
minuteText: 'Minutt',
|
9 |
+
secondText: 'Sekund',
|
10 |
+
millisecText: 'Millisekund',
|
11 |
+
timezoneText: 'Tidssone',
|
12 |
+
currentText: 'Nå',
|
13 |
+
closeText: 'Lukk',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['am', 'AM', 'A'],
|
16 |
+
pmNames: ['pm', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['no']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pl.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Michał Pena */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pl'] = {
|
5 |
+
timeOnlyTitle: 'Wybierz godzinę',
|
6 |
+
timeText: 'Czas',
|
7 |
+
hourText: 'Godzina',
|
8 |
+
minuteText: 'Minuta',
|
9 |
+
secondText: 'Sekunda',
|
10 |
+
millisecText: 'Milisekunda',
|
11 |
+
timezoneText: 'Strefa czasowa',
|
12 |
+
currentText: 'Teraz',
|
13 |
+
closeText: 'Gotowe',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pl']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt-BR.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Diogo Damiani (diogodamiani@gmail.com) */
|
3 |
+
(function ($) {
|
4 |
+
$.timepicker.regional['pt-BR'] = {
|
5 |
+
timeOnlyTitle: 'Escolha a horário',
|
6 |
+
timeText: 'Horário',
|
7 |
+
hourText: 'Hora',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
timezoneText: 'Fuso horário',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Fechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pt-BR']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-pt.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Luan Almeida */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['pt'] = {
|
5 |
+
timeOnlyTitle: 'Escolha uma hora',
|
6 |
+
timeText: 'Hora',
|
7 |
+
hourText: 'Horas',
|
8 |
+
minuteText: 'Minutos',
|
9 |
+
secondText: 'Segundos',
|
10 |
+
millisecText: 'Milissegundos',
|
11 |
+
timezoneText: 'Fuso horário',
|
12 |
+
currentText: 'Agora',
|
13 |
+
closeText: 'Fechar',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['a.m.', 'AM', 'A'],
|
16 |
+
pmNames: ['p.m.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['pt']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ro.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Romeo Adrian Cioaba */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ro'] = {
|
5 |
+
timeOnlyTitle: 'Alegeţi o oră',
|
6 |
+
timeText: 'Timp',
|
7 |
+
hourText: 'Ore',
|
8 |
+
minuteText: 'Minute',
|
9 |
+
secondText: 'Secunde',
|
10 |
+
millisecText: 'Milisecunde',
|
11 |
+
timezoneText: 'Fus orar',
|
12 |
+
currentText: 'Acum',
|
13 |
+
closeText: 'Închide',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ro']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-ru.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Trent Richardson */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['ru'] = {
|
5 |
+
timeOnlyTitle: 'Выберите время',
|
6 |
+
timeText: 'Время',
|
7 |
+
hourText: 'Часы',
|
8 |
+
minuteText: 'Минуты',
|
9 |
+
secondText: 'Секунды',
|
10 |
+
millisecText: 'Миллисекунды',
|
11 |
+
timezoneText: 'Часовой пояс',
|
12 |
+
currentText: 'Сейчас',
|
13 |
+
closeText: 'Закрыть',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['ru']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sk.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by David Vallner */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sk'] = {
|
5 |
+
timeOnlyTitle: 'Zvoľte čas',
|
6 |
+
timeText: 'Čas',
|
7 |
+
hourText: 'Hodiny',
|
8 |
+
minuteText: 'Minúty',
|
9 |
+
secondText: 'Sekundy',
|
10 |
+
millisecText: 'Milisekundy',
|
11 |
+
timezoneText: 'Časové pásmo',
|
12 |
+
currentText: 'Teraz',
|
13 |
+
closeText: 'Zavrieť',
|
14 |
+
timeFormat: 'H:m',
|
15 |
+
amNames: ['dop.', 'AM', 'A'],
|
16 |
+
pmNames: ['pop.', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['sk']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-sv.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nevon */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['sv'] = {
|
5 |
+
timeOnlyTitle: 'Välj en tid',
|
6 |
+
timeText: 'Timme',
|
7 |
+
hourText: 'Timmar',
|
8 |
+
minuteText: 'Minuter',
|
9 |
+
secondText: 'Sekunder',
|
10 |
+
millisecText: 'Millisekunder',
|
11 |
+
timezoneText: 'Tidszon',
|
12 |
+
currentText: 'Nu',
|
13 |
+
closeText: 'Stäng',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['sv']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-th.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Yote Wachirapornpongsa */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['th'] = {
|
5 |
+
timeOnlyTitle: 'เลือกเวลา',
|
6 |
+
timeText: 'เวลา ',
|
7 |
+
hourText: 'ชั่วโมง ',
|
8 |
+
minuteText: 'นาที',
|
9 |
+
secondText: 'วินาที',
|
10 |
+
millisecText: 'มิลลิวินาที',
|
11 |
+
timezoneText: 'เขตเวลา',
|
12 |
+
currentText: 'เวลาปัจจุบัน',
|
13 |
+
closeText: 'ปิด',
|
14 |
+
timeFormat: 'hh:mm tt'
|
15 |
+
};
|
16 |
+
$.timepicker.setDefaults($.timepicker.regional['th']);
|
17 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-tr.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Fehmi Can Saglam, Edited by Goktug Ozturk */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['tr'] = {
|
5 |
+
timeOnlyTitle: 'Zaman Seçiniz',
|
6 |
+
timeText: 'Zaman',
|
7 |
+
hourText: 'Saat',
|
8 |
+
minuteText: 'Dakika',
|
9 |
+
secondText: 'Saniye',
|
10 |
+
millisecText: 'Milisaniye',
|
11 |
+
timezoneText: 'Zaman Dilimi',
|
12 |
+
currentText: 'Şu an',
|
13 |
+
closeText: 'Tamam',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['ÖÖ', 'Ö'],
|
16 |
+
pmNames: ['ÖS', 'S'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['tr']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-uk.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Sergey Noskov */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['uk'] = {
|
5 |
+
timeOnlyTitle: 'Виберіть час',
|
6 |
+
timeText: 'Час',
|
7 |
+
hourText: 'Години',
|
8 |
+
minuteText: 'Хвилини',
|
9 |
+
secondText: 'Секунди',
|
10 |
+
millisecText: 'Мілісекунди',
|
11 |
+
timezoneText: 'Часовий пояс',
|
12 |
+
currentText: 'Зараз',
|
13 |
+
closeText: 'Закрити',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['uk']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-vi.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Nguyen Dinh Trung */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['vi'] = {
|
5 |
+
timeOnlyTitle: 'Chọn giờ',
|
6 |
+
timeText: 'Thời gian',
|
7 |
+
hourText: 'Giờ',
|
8 |
+
minuteText: 'Phút',
|
9 |
+
secondText: 'Giây',
|
10 |
+
millisecText: 'Phần nghìn giây',
|
11 |
+
timezoneText: 'Múi giờ',
|
12 |
+
currentText: 'Hiện thời',
|
13 |
+
closeText: 'Đóng',
|
14 |
+
timeFormat: 'H:m',
|
15 |
+
amNames: ['SA', 'AM', 'A'],
|
16 |
+
pmNames: ['CH', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['vi']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-CN.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Simplified Chinese translation for the jQuery Timepicker Addon /
|
2 |
+
/ Written by Will Lu */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-CN'] = {
|
5 |
+
timeOnlyTitle: '选择时间',
|
6 |
+
timeText: '时间',
|
7 |
+
hourText: '小时',
|
8 |
+
minuteText: '分钟',
|
9 |
+
secondText: '秒钟',
|
10 |
+
millisecText: '微秒',
|
11 |
+
timezoneText: '时区',
|
12 |
+
currentText: '现在时间',
|
13 |
+
closeText: '关闭',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['AM', 'A'],
|
16 |
+
pmNames: ['PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-CN']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/jqueryui/timepicker-i18n/jquery-ui-timepicker-zh-TW.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese translation for the jQuery Timepicker Addon */
|
2 |
+
/* Written by Alang.lin */
|
3 |
+
(function($) {
|
4 |
+
$.timepicker.regional['zh-TW'] = {
|
5 |
+
timeOnlyTitle: '選擇時分秒',
|
6 |
+
timeText: '時間',
|
7 |
+
hourText: '時',
|
8 |
+
minuteText: '分',
|
9 |
+
secondText: '秒',
|
10 |
+
millisecText: '毫秒',
|
11 |
+
timezoneText: '時區',
|
12 |
+
currentText: '現在時間',
|
13 |
+
closeText: '確定',
|
14 |
+
timeFormat: 'HH:mm',
|
15 |
+
amNames: ['上午', 'AM', 'A'],
|
16 |
+
pmNames: ['下午', 'PM', 'P'],
|
17 |
+
isRTL: false
|
18 |
+
};
|
19 |
+
$.timepicker.setDefaults($.timepicker.regional['zh-TW']);
|
20 |
+
})(jQuery);
|
inc/meta-box/js/map.js
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
// Use function construction to store map & DOM elements separately for each instance
|
6 |
+
var MapField = function ( $container )
|
7 |
+
{
|
8 |
+
this.$container = $container;
|
9 |
+
};
|
10 |
+
|
11 |
+
// Use prototype for better performance
|
12 |
+
MapField.prototype = {
|
13 |
+
// Initialize everything
|
14 |
+
init : function ()
|
15 |
+
{
|
16 |
+
this.initDomElements();
|
17 |
+
this.initMapElements();
|
18 |
+
|
19 |
+
this.initMarkerPosition();
|
20 |
+
this.addListeners();
|
21 |
+
this.autocomplete();
|
22 |
+
},
|
23 |
+
|
24 |
+
// Initialize DOM elements
|
25 |
+
initDomElements : function ()
|
26 |
+
{
|
27 |
+
this.canvas = this.$container.find( '.rwmb-map-canvas' )[0];
|
28 |
+
this.$coordinate = this.$container.find( '.rwmb-map-coordinate' );
|
29 |
+
this.$findButton = this.$container.find( '.rwmb-map-goto-address-button' );
|
30 |
+
this.addressField = this.$findButton.val();
|
31 |
+
},
|
32 |
+
|
33 |
+
// Initialize map elements
|
34 |
+
initMapElements : function ()
|
35 |
+
{
|
36 |
+
var defaultLoc = $( this.canvas ).data( 'default-loc' ),
|
37 |
+
latLng;
|
38 |
+
|
39 |
+
defaultLoc = defaultLoc ? defaultLoc.split( ',' ) : [53.346881, -6.258860];
|
40 |
+
latLng = new google.maps.LatLng( defaultLoc[0], defaultLoc[1] ); // Initial position for map
|
41 |
+
|
42 |
+
this.map = new google.maps.Map( this.canvas, {
|
43 |
+
center : latLng,
|
44 |
+
zoom : 14,
|
45 |
+
streetViewControl: 0,
|
46 |
+
mapTypeId : google.maps.MapTypeId.ROADMAP
|
47 |
+
} );
|
48 |
+
this.marker = new google.maps.Marker( { position: latLng, map: this.map, draggable: true } );
|
49 |
+
this.geocoder = new google.maps.Geocoder();
|
50 |
+
},
|
51 |
+
|
52 |
+
// Initialize marker position
|
53 |
+
initMarkerPosition: function ()
|
54 |
+
{
|
55 |
+
var coord = this.$coordinate.val(),
|
56 |
+
l,
|
57 |
+
zoom;
|
58 |
+
|
59 |
+
if ( coord )
|
60 |
+
{
|
61 |
+
l = coord.split( ',' );
|
62 |
+
this.marker.setPosition( new google.maps.LatLng( l[0], l[1] ) );
|
63 |
+
|
64 |
+
zoom = l.length > 2 ? parseInt( l[2], 10 ) : 14;
|
65 |
+
|
66 |
+
this.map.setCenter( this.marker.position );
|
67 |
+
this.map.setZoom( zoom );
|
68 |
+
}
|
69 |
+
else if ( this.addressField )
|
70 |
+
{
|
71 |
+
this.geocodeAddress();
|
72 |
+
}
|
73 |
+
},
|
74 |
+
|
75 |
+
// Add event listeners for 'click' & 'drag'
|
76 |
+
addListeners : function ()
|
77 |
+
{
|
78 |
+
var that = this;
|
79 |
+
google.maps.event.addListener( this.map, 'click', function ( event )
|
80 |
+
{
|
81 |
+
that.marker.setPosition( event.latLng );
|
82 |
+
that.updateCoordinate( event.latLng );
|
83 |
+
} );
|
84 |
+
google.maps.event.addListener( this.marker, 'drag', function ( event )
|
85 |
+
{
|
86 |
+
that.updateCoordinate( event.latLng );
|
87 |
+
} );
|
88 |
+
|
89 |
+
this.$findButton.on( 'click', function ()
|
90 |
+
{
|
91 |
+
that.geocodeAddress();
|
92 |
+
return false;
|
93 |
+
} );
|
94 |
+
},
|
95 |
+
|
96 |
+
// Autocomplete address
|
97 |
+
autocomplete : function ()
|
98 |
+
{
|
99 |
+
var that = this;
|
100 |
+
|
101 |
+
// No address field or more than 1 address fields, ignore
|
102 |
+
if ( !this.addressField || this.addressField.split( ',' ).length > 1 )
|
103 |
+
{
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
|
107 |
+
$( '#' + this.addressField ).autocomplete( {
|
108 |
+
source: function ( request, response )
|
109 |
+
{
|
110 |
+
// TODO: add 'region' option, to help bias geocoder.
|
111 |
+
that.geocoder.geocode( {
|
112 |
+
'address': request.term
|
113 |
+
}, function ( results )
|
114 |
+
{
|
115 |
+
response( $.map( results, function ( item )
|
116 |
+
{
|
117 |
+
return {
|
118 |
+
label : item.formatted_address,
|
119 |
+
value : item.formatted_address,
|
120 |
+
latitude : item.geometry.location.lat(),
|
121 |
+
longitude: item.geometry.location.lng()
|
122 |
+
};
|
123 |
+
} ) );
|
124 |
+
} );
|
125 |
+
},
|
126 |
+
select: function ( event, ui )
|
127 |
+
{
|
128 |
+
var latLng = new google.maps.LatLng( ui.item.latitude, ui.item.longitude );
|
129 |
+
|
130 |
+
that.map.setCenter( latLng );
|
131 |
+
that.marker.setPosition( latLng );
|
132 |
+
that.updateCoordinate( latLng );
|
133 |
+
}
|
134 |
+
} );
|
135 |
+
},
|
136 |
+
|
137 |
+
// Update coordinate to input field
|
138 |
+
updateCoordinate : function ( latLng )
|
139 |
+
{
|
140 |
+
this.$coordinate.val( latLng.lat() + ',' + latLng.lng() );
|
141 |
+
},
|
142 |
+
|
143 |
+
// Find coordinates by address
|
144 |
+
// Find coordinates by address
|
145 |
+
geocodeAddress : function ()
|
146 |
+
{
|
147 |
+
var address,
|
148 |
+
addressList = [],
|
149 |
+
fieldList = this.addressField.split( ',' ),
|
150 |
+
loop,
|
151 |
+
that = this;
|
152 |
+
|
153 |
+
for ( loop = 0; loop < fieldList.length; loop++ )
|
154 |
+
{
|
155 |
+
addressList[loop] = jQuery( '#' + fieldList[loop] ).val();
|
156 |
+
}
|
157 |
+
|
158 |
+
address = addressList.join( ',' ).replace( /\n/g, ',' ).replace( /,,/g, ',' );
|
159 |
+
|
160 |
+
if ( address )
|
161 |
+
{
|
162 |
+
this.geocoder.geocode( { 'address': address }, function ( results, status )
|
163 |
+
{
|
164 |
+
if ( status === google.maps.GeocoderStatus.OK )
|
165 |
+
{
|
166 |
+
that.map.setCenter( results[0].geometry.location );
|
167 |
+
that.marker.setPosition( results[0].geometry.location );
|
168 |
+
that.updateCoordinate( results[0].geometry.location );
|
169 |
+
}
|
170 |
+
} );
|
171 |
+
}
|
172 |
+
}
|
173 |
+
};
|
174 |
+
|
175 |
+
$( function ()
|
176 |
+
{
|
177 |
+
$( '.rwmb-map-field' ).each( function ()
|
178 |
+
{
|
179 |
+
var field = new MapField( $( this ) );
|
180 |
+
field.init();
|
181 |
+
|
182 |
+
$( this ).data( 'mapController', field );
|
183 |
+
} );
|
184 |
+
|
185 |
+
$( '.rwmb-input' ).on( 'clone', function ()
|
186 |
+
{
|
187 |
+
$( '.rwmb-map-field' ).each( function ()
|
188 |
+
{
|
189 |
+
var field = new MapField( $( this ) );
|
190 |
+
field.init();
|
191 |
+
|
192 |
+
$( this ).data( 'mapController', field );
|
193 |
+
} );
|
194 |
+
} );
|
195 |
+
} );
|
196 |
+
|
197 |
+
})( jQuery );
|
inc/meta-box/js/oembed.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
$( '.rwmb-oembed-wrapper .spinner' ).hide();
|
6 |
+
|
7 |
+
$( 'body' ).on( 'click', '.rwmb-oembed-wrapper .show-embed', function() {
|
8 |
+
var $this = $( this ),
|
9 |
+
$spinner = $this.siblings( '.spinner' ),
|
10 |
+
data = {
|
11 |
+
action: 'rwmb_get_embed',
|
12 |
+
url: $this.siblings( 'input' ).val()
|
13 |
+
};
|
14 |
+
|
15 |
+
$spinner.show();
|
16 |
+
$.post( ajaxurl, data, function( r )
|
17 |
+
{
|
18 |
+
$spinner.hide();
|
19 |
+
$this.siblings( '.embed-code' ).html( r.data );
|
20 |
+
}, 'json' );
|
21 |
+
|
22 |
+
return false;
|
23 |
+
} );
|
24 |
+
} );
|
inc/meta-box/js/plupload-image.js
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
// Hide "Uploaded files" title if there are no files uploaded after deleting files
|
6 |
+
$( '.rwmb-images' ).on( 'click', '.rwmb-delete-file', function ()
|
7 |
+
{
|
8 |
+
// Check if we need to show drop target
|
9 |
+
var $dragndrop = $( this ).parents( '.rwmb-images' ).siblings( '.rwmb-drag-drop' );
|
10 |
+
|
11 |
+
// After delete files, show the Drag & Drop section
|
12 |
+
$dragndrop.removeClass( 'hidden' );
|
13 |
+
} );
|
14 |
+
|
15 |
+
$( '.rwmb-drag-drop' ).each( function ()
|
16 |
+
{
|
17 |
+
// Declare vars
|
18 |
+
var $dropArea = $( this ),
|
19 |
+
$imageList = $dropArea.siblings( '.rwmb-uploaded' ),
|
20 |
+
uploaderData = $dropArea.data( 'js_options' ),
|
21 |
+
uploader = {};
|
22 |
+
|
23 |
+
// Extend uploaderData
|
24 |
+
uploaderData.multipart_params = $.extend(
|
25 |
+
{
|
26 |
+
_ajax_nonce: $dropArea.data( 'upload_nonce' ),
|
27 |
+
post_id : $( '#post_ID' ).val()
|
28 |
+
},
|
29 |
+
uploaderData.multipart_params
|
30 |
+
);
|
31 |
+
|
32 |
+
// Create uploader
|
33 |
+
uploader = new plupload.Uploader( uploaderData );
|
34 |
+
uploader.init();
|
35 |
+
|
36 |
+
// Add files
|
37 |
+
uploader.bind( 'FilesAdded', function ( up, files )
|
38 |
+
{
|
39 |
+
var maxFileUploads = $imageList.data( 'max_file_uploads' ),
|
40 |
+
uploaded = $imageList.children().length,
|
41 |
+
msg = maxFileUploads > 1 ? rwmbFile.maxFileUploadsPlural : rwmbFile.maxFileUploadsSingle;
|
42 |
+
|
43 |
+
msg = msg.replace( '%d', maxFileUploads );
|
44 |
+
|
45 |
+
// Remove files from queue if exceed max file uploads
|
46 |
+
if ( maxFileUploads > 0 && ( uploaded + files.length ) > maxFileUploads )
|
47 |
+
{
|
48 |
+
if ( uploaded < maxFileUploads )
|
49 |
+
{
|
50 |
+
var diff = maxFileUploads - uploaded;
|
51 |
+
up.splice( diff - 1, files.length - diff );
|
52 |
+
files = up.files;
|
53 |
+
}
|
54 |
+
alert( msg );
|
55 |
+
}
|
56 |
+
|
57 |
+
// Hide drag & drop section if reach max file uploads
|
58 |
+
if ( maxFileUploads > 0 && uploaded + files.length >= maxFileUploads )
|
59 |
+
{
|
60 |
+
$dropArea.addClass( 'hidden' );
|
61 |
+
}
|
62 |
+
|
63 |
+
var max = parseInt( up.settings.max_file_size, 10 );
|
64 |
+
|
65 |
+
// Upload files
|
66 |
+
plupload.each( files, function ( file )
|
67 |
+
{
|
68 |
+
addLoading( up, file, $imageList );
|
69 |
+
addThrobber( file );
|
70 |
+
if ( file.size >= max )
|
71 |
+
{
|
72 |
+
removeError( file );
|
73 |
+
}
|
74 |
+
} );
|
75 |
+
up.refresh();
|
76 |
+
up.start();
|
77 |
+
|
78 |
+
} );
|
79 |
+
|
80 |
+
uploader.bind( 'Error', function ( up, e )
|
81 |
+
{
|
82 |
+
addLoading( up, e.file, $imageList );
|
83 |
+
removeError( e.file );
|
84 |
+
up.removeFile( e.file );
|
85 |
+
} );
|
86 |
+
|
87 |
+
uploader.bind( 'FileUploaded', function ( up, file, r )
|
88 |
+
{
|
89 |
+
r = $.parseJSON( r.response );
|
90 |
+
if ( r.success )
|
91 |
+
{
|
92 |
+
$( 'li#' + file.id ).replaceWith( r.data );
|
93 |
+
}
|
94 |
+
else
|
95 |
+
{
|
96 |
+
removeError( file );
|
97 |
+
}
|
98 |
+
} );
|
99 |
+
} );
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Helper functions
|
103 |
+
*/
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Removes li element if there is an error with the file
|
107 |
+
*
|
108 |
+
* @return void
|
109 |
+
*/
|
110 |
+
function removeError( file )
|
111 |
+
{
|
112 |
+
$( 'li#' + file.id )
|
113 |
+
.addClass( 'rwmb-image-error' )
|
114 |
+
.delay( 1600 )
|
115 |
+
.fadeOut( 'slow', function ()
|
116 |
+
{
|
117 |
+
$( this ).remove();
|
118 |
+
}
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Adds loading li element
|
124 |
+
*
|
125 |
+
* @return void
|
126 |
+
*/
|
127 |
+
function addLoading( up, file, $ul )
|
128 |
+
{
|
129 |
+
$ul.removeClass( 'hidden' ).append( '<li id="' + file.id + '"><div class="rwmb-image-uploading-bar"></div><div id="' + file.id + '-throbber" class="rwmb-image-uploading-status"></div></li>' );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Adds loading throbber while waiting for a response
|
134 |
+
*
|
135 |
+
* @return void
|
136 |
+
*/
|
137 |
+
function addThrobber( file )
|
138 |
+
{
|
139 |
+
$( '#' + file.id + '-throbber' ).html( '<img class="rwmb-loader" height="64" width="64" src="' + RWMB.url + '"img/loader.gif">' );
|
140 |
+
}
|
141 |
+
} );
|
inc/meta-box/js/select-advanced.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
function rwmb_update_select_advanced()
|
6 |
+
{
|
7 |
+
var $this = $( this ),
|
8 |
+
options = $this.data( 'options' );
|
9 |
+
$this.siblings( '.select2-container' ).remove();
|
10 |
+
$this.select2( options );
|
11 |
+
}
|
12 |
+
|
13 |
+
$( ':input.rwmb-select-advanced' ).each( rwmb_update_select_advanced );
|
14 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-select-advanced', rwmb_update_select_advanced );
|
15 |
+
} );
|
inc/meta-box/js/select2/select2.min.js
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright 2012 Igor Vaynberg
|
3 |
+
|
4 |
+
Version: 3.2 Timestamp: Mon Sep 10 10:38:04 PDT 2012
|
5 |
+
|
6 |
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in
|
7 |
+
compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
|
8 |
+
|
9 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
10 |
+
|
11 |
+
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
12 |
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
See the License for the specific language governing permissions and limitations under the License.
|
14 |
+
*/
|
15 |
+
(function(e){"undefined"==typeof e.fn.each2&&e.fn.extend({each2:function(g){for(var i=e([0]),m=-1,s=this.length;++m<s&&(i.context=i[0]=this[m])&&!1!==g.call(i[0],m,i););return this}})})(jQuery);
|
16 |
+
(function(e,g){function i(a,b){var c=0,d=b.length,j;if("undefined"===typeof a)return-1;if(a.constructor===String)for(;c<d;c+=1){if(0===a.localeCompare(b[c]))return c}else for(;c<d;c+=1)if(j=b[c],j.constructor===String){if(0===j.localeCompare(a))return c}else if(j===a)return c;return-1}function m(a,b){return a===b?!0:a===g||b===g||null===a||null===b?!1:a.constructor===String?0===a.localeCompare(b):b.constructor===String?0===b.localeCompare(a):!1}function s(a,b){var c,d,j;if(null===a||1>a.length)return[];
|
17 |
+
c=a.split(b);d=0;for(j=c.length;d<j;d+=1)c[d]=e.trim(c[d]);return c}function A(a,b,c){var c=c||g,d;return function(){var j=arguments;window.clearTimeout(d);d=window.setTimeout(function(){b.apply(c,j)},a)}}function l(a){a.preventDefault();a.stopPropagation()}function B(a,b,c){var d=a.toUpperCase().indexOf(b.toUpperCase()),b=b.length;0>d?c.push(a):(c.push(a.substring(0,d)),c.push("<span class='select2-match'>"),c.push(a.substring(d,d+b)),c.push("</span>"),c.push(a.substring(d+b,a.length)))}function C(a){var b,
|
18 |
+
c=0,d=null,j=a.quietMillis||100;return function(h){window.clearTimeout(b);b=window.setTimeout(function(){var b=c+=1,j=a.data,n=a.transport||e.ajax,f=a.traditional||!1,g=a.type||"GET",j=j.call(this,h.term,h.page,h.context);null!==d&&d.abort();d=n.call(null,{url:a.url,dataType:a.dataType,data:j,type:g,traditional:f,success:function(d){b<c||(d=a.results(d,h.page),h.callback(d))}})},j)}}function D(a){var b=a,c,d=function(a){return""+a.text};e.isArray(b)||(d=b.text,e.isFunction(d)||(c=b.text,d=function(a){return a[c]}),
|
19 |
+
b=b.results);return function(a){var c=a.term,f={results:[]},k;if(c==="")a.callback({results:b});else{k=function(b,f){var g,t,b=b[0];if(b.children){g={};for(t in b)b.hasOwnProperty(t)&&(g[t]=b[t]);g.children=[];e(b.children).each2(function(a,b){k(b,g.children)});g.children.length&&f.push(g)}else a.matcher(c,d(b))&&f.push(b)};e(b).each2(function(a,b){k(b,f.results)});a.callback(f)}}}function E(a){return e.isFunction(a)?a:function(b){var c=b.term,d={results:[]};e(a).each(function(){var a=this.text!==
|
20 |
+
g,e=a?this.text:this;if(""===c||b.matcher(c,e))d.results.push(a?this:{id:this,text:this})});b.callback(d)}}function u(a){if(e.isFunction(a))return!0;if(!a)return!1;throw Error("formatterName must be a function or a falsy value");}function v(a){return e.isFunction(a)?a():a}function F(a){var b=0;e.each(a,function(a,d){d.children?b+=F(d.children):b++});return b}function H(a,b,c,d){var e=a,h=!1,f,k,n,o;if(!d.createSearchChoice||!d.tokenSeparators||1>d.tokenSeparators.length)return g;for(;;){h=-1;k=0;
|
21 |
+
for(n=d.tokenSeparators.length;k<n&&!(o=d.tokenSeparators[k],h=a.indexOf(o),0<=h);k++);if(0>h)break;f=a.substring(0,h);a=a.substring(h+o.length);if(0<f.length&&(f=d.createSearchChoice(f,b),f!==g&&null!==f&&d.id(f)!==g&&null!==d.id(f))){h=!1;k=0;for(n=b.length;k<n;k++)if(m(d.id(f),d.id(b[k]))){h=!0;break}h||c(f)}}if(0!=e.localeCompare(a))return a}function x(a,b){var c=function(){};c.prototype=new a;c.prototype.constructor=c;c.prototype.parent=a.prototype;c.prototype=e.extend(c.prototype,b);return c}
|
22 |
+
if(window.Select2===g){var f,w,y,z,G,q;f={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){a=a.which?a.which:a;switch(a){case f.LEFT:case f.RIGHT:case f.UP:case f.DOWN:return!0}return!1},isControl:function(a){switch(a.which){case f.SHIFT:case f.CTRL:case f.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){a=a.which?a.which:a;return 112<=a&&123>=a}};var I=1;G=function(){return I++};
|
23 |
+
e(document).delegate("body","mousemove",function(a){e.data(document,"select2-lastpos",{x:a.pageX,y:a.pageY})});e(document).ready(function(){e(document).delegate("body","mousedown touchend",function(a){var b=e(a.target).closest("div.select2-container").get(0),c;b?e(document).find("div.select2-container-active").each(function(){this!==b&&e(this).data("select2").blur()}):(b=e(a.target).closest("div.select2-drop").get(0),e(document).find("div.select2-drop-active").each(function(){this!==b&&e(this).data("select2").blur()}));
|
24 |
+
b=e(a.target);c=b.attr("for");"LABEL"===a.target.tagName&&(c&&0<c.length)&&(b=e("#"+c),b=b.data("select2"),b!==g&&(b.focus(),a.preventDefault()))})});w=x(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(a){var b,c;this.opts=a=this.prepareOpts(a);this.id=a.id;a.element.data("select2")!==g&&null!==a.element.data("select2")&&this.destroy();this.enabled=!0;this.container=this.createContainer();this.containerId="s2id_"+(a.element.attr("id")||"autogen"+G());this.containerSelector=
|
25 |
+
"#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);var d=!1,j;this.body=function(){!1===d&&(j=a.element.closest("body"),d=!0);return j};a.element.attr("class")!==g&&this.container.addClass(a.element.attr("class").replace(/validate\[[\S ]+] ?/,""));this.container.css(v(a.containerCss));this.container.addClass(v(a.containerCssClass));this.opts.element.data("select2",this).hide().before(this.container);this.container.data("select2",
|
26 |
+
this);this.dropdown=this.container.find(".select2-drop");this.dropdown.addClass(v(a.dropdownCssClass));this.dropdown.data("select2",this);this.results=b=this.container.find(".select2-results");this.search=c=this.container.find("input.select2-input");c.attr("tabIndex",this.opts.element.attr("tabIndex"));this.resultsPage=0;this.context=null;this.initContainer();this.initContainerWidth();this.results.bind("mousemove",function(a){var b=e.data(document,"select2-lastpos");(b===g||b.x!==a.pageX||b.y!==a.pageY)&&
|
27 |
+
e(a.target).trigger("mousemove-filtered",a)});this.dropdown.delegate(".select2-results","mousemove-filtered",this.bind(this.highlightUnderEvent));var h=this.results,f=A(80,function(a){h.trigger("scroll-debounced",a)});h.bind("scroll",function(a){0<=i(a.target,h.get())&&f(a)});this.dropdown.delegate(".select2-results","scroll-debounced",this.bind(this.loadMoreIfNeeded));e.fn.mousewheel&&b.mousewheel(function(a,c,d,e){c=b.scrollTop();0<e&&0>=c-e?(b.scrollTop(0),l(a)):0>e&&b.get(0).scrollHeight-b.scrollTop()+
|
28 |
+
e<=b.height()&&(b.scrollTop(b.get(0).scrollHeight-b.height()),l(a))});c.bind("keydown",function(){e.data(c,"keyup-change-value")===g&&e.data(c,"keyup-change-value",c.val())});c.bind("keyup",function(){var a=e.data(c,"keyup-change-value");a!==g&&c.val()!==a&&(e.removeData(c,"keyup-change-value"),c.trigger("keyup-change"))});c.bind("keyup-change",this.bind(this.updateResults));c.bind("focus",function(){c.addClass("select2-focused");" "===c.val()&&c.val("")});c.bind("blur",function(){c.removeClass("select2-focused")});
|
29 |
+
this.dropdown.delegate(".select2-results","mouseup",this.bind(function(a){0<e(a.target).closest(".select2-result-selectable:not(.select2-disabled)").length?(this.highlightUnderEvent(a),this.selectHighlighted(a)):this.focusSearch();l(a)}));this.dropdown.bind("click mouseup mousedown",function(a){a.stopPropagation()});e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource());(a.element.is(":disabled")||a.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var a=
|
30 |
+
this.opts.element.data("select2");a!==g&&(a.container.remove(),a.dropdown.remove(),a.opts.element.removeData("select2").unbind(".select2").show())},prepareOpts:function(a){var b,c,d;b=a.element;"select"===b.get(0).tagName.toLowerCase()&&(this.select=c=a.element);c&&e.each("id multiple ajax query createSearchChoice initSelection data tags".split(" "),function(){if(this in a)throw Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.");});a=e.extend({},{populateResults:function(b,
|
31 |
+
c,d){var f,n=this.opts.id,o=this;f=function(b,c,j){var h,l,i,m,r,p,q;h=0;for(l=b.length;h<l;h=h+1){i=b[h];m=n(i)!==g;r=i.children&&i.children.length>0;p=e("<li></li>");p.addClass("select2-results-dept-"+j);p.addClass("select2-result");p.addClass(m?"select2-result-selectable":"select2-result-unselectable");r&&p.addClass("select2-result-with-children");p.addClass(o.opts.formatResultCssClass(i));m=e("<div></div>");m.addClass("select2-result-label");q=a.formatResult(i,m,d);q!==g&&m.html(o.opts.escapeMarkup(q));
|
32 |
+
p.append(m);if(r){r=e("<ul></ul>");r.addClass("select2-result-sub");f(i.children,r,j+1);p.append(r)}p.data("select2-data",i);c.append(p)}};f(c,b,0)}},e.fn.select2.defaults,a);"function"!==typeof a.id&&(d=a.id,a.id=function(a){return a[d]});if(c)a.query=this.bind(function(a){var c={results:[],more:false},d=a.term,f,n,o;o=function(b,c){var e;if(b.is("option"))a.matcher(d,b.text(),b)&&c.push({id:b.attr("value"),text:b.text(),element:b.get(),css:b.attr("class")});else if(b.is("optgroup")){e={text:b.attr("label"),
|
33 |
+
children:[],element:b.get(),css:b.attr("class")};b.children().each2(function(a,b){o(b,e.children)});e.children.length>0&&c.push(e)}};f=b.children();if(this.getPlaceholder()!==g&&f.length>0){n=f[0];e(n).text()===""&&(f=f.not(n))}f.each2(function(a,b){o(b,c.results)});a.callback(c)}),a.id=function(a){return a.id},a.formatResultCssClass=function(a){return a.css};else if(!("query"in a))if("ajax"in a){if((c=a.element.data("ajax-url"))&&0<c.length)a.ajax.url=c;a.query=C(a.ajax)}else"data"in a?a.query=D(a.data):
|
34 |
+
"tags"in a&&(a.query=E(a.tags),a.createSearchChoice=function(a){return{id:a,text:a}},a.initSelection=function(b,c){var d=[];e(s(b.val(),a.separator)).each(function(){var b=this,c=this,j=a.tags;e.isFunction(j)&&(j=j());e(j).each(function(){if(m(this.id,b)){c=this.text;return false}});d.push({id:b,text:c})});c(d)});if("function"!==typeof a.query)throw"query function not defined for Select2 "+a.element.attr("id");return a},monitorSource:function(){this.opts.element.bind("change.select2",this.bind(function(){!0!==
|
35 |
+
this.opts.element.data("select2-change-triggered")&&this.initSelection()}))},triggerChange:function(a){a=a||{};a=e.extend({},a,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",!0);this.opts.element.trigger(a);this.opts.element.data("select2-change-triggered",!1);this.opts.element.click();this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){this.enabled||(this.enabled=!0,this.container.removeClass("select2-container-disabled"))},disable:function(){this.enabled&&
|
36 |
+
(this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"))},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var a=this.container.offset(),b=this.container.outerHeight(),c=this.container.outerWidth(),d=this.dropdown.outerHeight(),j=e(window).scrollTop()+document.documentElement.clientHeight,b=a.top+b,f=a.left,j=b+d<=j,g=a.top-d>=this.body().scrollTop(),k=this.dropdown.hasClass("select2-drop-above"),n;"static"!==this.body().css("position")&&
|
37 |
+
(n=this.body().offset(),b-=n.top,f-=n.left);k?(k=!0,!g&&j&&(k=!1)):(k=!1,!j&&g&&(k=!0));k?(b=a.top-d,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above"));a=e.extend({top:b,left:f,width:c},v(this.opts.dropdownCss));this.dropdown.css(a)},shouldOpen:function(){var a;if(this.opened())return!1;a=e.Event("open");this.opts.element.trigger(a);return!a.isDefaultPrevented()},
|
38 |
+
clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){if(!this.shouldOpen())return!1;window.setTimeout(this.bind(this.opening),1);return!0},opening:function(){var a=this.containerId,b=this.containerSelector,c="scroll."+a,d="resize."+a;this.container.parents().each(function(){e(this).bind(c,function(){var a=e(b);0==a.length&&e(this).unbind(c);a.select2("close")})});e(window).bind(d,function(){var a=
|
39 |
+
e(b);0==a.length&&e(window).unbind(d);a.select2("close")});this.clearDropdownAlignmentPreference();" "===this.search.val()&&this.search.val("");this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.updateResults(!0);this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body());this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");this.ensureHighlightVisible();this.focusSearch()},close:function(){if(this.opened()){var a=
|
40 |
+
this;this.container.parents().each(function(){e(this).unbind("scroll."+a.containerId)});e(window).unbind("resize."+this.containerId);this.clearDropdownAlignmentPreference();this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();this.clearSearch();this.opts.element.trigger(e.Event("close"))}},clearSearch:function(){},ensureHighlightVisible:function(){var a=this.results,b,c,d,f;c=this.highlight();0>c||(0==c?a.scrollTop(0):
|
41 |
+
(b=a.find(".select2-result-selectable"),d=e(b[c]),f=d.offset().top+d.outerHeight(),c===b.length-1&&(b=a.find("li.select2-more-results"),0<b.length&&(f=b.offset().top+b.outerHeight())),b=a.offset().top+a.outerHeight(),f>b&&a.scrollTop(a.scrollTop()+(f-b)),d=d.offset().top-a.offset().top,0>d&&a.scrollTop(a.scrollTop()+d)))},moveHighlight:function(a){for(var b=this.results.find(".select2-result-selectable"),c=this.highlight();-1<c&&c<b.length;){var c=c+a,d=e(b[c]);if(d.hasClass("select2-result-selectable")&&
|
42 |
+
!d.hasClass("select2-disabled")){this.highlight(c);break}}},highlight:function(a){var b=this.results.find(".select2-result-selectable").not(".select2-disabled");if(0===arguments.length)return i(b.filter(".select2-highlighted")[0],b.get());a>=b.length&&(a=b.length-1);0>a&&(a=0);b.removeClass("select2-highlighted");e(b[a]).addClass("select2-highlighted");this.ensureHighlightVisible()},countSelectableResults:function(){return this.results.find(".select2-result-selectable").not(".select2-disabled").length},
|
43 |
+
highlightUnderEvent:function(a){a=e(a.target).closest(".select2-result-selectable");if(0<a.length&&!a.is(".select2-highlighted")){var b=this.results.find(".select2-result-selectable");this.highlight(b.index(a))}else 0==a.length&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var a=this.results,b=a.find("li.select2-more-results"),c,d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-
|
44 |
+
a.height(),0>=c&&(b.addClass("select2-active"),this.opts.query({term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),!0===c.more?(b.detach().appendTo(a).text(e.opts.formatLoadMore(d+1)),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d)})})))},tokenize:function(){},updateResults:function(a){function b(){f.scrollTop(0);d.removeClass("select2-active");
|
45 |
+
k.positionDropdown()}function c(a){f.html(k.opts.escapeMarkup(a));b()}var d=this.search,f=this.results,h=this.opts,i,k=this;if(!(!0!==a&&(!1===this.showSearchInput||!this.opened()))){d.addClass("select2-active");if(1<=h.maximumSelectionSize&&(i=this.data(),e.isArray(i)&&i.length>=h.maximumSelectionSize&&u(h.formatSelectionTooBig,"formatSelectionTooBig"))){c("<li class='select2-selection-limit'>"+h.formatSelectionTooBig(h.maximumSelectionSize)+"</li>");return}d.val().length<h.minimumInputLength&&u(h.formatInputTooShort,
|
46 |
+
"formatInputTooShort")?c("<li class='select2-no-results'>"+h.formatInputTooShort(d.val(),h.minimumInputLength)+"</li>"):(c("<li class='select2-searching'>"+h.formatSearching()+"</li>"),i=this.tokenize(),i!=g&&null!=i&&d.val(i),this.resultsPage=1,h.query({term:d.val(),page:this.resultsPage,context:null,matcher:h.matcher,callback:this.bind(function(i){var l;this.opened()&&((this.context=i.context===g?null:i.context,this.opts.createSearchChoice&&""!==d.val()&&(l=this.opts.createSearchChoice.call(null,
|
47 |
+
d.val(),i.results),l!==g&&null!==l&&k.id(l)!==g&&null!==k.id(l)&&0===e(i.results).filter(function(){return m(k.id(this),k.id(l))}).length&&i.results.unshift(l)),0===i.results.length&&u(h.formatNoMatches,"formatNoMatches"))?c("<li class='select2-no-results'>"+h.formatNoMatches(d.val())+"</li>"):(f.empty(),k.opts.populateResults.call(this,f,i.results,{term:d.val(),page:this.resultsPage,context:null}),!0===i.more&&u(h.formatLoadMore,"formatLoadMore")&&(f.append("<li class='select2-more-results'>"+k.opts.escapeMarkup(h.formatLoadMore(this.resultsPage))+
|
48 |
+
"</li>"),window.setTimeout(function(){k.loadMoreIfNeeded()},10)),this.postprocessResults(i,a),b()))})}))}},cancel:function(){this.close()},blur:function(){this.close();this.container.removeClass("select2-container-active");this.dropdown.removeClass("select2-drop-active");this.search[0]===document.activeElement&&this.search.blur();this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){this.search.show();this.search.focus();
|
49 |
+
window.setTimeout(this.bind(function(){this.search.show();this.search.focus();this.search.val(this.search.val())}),10)},selectHighlighted:function(){var a=this.highlight(),b=this.results.find(".select2-highlighted").not(".select2-disabled"),c=b.closest(".select2-result-selectable").data("select2-data");c&&(b.addClass("select2-disabled"),this.highlight(a),this.onSelect(c))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||
|
50 |
+
this.opts.placeholder},initContainerWidth:function(){var a=function(){var a,c,d,f;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth()?"auto":this.opts.element.outerWidth()+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){a=this.opts.element.attr("style");if(a!==g){a=a.split(";");d=0;for(f=a.length;d<f;d+=1)if(c=a[d].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/),null!==c&&1<=c.length)return c[1]}return"resolve"===
|
51 |
+
this.opts.width?(a=this.opts.element.css("width"),0<a.indexOf("%")?a:0===this.opts.element.outerWidth()?"auto":this.opts.element.outerWidth()+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}.call(this);null!==a&&this.container.attr("style","width: "+a)}});y=x(w,{createContainer:function(){return e("<div></div>",{"class":"select2-container"}).html(" <a href='#' onclick='return false;' class='select2-choice'> <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr> <div><b></b></div></a> <div class='select2-drop select2-offscreen'> <div class='select2-search'> <input type='text' autocomplete='off' class='select2-input'/> </div> <ul class='select2-results'> </ul></div>")},
|
52 |
+
opening:function(){this.search.show();this.parent.opening.apply(this,arguments);this.dropdown.removeClass("select2-offscreen")},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.dropdown.removeAttr("style").addClass("select2-offscreen").insertAfter(this.selection).show())},focus:function(){this.close();this.selection.focus()},isFocused:function(){return this.selection[0]===document.activeElement},cancel:function(){this.parent.cancel.apply(this,arguments);this.selection.focus()},
|
53 |
+
initContainer:function(){var a,b=this.dropdown;this.selection=a=this.container.find(".select2-choice");this.search.bind("keydown",this.bind(function(a){if(this.enabled)if(a.which===f.PAGE_UP||a.which===f.PAGE_DOWN)l(a);else if(this.opened())switch(a.which){case f.UP:case f.DOWN:this.moveHighlight(a.which===f.UP?-1:1);l(a);break;case f.TAB:case f.ENTER:this.selectHighlighted();l(a);break;case f.ESC:this.cancel(a),l(a)}else a.which===f.TAB||f.isControl(a)||f.isFunctionKey(a)||a.which===f.ESC||!1===
|
54 |
+
this.opts.openOnEnter&&a.which===f.ENTER||this.open()}));this.search.bind("focus",this.bind(function(){this.selection.attr("tabIndex","-1")}));this.search.bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active");window.setTimeout(this.bind(function(){this.selection.attr("tabIndex",this.opts.element.attr("tabIndex"))}),10)}));a.bind("mousedown",this.bind(function(){this.opened()?(this.close(),this.selection.focus()):this.enabled&&this.open()}));b.bind("mousedown",
|
55 |
+
this.bind(function(){this.search.focus()}));a.bind("focus",this.bind(function(){this.container.addClass("select2-container-active");this.search.attr("tabIndex","-1")}));a.bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active");window.setTimeout(this.bind(function(){this.search.attr("tabIndex",this.opts.element.attr("tabIndex"))}),10)}));a.bind("keydown",this.bind(function(a){if(this.enabled)if(a.which===f.PAGE_UP||a.which===f.PAGE_DOWN)l(a);else if(!(a.which===
|
56 |
+
f.TAB||f.isControl(a)||f.isFunctionKey(a)||a.which===f.ESC)&&!(!1===this.opts.openOnEnter&&a.which===f.ENTER))if(a.which==f.DELETE)this.opts.allowClear&&this.clear();else{this.open();if(a.which!==f.ENTER&&!(48>a.which)){var b=String.fromCharCode(a.which).toLowerCase();a.shiftKey&&(b=b.toUpperCase());this.search.focus();this.search.val(b)}l(a)}}));a.delegate("abbr","mousedown",this.bind(function(a){this.enabled&&(this.clear(),l(a),this.close(),this.triggerChange(),this.selection.focus())}));this.setPlaceholder();
|
57 |
+
this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")}))},clear:function(){this.opts.element.val("");this.selection.find("span").empty();this.selection.removeData("select2-data");this.setPlaceholder()},initSelection:function(){if(""===this.opts.element.val())this.close(),this.setPlaceholder();else{var a=this;this.opts.initSelection.call(null,this.opts.element,function(b){b!==g&&null!==b&&(a.updateSelection(b),a.close(),a.setPlaceholder())})}},prepareOpts:function(){var a=
|
58 |
+
this.parent.prepareOpts.apply(this,arguments);"select"===a.element.get(0).tagName.toLowerCase()&&(a.initSelection=function(a,c){var d=a.find(":selected");e.isFunction(c)&&c({id:d.attr("value"),text:d.text()})});return a},setPlaceholder:function(){var a=this.getPlaceholder();""===this.opts.element.val()&&a!==g&&!(this.select&&""!==this.select.find("option:first").text())&&(this.selection.find("span").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide())},
|
59 |
+
postprocessResults:function(a,b){var c=0,d=this,f=!0;this.results.find(".select2-result-selectable").each2(function(a,b){if(m(d.id(b.data("select2-data")),d.opts.element.val()))return c=a,!1});this.highlight(c);!0===b&&(f=this.showSearchInput=F(a.results)>=this.opts.minimumResultsForSearch,this.dropdown.find(".select2-search")[f?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[f?"addClass":"removeClass"]("select2-with-searchbox"))},onSelect:function(a){var b=this.opts.element.val();
|
60 |
+
this.opts.element.val(this.id(a));this.updateSelection(a);this.close();this.selection.focus();m(b,this.id(a))||this.triggerChange()},updateSelection:function(a){var b=this.selection.find("span");this.selection.data("select2-data",a);b.empty();a=this.opts.formatSelection(a,b);a!==g&&b.append(this.opts.escapeMarkup(a));this.selection.removeClass("select2-default");this.opts.allowClear&&this.getPlaceholder()!==g&&this.selection.find("abbr").show()},val:function(){var a,b=null,c=this;if(0===arguments.length)return this.opts.element.val();
|
61 |
+
a=arguments[0];if(this.select)this.select.val(a).find(":selected").each2(function(a,c){b={id:c.attr("value"),text:c.text()};return!1}),this.updateSelection(b),this.setPlaceholder();else{if(this.opts.initSelection===g)throw Error("cannot call val() if initSelection() is not defined");a?(this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){c.opts.element.val(!a?"":c.id(a));c.updateSelection(a);c.setPlaceholder()})):this.clear()}},clearSearch:function(){this.search.val("")},
|
62 |
+
data:function(a){var b;if(0===arguments.length)return b=this.selection.data("select2-data"),b==g&&(b=null),b;!a||""===a?this.clear():(this.opts.element.val(!a?"":this.id(a)),this.updateSelection(a))}});z=x(w,{createContainer:function(){return e("<div></div>",{"class":"select2-container select2-container-multi"}).html(" <ul class='select2-choices'> <li class='select2-search-field'> <input type='text' autocomplete='off' class='select2-input'> </li></ul><div class='select2-drop select2-drop-multi' style='display:none;'> <ul class='select2-results'> </ul></div>")},
|
63 |
+
prepareOpts:function(){var a=this.parent.prepareOpts.apply(this,arguments);"select"===a.element.get(0).tagName.toLowerCase()&&(a.initSelection=function(a,c){var d=[];a.find(":selected").each2(function(a,b){d.push({id:b.attr("value"),text:b.text()})});e.isFunction(c)&&c(d)});return a},initContainer:function(){var a;this.searchContainer=this.container.find(".select2-search-field");this.selection=a=this.container.find(".select2-choices");this.search.bind("keydown",this.bind(function(b){if(this.enabled){if(b.which===
|
64 |
+
f.BACKSPACE&&""===this.search.val()){this.close();var c;c=a.find(".select2-search-choice-focus");if(0<c.length){this.unselect(c.first());this.search.width(10);l(b);return}c=a.find(".select2-search-choice");0<c.length&&c.last().addClass("select2-search-choice-focus")}else a.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(b.which){case f.UP:case f.DOWN:this.moveHighlight(b.which===f.UP?-1:1);l(b);return;case f.ENTER:case f.TAB:this.selectHighlighted();
|
65 |
+
l(b);return;case f.ESC:this.cancel(b);l(b);return}if(!(b.which===f.TAB||f.isControl(b)||f.isFunctionKey(b)||b.which===f.BACKSPACE||b.which===f.ESC)&&!(!1===this.opts.openOnEnter&&b.which===f.ENTER))this.open(),(b.which===f.PAGE_UP||b.which===f.PAGE_DOWN)&&l(b)}}));this.search.bind("keyup",this.bind(this.resizeSearch));this.search.bind("blur",this.bind(function(a){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.clearSearch();a.stopImmediatePropagation()}));
|
66 |
+
this.container.delegate(".select2-choices","mousedown",this.bind(function(a){this.enabled&&!(0<e(a.target).closest(".select2-search-choice").length)&&(this.clearPlaceholder(),this.open(),this.focusSearch(),a.preventDefault())}));this.container.delegate(".select2-choices","focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())}));this.clearSearch()},enable:function(){this.enabled||(this.parent.enable.apply(this,
|
67 |
+
arguments),this.search.removeAttr("disabled"))},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0))},initSelection:function(){""===this.opts.element.val()&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||""!==this.opts.element.val()){var a=this;this.opts.initSelection.call(null,this.opts.element,function(b){if(b!==g&&b!==null){a.updateSelection(b);a.close();a.clearSearch()}})}},clearSearch:function(){var a=this.getPlaceholder();
|
68 |
+
a!==g&&0===this.getVal().length&&!1===this.search.hasClass("select2-focused")?(this.search.val(a).addClass("select2-default"),this.resizeSearch()):this.search.val(" ").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")?this.search.val("").removeClass("select2-default"):" "===this.search.val()&&this.search.val("")},opening:function(){this.parent.opening.apply(this,arguments);this.clearPlaceholder();this.resizeSearch();this.focusSearch()},close:function(){this.opened()&&
|
69 |
+
this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(a){var b=[],c=[],d=this;e(a).each(function(){0>i(d.id(this),b)&&(b.push(d.id(this)),c.push(this))});a=c;this.selection.find(".select2-search-choice").remove();e(a).each(function(){d.addSelectedChoice(this)});d.postprocessResults()},tokenize:function(){var a=this.search.val(),a=this.opts.tokenizer(a,this.data(),this.bind(this.onSelect),
|
70 |
+
this.opts);null!=a&&a!=g&&(this.search.val(a),0<a.length&&this.open())},onSelect:function(a){this.addSelectedChoice(a);this.select&&this.postprocessResults();this.opts.closeOnSelect?(this.close(),this.search.width(10)):0<this.countSelectableResults()?(this.search.width(10),this.resizeSearch(),this.positionDropdown()):this.close();this.triggerChange({added:a});this.focusSearch()},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(a){var b=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),
|
71 |
+
c=this.id(a),d=this.getVal(),f;f=this.opts.formatSelection(a,b);b.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>");b.find(".select2-search-choice-close").bind("mousedown",l).bind("click dblclick",this.bind(function(a){this.enabled&&(e(a.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(a.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue(),
|
72 |
+
l(a))})).bind("focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))}));b.data("select2-data",a);b.insertBefore(this.searchContainer);d.push(c);this.setVal(d)},unselect:function(a){var b=this.getVal(),c,d,a=a.closest(".select2-search-choice");if(0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data");d=i(this.id(c),b);0<=d&&(b.splice(d,1),this.setVal(b),this.select&&
|
73 |
+
this.postprocessResults());a.remove();this.triggerChange({removed:c})},postprocessResults:function(){var a=this.getVal(),b=this.results.find(".select2-result-selectable"),c=this.results.find(".select2-result-with-children"),d=this;b.each2(function(b,c){var e=d.id(c.data("select2-data"));0<=i(e,a)?c.addClass("select2-disabled").removeClass("select2-result-selectable"):c.removeClass("select2-disabled").addClass("select2-result-selectable")});c.each2(function(a,b){0==b.find(".select2-result-selectable").length?
|
74 |
+
b.addClass("select2-disabled"):b.removeClass("select2-disabled")});b.each2(function(a,b){if(!b.hasClass("select2-disabled")&&b.hasClass("select2-result-selectable"))return d.highlight(0),!1})},resizeSearch:function(){var a,b,c,d,f=this.search.outerWidth()-this.search.width();a=this.search;q||(c=a[0].currentStyle||window.getComputedStyle(a[0],null),q=e("<div></div>").css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,
|
75 |
+
fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),e("body").append(q));q.text(a.val());a=q.width()+10;b=this.search.offset().left;c=this.selection.width();d=this.selection.offset().left;b=c-(b-d)-f;b<a&&(b=c-f);40>b&&(b=c-f);this.search.width(b)},getVal:function(){var a;if(this.select)return a=this.select.val(),null===a?[]:a;a=this.opts.element.val();return s(a,this.opts.separator)},setVal:function(a){var b;this.select?this.select.val(a):(b=
|
76 |
+
[],e(a).each(function(){0>i(this,b)&&b.push(this)}),this.opts.element.val(0===b.length?"":b.join(this.opts.separator)))},val:function(){var a,b=[],c=this;if(0===arguments.length)return this.getVal();if(a=arguments[0])if(this.setVal(a),this.select)this.select.find(":selected").each(function(){b.push({id:e(this).attr("value"),text:e(this).text()})}),this.updateSelection(b);else{if(this.opts.initSelection===g)throw Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,
|
77 |
+
function(a){var b=e(a).map(c.id);c.setVal(b);c.updateSelection(a);c.clearSearch()})}else this.opts.element.val(""),this.updateSelection([]);this.clearSearch()},onSortStart:function(){if(this.select)throw Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var a=[],b=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();
|
78 |
+
this.selection.find(".select2-search-choice").each(function(){a.push(b.opts.id(e(this).data("select2-data")))});this.setVal(a);this.triggerChange()},data:function(a){var b=this,c;if(0===arguments.length)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();a||(a=[]);c=e.map(a,function(a){return b.opts.id(a)});this.setVal(c);this.updateSelection(a);this.clearSearch()}});e.fn.select2=function(){var a=Array.prototype.slice.call(arguments,0),b,
|
79 |
+
c,d,f,h="val destroy opened open close focus isFocused container onSortStart onSortEnd enable disable positionDropdown data".split(" ");this.each(function(){if(0===a.length||"object"===typeof a[0])b=0===a.length?{}:e.extend({},a[0]),b.element=e(this),"select"===b.element.get(0).tagName.toLowerCase()?f=b.element.attr("multiple"):(f=b.multiple||!1,"tags"in b&&(b.multiple=f=!0)),c=f?new z:new y,c.init(b);else if("string"===typeof a[0]){if(0>i(a[0],h))throw"Unknown method: "+a[0];d=g;c=e(this).data("select2");
|
80 |
+
if(c!==g&&(d="container"===a[0]?c.container:c[a[0]].apply(c,a.slice(1)),d!==g))return!1}else throw"Invalid arguments to select2 plugin: "+a;});return d===g?this:d};e.fn.select2.defaults={width:"copy",closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c){b=[];B(a.text,c.term,b);return b.join("")},formatSelection:function(a){return a?a.text:g},formatResultCssClass:function(){return g},formatNoMatches:function(){return"No matches found"},
|
81 |
+
formatInputTooShort:function(a,b){return"Please enter "+(b-a.length)+" more characters"},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return 0<=b.toUpperCase().indexOf(a.toUpperCase())},separator:",",tokenSeparators:[],tokenizer:H,
|
82 |
+
escapeMarkup:function(a){return a&&"string"===typeof a?a.replace(/&/g,"&"):a},blurOnChange:!1};window.Select2={query:{ajax:C,local:D,tags:E},util:{debounce:A,markMatch:B},"class":{"abstract":w,single:y,multi:z}}}})(jQuery);
|
inc/meta-box/js/slider.js
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
function rwmb_update_slider()
|
6 |
+
{
|
7 |
+
var $input = $( this ),
|
8 |
+
$slider = $input.siblings( '.rwmb-slider' ),
|
9 |
+
$valueLabel = $slider.siblings( '.rwmb-slider-value-label' ).find( 'span' ),
|
10 |
+
value = $input.val(),
|
11 |
+
options = $slider.data( 'options' );
|
12 |
+
|
13 |
+
$slider.html( '' );
|
14 |
+
|
15 |
+
if ( !value )
|
16 |
+
{
|
17 |
+
value = 0;
|
18 |
+
$input.val( 0 );
|
19 |
+
$valueLabel.text( '0' );
|
20 |
+
}
|
21 |
+
else
|
22 |
+
{
|
23 |
+
$valueLabel.text( value );
|
24 |
+
}
|
25 |
+
|
26 |
+
// Assign field value and callback function when slide
|
27 |
+
options.value = value;
|
28 |
+
options.slide = function( event, ui )
|
29 |
+
{
|
30 |
+
$input.val( ui.value );
|
31 |
+
$valueLabel.text( ui.value );
|
32 |
+
};
|
33 |
+
|
34 |
+
$slider.slider( options );
|
35 |
+
}
|
36 |
+
|
37 |
+
$( ':input.rwmb-slider-value' ).each( rwmb_update_slider );
|
38 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-slider-value', rwmb_update_slider );
|
39 |
+
} );
|
inc/meta-box/js/taxonomy.js
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
$( '.rw-taxonomy-tree input:checkbox' ).change( function()
|
6 |
+
{
|
7 |
+
var $this = $( this ),
|
8 |
+
$childList = $this.parent().siblings( '.rw-taxonomy-tree' );
|
9 |
+
if ( $this.is( ':checked' ) )
|
10 |
+
{
|
11 |
+
$childList.removeClass( 'hidden' );
|
12 |
+
}
|
13 |
+
else
|
14 |
+
{
|
15 |
+
$childList.find( 'input' ).removeAttr( 'checked' );
|
16 |
+
$childList.addClass( 'hidden' );
|
17 |
+
}
|
18 |
+
} );
|
19 |
+
|
20 |
+
$( '.rw-taxonomy-tree select' ).change( function()
|
21 |
+
{
|
22 |
+
var $this = $( this ),
|
23 |
+
$childList = $this.siblings( '.rw-taxonomy-tree' ),
|
24 |
+
$value = $this.val();
|
25 |
+
$childList.removeClass( 'active' ).addClass( 'disabled' ).find( 'select' ).each( function()
|
26 |
+
{
|
27 |
+
$( this ).val( $( 'options:first', this ).val() ).attr( 'disabled', 'disabled' );
|
28 |
+
} );
|
29 |
+
$childList.filter( '.rwmb-taxonomy-' + $value ).removeClass( 'disabled' ).addClass( 'active' ).children( 'select' ).removeAttr( 'disabled' );
|
30 |
+
} );
|
31 |
+
} );
|
inc/meta-box/js/thickbox-image.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
$( 'body' ).on( 'click', '.rwmb-thickbox-upload', function ()
|
6 |
+
{
|
7 |
+
var $this = $( this ),
|
8 |
+
$holder = $this.siblings( '.rwmb-images' ),
|
9 |
+
post_id = $( '#post_ID' ).val(),
|
10 |
+
field_id = $this.data( 'field_id' ),
|
11 |
+
backup = window.send_to_editor;
|
12 |
+
|
13 |
+
window.send_to_editor = function ( html )
|
14 |
+
{
|
15 |
+
var $img = $( '<div />' ).append( html ).find( 'img' ),
|
16 |
+
url = $img.attr( 'src' ),
|
17 |
+
img_class = $img.attr( 'class' ),
|
18 |
+
id = parseInt( img_class.replace( /\D/g, '' ), 10 );
|
19 |
+
|
20 |
+
html = '<li id="item_' + id + '">';
|
21 |
+
html += '<img src="' + url + '">';
|
22 |
+
html += '<div class="rwmb-image-bar">';
|
23 |
+
html += '<a class="rwmb-delete-file" href="#" data-attachment_id="' + id + '">×</a>';
|
24 |
+
html += '</div>';
|
25 |
+
html += '<input type="hidden" name="' + field_id + '[]" value="' + id + '">';
|
26 |
+
html += '</li>';
|
27 |
+
|
28 |
+
$holder.append( $( html ) ).removeClass( 'hidden' );
|
29 |
+
|
30 |
+
tb_remove();
|
31 |
+
window.send_to_editor = backup;
|
32 |
+
};
|
33 |
+
tb_show( '', 'media-upload.php?post_id=' + post_id + '&TB_iframe=true' );
|
34 |
+
|
35 |
+
return false;
|
36 |
+
} );
|
37 |
+
} );
|
inc/meta-box/js/time.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Update datetime picker element
|
7 |
+
* Used for static & dynamic added elements (when clone)
|
8 |
+
*/
|
9 |
+
function rwmb_update_time_picker()
|
10 |
+
{
|
11 |
+
var $this = $( this ),
|
12 |
+
options = $this.data( 'options' );
|
13 |
+
|
14 |
+
$this.siblings( '.ui-datepicker-append' ).remove(); // Remove appended text
|
15 |
+
$this.removeClass( 'hasDatepicker' ).attr( 'id', '' ).timepicker( options );
|
16 |
+
}
|
17 |
+
|
18 |
+
$( ':input.rwmb-time' ).each( rwmb_update_time_picker );
|
19 |
+
$( '.rwmb-input' ).on( 'clone', ':input.rwmb-time', rwmb_update_time_picker );
|
20 |
+
} );
|
inc/meta-box/js/validate.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( function ( $ )
|
2 |
+
{
|
3 |
+
'use strict';
|
4 |
+
|
5 |
+
var $form = $( '#post' );
|
6 |
+
|
7 |
+
// Required field styling
|
8 |
+
$.each( rwmb.validationOptions.rules, function ( k, v )
|
9 |
+
{
|
10 |
+
if ( v['required'] )
|
11 |
+
{
|
12 |
+
$( '#' + k ).parent().siblings( '.rwmb-label' ).addClass( 'required' ).append( '<span>*</span>' );
|
13 |
+
}
|
14 |
+
} );
|
15 |
+
|
16 |
+
rwmb.validationOptions.invalidHandler = function ()
|
17 |
+
{
|
18 |
+
// Re-enable the submit ( publish/update ) button and hide the ajax indicator
|
19 |
+
$( '#publish' ).removeClass( 'button-primary-disabled' );
|
20 |
+
$( '#ajax-loading' ).attr( 'style', '' );
|
21 |
+
$form.siblings( '#message' ).remove();
|
22 |
+
$form.before( '<div id="message" class="error"><p>' + rwmb.summaryMessage + '</p></div>' );
|
23 |
+
};
|
24 |
+
|
25 |
+
$form.validate( rwmb.validationOptions );
|
26 |
+
} );
|
inc/meta-box/lang/ar.mo
ADDED
Binary file
|
inc/meta-box/lang/ar.po
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-03 15:09+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-12-29 23:40-0500\n"
|
7 |
+
"Last-Translator: Adel Qalieh <aqalieh95@gmail.com>\n"
|
8 |
+
"Language-Team: Adel Qalieh <aqalieh95@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
13 |
+
"_nx_noop:1,2\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"Plural-Forms: nplurals=6; plural= n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
|
17 |
+
"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n"
|
18 |
+
"X-Language: ar\n"
|
19 |
+
"X-Source-Language: en\n"
|
20 |
+
"Language: ar\n"
|
21 |
+
"X-Poedit-SearchPath-0: ..\n"
|
22 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
23 |
+
|
24 |
+
#: ../meta-box.php:79
|
25 |
+
msgid "RW_Meta_Box Debug:"
|
26 |
+
msgstr "RW_Meta_Box Debug:"
|
27 |
+
|
28 |
+
#: ../inc/classes/meta-box.php:316
|
29 |
+
msgid "+"
|
30 |
+
msgstr "+"
|
31 |
+
|
32 |
+
#: ../inc/classes/meta-box.php:340
|
33 |
+
msgid "–"
|
34 |
+
msgstr "–"
|
35 |
+
|
36 |
+
#: ../inc/fields/file.php:69
|
37 |
+
msgid "Error: Cannot delete file"
|
38 |
+
msgstr "خطأ: لا يمكن حذف الملف"
|
39 |
+
|
40 |
+
#: ../inc/fields/file.php:83
|
41 |
+
msgctxt "file upload"
|
42 |
+
msgid "Uploaded files"
|
43 |
+
msgstr "ملفات محملة"
|
44 |
+
|
45 |
+
#: ../inc/fields/file.php:84
|
46 |
+
msgctxt "file upload"
|
47 |
+
msgid "Delete this file"
|
48 |
+
msgstr "حذف هذا الملف"
|
49 |
+
|
50 |
+
#: ../inc/fields/file.php:85
|
51 |
+
msgctxt "file upload"
|
52 |
+
msgid "Delete"
|
53 |
+
msgstr "حذف"
|
54 |
+
|
55 |
+
#: ../inc/fields/file.php:86
|
56 |
+
msgctxt "file upload"
|
57 |
+
msgid "Upload files"
|
58 |
+
msgstr "تحميل الملفات"
|
59 |
+
|
60 |
+
#: ../inc/fields/file.php:87
|
61 |
+
msgctxt "file upload"
|
62 |
+
msgid "+ Add new file"
|
63 |
+
msgstr "+ إضافة ملف جديد"
|
64 |
+
|
65 |
+
#: ../inc/fields/image.php:75
|
66 |
+
msgid "Order saved"
|
67 |
+
msgstr "حفظ الترتيب"
|
68 |
+
|
69 |
+
#: ../inc/fields/image.php:91 ../inc/fields/plupload-image.php:156
|
70 |
+
msgctxt "image upload"
|
71 |
+
msgid "Uploaded files"
|
72 |
+
msgstr "ملفات محملة"
|
73 |
+
|
74 |
+
#: ../inc/fields/image.php:92 ../inc/fields/plupload-image.php:112
|
75 |
+
msgctxt "image upload"
|
76 |
+
msgid "Delete this file"
|
77 |
+
msgstr "حذف هذا الملف"
|
78 |
+
|
79 |
+
#: ../inc/fields/image.php:93 ../inc/fields/plupload-image.php:113
|
80 |
+
msgctxt "image upload"
|
81 |
+
msgid "Delete"
|
82 |
+
msgstr "حذف"
|
83 |
+
|
84 |
+
#: ../inc/fields/image.php:94 ../inc/fields/plupload-image.php:114
|
85 |
+
msgctxt "image upload"
|
86 |
+
msgid "Edit"
|
87 |
+
msgstr "حرر"
|
88 |
+
|
89 |
+
#: ../inc/fields/image.php:95 ../inc/fields/plupload-image.php:157
|
90 |
+
msgctxt "image upload"
|
91 |
+
msgid "Upload files"
|
92 |
+
msgstr "تحميل الملفات"
|
93 |
+
|
94 |
+
#: ../inc/fields/image.php:96
|
95 |
+
msgctxt "image upload"
|
96 |
+
msgid "+ Add new image"
|
97 |
+
msgstr "إضافة صورة جديدة"
|
98 |
+
|
99 |
+
#: ../inc/fields/plupload-image.php:95
|
100 |
+
msgctxt "image upload"
|
101 |
+
msgid "Allowed Image Files"
|
102 |
+
msgstr "أنواع الصور المسموحة"
|
103 |
+
|
104 |
+
#: ../inc/fields/plupload-image.php:160
|
105 |
+
msgctxt "image upload"
|
106 |
+
msgid "Drop images here"
|
107 |
+
msgstr "إفلت الصور هنا"
|
108 |
+
|
109 |
+
#: ../inc/fields/plupload-image.php:161
|
110 |
+
msgctxt "image upload"
|
111 |
+
msgid "or"
|
112 |
+
msgstr "أو"
|
113 |
+
|
114 |
+
#: ../inc/fields/plupload-image.php:162
|
115 |
+
msgctxt "image upload"
|
116 |
+
msgid "Select Files"
|
117 |
+
msgstr "إختر الملفات"
|
118 |
+
|
119 |
+
#: ../inc/fields/thickbox-image.php:45
|
120 |
+
msgctxt "image upload"
|
121 |
+
msgid "Upload image"
|
122 |
+
msgstr "حمل الصورة"
|
inc/meta-box/lang/de_DE.mo
ADDED
Binary file
|
inc/meta-box/lang/de_DE.po
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-23 22:08+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-03-23 22:21+0100\n"
|
7 |
+
"Last-Translator: Johann Kratzik <johann@kratzik.com>\n"
|
8 |
+
"Language-Team: Johann Kratzik <info@zoomdrive.at>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: German\n"
|
15 |
+
"X-Poedit-Country: AUSTRIA\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
+
|
20 |
+
#: ../inc/classes/meta-box.php:296
|
21 |
+
msgid "Please correct the errors highlighted below and try again."
|
22 |
+
msgstr "Bitte beheben Sie die unten angeführten Fehler und versuchen Sie es erneut."
|
23 |
+
|
24 |
+
#: ../inc/classes/meta-box.php:357
|
25 |
+
msgid "+"
|
26 |
+
msgstr "+"
|
27 |
+
|
28 |
+
#: ../inc/classes/meta-box.php:379
|
29 |
+
msgid "–"
|
30 |
+
msgstr "–"
|
31 |
+
|
32 |
+
#: ../inc/fields/file-advanced.php:59
|
33 |
+
msgctxt "file upload"
|
34 |
+
msgid "Select Files"
|
35 |
+
msgstr "Dateien auswählen"
|
36 |
+
|
37 |
+
#: ../inc/fields/file.php:66
|
38 |
+
msgid "Error: Cannot delete file"
|
39 |
+
msgstr "Fehler: Datei kann nicht gelöscht werden"
|
40 |
+
|
41 |
+
#: ../inc/fields/file.php:80
|
42 |
+
msgctxt "file upload"
|
43 |
+
msgid "Upload Files"
|
44 |
+
msgstr "Dateien hochladen"
|
45 |
+
|
46 |
+
#: ../inc/fields/file.php:81
|
47 |
+
msgctxt "file upload"
|
48 |
+
msgid "+ Add new file"
|
49 |
+
msgstr "+ Neue Datei hinzufügen"
|
50 |
+
|
51 |
+
#: ../inc/fields/file.php:133
|
52 |
+
msgctxt "file upload"
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Löschen"
|
55 |
+
|
56 |
+
#: ../inc/fields/file.php:134
|
57 |
+
msgctxt "file upload"
|
58 |
+
msgid "Edit"
|
59 |
+
msgstr "Bearbeiten"
|
60 |
+
|
61 |
+
#: ../inc/fields/image-advanced.php:63
|
62 |
+
msgctxt "image upload"
|
63 |
+
msgid "Select or Upload Images"
|
64 |
+
msgstr "Bilder auswählen oder hochladen"
|
65 |
+
|
66 |
+
#: ../inc/fields/image.php:64
|
67 |
+
msgid "Order saved"
|
68 |
+
msgstr "Reihenfolge gespeichert"
|
69 |
+
|
70 |
+
#: ../inc/fields/image.php:78
|
71 |
+
msgctxt "image upload"
|
72 |
+
msgid "Upload Images"
|
73 |
+
msgstr "Bilder hochladen"
|
74 |
+
|
75 |
+
#: ../inc/fields/image.php:79
|
76 |
+
msgctxt "image upload"
|
77 |
+
msgid "+ Add new image"
|
78 |
+
msgstr "+ Neues Bild hinzufügen"
|
79 |
+
|
80 |
+
#: ../inc/fields/image.php:144
|
81 |
+
msgctxt "image upload"
|
82 |
+
msgid "Delete"
|
83 |
+
msgstr "Löschen"
|
84 |
+
|
85 |
+
#: ../inc/fields/image.php:145
|
86 |
+
msgctxt "image upload"
|
87 |
+
msgid "Edit"
|
88 |
+
msgstr "Bearbeiten"
|
89 |
+
|
90 |
+
#: ../inc/fields/map.php:46
|
91 |
+
msgid "Find Address"
|
92 |
+
msgstr "Adresse finden"
|
93 |
+
|
94 |
+
#: ../inc/fields/plupload-image.php:104
|
95 |
+
msgctxt "image upload"
|
96 |
+
msgid "Drop images here"
|
97 |
+
msgstr "Bilder hierher ziehen"
|
98 |
+
|
99 |
+
#: ../inc/fields/plupload-image.php:105
|
100 |
+
msgctxt "image upload"
|
101 |
+
msgid "or"
|
102 |
+
msgstr "oder"
|
103 |
+
|
104 |
+
#: ../inc/fields/plupload-image.php:106
|
105 |
+
msgctxt "image upload"
|
106 |
+
msgid "Select Files"
|
107 |
+
msgstr "Dateien auswählen"
|
108 |
+
|
109 |
+
#: ../inc/fields/plupload-image.php:181
|
110 |
+
msgctxt "image upload"
|
111 |
+
msgid "Allowed Image Files"
|
112 |
+
msgstr "Erlaubte Typen von Bilddateien"
|
113 |
+
|
114 |
+
#: ../inc/fields/posts.php:54
|
115 |
+
msgid "Post"
|
116 |
+
msgstr "Beitrag"
|
117 |
+
|
118 |
+
#: ../inc/fields/posts.php:64
|
119 |
+
#: ../inc/fields/taxonomy.php:42
|
120 |
+
#, php-format
|
121 |
+
msgid "Select a %s"
|
122 |
+
msgstr "%s auswählen"
|
123 |
+
|
124 |
+
#: ../inc/fields/select-advanced.php:69
|
125 |
+
msgid "Select a value"
|
126 |
+
msgstr "Einen Wert wählen"
|
127 |
+
|
128 |
+
#, fuzzy
|
129 |
+
#~ msgctxt "file upload"
|
130 |
+
|
131 |
+
#~ msgid "Uploaded files"
|
132 |
+
#~ msgstr "Dateien fertig geladen"
|
133 |
+
#~ msgctxt "file upload"
|
134 |
+
|
135 |
+
#~ msgid "Delete this file"
|
136 |
+
#~ msgstr "Datei löschen"
|
137 |
+
|
138 |
+
#, fuzzy
|
139 |
+
#~ msgctxt "image upload"
|
140 |
+
|
141 |
+
#~ msgid "Uploaded files"
|
142 |
+
#~ msgstr "Dateien fertig geladen"
|
143 |
+
#~ msgctxt "image upload"
|
144 |
+
|
145 |
+
#~ msgid "Delete this file"
|
146 |
+
#~ msgstr "Datei löschen"
|
147 |
+
#~ msgctxt "image upload"
|
148 |
+
|
149 |
+
#~ msgid "Upload files"
|
150 |
+
#~ msgstr "Dateien hochladen"
|
151 |
+
#~ msgctxt "image upload"
|
152 |
+
|
153 |
+
#~ msgid "Add another file"
|
154 |
+
#~ msgstr "Weitere Datei"
|
155 |
+
|
156 |
+
#~ msgid "Cannot delete file. Something's wrong."
|
157 |
+
#~ msgstr "Fehler: Datei kann nicht gelöscht werden."
|
158 |
+
|
159 |
+
#~ msgid "Upload new files"
|
160 |
+
#~ msgstr "Neue Dateien hochladen"
|
inc/meta-box/lang/default.pot
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# <!=Copyright (C) 2014 Rilwis
|
2 |
+
# This file is distributed under the GPL2+.=!>
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Meta Box 4.3.10\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/meta-box\n"
|
7 |
+
"POT-Creation-Date: 2014-09-13 10:50:22+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: inc/field.php:225
|
16 |
+
msgid "+"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: inc/field.php:235
|
20 |
+
msgid "–"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: inc/fields/button.php:35
|
24 |
+
msgid "Click me"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: inc/fields/file-advanced.php:23
|
28 |
+
msgid "Select Files"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: inc/fields/file-advanced.php:66
|
32 |
+
msgctxt "file upload"
|
33 |
+
msgid "Select or Upload Files"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: inc/fields/file-advanced.php:103 inc/fields/file.php:168
|
37 |
+
msgctxt "file upload"
|
38 |
+
msgid "Delete"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: inc/fields/file-advanced.php:104 inc/fields/file.php:169
|
42 |
+
msgctxt "file upload"
|
43 |
+
msgid "Edit"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: inc/fields/file-input.php:17
|
47 |
+
msgid "Select File"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: inc/fields/file-input.php:40
|
51 |
+
msgid "Select"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/fields/file-input.php:42
|
55 |
+
msgid "Remove"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: inc/fields/file.php:19
|
59 |
+
msgid "You may only upload maximum %d file"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: inc/fields/file.php:20
|
63 |
+
msgid "You may only upload maximum %d files"
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: inc/fields/file.php:98
|
67 |
+
msgid "Error: Cannot delete file"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: inc/fields/file.php:111
|
71 |
+
msgctxt "file upload"
|
72 |
+
msgid "Upload Files"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: inc/fields/file.php:112
|
76 |
+
msgctxt "file upload"
|
77 |
+
msgid "+ Add new file"
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: inc/fields/image-advanced.php:23
|
81 |
+
msgid "Select Images"
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: inc/fields/image-advanced.php:71
|
85 |
+
msgctxt "image upload"
|
86 |
+
msgid "Select or Upload Images"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: inc/fields/image-advanced.php:108 inc/fields/image.php:136
|
90 |
+
msgctxt "image upload"
|
91 |
+
msgid "Delete"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/fields/image-advanced.php:109 inc/fields/image.php:137
|
95 |
+
msgctxt "image upload"
|
96 |
+
msgid "Edit"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: inc/fields/image.php:70 inc/fields/thickbox-image.php:34
|
100 |
+
msgctxt "image upload"
|
101 |
+
msgid "Upload Images"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/fields/image.php:71
|
105 |
+
msgctxt "image upload"
|
106 |
+
msgid "+ Add new image"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/fields/map.php:48
|
110 |
+
msgid "Find Address"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/fields/oembed.php:55
|
114 |
+
msgid "Embed HTML not available."
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/fields/oembed.php:77
|
118 |
+
msgid "Preview"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/fields/plupload-image.php:105
|
122 |
+
msgctxt "image upload"
|
123 |
+
msgid "Drop images here"
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: inc/fields/plupload-image.php:106
|
127 |
+
msgctxt "image upload"
|
128 |
+
msgid "or"
|
129 |
+
msgstr ""
|
130 |
+
|
131 |
+
#: inc/fields/plupload-image.php:107
|
132 |
+
msgctxt "image upload"
|
133 |
+
msgid "Select Files"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: inc/fields/plupload-image.php:183
|
137 |
+
msgctxt "image upload"
|
138 |
+
msgid "Allowed Image Files"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/fields/post.php:52
|
142 |
+
msgid "Post"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/fields/post.php:66 inc/fields/taxonomy.php:40 inc/fields/user.php:62
|
146 |
+
msgid "Select a %s"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/fields/user.php:54
|
150 |
+
msgid "User"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: inc/meta-box.php:245
|
154 |
+
msgid "Please correct the errors highlighted below and try again."
|
155 |
+
msgstr ""
|
156 |
+
#. Plugin Name of the plugin/theme
|
157 |
+
msgid "Meta Box"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#. Plugin URI of the plugin/theme
|
161 |
+
msgid "http://www.deluxeblogtips.com/meta-box"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#. Description of the plugin/theme
|
165 |
+
msgid "Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0"
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#. Author of the plugin/theme
|
169 |
+
msgid "Rilwis"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#. Author URI of the plugin/theme
|
173 |
+
msgid "http://www.deluxeblogtips.com"
|
174 |
+
msgstr ""
|
inc/meta-box/lang/es.mo
ADDED
Binary file
|
inc/meta-box/lang/es.po
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-03 15:09+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-12-29 23:42-0500\n"
|
7 |
+
"Last-Translator: Adel Qalieh <aqalieh95@gmail.com>\n"
|
8 |
+
"Language-Team: Adel Qalieh <aqalieh95@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
13 |
+
"_nx_noop:1,2\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
17 |
+
"X-Language: es\n"
|
18 |
+
"X-Source-Language: en\n"
|
19 |
+
"Language: es\n"
|
20 |
+
"X-Poedit-SearchPath-0: ..\n"
|
21 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
22 |
+
|
23 |
+
#: ../meta-box.php:79
|
24 |
+
msgid "RW_Meta_Box Debug:"
|
25 |
+
msgstr "RW_Meta_Box Debug:"
|
26 |
+
|
27 |
+
#: ../inc/classes/meta-box.php:316
|
28 |
+
msgid "+"
|
29 |
+
msgstr "+"
|
30 |
+
|
31 |
+
#: ../inc/classes/meta-box.php:340
|
32 |
+
msgid "–"
|
33 |
+
msgstr "–"
|
34 |
+
|
35 |
+
#: ../inc/fields/file.php:69
|
36 |
+
msgid "Error: Cannot delete file"
|
37 |
+
msgstr "Error: No se puede eliminar el archivo"
|
38 |
+
|
39 |
+
#: ../inc/fields/file.php:83
|
40 |
+
msgctxt "file upload"
|
41 |
+
msgid "Uploaded files"
|
42 |
+
msgstr "Archivos subidos"
|
43 |
+
|
44 |
+
#: ../inc/fields/file.php:84
|
45 |
+
msgctxt "file upload"
|
46 |
+
msgid "Delete this file"
|
47 |
+
msgstr "Eliminar este archivo"
|
48 |
+
|
49 |
+
#: ../inc/fields/file.php:85
|
50 |
+
msgctxt "file upload"
|
51 |
+
msgid "Delete"
|
52 |
+
msgstr "Eliminar"
|
53 |
+
|
54 |
+
#: ../inc/fields/file.php:86
|
55 |
+
msgctxt "file upload"
|
56 |
+
msgid "Upload files"
|
57 |
+
msgstr "Subir archivos"
|
58 |
+
|
59 |
+
#: ../inc/fields/file.php:87
|
60 |
+
msgctxt "file upload"
|
61 |
+
msgid "+ Add new file"
|
62 |
+
msgstr "+ Añadir un archivo nuevo"
|
63 |
+
|
64 |
+
#: ../inc/fields/image.php:75
|
65 |
+
msgid "Order saved"
|
66 |
+
msgstr "El orden guardado"
|
67 |
+
|
68 |
+
#: ../inc/fields/image.php:91 ../inc/fields/plupload-image.php:156
|
69 |
+
msgctxt "image upload"
|
70 |
+
msgid "Uploaded files"
|
71 |
+
msgstr "Archivos subidos"
|
72 |
+
|
73 |
+
#: ../inc/fields/image.php:92 ../inc/fields/plupload-image.php:112
|
74 |
+
msgctxt "image upload"
|
75 |
+
msgid "Delete this file"
|
76 |
+
msgstr "Eliminar este archivo"
|
77 |
+
|
78 |
+
#: ../inc/fields/image.php:93 ../inc/fields/plupload-image.php:113
|
79 |
+
msgctxt "image upload"
|
80 |
+
msgid "Delete"
|
81 |
+
msgstr "Eliminar"
|
82 |
+
|
83 |
+
#: ../inc/fields/image.php:94 ../inc/fields/plupload-image.php:114
|
84 |
+
msgctxt "image upload"
|
85 |
+
msgid "Edit"
|
86 |
+
msgstr "Edit"
|
87 |
+
|
88 |
+
#: ../inc/fields/image.php:95 ../inc/fields/plupload-image.php:157
|
89 |
+
msgctxt "image upload"
|
90 |
+
msgid "Upload files"
|
91 |
+
msgstr "Subir archivos"
|
92 |
+
|
93 |
+
#: ../inc/fields/image.php:96
|
94 |
+
msgctxt "image upload"
|
95 |
+
msgid "+ Add new image"
|
96 |
+
msgstr "+ Añadir un archivo nuevo"
|
97 |
+
|
98 |
+
#: ../inc/fields/plupload-image.php:95
|
99 |
+
msgctxt "image upload"
|
100 |
+
msgid "Allowed Image Files"
|
101 |
+
msgstr "Archivos de imágenes permitidos"
|
102 |
+
|
103 |
+
#: ../inc/fields/plupload-image.php:160
|
104 |
+
msgctxt "image upload"
|
105 |
+
msgid "Drop images here"
|
106 |
+
msgstr "Soltar imágenes aquí"
|
107 |
+
|
108 |
+
#: ../inc/fields/plupload-image.php:161
|
109 |
+
msgctxt "image upload"
|
110 |
+
msgid "or"
|
111 |
+
msgstr "o"
|
112 |
+
|
113 |
+
#: ../inc/fields/plupload-image.php:162
|
114 |
+
msgctxt "image upload"
|
115 |
+
msgid "Select Files"
|
116 |
+
msgstr "Seleccionar Archivos"
|
117 |
+
|
118 |
+
#: ../inc/fields/thickbox-image.php:45
|
119 |
+
msgctxt "image upload"
|
120 |
+
msgid "Upload image"
|
121 |
+
msgstr "Subir imágenes"
|
inc/meta-box/lang/it_IT.mo
ADDED
Binary file
|
inc/meta-box/lang/it_IT.po
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-03-02 14:08+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-03-02 14:08+0700\n"
|
7 |
+
"Last-Translator: name <email@domain.com>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2;_x:2c,1\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: UNITED STATES\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../meta-box.php:334
|
22 |
+
msgid "+"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: ../meta-box.php:358
|
26 |
+
msgid "–"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../meta-box.php:691
|
30 |
+
msgid "RW_Meta_Box Debug:"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../inc/fields/color.php:45
|
34 |
+
msgid "Select a color"
|
35 |
+
msgstr "Seleziona un colore"
|
36 |
+
|
37 |
+
#: ../inc/fields/file.php:69
|
38 |
+
msgid "Error: Cannot delete file"
|
39 |
+
msgstr "Errore: impossibile cancellare il file"
|
40 |
+
|
41 |
+
#: ../inc/fields/file.php:83
|
42 |
+
msgctxt "file upload"
|
43 |
+
msgid "Uploaded files"
|
44 |
+
msgstr "Carica i files"
|
45 |
+
|
46 |
+
#: ../inc/fields/file.php:84
|
47 |
+
msgctxt "file upload"
|
48 |
+
msgid "Delete this file"
|
49 |
+
msgstr "Elimina file"
|
50 |
+
|
51 |
+
#: ../inc/fields/file.php:85
|
52 |
+
msgctxt "file upload"
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Elimina"
|
55 |
+
|
56 |
+
#: ../inc/fields/file.php:86
|
57 |
+
msgctxt "file upload"
|
58 |
+
msgid "Upload files"
|
59 |
+
msgstr "Carica files"
|
60 |
+
|
61 |
+
#: ../inc/fields/file.php:87
|
62 |
+
msgctxt "file upload"
|
63 |
+
msgid "Add another file"
|
64 |
+
msgstr "Aggiungi altro file"
|
65 |
+
|
66 |
+
#: ../inc/fields/image.php:68
|
67 |
+
msgid "Order saved"
|
68 |
+
msgstr "Ordine salvato"
|
69 |
+
|
70 |
+
#: ../inc/fields/image.php:84
|
71 |
+
#: ../inc/fields/plupload-image.php:178
|
72 |
+
msgctxt "image upload"
|
73 |
+
msgid "Uploaded files"
|
74 |
+
msgstr "Files caricati"
|
75 |
+
|
76 |
+
#: ../inc/fields/image.php:85
|
77 |
+
#: ../inc/fields/plupload-image.php:140
|
78 |
+
msgctxt "image upload"
|
79 |
+
msgid "Delete this file"
|
80 |
+
msgstr "Elimina file"
|
81 |
+
|
82 |
+
#: ../inc/fields/image.php:86
|
83 |
+
#: ../inc/fields/plupload-image.php:141
|
84 |
+
msgctxt "image upload"
|
85 |
+
msgid "Delete"
|
86 |
+
msgstr "Cancella"
|
87 |
+
|
88 |
+
#: ../inc/fields/image.php:87
|
89 |
+
#: ../inc/fields/plupload-image.php:142
|
90 |
+
msgctxt "image upload"
|
91 |
+
msgid "Edit"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: ../inc/fields/image.php:88
|
95 |
+
#: ../inc/fields/plupload-image.php:179
|
96 |
+
msgctxt "image upload"
|
97 |
+
msgid "Upload files"
|
98 |
+
msgstr "Carica files"
|
99 |
+
|
100 |
+
#: ../inc/fields/image.php:89
|
101 |
+
#: ../inc/fields/plupload-image.php:180
|
102 |
+
msgctxt "image upload"
|
103 |
+
msgid "Add another file"
|
104 |
+
msgstr "Aggiungi altro file"
|
105 |
+
|
106 |
+
#: ../inc/fields/plupload-image.php:112
|
107 |
+
msgctxt "image upload"
|
108 |
+
msgid "Allowed Image Files"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: ../inc/fields/plupload-image.php:183
|
112 |
+
msgctxt "image upload"
|
113 |
+
msgid "Drop images here"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: ../inc/fields/plupload-image.php:184
|
117 |
+
msgctxt "image upload"
|
118 |
+
msgid "or"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../inc/fields/plupload-image.php:185
|
122 |
+
#, fuzzy
|
123 |
+
msgctxt "image upload"
|
124 |
+
msgid "Select Files"
|
125 |
+
msgstr "Seleziona un colore"
|
126 |
+
|
inc/meta-box/lang/nb_NO.mo
ADDED
Binary file
|
inc/meta-box/lang/nb_NO.po
ADDED
@@ -0,0 +1,149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-03-02 14:08+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-03-05 22:32+0100\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: Magnus Kolstad <mrkolby@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2;_x:2c,1\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: Norwegian (Bokmål)\n"
|
15 |
+
"X-Poedit-Country: Norwegian\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../meta-box.php:334
|
22 |
+
msgid "+"
|
23 |
+
msgstr "+"
|
24 |
+
|
25 |
+
#: ../meta-box.php:358
|
26 |
+
msgid "–"
|
27 |
+
msgstr "–"
|
28 |
+
|
29 |
+
#: ../meta-box.php:691
|
30 |
+
msgid "RW_Meta_Box Debug:"
|
31 |
+
msgstr "RW_Meta_Box-debug"
|
32 |
+
|
33 |
+
#: ../inc/fields/color.php:45
|
34 |
+
msgid "Select a color"
|
35 |
+
msgstr "Velg en farge"
|
36 |
+
|
37 |
+
#: ../inc/fields/file.php:69
|
38 |
+
msgid "Error: Cannot delete file"
|
39 |
+
msgstr "Feil: Kan ikke slette fil"
|
40 |
+
|
41 |
+
#: ../inc/fields/file.php:83
|
42 |
+
msgctxt "file upload"
|
43 |
+
msgid "Uploaded files"
|
44 |
+
msgstr "Opplastede filer"
|
45 |
+
|
46 |
+
#: ../inc/fields/file.php:84
|
47 |
+
msgctxt "file upload"
|
48 |
+
msgid "Delete this file"
|
49 |
+
msgstr "Slett denne filen"
|
50 |
+
|
51 |
+
#: ../inc/fields/file.php:85
|
52 |
+
msgctxt "file upload"
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Slett"
|
55 |
+
|
56 |
+
#: ../inc/fields/file.php:86
|
57 |
+
msgctxt "file upload"
|
58 |
+
msgid "Upload files"
|
59 |
+
msgstr "Last opp filer"
|
60 |
+
|
61 |
+
#: ../inc/fields/file.php:87
|
62 |
+
msgctxt "file upload"
|
63 |
+
msgid "Add another file"
|
64 |
+
msgstr "Legg til en fil"
|
65 |
+
|
66 |
+
#: ../inc/fields/image.php:68
|
67 |
+
msgid "Order saved"
|
68 |
+
msgstr "Sortering lagret"
|
69 |
+
|
70 |
+
#: ../inc/fields/image.php:84
|
71 |
+
#: ../inc/fields/plupload-image.php:178
|
72 |
+
msgctxt "image upload"
|
73 |
+
msgid "Uploaded files"
|
74 |
+
msgstr "Opplastede filer"
|
75 |
+
|
76 |
+
#: ../inc/fields/image.php:85
|
77 |
+
#: ../inc/fields/plupload-image.php:140
|
78 |
+
msgctxt "image upload"
|
79 |
+
msgid "Delete this file"
|
80 |
+
msgstr "Slett denne filen"
|
81 |
+
|
82 |
+
#: ../inc/fields/image.php:86
|
83 |
+
#: ../inc/fields/plupload-image.php:141
|
84 |
+
msgctxt "image upload"
|
85 |
+
msgid "Delete"
|
86 |
+
msgstr "Slett"
|
87 |
+
|
88 |
+
#: ../inc/fields/image.php:87
|
89 |
+
#: ../inc/fields/plupload-image.php:142
|
90 |
+
msgctxt "image upload"
|
91 |
+
msgid "Edit"
|
92 |
+
msgstr "Endre"
|
93 |
+
|
94 |
+
#: ../inc/fields/image.php:88
|
95 |
+
#: ../inc/fields/plupload-image.php:179
|
96 |
+
msgctxt "image upload"
|
97 |
+
msgid "Upload files"
|
98 |
+
msgstr "Last opp filer"
|
99 |
+
|
100 |
+
#: ../inc/fields/image.php:89
|
101 |
+
#: ../inc/fields/plupload-image.php:180
|
102 |
+
msgctxt "image upload"
|
103 |
+
msgid "Add another file"
|
104 |
+
msgstr "Legg til en fil"
|
105 |
+
|
106 |
+
#: ../inc/fields/plupload-image.php:112
|
107 |
+
msgctxt "image upload"
|
108 |
+
msgid "Allowed Image Files"
|
109 |
+
msgstr "Tillate bilde-filer"
|
110 |
+
|
111 |
+
#: ../inc/fields/plupload-image.php:183
|
112 |
+
msgctxt "image upload"
|
113 |
+
msgid "Drop images here"
|
114 |
+
msgstr "Slipp bildene her"
|
115 |
+
|
116 |
+
#: ../inc/fields/plupload-image.php:184
|
117 |
+
msgctxt "image upload"
|
118 |
+
msgid "or"
|
119 |
+
msgstr "eller"
|
120 |
+
|
121 |
+
#: ../inc/fields/plupload-image.php:185
|
122 |
+
#, fuzzy
|
123 |
+
msgctxt "image upload"
|
124 |
+
msgid "Select Files"
|
125 |
+
msgstr "Velg en farge"
|
126 |
+
|
127 |
+
#~ msgid "Cannot delete file. Something's wrong."
|
128 |
+
#~ msgstr "Kan ikke slette filen. Noe er galt."
|
129 |
+
|
130 |
+
#~ msgid "Uploaded files"
|
131 |
+
#~ msgstr "Opplastede filer."
|
132 |
+
|
133 |
+
#~ msgid "Delete"
|
134 |
+
#~ msgstr "Slett"
|
135 |
+
|
136 |
+
#~ msgid "Upload new files"
|
137 |
+
#~ msgstr "Last opp nye filer"
|
138 |
+
|
139 |
+
#~ msgid "Add more file"
|
140 |
+
#~ msgstr "Legg til flere filer"
|
141 |
+
|
142 |
+
#~ msgid "Uploaded images"
|
143 |
+
#~ msgstr "Opplastede bilder"
|
144 |
+
|
145 |
+
#~ msgid "Delete this image"
|
146 |
+
#~ msgstr "Slett dette bildet"
|
147 |
+
|
148 |
+
#~ msgid "Upload new images"
|
149 |
+
#~ msgstr "Last opp nye bilder"
|
inc/meta-box/lang/nl.mo
ADDED
Binary file
|
inc/meta-box/lang/nl.po
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-04-21 01:56+0100\n"
|
6 |
+
"PO-Revision-Date: 2013-04-21 01:56+0100\n"
|
7 |
+
"Last-Translator: Cor van Noorloos <info@webvorm.nl>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: nl_NL\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../inc/classes/meta-box.php:299
|
22 |
+
msgid "Please correct the errors highlighted below and try again."
|
23 |
+
msgstr "Corrigeer de fouten hieronder gemarkeerd en probeer opnieuw."
|
24 |
+
|
25 |
+
#: ../inc/classes/meta-box.php:360
|
26 |
+
msgid "+"
|
27 |
+
msgstr "+"
|
28 |
+
|
29 |
+
#: ../inc/classes/meta-box.php:382
|
30 |
+
msgid "–"
|
31 |
+
msgstr "–"
|
32 |
+
|
33 |
+
#: ../inc/fields/file-advanced.php:62
|
34 |
+
msgctxt "file upload"
|
35 |
+
msgid "Select or Upload Files"
|
36 |
+
msgstr "Bestanden selecteren of uploaden"
|
37 |
+
|
38 |
+
#: ../inc/fields/file.php:66
|
39 |
+
msgid "Error: Cannot delete file"
|
40 |
+
msgstr "Foutmelding: Kan bestand niet verwijderen"
|
41 |
+
|
42 |
+
#: ../inc/fields/file.php:80
|
43 |
+
msgctxt "file upload"
|
44 |
+
msgid "Upload Files"
|
45 |
+
msgstr "Bestanden uploaden"
|
46 |
+
|
47 |
+
#: ../inc/fields/file.php:81
|
48 |
+
msgctxt "file upload"
|
49 |
+
msgid "+ Add new file"
|
50 |
+
msgstr "+ Nieuw bestand toevoegen"
|
51 |
+
|
52 |
+
#: ../inc/fields/file.php:133
|
53 |
+
msgctxt "file upload"
|
54 |
+
msgid "Delete"
|
55 |
+
msgstr "Verwijderen"
|
56 |
+
|
57 |
+
#: ../inc/fields/file.php:134
|
58 |
+
msgctxt "file upload"
|
59 |
+
msgid "Edit"
|
60 |
+
msgstr "Bewerken"
|
61 |
+
|
62 |
+
#: ../inc/fields/image-advanced.php:68
|
63 |
+
msgctxt "image upload"
|
64 |
+
msgid "Select or Upload Images"
|
65 |
+
msgstr "Afbeeldingen selecteren of uploaden"
|
66 |
+
|
67 |
+
#: ../inc/fields/image.php:64
|
68 |
+
msgid "Order saved"
|
69 |
+
msgstr "Volgorde opgeslagen"
|
70 |
+
|
71 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
72 |
+
msgctxt "image upload"
|
73 |
+
msgid "Upload Images"
|
74 |
+
msgstr "Afbeeldingen uploaden"
|
75 |
+
|
76 |
+
#: ../inc/fields/image.php:79
|
77 |
+
msgctxt "image upload"
|
78 |
+
msgid "+ Add new image"
|
79 |
+
msgstr "+ Nieuwe afbeelding toevoegen"
|
80 |
+
|
81 |
+
#: ../inc/fields/image.php:144
|
82 |
+
msgctxt "image upload"
|
83 |
+
msgid "Delete"
|
84 |
+
msgstr "Verwijderen"
|
85 |
+
|
86 |
+
#: ../inc/fields/image.php:145
|
87 |
+
msgctxt "image upload"
|
88 |
+
msgid "Edit"
|
89 |
+
msgstr "Bewerken"
|
90 |
+
|
91 |
+
#: ../inc/fields/map.php:46
|
92 |
+
msgid "Find Address"
|
93 |
+
msgstr "Adres vinden"
|
94 |
+
|
95 |
+
#: ../inc/fields/plupload-image.php:104
|
96 |
+
msgctxt "image upload"
|
97 |
+
msgid "Drop images here"
|
98 |
+
msgstr "Afbeeldingen naar hier verslepen"
|
99 |
+
|
100 |
+
#: ../inc/fields/plupload-image.php:105
|
101 |
+
msgctxt "image upload"
|
102 |
+
msgid "or"
|
103 |
+
msgstr "of"
|
104 |
+
|
105 |
+
#: ../inc/fields/plupload-image.php:106
|
106 |
+
msgctxt "image upload"
|
107 |
+
msgid "Select Files"
|
108 |
+
msgstr "Bestanden selecteren"
|
109 |
+
|
110 |
+
#: ../inc/fields/plupload-image.php:181
|
111 |
+
msgctxt "image upload"
|
112 |
+
msgid "Allowed Image Files"
|
113 |
+
msgstr "Toegestane afbeeldingsbestanden"
|
114 |
+
|
115 |
+
#: ../inc/fields/post.php:54
|
116 |
+
msgid "Post"
|
117 |
+
msgstr "Bericht"
|
118 |
+
|
119 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
120 |
+
#, php-format
|
121 |
+
msgid "Select a %s"
|
122 |
+
msgstr "Een %s selecteren"
|
123 |
+
|
124 |
+
#: ../inc/fields/select-advanced.php:71
|
125 |
+
msgid "Select a value"
|
126 |
+
msgstr "Een waarde selecteren"
|
127 |
+
|
128 |
+
#~ msgctxt "file upload"
|
129 |
+
#~ msgid "Select Files"
|
130 |
+
#~ msgstr "Bestanden selecteren"
|
inc/meta-box/lang/pt_BR.mo
ADDED
Binary file
|
inc/meta-box/lang/pt_BR.po
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-03-02 14:08+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-03-19 02:59-0300\n"
|
7 |
+
"Last-Translator: name <email@domain.com>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;_nx_noop:1,2\n"
|
13 |
+
"X-Poedit-Basepath: .\n"
|
14 |
+
"X-Poedit-Language: English\n"
|
15 |
+
"X-Poedit-Country: VIET NAM\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
+
|
20 |
+
#: ../meta-box.php:334
|
21 |
+
msgid "+"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../meta-box.php:358
|
25 |
+
msgid "–"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../meta-box.php:691
|
29 |
+
msgid "RW_Meta_Box Debug:"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../inc/fields/color.php:45
|
33 |
+
msgid "Select a color"
|
34 |
+
msgstr "Selecione a cor"
|
35 |
+
|
36 |
+
#: ../inc/fields/file.php:69
|
37 |
+
msgid "Error: Cannot delete file"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: ../inc/fields/file.php:83
|
41 |
+
msgctxt "file upload"
|
42 |
+
msgid "Uploaded files"
|
43 |
+
msgstr "Arquivos carregados"
|
44 |
+
|
45 |
+
#: ../inc/fields/file.php:84
|
46 |
+
msgctxt "file upload"
|
47 |
+
msgid "Delete this file"
|
48 |
+
msgstr "Deletar esse arquivo"
|
49 |
+
|
50 |
+
#: ../inc/fields/file.php:85
|
51 |
+
msgctxt "file upload"
|
52 |
+
msgid "Delete"
|
53 |
+
msgstr "Deletar"
|
54 |
+
|
55 |
+
#: ../inc/fields/file.php:86
|
56 |
+
msgctxt "file upload"
|
57 |
+
msgid "Upload files"
|
58 |
+
msgstr "Carregar arquivos"
|
59 |
+
|
60 |
+
#: ../inc/fields/file.php:87
|
61 |
+
msgctxt "file upload"
|
62 |
+
msgid "Add another file"
|
63 |
+
msgstr "Adicionar outro arquivo"
|
64 |
+
|
65 |
+
#: ../inc/fields/image.php:68
|
66 |
+
msgid "Order saved"
|
67 |
+
msgstr "Salvar ordem"
|
68 |
+
|
69 |
+
#: ../inc/fields/image.php:84
|
70 |
+
#: ../inc/fields/plupload-image.php:178
|
71 |
+
msgctxt "image upload"
|
72 |
+
msgid "Uploaded files"
|
73 |
+
msgstr "Arquivos carregados"
|
74 |
+
|
75 |
+
#: ../inc/fields/image.php:85
|
76 |
+
#: ../inc/fields/plupload-image.php:140
|
77 |
+
msgctxt "image upload"
|
78 |
+
msgid "Delete this file"
|
79 |
+
msgstr "Deletar esse arquivo"
|
80 |
+
|
81 |
+
#: ../inc/fields/image.php:86
|
82 |
+
#: ../inc/fields/plupload-image.php:141
|
83 |
+
msgctxt "image upload"
|
84 |
+
msgid "Delete"
|
85 |
+
msgstr "Deletar"
|
86 |
+
|
87 |
+
#: ../inc/fields/image.php:87
|
88 |
+
#: ../inc/fields/plupload-image.php:142
|
89 |
+
msgctxt "image upload"
|
90 |
+
msgid "Edit"
|
91 |
+
msgstr "Editar"
|
92 |
+
|
93 |
+
#: ../inc/fields/image.php:88
|
94 |
+
#: ../inc/fields/plupload-image.php:179
|
95 |
+
msgctxt "image upload"
|
96 |
+
msgid "Upload files"
|
97 |
+
msgstr "Carregar arquivos"
|
98 |
+
|
99 |
+
#: ../inc/fields/image.php:89
|
100 |
+
#: ../inc/fields/plupload-image.php:180
|
101 |
+
msgctxt "image upload"
|
102 |
+
msgid "Add another file"
|
103 |
+
msgstr "Adicionar outro arquivo"
|
104 |
+
|
105 |
+
#: ../inc/fields/plupload-image.php:112
|
106 |
+
msgctxt "image upload"
|
107 |
+
msgid "Allowed Image Files"
|
108 |
+
msgstr "Arquivos de imagem permetidos"
|
109 |
+
|
110 |
+
#: ../inc/fields/plupload-image.php:183
|
111 |
+
msgctxt "image upload"
|
112 |
+
msgid "Drop images here"
|
113 |
+
msgstr "Largue as imagens aqui"
|
114 |
+
|
115 |
+
#: ../inc/fields/plupload-image.php:184
|
116 |
+
msgctxt "image upload"
|
117 |
+
msgid "or"
|
118 |
+
msgstr "ou"
|
119 |
+
|
120 |
+
#: ../inc/fields/plupload-image.php:185
|
121 |
+
msgctxt "image upload"
|
122 |
+
msgid "Select Files"
|
123 |
+
msgstr "Selecione os arquivos"
|
124 |
+
|
inc/meta-box/lang/sv_SE.mo
ADDED
Binary file
|
inc/meta-box/lang/sv_SE.po
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2012-06-03 15:09+0700\n"
|
6 |
+
"PO-Revision-Date: 2012-08-09 16:15+0100\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
13 |
+
"_nx_noop:1,2\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"Language: en_VN\n"
|
17 |
+
"X-Poedit-SearchPath-0: ..\n"
|
18 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
19 |
+
|
20 |
+
#: ../meta-box.php:79
|
21 |
+
msgid "RW_Meta_Box Debug:"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: ../inc/classes/meta-box.php:316
|
25 |
+
msgid "+"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: ../inc/classes/meta-box.php:340
|
29 |
+
msgid "–"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: ../inc/fields/file.php:69
|
33 |
+
msgid "Error: Cannot delete file"
|
34 |
+
msgstr "Fel: Kan inte radera filen"
|
35 |
+
|
36 |
+
#: ../inc/fields/file.php:83
|
37 |
+
msgctxt "file upload"
|
38 |
+
msgid "Uploaded files"
|
39 |
+
msgstr "Uppladdade filer"
|
40 |
+
|
41 |
+
#: ../inc/fields/file.php:84
|
42 |
+
msgctxt "file upload"
|
43 |
+
msgid "Delete this file"
|
44 |
+
msgstr "Radera den här filen"
|
45 |
+
|
46 |
+
#: ../inc/fields/file.php:85
|
47 |
+
msgctxt "file upload"
|
48 |
+
msgid "Delete"
|
49 |
+
msgstr "Radera"
|
50 |
+
|
51 |
+
#: ../inc/fields/file.php:86
|
52 |
+
msgctxt "file upload"
|
53 |
+
msgid "Upload files"
|
54 |
+
msgstr "Ladda upp"
|
55 |
+
|
56 |
+
#: ../inc/fields/file.php:87
|
57 |
+
msgctxt "file upload"
|
58 |
+
msgid "+ Add new file"
|
59 |
+
msgstr "+ Lägg till ny fil"
|
60 |
+
|
61 |
+
#: ../inc/fields/image.php:75
|
62 |
+
msgid "Order saved"
|
63 |
+
msgstr "Ordning sparad"
|
64 |
+
|
65 |
+
#: ../inc/fields/image.php:91 ../inc/fields/plupload-image.php:156
|
66 |
+
msgctxt "image upload"
|
67 |
+
msgid "Uploaded files"
|
68 |
+
msgstr "Uppladdade filer"
|
69 |
+
|
70 |
+
#: ../inc/fields/image.php:92 ../inc/fields/plupload-image.php:112
|
71 |
+
msgctxt "image upload"
|
72 |
+
msgid "Delete this file"
|
73 |
+
msgstr "Radera den här filen"
|
74 |
+
|
75 |
+
#: ../inc/fields/image.php:93 ../inc/fields/plupload-image.php:113
|
76 |
+
msgctxt "image upload"
|
77 |
+
msgid "Delete"
|
78 |
+
msgstr "Radera"
|
79 |
+
|
80 |
+
#: ../inc/fields/image.php:94 ../inc/fields/plupload-image.php:114
|
81 |
+
msgctxt "image upload"
|
82 |
+
msgid "Edit"
|
83 |
+
msgstr "Redigera"
|
84 |
+
|
85 |
+
#: ../inc/fields/image.php:95 ../inc/fields/plupload-image.php:157
|
86 |
+
msgctxt "image upload"
|
87 |
+
msgid "Upload files"
|
88 |
+
msgstr "Ladda upp filer"
|
89 |
+
|
90 |
+
#: ../inc/fields/image.php:96
|
91 |
+
msgctxt "image upload"
|
92 |
+
msgid "+ Add new image"
|
93 |
+
msgstr "+ Lägg till ny bild"
|
94 |
+
|
95 |
+
#: ../inc/fields/plupload-image.php:95
|
96 |
+
msgctxt "image upload"
|
97 |
+
msgid "Allowed Image Files"
|
98 |
+
msgstr "Tillåtna bildformat"
|
99 |
+
|
100 |
+
#: ../inc/fields/plupload-image.php:160
|
101 |
+
msgctxt "image upload"
|
102 |
+
msgid "Drop images here"
|
103 |
+
msgstr "Släpp bilder här"
|
104 |
+
|
105 |
+
#: ../inc/fields/plupload-image.php:161
|
106 |
+
msgctxt "image upload"
|
107 |
+
msgid "or"
|
108 |
+
msgstr "eller"
|
109 |
+
|
110 |
+
#: ../inc/fields/plupload-image.php:162
|
111 |
+
msgctxt "image upload"
|
112 |
+
msgid "Select Files"
|
113 |
+
msgstr "Välj filer"
|
114 |
+
|
115 |
+
#: ../inc/fields/thickbox-image.php:45
|
116 |
+
msgctxt "image upload"
|
117 |
+
msgid "Upload image"
|
118 |
+
msgstr "Ladda upp bild"
|
inc/meta-box/lang/tr_TR.mo
ADDED
Binary file
|
inc/meta-box/lang/tr_TR.po
ADDED
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-06-03 22:19+0700\n"
|
6 |
+
"PO-Revision-Date: 2013-07-13 01:40+0200\n"
|
7 |
+
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: en_EN\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../demo/all-custom-post-types.php:20
|
22 |
+
msgid "Personal Information"
|
23 |
+
msgstr "Kişisel Bilgiler"
|
24 |
+
|
25 |
+
#: ../demo/all-custom-post-types.php:25
|
26 |
+
msgid "Full name"
|
27 |
+
msgstr "Tam İsminiz"
|
28 |
+
|
29 |
+
#: ../demo/better-include.php:16 ../demo/include-by-ID-or-page-template.php:8
|
30 |
+
msgid "Meta Box Title"
|
31 |
+
msgstr "Meta Box Başlığı"
|
32 |
+
|
33 |
+
#: ../demo/better-include.php:19 ../demo/include-by-ID-or-page-template.php:14
|
34 |
+
msgid "Your images"
|
35 |
+
msgstr "Resiminiz"
|
36 |
+
|
37 |
+
#: ../demo/date-time-js-options.php:11
|
38 |
+
msgid "Date Time Picker With JS Options"
|
39 |
+
msgstr "JS Seçenekleriyle Tarih Saat Seçici"
|
40 |
+
|
41 |
+
#: ../demo/date-time-js-options.php:15
|
42 |
+
msgid "Date"
|
43 |
+
msgstr "Tarih"
|
44 |
+
|
45 |
+
#: ../demo/date-time-js-options.php:21 ../demo/demo.php:177
|
46 |
+
msgid "(yyyy-mm-dd)"
|
47 |
+
msgstr "(yyyy-aa-gg)"
|
48 |
+
|
49 |
+
#: ../demo/date-time-js-options.php:23
|
50 |
+
msgid "Select Date"
|
51 |
+
msgstr "Tarih Seç"
|
52 |
+
|
53 |
+
#: ../demo/date-time-js-options.php:24 ../demo/demo.php:178
|
54 |
+
msgid "yy-mm-dd"
|
55 |
+
msgstr "yy-aa-gg"
|
56 |
+
|
57 |
+
#: ../demo/date-time-js-options.php:30
|
58 |
+
msgid "Datetime"
|
59 |
+
msgstr "Tarihsaat"
|
60 |
+
|
61 |
+
#: ../demo/date-time-js-options.php:41
|
62 |
+
msgid "Time"
|
63 |
+
msgstr "Saat"
|
64 |
+
|
65 |
+
#: ../demo/demo.php:34
|
66 |
+
msgid "Standard Fields"
|
67 |
+
msgstr "Standart Alanlar"
|
68 |
+
|
69 |
+
#: ../demo/demo.php:53
|
70 |
+
msgid "Text"
|
71 |
+
msgstr "Yazı"
|
72 |
+
|
73 |
+
#: ../demo/demo.php:57
|
74 |
+
msgid "Text description"
|
75 |
+
msgstr "Yazı Açıklaması"
|
76 |
+
|
77 |
+
#: ../demo/demo.php:60
|
78 |
+
msgid "Default text value"
|
79 |
+
msgstr "Varsayılan yazı değeri"
|
80 |
+
|
81 |
+
#: ../demo/demo.php:66
|
82 |
+
msgid "Checkbox"
|
83 |
+
msgstr "Onay Kutusu"
|
84 |
+
|
85 |
+
#: ../demo/demo.php:74
|
86 |
+
msgid "Radio"
|
87 |
+
msgstr "Seçim Kutusu"
|
88 |
+
|
89 |
+
#: ../demo/demo.php:80 ../demo/demo.php:91 ../demo/demo.php:226
|
90 |
+
msgid "Label1"
|
91 |
+
msgstr "Etiket1"
|
92 |
+
|
93 |
+
#: ../demo/demo.php:81 ../demo/demo.php:92 ../demo/demo.php:227
|
94 |
+
msgid "Label2"
|
95 |
+
msgstr "Etiket2"
|
96 |
+
|
97 |
+
#: ../demo/demo.php:86
|
98 |
+
msgid "Select"
|
99 |
+
msgstr "Seç"
|
100 |
+
|
101 |
+
#: ../demo/demo.php:96
|
102 |
+
msgid "Select an Item"
|
103 |
+
msgstr "Bir Nesne Seçin"
|
104 |
+
|
105 |
+
#: ../demo/demo.php:103
|
106 |
+
msgid "Hidden value"
|
107 |
+
msgstr "Gizli Alan"
|
108 |
+
|
109 |
+
#: ../demo/demo.php:107
|
110 |
+
msgid "Password"
|
111 |
+
msgstr "Parola"
|
112 |
+
|
113 |
+
#: ../demo/demo.php:113
|
114 |
+
msgid "Textarea"
|
115 |
+
msgstr "Yazı Alanı"
|
116 |
+
|
117 |
+
#: ../demo/demo.php:114
|
118 |
+
msgid "Textarea description"
|
119 |
+
msgstr "Yazı Alanı Açıklaması"
|
120 |
+
|
121 |
+
#: ../demo/demo.php:131
|
122 |
+
msgid "Password is required"
|
123 |
+
msgstr "Parola Gerekli"
|
124 |
+
|
125 |
+
#: ../demo/demo.php:132
|
126 |
+
msgid "Password must be at least 7 characters"
|
127 |
+
msgstr "Parolanız 7 karakterden fazla olmalıdır"
|
128 |
+
|
129 |
+
#: ../demo/demo.php:140
|
130 |
+
msgid "Advanced Fields"
|
131 |
+
msgstr "Gelişmiş Alanlar"
|
132 |
+
|
133 |
+
#: ../demo/demo.php:145
|
134 |
+
msgid "Slider"
|
135 |
+
msgstr "Slider"
|
136 |
+
|
137 |
+
#: ../demo/demo.php:150
|
138 |
+
msgid "$"
|
139 |
+
msgstr "$"
|
140 |
+
|
141 |
+
#: ../demo/demo.php:151
|
142 |
+
msgid " USD"
|
143 |
+
msgstr "USD"
|
144 |
+
|
145 |
+
#: ../demo/demo.php:162
|
146 |
+
msgid "Number"
|
147 |
+
msgstr "Numara"
|
148 |
+
|
149 |
+
#: ../demo/demo.php:171
|
150 |
+
msgid "Date picker"
|
151 |
+
msgstr "Tarih Seçici"
|
152 |
+
|
153 |
+
#: ../demo/demo.php:186
|
154 |
+
msgid "Datetime picker"
|
155 |
+
msgstr "Tarih Saat Seçici"
|
156 |
+
|
157 |
+
#: ../demo/demo.php:200
|
158 |
+
msgid "Time picker"
|
159 |
+
msgstr "Saat Seçici"
|
160 |
+
|
161 |
+
#: ../demo/demo.php:215
|
162 |
+
msgid "Color picker"
|
163 |
+
msgstr "Renk Seçici"
|
164 |
+
|
165 |
+
#: ../demo/demo.php:221
|
166 |
+
msgid "Checkbox list"
|
167 |
+
msgstr "Onay Kutusu Litesi"
|
168 |
+
|
169 |
+
#: ../demo/demo.php:232
|
170 |
+
msgid "Email"
|
171 |
+
msgstr "E-Posta"
|
172 |
+
|
173 |
+
#: ../demo/demo.php:234
|
174 |
+
msgid "Email description"
|
175 |
+
msgstr "E-Posta Açıklaması"
|
176 |
+
|
177 |
+
#: ../demo/demo.php:240
|
178 |
+
msgid "Range"
|
179 |
+
msgstr "Aralık"
|
180 |
+
|
181 |
+
#: ../demo/demo.php:242
|
182 |
+
msgid "Range description"
|
183 |
+
msgstr "Aralık Açıklması"
|
184 |
+
|
185 |
+
#: ../demo/demo.php:251
|
186 |
+
msgid "URL"
|
187 |
+
msgstr "URL"
|
188 |
+
|
189 |
+
#: ../demo/demo.php:253
|
190 |
+
msgid "URL description"
|
191 |
+
msgstr "URL Açıklaması"
|
192 |
+
|
193 |
+
#: ../demo/demo.php:259
|
194 |
+
msgid "oEmbed"
|
195 |
+
msgstr "oEmbed"
|
196 |
+
|
197 |
+
#: ../demo/demo.php:261
|
198 |
+
msgid "oEmbed description"
|
199 |
+
msgstr "oEmbed Açıklaması"
|
200 |
+
|
201 |
+
#: ../demo/demo.php:266
|
202 |
+
msgid "Taxonomy"
|
203 |
+
msgstr "Taxonomy"
|
204 |
+
|
205 |
+
#: ../demo/demo.php:280
|
206 |
+
msgid "Posts (Pages)"
|
207 |
+
msgstr "Yazılar (Sayfalar)"
|
208 |
+
|
209 |
+
#: ../demo/demo.php:296
|
210 |
+
msgid "WYSIWYG / Rich Text Editor"
|
211 |
+
msgstr "WYSIWYG / Gelişmiş Yazı Editörü"
|
212 |
+
|
213 |
+
#: ../demo/demo.php:301
|
214 |
+
msgid "WYSIWYG default value"
|
215 |
+
msgstr "WYSIWYG varsayılan değer"
|
216 |
+
|
217 |
+
#: ../demo/demo.php:312 ../demo/force-delete.php:15
|
218 |
+
msgid "File Upload"
|
219 |
+
msgstr "Dosya Yükleme"
|
220 |
+
|
221 |
+
#: ../demo/demo.php:318
|
222 |
+
msgid "File Advanced Upload"
|
223 |
+
msgstr "Gelişmiş Dosya Yükleme"
|
224 |
+
|
225 |
+
#: ../demo/demo.php:326 ../demo/force-delete.php:22
|
226 |
+
msgid "Image Upload"
|
227 |
+
msgstr "Resim Yükleme"
|
228 |
+
|
229 |
+
#: ../demo/demo.php:332 ../demo/force-delete.php:28
|
230 |
+
msgid "Thickbox Image Upload"
|
231 |
+
msgstr "Thickbox Resim Yükleme"
|
232 |
+
|
233 |
+
#: ../demo/demo.php:338 ../demo/force-delete.php:35
|
234 |
+
msgid "Plupload Image Upload"
|
235 |
+
msgstr "Plupload Resim Yükleme"
|
236 |
+
|
237 |
+
#: ../demo/demo.php:345
|
238 |
+
msgid "Image Advanced Upload"
|
239 |
+
msgstr "Gelişmiş Resim Yükleme"
|
240 |
+
|
241 |
+
#: ../demo/force-delete.php:11
|
242 |
+
msgid "Test Meta Box"
|
243 |
+
msgstr "Test Meta Box"
|
244 |
+
|
245 |
+
#: ../demo/map.php:9
|
246 |
+
msgid "Google Map"
|
247 |
+
msgstr "Google Haritalar"
|
248 |
+
|
249 |
+
#: ../demo/map.php:13
|
250 |
+
msgid "Address"
|
251 |
+
msgstr "Adres"
|
252 |
+
|
253 |
+
#: ../demo/map.php:15
|
254 |
+
msgid "Hanoi, Vietnam"
|
255 |
+
msgstr "Hanoi, Vietnam"
|
256 |
+
|
257 |
+
#: ../demo/map.php:19
|
258 |
+
msgid "Location"
|
259 |
+
msgstr "Yer Bilgisi"
|
260 |
+
|
261 |
+
#: ../inc/classes/meta-box.php:220
|
262 |
+
msgid "Please correct the errors highlighted below and try again."
|
263 |
+
msgstr "Lütfen işaretlenmiş alanları düzeltin ve tekrar deneyin."
|
264 |
+
|
265 |
+
#: ../inc/classes/meta-box.php:394
|
266 |
+
msgid "+"
|
267 |
+
msgstr "+"
|
268 |
+
|
269 |
+
#: ../inc/classes/meta-box.php:416
|
270 |
+
msgid "–"
|
271 |
+
msgstr "–"
|
272 |
+
|
273 |
+
#: ../inc/fields/file-advanced.php:23
|
274 |
+
#, php-format
|
275 |
+
msgid "You may only upload maximum %d file"
|
276 |
+
msgstr "Yükleme yapabileceğiniz maksimum dosya sayısı %d dır"
|
277 |
+
|
278 |
+
#: ../inc/fields/file-advanced.php:24
|
279 |
+
#, php-format
|
280 |
+
msgid "You may only upload maximum %d files"
|
281 |
+
msgstr "Yükleme yapabileceğiniz maksimum dosya sayısı %d dır"
|
282 |
+
|
283 |
+
#: ../inc/fields/file-advanced.php:25
|
284 |
+
msgid "Select Files"
|
285 |
+
msgstr "Dosya Seç"
|
286 |
+
|
287 |
+
#: ../inc/fields/file-advanced.php:68
|
288 |
+
msgctxt "file upload"
|
289 |
+
msgid "Select or Upload Files"
|
290 |
+
msgstr "Seç veya Dosya Yükle"
|
291 |
+
|
292 |
+
#: ../inc/fields/file-advanced.php:104 ../inc/fields/file.php:133
|
293 |
+
msgctxt "file upload"
|
294 |
+
msgid "Delete"
|
295 |
+
msgstr "Sil"
|
296 |
+
|
297 |
+
#: ../inc/fields/file-advanced.php:105 ../inc/fields/file.php:134
|
298 |
+
msgctxt "file upload"
|
299 |
+
msgid "Edit"
|
300 |
+
msgstr "Düzenle"
|
301 |
+
|
302 |
+
#: ../inc/fields/file.php:66
|
303 |
+
msgid "Error: Cannot delete file"
|
304 |
+
msgstr "Hata: Dosya Silinemedi"
|
305 |
+
|
306 |
+
#: ../inc/fields/file.php:80
|
307 |
+
msgctxt "file upload"
|
308 |
+
msgid "Upload Files"
|
309 |
+
msgstr "Dosya Yükleme"
|
310 |
+
|
311 |
+
#: ../inc/fields/file.php:81
|
312 |
+
msgctxt "file upload"
|
313 |
+
msgid "+ Add new file"
|
314 |
+
msgstr "+ Yeni Dosya Ekle"
|
315 |
+
|
316 |
+
#: ../inc/fields/image-advanced.php:22
|
317 |
+
msgid "Select Images"
|
318 |
+
msgstr "Resim Seç"
|
319 |
+
|
320 |
+
#: ../inc/fields/image-advanced.php:71
|
321 |
+
msgctxt "image upload"
|
322 |
+
msgid "Select or Upload Images"
|
323 |
+
msgstr "Seç veya Resim Yükle"
|
324 |
+
|
325 |
+
#: ../inc/fields/image-advanced.php:107 ../inc/fields/image.php:144
|
326 |
+
msgctxt "image upload"
|
327 |
+
msgid "Delete"
|
328 |
+
msgstr "Sil"
|
329 |
+
|
330 |
+
#: ../inc/fields/image-advanced.php:108 ../inc/fields/image.php:145
|
331 |
+
msgctxt "image upload"
|
332 |
+
msgid "Edit"
|
333 |
+
msgstr "Düzenle"
|
334 |
+
|
335 |
+
#: ../inc/fields/image.php:64
|
336 |
+
msgid "Order saved"
|
337 |
+
msgstr "Görev Kaydedildi"
|
338 |
+
|
339 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
340 |
+
msgctxt "image upload"
|
341 |
+
msgid "Upload Images"
|
342 |
+
msgstr "Resim Yükle"
|
343 |
+
|
344 |
+
#: ../inc/fields/image.php:79
|
345 |
+
msgctxt "image upload"
|
346 |
+
msgid "+ Add new image"
|
347 |
+
msgstr "+ Yeni Resim Ekle"
|
348 |
+
|
349 |
+
#: ../inc/fields/map.php:48
|
350 |
+
msgid "Find Address"
|
351 |
+
msgstr "Adres Bul"
|
352 |
+
|
353 |
+
#: ../inc/fields/plupload-image.php:104
|
354 |
+
msgctxt "image upload"
|
355 |
+
msgid "Drop images here"
|
356 |
+
msgstr "Resimi Buraya Sürükleyin"
|
357 |
+
|
358 |
+
#: ../inc/fields/plupload-image.php:105
|
359 |
+
msgctxt "image upload"
|
360 |
+
msgid "or"
|
361 |
+
msgstr "veya"
|
362 |
+
|
363 |
+
#: ../inc/fields/plupload-image.php:106
|
364 |
+
msgctxt "image upload"
|
365 |
+
msgid "Select Files"
|
366 |
+
msgstr "Dosya Seçin"
|
367 |
+
|
368 |
+
#: ../inc/fields/plupload-image.php:181
|
369 |
+
msgctxt "image upload"
|
370 |
+
msgid "Allowed Image Files"
|
371 |
+
msgstr "İzin Verilen Resim Tipleri"
|
372 |
+
|
373 |
+
#: ../inc/fields/post.php:54
|
374 |
+
msgid "Post"
|
375 |
+
msgstr "Yazı"
|
376 |
+
|
377 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
378 |
+
#, php-format
|
379 |
+
msgid "Select a %s"
|
380 |
+
msgstr "Seç bir %s"
|
381 |
+
|
382 |
+
#: ../inc/fields/select-advanced.php:71
|
383 |
+
msgid "Select a value"
|
384 |
+
msgstr "Bir değer seçin"
|
inc/meta-box/lang/vi.mo
ADDED
Binary file
|
inc/meta-box/lang/vi.po
ADDED
@@ -0,0 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-06-03 22:18+0700\n"
|
6 |
+
"PO-Revision-Date: 2013-06-03 22:19+0700\n"
|
7 |
+
"Last-Translator: Rilwis <rilwis@gmail.com>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: en_VN\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.5\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../demo/all-custom-post-types.php:20
|
22 |
+
msgid "Personal Information"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: ../demo/all-custom-post-types.php:25
|
26 |
+
msgid "Full name"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: ../demo/better-include.php:16 ../demo/include-by-ID-or-page-template.php:8
|
30 |
+
msgid "Meta Box Title"
|
31 |
+
msgstr ""
|
32 |
+
|
33 |
+
#: ../demo/better-include.php:19 ../demo/include-by-ID-or-page-template.php:14
|
34 |
+
msgid "Your images"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: ../demo/date-time-js-options.php:11
|
38 |
+
msgid "Date Time Picker With JS Options"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: ../demo/date-time-js-options.php:15
|
42 |
+
msgid "Date"
|
43 |
+
msgstr ""
|
44 |
+
|
45 |
+
#: ../demo/date-time-js-options.php:21 ../demo/demo.php:177
|
46 |
+
msgid "(yyyy-mm-dd)"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: ../demo/date-time-js-options.php:23
|
50 |
+
msgid "Select Date"
|
51 |
+
msgstr "Chọn ngày"
|
52 |
+
|
53 |
+
#: ../demo/date-time-js-options.php:24 ../demo/demo.php:178
|
54 |
+
msgid "yy-mm-dd"
|
55 |
+
msgstr ""
|
56 |
+
|
57 |
+
#: ../demo/date-time-js-options.php:30
|
58 |
+
msgid "Datetime"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
#: ../demo/date-time-js-options.php:41
|
62 |
+
msgid "Time"
|
63 |
+
msgstr ""
|
64 |
+
|
65 |
+
#: ../demo/demo.php:34
|
66 |
+
msgid "Standard Fields"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: ../demo/demo.php:53
|
70 |
+
msgid "Text"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
#: ../demo/demo.php:57
|
74 |
+
msgid "Text description"
|
75 |
+
msgstr ""
|
76 |
+
|
77 |
+
#: ../demo/demo.php:60
|
78 |
+
msgid "Default text value"
|
79 |
+
msgstr "Giá trị text mặc định"
|
80 |
+
|
81 |
+
#: ../demo/demo.php:66
|
82 |
+
msgid "Checkbox"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
#: ../demo/demo.php:74
|
86 |
+
msgid "Radio"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: ../demo/demo.php:80 ../demo/demo.php:91 ../demo/demo.php:226
|
90 |
+
msgid "Label1"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: ../demo/demo.php:81 ../demo/demo.php:92 ../demo/demo.php:227
|
94 |
+
msgid "Label2"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: ../demo/demo.php:86
|
98 |
+
msgid "Select"
|
99 |
+
msgstr "Chọn"
|
100 |
+
|
101 |
+
#: ../demo/demo.php:96
|
102 |
+
msgid "Select an Item"
|
103 |
+
msgstr "Chọn một giá trị"
|
104 |
+
|
105 |
+
#: ../demo/demo.php:103
|
106 |
+
msgid "Hidden value"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: ../demo/demo.php:107
|
110 |
+
msgid "Password"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: ../demo/demo.php:113
|
114 |
+
msgid "Textarea"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: ../demo/demo.php:114
|
118 |
+
msgid "Textarea description"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: ../demo/demo.php:131
|
122 |
+
msgid "Password is required"
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: ../demo/demo.php:132
|
126 |
+
msgid "Password must be at least 7 characters"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: ../demo/demo.php:140
|
130 |
+
msgid "Advanced Fields"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: ../demo/demo.php:145
|
134 |
+
msgid "Slider"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: ../demo/demo.php:150
|
138 |
+
msgid "$"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: ../demo/demo.php:151
|
142 |
+
msgid " USD"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: ../demo/demo.php:162
|
146 |
+
msgid "Number"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: ../demo/demo.php:171
|
150 |
+
msgid "Date picker"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: ../demo/demo.php:186
|
154 |
+
msgid "Datetime picker"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: ../demo/demo.php:200
|
158 |
+
msgid "Time picker"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: ../demo/demo.php:215
|
162 |
+
msgid "Color picker"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: ../demo/demo.php:221
|
166 |
+
msgid "Checkbox list"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: ../demo/demo.php:232
|
170 |
+
msgid "Email"
|
171 |
+
msgstr ""
|
172 |
+
|
173 |
+
#: ../demo/demo.php:234
|
174 |
+
msgid "Email description"
|
175 |
+
msgstr ""
|
176 |
+
|
177 |
+
#: ../demo/demo.php:240
|
178 |
+
msgid "Range"
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
#: ../demo/demo.php:242
|
182 |
+
msgid "Range description"
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: ../demo/demo.php:251
|
186 |
+
msgid "URL"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: ../demo/demo.php:253
|
190 |
+
msgid "URL description"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: ../demo/demo.php:259
|
194 |
+
msgid "oEmbed"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: ../demo/demo.php:261
|
198 |
+
msgid "oEmbed description"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: ../demo/demo.php:266
|
202 |
+
msgid "Taxonomy"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: ../demo/demo.php:280
|
206 |
+
msgid "Posts (Pages)"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: ../demo/demo.php:296
|
210 |
+
msgid "WYSIWYG / Rich Text Editor"
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: ../demo/demo.php:301
|
214 |
+
msgid "WYSIWYG default value"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: ../demo/demo.php:312 ../demo/force-delete.php:15
|
218 |
+
msgid "File Upload"
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: ../demo/demo.php:318
|
222 |
+
msgid "File Advanced Upload"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: ../demo/demo.php:326 ../demo/force-delete.php:22
|
226 |
+
msgid "Image Upload"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: ../demo/demo.php:332 ../demo/force-delete.php:28
|
230 |
+
msgid "Thickbox Image Upload"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: ../demo/demo.php:338 ../demo/force-delete.php:35
|
234 |
+
#, fuzzy
|
235 |
+
msgid "Plupload Image Upload"
|
236 |
+
msgstr "Tải file"
|
237 |
+
|
238 |
+
#: ../demo/demo.php:345
|
239 |
+
msgid "Image Advanced Upload"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: ../demo/force-delete.php:11
|
243 |
+
msgid "Test Meta Box"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: ../demo/map.php:9
|
247 |
+
msgid "Google Map"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: ../demo/map.php:13
|
251 |
+
msgid "Address"
|
252 |
+
msgstr "Địa chỉ"
|
253 |
+
|
254 |
+
#: ../demo/map.php:15
|
255 |
+
msgid "Hanoi, Vietnam"
|
256 |
+
msgstr ""
|
257 |
+
|
258 |
+
#: ../demo/map.php:19
|
259 |
+
msgid "Location"
|
260 |
+
msgstr "Địa điểm"
|
261 |
+
|
262 |
+
#: ../inc/classes/meta-box.php:220
|
263 |
+
msgid "Please correct the errors highlighted below and try again."
|
264 |
+
msgstr "Vui lòng sửa các lỗi dưới đây và thử lại"
|
265 |
+
|
266 |
+
#: ../inc/classes/meta-box.php:394
|
267 |
+
msgid "+"
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: ../inc/classes/meta-box.php:416
|
271 |
+
msgid "–"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: ../inc/fields/file-advanced.php:23
|
275 |
+
#, php-format
|
276 |
+
msgid "You may only upload maximum %d file"
|
277 |
+
msgstr "Bạn chỉ được phép upload tối đa %d file"
|
278 |
+
|
279 |
+
#: ../inc/fields/file-advanced.php:24
|
280 |
+
#, php-format
|
281 |
+
msgid "You may only upload maximum %d files"
|
282 |
+
msgstr "Bạn chỉ được phép upload tối đa %d file"
|
283 |
+
|
284 |
+
#: ../inc/fields/file-advanced.php:25
|
285 |
+
#, fuzzy
|
286 |
+
msgid "Select Files"
|
287 |
+
msgstr "Chọn file"
|
288 |
+
|
289 |
+
#: ../inc/fields/file-advanced.php:68
|
290 |
+
#, fuzzy
|
291 |
+
msgctxt "file upload"
|
292 |
+
msgid "Select or Upload Files"
|
293 |
+
msgstr "Chọn hoặc tải file"
|
294 |
+
|
295 |
+
#: ../inc/fields/file-advanced.php:104 ../inc/fields/file.php:133
|
296 |
+
msgctxt "file upload"
|
297 |
+
msgid "Delete"
|
298 |
+
msgstr "Xóa"
|
299 |
+
|
300 |
+
#: ../inc/fields/file-advanced.php:105 ../inc/fields/file.php:134
|
301 |
+
msgctxt "file upload"
|
302 |
+
msgid "Edit"
|
303 |
+
msgstr "Sửa"
|
304 |
+
|
305 |
+
#: ../inc/fields/file.php:66
|
306 |
+
msgid "Error: Cannot delete file"
|
307 |
+
msgstr "Lỗi: Không xóa được file"
|
308 |
+
|
309 |
+
#: ../inc/fields/file.php:80
|
310 |
+
msgctxt "file upload"
|
311 |
+
msgid "Upload Files"
|
312 |
+
msgstr "Tải file"
|
313 |
+
|
314 |
+
#: ../inc/fields/file.php:81
|
315 |
+
msgctxt "file upload"
|
316 |
+
msgid "+ Add new file"
|
317 |
+
msgstr "+ Thêm file mới"
|
318 |
+
|
319 |
+
#: ../inc/fields/image-advanced.php:22
|
320 |
+
msgid "Select Images"
|
321 |
+
msgstr "Chọn hình ảnh"
|
322 |
+
|
323 |
+
#: ../inc/fields/image-advanced.php:71
|
324 |
+
msgctxt "image upload"
|
325 |
+
msgid "Select or Upload Images"
|
326 |
+
msgstr "Chọn hoặc tải file"
|
327 |
+
|
328 |
+
#: ../inc/fields/image-advanced.php:107 ../inc/fields/image.php:144
|
329 |
+
msgctxt "image upload"
|
330 |
+
msgid "Delete"
|
331 |
+
msgstr "Xóa"
|
332 |
+
|
333 |
+
#: ../inc/fields/image-advanced.php:108 ../inc/fields/image.php:145
|
334 |
+
msgctxt "image upload"
|
335 |
+
msgid "Edit"
|
336 |
+
msgstr "Sửa"
|
337 |
+
|
338 |
+
#: ../inc/fields/image.php:64
|
339 |
+
msgid "Order saved"
|
340 |
+
msgstr "Đã lưu thứ tự"
|
341 |
+
|
342 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
343 |
+
msgctxt "image upload"
|
344 |
+
msgid "Upload Images"
|
345 |
+
msgstr "Tải file"
|
346 |
+
|
347 |
+
#: ../inc/fields/image.php:79
|
348 |
+
msgctxt "image upload"
|
349 |
+
msgid "+ Add new image"
|
350 |
+
msgstr "+ Thêm hình mới"
|
351 |
+
|
352 |
+
#: ../inc/fields/map.php:48
|
353 |
+
msgid "Find Address"
|
354 |
+
msgstr "Tìm địa chỉ"
|
355 |
+
|
356 |
+
#: ../inc/fields/plupload-image.php:104
|
357 |
+
msgctxt "image upload"
|
358 |
+
msgid "Drop images here"
|
359 |
+
msgstr "Kéo thả hình ảnh vào đây"
|
360 |
+
|
361 |
+
#: ../inc/fields/plupload-image.php:105
|
362 |
+
msgctxt "image upload"
|
363 |
+
msgid "or"
|
364 |
+
msgstr "hoặc"
|
365 |
+
|
366 |
+
#: ../inc/fields/plupload-image.php:106
|
367 |
+
msgctxt "image upload"
|
368 |
+
msgid "Select Files"
|
369 |
+
msgstr "Chọn file"
|
370 |
+
|
371 |
+
#: ../inc/fields/plupload-image.php:181
|
372 |
+
msgctxt "image upload"
|
373 |
+
msgid "Allowed Image Files"
|
374 |
+
msgstr "Các file hình ảnh được cho phép"
|
375 |
+
|
376 |
+
#: ../inc/fields/post.php:54
|
377 |
+
msgid "Post"
|
378 |
+
msgstr "Bài viết"
|
379 |
+
|
380 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
381 |
+
#, php-format
|
382 |
+
msgid "Select a %s"
|
383 |
+
msgstr "Chọn %s"
|
384 |
+
|
385 |
+
#: ../inc/fields/select-advanced.php:71
|
386 |
+
msgid "Select a value"
|
387 |
+
msgstr "Chọn một màu"
|
388 |
+
|
389 |
+
#~ msgctxt "file upload"
|
390 |
+
#~ msgid "Uploaded files"
|
391 |
+
#~ msgstr "Các file đã tải lên"
|
392 |
+
|
393 |
+
#~ msgctxt "file upload"
|
394 |
+
#~ msgid "Delete this file"
|
395 |
+
#~ msgstr "Xóa file"
|
396 |
+
|
397 |
+
#~ msgctxt "image upload"
|
398 |
+
#~ msgid "Uploaded files"
|
399 |
+
#~ msgstr "Các file đã tải lên"
|
400 |
+
|
401 |
+
#~ msgctxt "image upload"
|
402 |
+
#~ msgid "Delete this file"
|
403 |
+
#~ msgstr "Xóa file"
|
404 |
+
|
405 |
+
#~ msgctxt "image upload"
|
406 |
+
#~ msgid "Upload files"
|
407 |
+
#~ msgstr "Tải file"
|
408 |
+
|
409 |
+
#~ msgctxt "image upload"
|
410 |
+
#~ msgid "Add another file"
|
411 |
+
#~ msgstr "Thêm file mới"
|
inc/meta-box/lang/zh_CN.mo
ADDED
Binary file
|
inc/meta-box/lang/zh_CN.po
ADDED
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Meta Box Script For WordPress\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-06-03 22:19+0700\n"
|
6 |
+
"PO-Revision-Date: 2013-11-25 12:07+0800\n"
|
7 |
+
"Last-Translator: Amos Lee <iwillhappy1314@gmail.com>\n"
|
8 |
+
"Language-Team: Rilwis <rilwis@gmail.com>\n"
|
9 |
+
"Language: en_EN\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e;_x:2c,1;_n:1,2;_n_noop:1,2;_nx:1,2;"
|
14 |
+
"_nx_noop:1,2\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"X-Generator: Poedit 1.5.7\n"
|
18 |
+
"X-Poedit-SearchPath-0: ..\n"
|
19 |
+
"X-Poedit-SearchPath-1: ../inc/fields\n"
|
20 |
+
|
21 |
+
#: ../demo/all-custom-post-types.php:20
|
22 |
+
msgid "Personal Information"
|
23 |
+
msgstr "个人信息"
|
24 |
+
|
25 |
+
#: ../demo/all-custom-post-types.php:25
|
26 |
+
msgid "Full name"
|
27 |
+
msgstr "全名"
|
28 |
+
|
29 |
+
#: ../demo/better-include.php:16 ../demo/include-by-ID-or-page-template.php:8
|
30 |
+
msgid "Meta Box Title"
|
31 |
+
msgstr "元数据盒子标题"
|
32 |
+
|
33 |
+
#: ../demo/better-include.php:19 ../demo/include-by-ID-or-page-template.php:14
|
34 |
+
msgid "Your images"
|
35 |
+
msgstr "你的图片"
|
36 |
+
|
37 |
+
#: ../demo/date-time-js-options.php:11
|
38 |
+
msgid "Date Time Picker With JS Options"
|
39 |
+
msgstr "日期时间选择"
|
40 |
+
|
41 |
+
#: ../demo/date-time-js-options.php:15
|
42 |
+
msgid "Date"
|
43 |
+
msgstr "日期"
|
44 |
+
|
45 |
+
#: ../demo/date-time-js-options.php:21 ../demo/demo.php:177
|
46 |
+
msgid "(yyyy-mm-dd)"
|
47 |
+
msgstr "(yyyy-mm-dd)"
|
48 |
+
|
49 |
+
#: ../demo/date-time-js-options.php:23
|
50 |
+
msgid "Select Date"
|
51 |
+
msgstr "选择日期"
|
52 |
+
|
53 |
+
#: ../demo/date-time-js-options.php:24 ../demo/demo.php:178
|
54 |
+
msgid "yy-mm-dd"
|
55 |
+
msgstr "yy-mm-dd"
|
56 |
+
|
57 |
+
#: ../demo/date-time-js-options.php:30
|
58 |
+
msgid "Datetime"
|
59 |
+
msgstr "日期时间"
|
60 |
+
|
61 |
+
#: ../demo/date-time-js-options.php:41
|
62 |
+
msgid "Time"
|
63 |
+
msgstr "时间"
|
64 |
+
|
65 |
+
#: ../demo/demo.php:34
|
66 |
+
msgid "Standard Fields"
|
67 |
+
msgstr "标准字段"
|
68 |
+
|
69 |
+
#: ../demo/demo.php:53
|
70 |
+
msgid "Text"
|
71 |
+
msgstr "文本"
|
72 |
+
|
73 |
+
#: ../demo/demo.php:57
|
74 |
+
msgid "Text description"
|
75 |
+
msgstr "文本描述"
|
76 |
+
|
77 |
+
#: ../demo/demo.php:60
|
78 |
+
msgid "Default text value"
|
79 |
+
msgstr "默认文本值"
|
80 |
+
|
81 |
+
#: ../demo/demo.php:66
|
82 |
+
msgid "Checkbox"
|
83 |
+
msgstr "多选"
|
84 |
+
|
85 |
+
#: ../demo/demo.php:74
|
86 |
+
msgid "Radio"
|
87 |
+
msgstr "单选"
|
88 |
+
|
89 |
+
#: ../demo/demo.php:80 ../demo/demo.php:91 ../demo/demo.php:226
|
90 |
+
msgid "Label1"
|
91 |
+
msgstr "标签1"
|
92 |
+
|
93 |
+
#: ../demo/demo.php:81 ../demo/demo.php:92 ../demo/demo.php:227
|
94 |
+
msgid "Label2"
|
95 |
+
msgstr "标签1"
|
96 |
+
|
97 |
+
#: ../demo/demo.php:86
|
98 |
+
msgid "Select"
|
99 |
+
msgstr "选择"
|
100 |
+
|
101 |
+
#: ../demo/demo.php:96
|
102 |
+
msgid "Select an Item"
|
103 |
+
msgstr "选择一项"
|
104 |
+
|
105 |
+
#: ../demo/demo.php:103
|
106 |
+
msgid "Hidden value"
|
107 |
+
msgstr "隐藏值"
|
108 |
+
|
109 |
+
#: ../demo/demo.php:107
|
110 |
+
msgid "Password"
|
111 |
+
msgstr "米秒"
|
112 |
+
|
113 |
+
#: ../demo/demo.php:113
|
114 |
+
msgid "Textarea"
|
115 |
+
msgstr "文本段落"
|
116 |
+
|
117 |
+
#: ../demo/demo.php:114
|
118 |
+
msgid "Textarea description"
|
119 |
+
msgstr "段落描述"
|
120 |
+
|
121 |
+
#: ../demo/demo.php:131
|
122 |
+
msgid "Password is required"
|
123 |
+
msgstr "密码为必填项"
|
124 |
+
|
125 |
+
#: ../demo/demo.php:132
|
126 |
+
msgid "Password must be at least 7 characters"
|
127 |
+
msgstr "密码至少为7个字符"
|
128 |
+
|
129 |
+
#: ../demo/demo.php:140
|
130 |
+
msgid "Advanced Fields"
|
131 |
+
msgstr "高级字段"
|
132 |
+
|
133 |
+
#: ../demo/demo.php:145
|
134 |
+
msgid "Slider"
|
135 |
+
msgstr "滑块"
|
136 |
+
|
137 |
+
#: ../demo/demo.php:150
|
138 |
+
msgid "$"
|
139 |
+
msgstr "$"
|
140 |
+
|
141 |
+
#: ../demo/demo.php:151
|
142 |
+
msgid " USD"
|
143 |
+
msgstr "USD"
|
144 |
+
|
145 |
+
#: ../demo/demo.php:162
|
146 |
+
msgid "Number"
|
147 |
+
msgstr "数字"
|
148 |
+
|
149 |
+
#: ../demo/demo.php:171
|
150 |
+
msgid "Date picker"
|
151 |
+
msgstr "日期选择器"
|
152 |
+
|
153 |
+
#: ../demo/demo.php:186
|
154 |
+
msgid "Datetime picker"
|
155 |
+
msgstr "日期时间选择器"
|
156 |
+
|
157 |
+
#: ../demo/demo.php:200
|
158 |
+
msgid "Time picker"
|
159 |
+
msgstr "时间选择器"
|
160 |
+
|
161 |
+
#: ../demo/demo.php:215
|
162 |
+
msgid "Color picker"
|
163 |
+
msgstr "颜色选择器"
|
164 |
+
|
165 |
+
#: ../demo/demo.php:221
|
166 |
+
msgid "Checkbox list"
|
167 |
+
msgstr "选择列表"
|
168 |
+
|
169 |
+
#: ../demo/demo.php:232
|
170 |
+
msgid "Email"
|
171 |
+
msgstr "邮件"
|
172 |
+
|
173 |
+
#: ../demo/demo.php:234
|
174 |
+
msgid "Email description"
|
175 |
+
msgstr "邮件描述"
|
176 |
+
|
177 |
+
#: ../demo/demo.php:240
|
178 |
+
msgid "Range"
|
179 |
+
msgstr "区间"
|
180 |
+
|
181 |
+
#: ../demo/demo.php:242
|
182 |
+
msgid "Range description"
|
183 |
+
msgstr "区间描述"
|
184 |
+
|
185 |
+
#: ../demo/demo.php:251
|
186 |
+
msgid "URL"
|
187 |
+
msgstr "URL"
|
188 |
+
|
189 |
+
#: ../demo/demo.php:253
|
190 |
+
msgid "URL description"
|
191 |
+
msgstr "URL描述"
|
192 |
+
|
193 |
+
#: ../demo/demo.php:259
|
194 |
+
msgid "oEmbed"
|
195 |
+
msgstr "oEmbed嵌入"
|
196 |
+
|
197 |
+
#: ../demo/demo.php:261
|
198 |
+
msgid "oEmbed description"
|
199 |
+
msgstr "oEmbed嵌入描述"
|
200 |
+
|
201 |
+
#: ../demo/demo.php:266
|
202 |
+
msgid "Taxonomy"
|
203 |
+
msgstr "分类法"
|
204 |
+
|
205 |
+
#: ../demo/demo.php:280
|
206 |
+
msgid "Posts (Pages)"
|
207 |
+
msgstr "文章(页面)"
|
208 |
+
|
209 |
+
#: ../demo/demo.php:296
|
210 |
+
msgid "WYSIWYG / Rich Text Editor"
|
211 |
+
msgstr "可视化编辑器"
|
212 |
+
|
213 |
+
#: ../demo/demo.php:301
|
214 |
+
msgid "WYSIWYG default value"
|
215 |
+
msgstr "可视化编辑器默认值"
|
216 |
+
|
217 |
+
#: ../demo/demo.php:312 ../demo/force-delete.php:15
|
218 |
+
msgid "File Upload"
|
219 |
+
msgstr "文件上传"
|
220 |
+
|
221 |
+
#: ../demo/demo.php:318
|
222 |
+
msgid "File Advanced Upload"
|
223 |
+
msgstr "高级文件上传"
|
224 |
+
|
225 |
+
#: ../demo/demo.php:326 ../demo/force-delete.php:22
|
226 |
+
msgid "Image Upload"
|
227 |
+
msgstr "图片上选"
|
228 |
+
|
229 |
+
#: ../demo/demo.php:332 ../demo/force-delete.php:28
|
230 |
+
msgid "Thickbox Image Upload"
|
231 |
+
msgstr "默认上传"
|
232 |
+
|
233 |
+
#: ../demo/demo.php:338 ../demo/force-delete.php:35
|
234 |
+
msgid "Plupload Image Upload"
|
235 |
+
msgstr "拖拽上传"
|
236 |
+
|
237 |
+
#: ../demo/demo.php:345
|
238 |
+
msgid "Image Advanced Upload"
|
239 |
+
msgstr "图片高级上传"
|
240 |
+
|
241 |
+
#: ../demo/force-delete.php:11
|
242 |
+
msgid "Test Meta Box"
|
243 |
+
msgstr "测试元数据盒子"
|
244 |
+
|
245 |
+
#: ../demo/map.php:9
|
246 |
+
msgid "Google Map"
|
247 |
+
msgstr "谷歌地图"
|
248 |
+
|
249 |
+
#: ../demo/map.php:13
|
250 |
+
msgid "Address"
|
251 |
+
msgstr "地址"
|
252 |
+
|
253 |
+
#: ../demo/map.php:15
|
254 |
+
msgid "Hanoi, Vietnam"
|
255 |
+
msgstr "河南,郑州"
|
256 |
+
|
257 |
+
#: ../demo/map.php:19
|
258 |
+
msgid "Location"
|
259 |
+
msgstr "位置"
|
260 |
+
|
261 |
+
#: ../inc/classes/meta-box.php:220
|
262 |
+
msgid "Please correct the errors highlighted below and try again."
|
263 |
+
msgstr "请检查并修正高亮错误处,然后重试 。"
|
264 |
+
|
265 |
+
#: ../inc/classes/meta-box.php:394
|
266 |
+
msgid "+"
|
267 |
+
msgstr "+"
|
268 |
+
|
269 |
+
#: ../inc/classes/meta-box.php:416
|
270 |
+
msgid "–"
|
271 |
+
msgstr "–"
|
272 |
+
|
273 |
+
#: ../inc/fields/file-advanced.php:23
|
274 |
+
#, php-format
|
275 |
+
msgid "You may only upload maximum %d file"
|
276 |
+
msgstr "最多能上传%d 个文件"
|
277 |
+
|
278 |
+
#: ../inc/fields/file-advanced.php:24
|
279 |
+
#, php-format
|
280 |
+
msgid "You may only upload maximum %d files"
|
281 |
+
msgstr "最多能上传%d 个文件"
|
282 |
+
|
283 |
+
#: ../inc/fields/file-advanced.php:25
|
284 |
+
msgid "Select Files"
|
285 |
+
msgstr "选择文件"
|
286 |
+
|
287 |
+
#: ../inc/fields/file-advanced.php:68
|
288 |
+
msgctxt "file upload"
|
289 |
+
msgid "Select or Upload Files"
|
290 |
+
msgstr "选择或上传文件"
|
291 |
+
|
292 |
+
#: ../inc/fields/file-advanced.php:104 ../inc/fields/file.php:133
|
293 |
+
msgctxt "file upload"
|
294 |
+
msgid "Delete"
|
295 |
+
msgstr "删除【上传文件】"
|
296 |
+
|
297 |
+
#: ../inc/fields/file-advanced.php:105 ../inc/fields/file.php:134
|
298 |
+
msgctxt "file upload"
|
299 |
+
msgid "Edit"
|
300 |
+
msgstr "编辑【上传文件】"
|
301 |
+
|
302 |
+
#: ../inc/fields/file.php:66
|
303 |
+
msgid "Error: Cannot delete file"
|
304 |
+
msgstr "错误:不能删除文件"
|
305 |
+
|
306 |
+
#: ../inc/fields/file.php:80
|
307 |
+
msgctxt "file upload"
|
308 |
+
msgid "Upload Files"
|
309 |
+
msgstr "上传文件"
|
310 |
+
|
311 |
+
#: ../inc/fields/file.php:81
|
312 |
+
msgctxt "file upload"
|
313 |
+
msgid "+ Add new file"
|
314 |
+
msgstr "+ 添加新文件"
|
315 |
+
|
316 |
+
#: ../inc/fields/image-advanced.php:22
|
317 |
+
msgid "Select Images"
|
318 |
+
msgstr "选择图片"
|
319 |
+
|
320 |
+
#: ../inc/fields/image-advanced.php:71
|
321 |
+
msgctxt "image upload"
|
322 |
+
msgid "Select or Upload Images"
|
323 |
+
msgstr "选择或上传图片"
|
324 |
+
|
325 |
+
#: ../inc/fields/image-advanced.php:107 ../inc/fields/image.php:144
|
326 |
+
msgctxt "image upload"
|
327 |
+
msgid "Delete"
|
328 |
+
msgstr "删除"
|
329 |
+
|
330 |
+
#: ../inc/fields/image-advanced.php:108 ../inc/fields/image.php:145
|
331 |
+
msgctxt "image upload"
|
332 |
+
msgid "Edit"
|
333 |
+
msgstr "编辑"
|
334 |
+
|
335 |
+
#: ../inc/fields/image.php:64
|
336 |
+
msgid "Order saved"
|
337 |
+
msgstr "排序已保存"
|
338 |
+
|
339 |
+
#: ../inc/fields/image.php:78 ../inc/fields/thickbox-image.php:35
|
340 |
+
msgctxt "image upload"
|
341 |
+
msgid "Upload Images"
|
342 |
+
msgstr "上传图像"
|
343 |
+
|
344 |
+
#: ../inc/fields/image.php:79
|
345 |
+
msgctxt "image upload"
|
346 |
+
msgid "+ Add new image"
|
347 |
+
msgstr "+ 添加新图像"
|
348 |
+
|
349 |
+
#: ../inc/fields/map.php:48
|
350 |
+
msgid "Find Address"
|
351 |
+
msgstr "查找地址"
|
352 |
+
|
353 |
+
#: ../inc/fields/plupload-image.php:104
|
354 |
+
msgctxt "image upload"
|
355 |
+
msgid "Drop images here"
|
356 |
+
msgstr "拖放图像到这里"
|
357 |
+
|
358 |
+
#: ../inc/fields/plupload-image.php:105
|
359 |
+
msgctxt "image upload"
|
360 |
+
msgid "or"
|
361 |
+
msgstr "或"
|
362 |
+
|
363 |
+
#: ../inc/fields/plupload-image.php:106
|
364 |
+
msgctxt "image upload"
|
365 |
+
msgid "Select Files"
|
366 |
+
msgstr "选择文件"
|
367 |
+
|
368 |
+
#: ../inc/fields/plupload-image.php:181
|
369 |
+
msgctxt "image upload"
|
370 |
+
msgid "Allowed Image Files"
|
371 |
+
msgstr "选择图像文件"
|
372 |
+
|
373 |
+
#: ../inc/fields/post.php:54
|
374 |
+
msgid "Post"
|
375 |
+
msgstr "文章"
|
376 |
+
|
377 |
+
#: ../inc/fields/post.php:68 ../inc/fields/taxonomy.php:40
|
378 |
+
#, php-format
|
379 |
+
msgid "Select a %s"
|
380 |
+
msgstr "选择%s"
|
381 |
+
|
382 |
+
#: ../inc/fields/select-advanced.php:71
|
383 |
+
msgid "Select a value"
|
384 |
+
msgstr "选择值"
|
inc/meta-box/meta-box.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Meta Box
|
4 |
+
Plugin URI: http://www.deluxeblogtips.com/meta-box
|
5 |
+
Description: Create meta box for editing pages in WordPress. Compatible with custom post types since WP 3.0
|
6 |
+
Version: 4.3.11
|
7 |
+
Author: Rilwis
|
8 |
+
Author URI: http://www.deluxeblogtips.com
|
9 |
+
License: GPL2+
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Prevent loading this file directly
|
13 |
+
defined( 'ABSPATH' ) || exit;
|
14 |
+
|
15 |
+
// Script version, used to add version for scripts and styles
|
16 |
+
define( 'TX_RWMB_VER', '4.3.11' );
|
17 |
+
|
18 |
+
// Define plugin URLs, for fast enqueuing scripts and styles
|
19 |
+
if ( ! defined( 'RWMB_URL' ) )
|
20 |
+
define( 'RWMB_URL', plugin_dir_url( __FILE__ ) );
|
21 |
+
define( 'TX_RWMB_JS_URL', trailingslashit( RWMB_URL . 'js' ) );
|
22 |
+
define( 'TX_RWMB_CSS_URL', trailingslashit( RWMB_URL . 'css' ) );
|
23 |
+
// Plugin paths, for including files
|
24 |
+
if ( ! defined( 'RWMB_DIR' ) )
|
25 |
+
define( 'RWMB_DIR', plugin_dir_path( __FILE__ ) );
|
26 |
+
define( 'TX_RWMB_INC_DIR', trailingslashit( RWMB_DIR . 'inc' ) );
|
27 |
+
define( 'TX_RWMB_FIELDS_DIR', trailingslashit( TX_RWMB_INC_DIR . 'fields' ) );
|
28 |
+
|
29 |
+
// Optimize code for loading plugin files ONLY on admin side
|
30 |
+
// @see http://www.deluxeblogtips.com/?p=345
|
31 |
+
|
32 |
+
// Helper function to retrieve meta value
|
33 |
+
require_once TX_RWMB_INC_DIR . 'helpers.php';
|
34 |
+
|
35 |
+
if ( is_admin() )
|
36 |
+
{
|
37 |
+
require_once TX_RWMB_INC_DIR . 'common.php';
|
38 |
+
require_once TX_RWMB_INC_DIR . 'field.php';
|
39 |
+
|
40 |
+
// Field classes
|
41 |
+
foreach ( glob( TX_RWMB_FIELDS_DIR . '*.php' ) as $file )
|
42 |
+
{
|
43 |
+
require_once $file;
|
44 |
+
}
|
45 |
+
|
46 |
+
// Main file
|
47 |
+
require_once TX_RWMB_INC_DIR . 'meta-box.php';
|
48 |
+
require_once TX_RWMB_INC_DIR . 'init.php';
|
49 |
+
}
|
inc/meta-box/readme.txt
ADDED
@@ -0,0 +1,372 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Meta Box ===
|
2 |
+
Contributors: rilwis, franz-josef-kaiser, Omnicia, funkedgeek, PerWiklander, ruanmer
|
3 |
+
Donate link: http://www.deluxeblogtips.com/donate
|
4 |
+
Tags: meta-box, custom-fields, custom-field, meta, meta-boxes
|
5 |
+
Requires at least: 3.5
|
6 |
+
Tested up to: 4.0.1
|
7 |
+
Stable tag: 4.4.1
|
8 |
+
License: GPLv2 or later
|
9 |
+
|
10 |
+
Meta Box plugin is a complete tool to create meta box and custom fields in WordPress: lightweight, powerful and easy-to-use.
|
11 |
+
|
12 |
+
== Description ==
|
13 |
+
|
14 |
+
Meta Box plugin provides powerful API to implement custom meta boxes and custom fields in editing pages (add new/edit post) in WordPress. It works with any custom post type and supports lots of field types.
|
15 |
+
|
16 |
+
### Features
|
17 |
+
|
18 |
+
* Easily register multiple custom meta boxes for posts, pages or custom post types
|
19 |
+
* Supports a lot of [field types](http://metabox.io/docs/define-fields/)
|
20 |
+
* Has built-in hooks which allow you to change the appearance and behavior of meta boxes
|
21 |
+
* Easily integrate with themes
|
22 |
+
|
23 |
+
### Documentation
|
24 |
+
|
25 |
+
- [Getting Started](http://metabox.io/docs/getting-started/)
|
26 |
+
- [Register Meta Boxes](http://metabox.io/docs/registering-meta-boxes/)
|
27 |
+
- [Define Fields](http://metabox.io/docs/define-fields/)
|
28 |
+
- [Get Meta Value](http://metabox.io/docs/get-meta-value/)
|
29 |
+
|
30 |
+
See more documentation [here](http://metabox.io/docs/).
|
31 |
+
|
32 |
+
### Premium Extensions
|
33 |
+
|
34 |
+
- [Meta Box Template](http://metabox.io/plugins/meta-box-template/): Define custom meta boxes and custom fields easier with templates.
|
35 |
+
- [Meta Box Tooltip](http://metabox.io/plugins/meta-box-tooltip/): Display help information for fields using beautiful tooltips.
|
36 |
+
- [Meta Box Show Hide (Javascript)](http://metabox.io/plugins/meta-box-show-hide-javascript/): Toggle meta boxes by page template, post format, taxonomy (including category) via Javascript.
|
37 |
+
- [Meta Box Tabs](http://metabox.io/plugins/meta-box-tabs/): Create tabs for meta boxes easily. Support 3 WordPress-native tab styles and tab icon.
|
38 |
+
- [Meta Box Columns](http://metabox.io/plugins/meta-box-columns/): Display fields more beautiful by putting them into 12-columns grid.
|
39 |
+
- [Meta Box Include Exclude](http://metabox.io/plugins/meta-box-include-exclude/): Show/hide meta boxes by ID, page template, taxonomy or custom function.
|
40 |
+
|
41 |
+
See all premium extensions [here](http://metabox.io/plugins/).
|
42 |
+
|
43 |
+
### Plugin Links
|
44 |
+
|
45 |
+
- [Project Page](http://metabox.io/meta-box/)
|
46 |
+
- [Documentation](http://metabox.io/docs/)
|
47 |
+
- [Report Bugs/Issues](https://github.com/rilwis/meta-box/issues)
|
48 |
+
- [Premium Extensions](http://metabox.io)
|
49 |
+
|
50 |
+
== Installation ==
|
51 |
+
|
52 |
+
1. Unzip the download package
|
53 |
+
1. Upload `meta-box` to the `/wp-content/plugins/` directory
|
54 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress
|
55 |
+
|
56 |
+
To getting started with the plugin API, please read [this tutorial](http://metabox.io/docs/getting-started/).
|
57 |
+
|
58 |
+
== Frequently Asked Questions ==
|
59 |
+
|
60 |
+
== Screenshots ==
|
61 |
+
1. Supported fields
|
62 |
+
|
63 |
+
== Changelog ==
|
64 |
+
|
65 |
+
= 4.4.1 =
|
66 |
+
* Fix: wrong text domain
|
67 |
+
* Fix: `select_advanced` field not cloning
|
68 |
+
* Fix: cloned emails are not saved
|
69 |
+
* Improvement: Use `post_types` instead of `pages`, accept string for single post type as well. Fallback to `pages` for previous versions.
|
70 |
+
|
71 |
+
= 4.4.0 =
|
72 |
+
* New: 'autocomplete' field.
|
73 |
+
* Improvement: field id is now optional (heading, divider)
|
74 |
+
* Improvement: heading now supports 'description'
|
75 |
+
* Improvement: update select2 library to version 3.5.2
|
76 |
+
* Improvement: coding standards
|
77 |
+
|
78 |
+
= 4.3.11 =
|
79 |
+
* Bug fix: use field id instead of field_name for wysiwyg field
|
80 |
+
* Improvement: allow to sort files
|
81 |
+
* Improvement: use 'meta-box' text domain instead of 'rwmb'
|
82 |
+
* Improvement: coding standards
|
83 |
+
|
84 |
+
= 4.3.10 =
|
85 |
+
* Bug fix: upload & reorder for image fields
|
86 |
+
* Bug fix: not saving meta caused by page template issue
|
87 |
+
* Bug fix: filter names for helper and shortcode callback functions
|
88 |
+
* Bug fix: loads correct locale JS files for jQueryUI date/time picker
|
89 |
+
|
90 |
+
= 4.3.9 =
|
91 |
+
* Bug fix: `text-list` field type
|
92 |
+
* Improvement: better coding styles
|
93 |
+
* Improvement: wysiwyg field is now clonable
|
94 |
+
* Improvement: launch geolocation autocomplete when address field is cloned
|
95 |
+
* Improvement: better cloning for radio, checkbox
|
96 |
+
* Improvement: add more hooks
|
97 |
+
* Improvement: allow child fields to add their own add/remove clone buttons.
|
98 |
+
* Improvement: remove 'clone-group'. Too complicated and not user-friendly.
|
99 |
+
|
100 |
+
= 4.3.8 =
|
101 |
+
* Bug fix: compatibility with PHP 5.2
|
102 |
+
|
103 |
+
= 4.3.7 =
|
104 |
+
* Bug fix: use WP_Query instead of `query_posts` to be compatible with WPML
|
105 |
+
* Bug fix: `get_called_class` function in PHP < 5.3
|
106 |
+
* Bug fix: clone now works for `slider` field
|
107 |
+
* Bug fix: fix cloning URL field
|
108 |
+
* Bug fix: hidden drop area if no max_file_uploads defined
|
109 |
+
* Improvement: added composer.json
|
110 |
+
* Improvement: add Chinese language
|
111 |
+
* Improvement: better check for duplication when save post
|
112 |
+
* Improvement: new `image_select` file, which is "radio image", e.g. select a radio value by selecting image
|
113 |
+
* Improvement: new `file_input` field, which allows to upload files or enter file URL
|
114 |
+
* Improvement: separate core code for meta box and fields
|
115 |
+
* Improvement: allow to add more map options in helper function
|
116 |
+
* Improvement: allow to pass more arguments to "get_terms" function when getting meta value with "rwmb_meta"
|
117 |
+
|
118 |
+
= 4.3.6 =
|
119 |
+
* Bug fix: fatal error in PHP 5.2 (continue)
|
120 |
+
* Improvement: allow register meta boxes via filter
|
121 |
+
|
122 |
+
= 4.3.5 =
|
123 |
+
* Bug fix: fatal error in PHP 5.2
|
124 |
+
* Bug fix: save empty values of clonable fields
|
125 |
+
|
126 |
+
= 4.3.4 =
|
127 |
+
* Bug fix: not show upload button after delete image when reach max_file_upload. #347
|
128 |
+
* Bug fix: autocomplete for map which conflicts with tags (terms) autocomplete
|
129 |
+
* Bug fix: random image order when reorder
|
130 |
+
* Bug fix: undefined index, notices in WordPress 3.6, notice error for oembed field
|
131 |
+
* Improvement: add default location for map field (via `std` param as usual)
|
132 |
+
* Improvement: add `placeholder` for text fields (url, email, etc.)
|
133 |
+
* Improvement: add `multiple` param for helper function to get value of multiple fields
|
134 |
+
* Improvement: `width` & `height` for map in helper function now requires units (allow to set %)
|
135 |
+
* Drop support for WordPress 3.3 (wysiwyg) and < 3.5 (for file & image field which uses new json functions)
|
136 |
+
|
137 |
+
= 4.3.3 =
|
138 |
+
* Bug fix: cannot clear all terms in taxonomy field
|
139 |
+
* Bug fix: potential problem with autosave
|
140 |
+
* Bug fix: cannot save zero string value "0"
|
141 |
+
* Improvement: add Turkish language
|
142 |
+
* Improvement: add taxonomy_advanced field, which saves term IDs as comma separated value in custom field
|
143 |
+
|
144 |
+
= 4.3.2 =
|
145 |
+
* Bug fix: allow to have more than 1 map on a page
|
146 |
+
* Bug fix: use HTTPS for Google Maps to work both in HTTP & HTTPS
|
147 |
+
* Bug fix: allow to clear all terms in taxonomy field
|
148 |
+
* Bug fix: "std" value for select fields is no longer "placeholder"
|
149 |
+
* Improvement: add "placeholder" param for select fields
|
150 |
+
* Improvement: add to helper function ability to show Google Maps in the front end. Check documentation for usage.
|
151 |
+
* Improvement: add spaces between radio inputs
|
152 |
+
* Improvement: add more params to "rwmb_meta" filter
|
153 |
+
* Improvement: using CSS animation for delete image
|
154 |
+
|
155 |
+
= 4.3.1 =
|
156 |
+
* Bug fix: fatal error if ASP open tag is allowed in php.ini
|
157 |
+
|
158 |
+
= 4.3 =
|
159 |
+
* Bug fix: show full size image after upload if thumbnail is not available
|
160 |
+
* Bug fix: new added file not shown
|
161 |
+
* Bug fix: issue with color field disappearing
|
162 |
+
* Bug fix: `max_file_upload` now works for normal `file` & `image` as well
|
163 |
+
* Bug fix: problem with uploading with the advanced fields
|
164 |
+
* Bug fix: file & image advanced not saving
|
165 |
+
* Bug fix: `select_advanced` cloning issue
|
166 |
+
* Bug fix: `plupload_image` ordering
|
167 |
+
* Improvement: add `divider`, `heading`, `button`, `range`, `oembed`, `email`, `post` fields
|
168 |
+
* Improvement: translation for file & image fields
|
169 |
+
* Improvement: add option `default_hidden` to hide meta box by default
|
170 |
+
* Improvement: allow to have multiple maps on the same page
|
171 |
+
* Improvement: file and image advanced now use Underscore.js
|
172 |
+
* Improvement: `slider` filed now has `prefix` and `suffix` for text labels and `js_options` for more JS options
|
173 |
+
* Improvement: WYSIWYS can bypass the `wpautop` using `raw` parameter
|
174 |
+
* Improvement: `color` field now supports new color picker in WP 3.5
|
175 |
+
* Improvement: add `ID` to results returned by `rwmb_meta` when getting meta value of file & image
|
176 |
+
* Improvement: auto use localized version for date & time fields
|
177 |
+
* Improvement: add `timestamp` option to save the datetime as unix timestamp internally
|
178 |
+
* Improvement: add `autosave` option for meta box
|
179 |
+
* Improvement: add `force_delete` option for file and image field
|
180 |
+
* And lots of changes and improvements
|
181 |
+
|
182 |
+
|
183 |
+
= 4.2.4 =
|
184 |
+
* Bug fix: path to Select2 JS and CSS. [Link](http://wordpress.org/support/topic/missing-files-5)
|
185 |
+
* Bug fix: `taxonomy.js` loading
|
186 |
+
* Bug fix: saving in quick mode edit
|
187 |
+
* Improvement: add `before` and `after` attributes to fields that can be used to display custom text
|
188 |
+
* Improvement: add Arabic and Spanish languages
|
189 |
+
* Improvement: add `rwmb*_before_save_post` and `rwmb*_before_save_post` actions before and after save post
|
190 |
+
* Improvement: add autocomplete for geo location in `map` field, add fancy animation to drop marker
|
191 |
+
* Improvemnet: add `url` field
|
192 |
+
|
193 |
+
|
194 |
+
= 4.2.3 =
|
195 |
+
* Bug fix: clone date field. [Link](http://www.deluxeblogtips.com/forums/viewtopic.php?id=299)
|
196 |
+
|
197 |
+
= 4.2.2 =
|
198 |
+
* Bug fix: `time` field doesn't work. [Link](http://wordpress.org/support/topic/time-field-js-wont-run-without-datetime)
|
199 |
+
* Bug fix: wrong JS call for `datetime`. [Link](http://wordpress.org/support/topic/421-datetime)
|
200 |
+
* Improvement: file and images now not deleted from library, *unless* use `force_delete` option
|
201 |
+
* Improvement: add `select_advanced` field, which uses [select2](http://ivaynberg.github.com/select2/) for better UX. Thanks @funkedgeek
|
202 |
+
|
203 |
+
= 4.2.1 =
|
204 |
+
* Bug fix: not save wysiwyg field in full screen mode. [Link](http://www.deluxeblogtips.com/forums/viewtopic.php?id=161)
|
205 |
+
* Bug fix: default value for select/checkbox_list. [Link](http://www.deluxeblogtips.com/forums/viewtopic.php?id=174)
|
206 |
+
* Bug fix: duplicated append test to `date` picker
|
207 |
+
* Bug fix: incorrect enqueue styles, issue #166
|
208 |
+
* Improvement: initial new field type `map`
|
209 |
+
|
210 |
+
= 4.2 =
|
211 |
+
* Bug fix: save only last element of `select` field with `multiple` values. [Link](http://wordpress.org/support/topic/plugin-meta-box-multiple-declaration-for-select-fields-no-longer-working?replies=5#post-3254534)
|
212 |
+
* Improvement: add `js_options` attribute for `date`, `datetime`, `time` fields to adjust jQuery date/datetime picker options. See `demo/demo.php` for usage
|
213 |
+
* Improvement: add `options` attribute for `wysiwyg`. You now can pass arguments same as for `wp_editor` function
|
214 |
+
* Improvement: clone feature now works with `checkbox_list` and `select` with `multiple` values
|
215 |
+
* Improvement: add `rwmb-{$field_type}-wrapper` class to field markup
|
216 |
+
* Improvement: Add [rwmb_meta meta_key="..."] shortcode. Attributes are the same as `rwmb_meta` function.
|
217 |
+
* Code refactored
|
218 |
+
|
219 |
+
= 4.1.11 =
|
220 |
+
* Bug fix: helper function for getting `taxonomy` field type
|
221 |
+
* Bug fix: `multiple` attribute for `select` field type
|
222 |
+
|
223 |
+
= 4.1.10 =
|
224 |
+
* Allow helper functions can be used in admin area
|
225 |
+
* Allow cloned fields to have a uniquely indexed `name` attribute
|
226 |
+
* Add Swedish translation
|
227 |
+
* Allow hidden field has its own value
|
228 |
+
* Taxonomy field now supported by `rwmb_meta` function
|
229 |
+
* Improvement in code format and field normalizing
|
230 |
+
|
231 |
+
= 4.1.9 =
|
232 |
+
* Add helper function to retrieve meta values
|
233 |
+
* Add basic validation (JS based)
|
234 |
+
* Fix image reorder bug
|
235 |
+
* Fix `select_tree` option for taxonomy field
|
236 |
+
* Fix not showing loading image for 1st image using plupload
|
237 |
+
|
238 |
+
= 4.1.8 =
|
239 |
+
* Add missed JS file for thickbox image
|
240 |
+
|
241 |
+
= 4.1.7 =
|
242 |
+
* Quick fix for thickbox image
|
243 |
+
|
244 |
+
= 4.1.6 =
|
245 |
+
* Quick fix for checkbox list and multiple/clonable fields
|
246 |
+
|
247 |
+
= 4.1.5 =
|
248 |
+
* Taxonomy field is now in core
|
249 |
+
* Add demo for including meta boxes for specific posts based on IDs or page templates
|
250 |
+
* Meta box ID is now optional
|
251 |
+
* Add `thickbox_image` field for uploading image with WP style
|
252 |
+
* Fix `guid` for uploaded images
|
253 |
+
|
254 |
+
= 4.1.4 =
|
255 |
+
* Fix taxonomy field
|
256 |
+
|
257 |
+
= 4.1.3 =
|
258 |
+
* Support max_file_uploads for plupload_image
|
259 |
+
* Better enqueue styles & scripts
|
260 |
+
* Store images in correct order after re-order
|
261 |
+
* Fix cloning color, date, time, datetime fields
|
262 |
+
|
263 |
+
= 4.1.2 =
|
264 |
+
* Improve taxonomy field
|
265 |
+
* Add filter to wp_editor
|
266 |
+
* Add more options for time field
|
267 |
+
* Improve plupload_image field
|
268 |
+
* Fix translation, use string for textdomain
|
269 |
+
|
270 |
+
= 4.1.1 =
|
271 |
+
* Fix translation
|
272 |
+
* Change jQueryUI theme to 'smoothness'
|
273 |
+
* Add more demos in the `demo` folder
|
274 |
+
|
275 |
+
= 4.1 =
|
276 |
+
* Added jQuery UI slider field
|
277 |
+
* Added new Plupload file uploader
|
278 |
+
* Added new checkbox list
|
279 |
+
* Fix empty jQuery UI div seen in FF in admin footer area
|
280 |
+
* Fix style for 'side' meta box
|
281 |
+
|
282 |
+
= 4.0.2 =
|
283 |
+
* Reformat code to make more readable
|
284 |
+
* Fix bugs of checkbox field and date field
|
285 |
+
|
286 |
+
= 4.0.1 =
|
287 |
+
* Change format_response() to ajax_response() and use WP_Ajax_Response class to control the ajax response
|
288 |
+
* Use wp_editor() built-in with WP 3.3 (with fallback)
|
289 |
+
|
290 |
+
= 4.0 =
|
291 |
+
* strongly refactor code
|
292 |
+
* create/check better nonce for each meta box
|
293 |
+
* use local JS/CSS libs instead of remote files for better control if conflict occurs
|
294 |
+
* separate field functions (enqueue scripts and styles, add actions, show, save) into separated classes
|
295 |
+
* use filters to let user change HTML of fields
|
296 |
+
* use filters to validate/change field values instead of validation class
|
297 |
+
* don't use Ajax on image upload as it's buggy and complicated. Revert to default upload
|
298 |
+
|
299 |
+
= 3.2.2 =
|
300 |
+
* fix WYSIWYG field for custom post type without 'editor' support. Thanks Jamie, Eugene and Selin Online. (http =//disq.us/2hzgsk)
|
301 |
+
* change some helper function to static as they're shared between objects
|
302 |
+
|
303 |
+
= 3.2.1 =
|
304 |
+
* fix code for getting script's url in Windows
|
305 |
+
* make meta box id is optional
|
306 |
+
|
307 |
+
= 3.2 =
|
308 |
+
* move js and css codes to separated files (rewrite js code for fields, too)
|
309 |
+
* allow to add multiple images to image meta field with selection, modified from "Fast Insert Image" plugin
|
310 |
+
* remove 'style' attibutes for fields as all CSS rules now can be put in the 'meta=box.css' file. All fields now has the class 'rw=$type', and table cells have class 'rwmb=label' and 'rwmb=field'
|
311 |
+
* allow to use file uploader for images as well, regarding http =//disq.us/1k2lwf
|
312 |
+
* when delete uploaded images, they're not deleted from the server (in case you insert them from the media, not the uploader). Also remove hook to delete all attachments when delete post. Regarding http =//disq.us/1nppyi
|
313 |
+
* change hook for adding meta box to 'add_meta_boxes', according Codex. Required WP 3.0+
|
314 |
+
* fix image uploading when custom post type doesn't support "editor"
|
315 |
+
* fix show many alerts when delete files, regarding http =//disq.us/1lolgb
|
316 |
+
* fix js comma missing bug when implement multiple fields with same type
|
317 |
+
* fix order of uploaded images, thank Onur
|
318 |
+
* fix deleting new uploaded image
|
319 |
+
* fix bug when save meta value = zero (0), regarding http =//disq.us/1tg008
|
320 |
+
* some minor changes such as = add 'id' attribute to fields, show uploaded images as thumbnail, add script to header of post.php and post=new.php only
|
321 |
+
|
322 |
+
= 3.1 =
|
323 |
+
* use thickbox for image uploading, allow user edit title, caption or crop, rotate image (credit to Stewart Duffy, idea from Jaace http =//disq.us/1bu64d)
|
324 |
+
* allow to reorder uploaded images (credit to Kai)
|
325 |
+
* save attach ID instead of url (credit to Stewart Duffy)
|
326 |
+
* escape fields value (credit to Stewart Duffy)
|
327 |
+
* add 'style' attribute to fields, allow user quick style fields (like height, width, etc.) (credit to Anders Larsson http =//disq.us/1eg4kp)
|
328 |
+
* wrap ajax callbacks into the class
|
329 |
+
* fix jquery UI conflict (for time picker, color picker, contextual help)
|
330 |
+
* fix notice error for checking post type
|
331 |
+
|
332 |
+
= 3.0.1 =
|
333 |
+
* save uploaded images and files' urls in meta fields
|
334 |
+
* fix date picker bug to not show saved value (http =//disq.us/1cg6mx)
|
335 |
+
* fix check_admin_referer for non=supported post types (http =//goo.gl/B6cah)
|
336 |
+
* refactor code for showing fields
|
337 |
+
|
338 |
+
= 3.0 =
|
339 |
+
* separate functions for checking, displaying and saving each type of field; allow developers easily extend the class
|
340 |
+
* add 'checkbox_list' (credit to Jan Fabry http =//goo.gl/9sDAx), 'color', 'date', 'time' types. The 'taxonomy' type is added as an example of extending class (credit to Manny Fresh http =//goo.gl/goGfm)
|
341 |
+
* show uploaded files as well as allow to add/delete attached files
|
342 |
+
* delete attached files when post is deleted (credit to Kai http =//goo.gl/9gfvd)
|
343 |
+
* validation function MUST return the value instead of true, false
|
344 |
+
* change the way of definition 'radio', 'select' field type to make it more simpler, allow multiple selection of select box
|
345 |
+
* improved some codes, fix code to not show warnings when in debugging mode
|
346 |
+
|
347 |
+
= 2.4.1 =
|
348 |
+
* fix bug of not receiving value for select box
|
349 |
+
|
350 |
+
= 2.4 =
|
351 |
+
* (image upload features are credit to Kai http =//twitter.com/ungestaltbar)
|
352 |
+
* change image upload using meta fields to using default WP gallery
|
353 |
+
* add delete button for images, using ajax
|
354 |
+
* allow to upload multiple images
|
355 |
+
* add validation for meta fields
|
356 |
+
|
357 |
+
= 2.3 =
|
358 |
+
* add wysiwyg editor type, improve check for upload fields, change context and priority attributes to optional
|
359 |
+
|
360 |
+
= 2.2 =
|
361 |
+
* add enctype to post form (fix upload bug), thanks to http =//goo.gl/PWWNf
|
362 |
+
|
363 |
+
= 2.1 =
|
364 |
+
* add file upload, image upload support
|
365 |
+
|
366 |
+
= 2.0 =
|
367 |
+
* oop code, support multiple post types, multiple meta boxes
|
368 |
+
|
369 |
+
= 1.0 =
|
370 |
+
* procedural code
|
371 |
+
|
372 |
+
== Upgrade Notice ==
|
inc/tnext-meta.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Registering meta boxes
|
4 |
+
*
|
5 |
+
* All the definitions of meta boxes are listed below with comments.
|
6 |
+
* Please read them CAREFULLY.
|
7 |
+
*
|
8 |
+
* You also should read the changelog to know what has been changed before updating.
|
9 |
+
*
|
10 |
+
* For more information, please visit:
|
11 |
+
* @link http://www.deluxeblogtips.com/meta-box/
|
12 |
+
*/
|
13 |
+
|
14 |
+
|
15 |
+
add_filter( 'rwmb_meta_boxes', 'tx_register_meta_boxes' );
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Register meta boxes
|
19 |
+
*
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
function tx_register_meta_boxes( $meta_boxes )
|
23 |
+
{
|
24 |
+
/**
|
25 |
+
* Prefix of meta keys (optional)
|
26 |
+
* Use underscore (_) at the beginning to make keys hidden
|
27 |
+
* Alt.: You also can make prefix empty to disable it
|
28 |
+
*/
|
29 |
+
// Better has an underscore as last sign
|
30 |
+
$prefix = 'tx_';
|
31 |
+
|
32 |
+
// 1st meta box
|
33 |
+
/*
|
34 |
+
$meta_boxes[] = array(
|
35 |
+
// Meta box id, UNIQUE per meta box. Optional since 4.1.5
|
36 |
+
'id' => 'heading',
|
37 |
+
|
38 |
+
// Meta box title - Will appear at the drag and drop handle bar. Required.
|
39 |
+
'title' => __( 'Page Heading Options', 'icraft' ),
|
40 |
+
|
41 |
+
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
|
42 |
+
'pages' => array( 'post', 'page' ),
|
43 |
+
|
44 |
+
// Where the meta box appear: normal (default), advanced, side. Optional.
|
45 |
+
'context' => 'normal',
|
46 |
+
|
47 |
+
// Order of meta box: high (default), low. Optional.
|
48 |
+
'priority' => 'high',
|
49 |
+
|
50 |
+
// Auto save: true, false (default). Optional.
|
51 |
+
'autosave' => true,
|
52 |
+
|
53 |
+
// List of meta fields
|
54 |
+
'fields' => array(
|
55 |
+
// Hide Title
|
56 |
+
array(
|
57 |
+
'name' => __( 'Hide Title', 'icraft' ),
|
58 |
+
'id' => "{$prefix}hidetitle",
|
59 |
+
'type' => 'checkbox',
|
60 |
+
// Value can be 0 or 1
|
61 |
+
'std' => 0,
|
62 |
+
'class' => 'hide-ttl',
|
63 |
+
),
|
64 |
+
array(
|
65 |
+
'name' => __( 'Show Default i-craft Slider', 'icraft' ),
|
66 |
+
'id' => "{$prefix}show_slider",
|
67 |
+
'type' => 'checkbox',
|
68 |
+
// Value can be 0 or 1
|
69 |
+
'std' => 0,
|
70 |
+
'class' => 'show-slider',
|
71 |
+
),
|
72 |
+
|
73 |
+
// Custom Title
|
74 |
+
array(
|
75 |
+
// Field name - Will be used as label
|
76 |
+
'name' => __( 'Custom title', 'icraft' ),
|
77 |
+
// Field ID, i.e. the meta key
|
78 |
+
'id' => "{$prefix}customtitle",
|
79 |
+
// Field description (optional)
|
80 |
+
'desc' => __( 'Enter custom title for the page', 'icraft' ),
|
81 |
+
'type' => 'text',
|
82 |
+
// Default value (optional)
|
83 |
+
'std' => __( '', 'icraft' ),
|
84 |
+
// CLONES: Add to make the field cloneable (i.e. have multiple value)
|
85 |
+
//'clone' => true,
|
86 |
+
'class' => 'cust-ttl',
|
87 |
+
),
|
88 |
+
|
89 |
+
// hide breadcrum
|
90 |
+
array(
|
91 |
+
'name' => __( 'Hide breadcrumb', 'icraft' ),
|
92 |
+
'id' => "{$prefix}hide_breadcrumb",
|
93 |
+
'type' => 'checkbox',
|
94 |
+
// Value can be 0 or 1
|
95 |
+
'std' => 0,
|
96 |
+
),
|
97 |
+
|
98 |
+
// Custom Title
|
99 |
+
array(
|
100 |
+
// Field name - Will be used as label
|
101 |
+
'name' => __( 'Other Slider Plugin Shortcode', 'icraft' ),
|
102 |
+
// Field ID, i.e. the meta key
|
103 |
+
'id' => "{$prefix}other_slider",
|
104 |
+
// Field description (optional)
|
105 |
+
'desc' => __( 'Enter a 3rd party slider shortcode, ex. meta slider, smart slider 2, wow slider, etc.', 'icraft' ),
|
106 |
+
'type' => 'text',
|
107 |
+
// Default value (optional)
|
108 |
+
'std' => __( '', 'icraft' ),
|
109 |
+
// CLONES: Add to make the field cloneable (i.e. have multiple value)
|
110 |
+
//'clone' => true,
|
111 |
+
'class' => 'cust-ttl',
|
112 |
+
),
|
113 |
+
|
114 |
+
|
115 |
+
)
|
116 |
+
);
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
121 |
+
$meta_boxes[] = array(
|
122 |
+
// Meta box id, UNIQUE per meta box. Optional since 4.1.5
|
123 |
+
'id' => 'portfoliometa',
|
124 |
+
|
125 |
+
// Meta box title - Will appear at the drag and drop handle bar. Required.
|
126 |
+
'title' => __( 'Portfolio Meta', 'ispirit' ),
|
127 |
+
|
128 |
+
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
|
129 |
+
'pages' => array( 'portfolio' ),
|
130 |
+
|
131 |
+
// Where the meta box appear: normal (default), advanced, side. Optional.
|
132 |
+
'context' => 'normal',
|
133 |
+
|
134 |
+
// Order of meta box: high (default), low. Optional.
|
135 |
+
'priority' => 'high',
|
136 |
+
|
137 |
+
// Auto save: true, false (default). Optional.
|
138 |
+
'autosave' => true,
|
139 |
+
|
140 |
+
// List of meta fields
|
141 |
+
'fields' => array(
|
142 |
+
// Side bar
|
143 |
+
|
144 |
+
// ITEM DETAILS OPTIONS SECTION
|
145 |
+
array(
|
146 |
+
'type' => 'heading',
|
147 |
+
'name' => __( 'Portfolio Additinal Details', 'nx-admin' ),
|
148 |
+
'id' => 'fake_id_pf1', // Not used but needed for plugin
|
149 |
+
),
|
150 |
+
// Slide duration
|
151 |
+
array(
|
152 |
+
'name' => __( 'Subtitle', 'nx-admin' ),
|
153 |
+
'id' => "{$prefix}portfolio_subtitle",
|
154 |
+
'desc' => __( 'Enter a subtitle for use within the portfolio item index (optional).', 'nx-admin' ),
|
155 |
+
'type' => 'text',
|
156 |
+
),
|
157 |
+
|
158 |
+
array(
|
159 |
+
'name' => __( 'Portfolio Link(External)', 'nx-admin' ),
|
160 |
+
'id' => "{$prefix}portfolio_url",
|
161 |
+
'desc' => __( 'Enter an external link for the item (optional) (NOTE: INCLUDE HTTP://).', 'nx-admin' ),
|
162 |
+
'type' => 'text',
|
163 |
+
),
|
164 |
+
)
|
165 |
+
);
|
166 |
+
*/
|
167 |
+
|
168 |
+
|
169 |
+
$meta_boxes[] = array(
|
170 |
+
// Meta box id, UNIQUE per meta box. Optional since 4.1.5
|
171 |
+
'id' => 'itrans-slider',
|
172 |
+
|
173 |
+
// Meta box title - Will appear at the drag and drop handle bar. Required.
|
174 |
+
'title' => __( 'itrans Slide Meta', 'ispirit' ),
|
175 |
+
|
176 |
+
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
|
177 |
+
'pages' => array( 'itrans-slider' ),
|
178 |
+
|
179 |
+
// Where the meta box appear: normal (default), advanced, side. Optional.
|
180 |
+
'context' => 'normal',
|
181 |
+
|
182 |
+
// Order of meta box: high (default), low. Optional.
|
183 |
+
'priority' => 'high',
|
184 |
+
|
185 |
+
// Auto save: true, false (default). Optional.
|
186 |
+
'autosave' => true,
|
187 |
+
|
188 |
+
// List of meta fields
|
189 |
+
'fields' => array(
|
190 |
+
|
191 |
+
// name
|
192 |
+
array(
|
193 |
+
'name' => __( 'Slide Button Text', 'nx-admin' ),
|
194 |
+
'id' => "{$prefix}slide_link_text",
|
195 |
+
'type' => 'text',
|
196 |
+
'std' => __( '', 'nx-admin' ),
|
197 |
+
'desc' => __('Enter the slide link button text.', 'nx-admin'),
|
198 |
+
),
|
199 |
+
|
200 |
+
// designation
|
201 |
+
array(
|
202 |
+
'name' => __( 'Lide Link URL', 'nx-admin' ),
|
203 |
+
'id' => "{$prefix}slide_link_url",
|
204 |
+
'type' => 'text',
|
205 |
+
'std' => __( '', 'nx-admin' ),
|
206 |
+
'desc' => __('Enter the slide link url', 'nx-admin'),
|
207 |
+
),
|
208 |
+
|
209 |
+
)
|
210 |
+
);
|
211 |
+
|
212 |
+
|
213 |
+
|
214 |
+
return $meta_boxes;
|
215 |
+
}
|
216 |
+
|
217 |
+
|
218 |
+
|
js/tx-script.js
CHANGED
@@ -28,6 +28,52 @@ jQuery(document).ready(function ($) {
|
|
28 |
var car_columns = _this.data('columns');
|
29 |
|
30 |
$(this).owlCarousel({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
items : car_columns,
|
32 |
stopOnHover : true,
|
33 |
//navigation:true,
|
@@ -43,6 +89,27 @@ jQuery(document).ready(function ($) {
|
|
43 |
theme : "tx-owl-theme"
|
44 |
});
|
45 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
|
48 |
// colorboxpopup
|
@@ -70,7 +137,7 @@ jQuery(document).ready(function ($) {
|
|
70 |
//itemSelector: '.widget'
|
71 |
});
|
72 |
});
|
73 |
-
*/
|
74 |
|
75 |
|
76 |
|
28 |
var car_columns = _this.data('columns');
|
29 |
|
30 |
$(this).owlCarousel({
|
31 |
+
items : car_columns,
|
32 |
+
stopOnHover : true,
|
33 |
+
paginationSpeed : 1000,
|
34 |
+
navigation : true,
|
35 |
+
goToFirstSpeed : 2000,
|
36 |
+
singleItem : false,
|
37 |
+
autoHeight : true,
|
38 |
+
navigationText: ['<span class="genericon genericon-leftarrow"></span>','<span class="genericon genericon-rightarrow"></span>'],
|
39 |
+
addClassActive: true,
|
40 |
+
theme : "tx-owl-theme"
|
41 |
+
});
|
42 |
+
});
|
43 |
+
|
44 |
+
|
45 |
+
//Products carousel
|
46 |
+
$('.tx-prod-carousel').each(function () {
|
47 |
+
|
48 |
+
var _this = $(this);
|
49 |
+
var car_columns = _this.data('columns');
|
50 |
+
|
51 |
+
$(this).children('div').children('ul').owlCarousel({
|
52 |
+
items : car_columns,
|
53 |
+
stopOnHover : true,
|
54 |
+
//navigation:true,
|
55 |
+
paginationSpeed : 1000,
|
56 |
+
navigation : true,
|
57 |
+
goToFirstSpeed : 2000,
|
58 |
+
singleItem : false,
|
59 |
+
autoHeight : true,
|
60 |
+
//navigationText: ["<i class=\"fa fa-angle-left\"></i>","<i class=\"fa fa-angle-right\"></i>"],
|
61 |
+
//theme: "tx-custom-slider",
|
62 |
+
navigationText: ['<span class="genericon genericon-leftarrow"></span>','<span class="genericon genericon-rightarrow"></span>'],
|
63 |
+
addClassActive: true,
|
64 |
+
theme : "tx-owl-theme"
|
65 |
+
});
|
66 |
+
});
|
67 |
+
|
68 |
+
//Related Product
|
69 |
+
$('.related.products').each(function () {
|
70 |
+
|
71 |
+
var _this = $(this);
|
72 |
+
var car_columns = _this.data('columns');
|
73 |
+
|
74 |
+
car_columns = 4;
|
75 |
+
|
76 |
+
$(this).children('ul').owlCarousel({
|
77 |
items : car_columns,
|
78 |
stopOnHover : true,
|
79 |
//navigation:true,
|
89 |
theme : "tx-owl-theme"
|
90 |
});
|
91 |
});
|
92 |
+
|
93 |
+
|
94 |
+
$('.tx-slider').each(function () {
|
95 |
+
|
96 |
+
var _this = $(this);
|
97 |
+
var slider_delay = _this.data('delay');
|
98 |
+
|
99 |
+
$(this).owlCarousel({
|
100 |
+
autoPlay : slider_delay,
|
101 |
+
stopOnHover : true,
|
102 |
+
navigation: true,
|
103 |
+
paginationSpeed : 1000,
|
104 |
+
goToFirstSpeed : 2000,
|
105 |
+
singleItem : true,
|
106 |
+
autoHeight : true,
|
107 |
+
navigationText: ['<span class="genericon genericon-leftarrow"></span>','<span class="genericon genericon-rightarrow"></span>'],
|
108 |
+
addClassActive: true,
|
109 |
+
theme : "tx-owl-theme",
|
110 |
+
pagination : true
|
111 |
+
});
|
112 |
+
});
|
113 |
|
114 |
|
115 |
// colorboxpopup
|
137 |
//itemSelector: '.widget'
|
138 |
});
|
139 |
});
|
140 |
+
*/
|
141 |
|
142 |
|
143 |
|
js/tx_main.js
CHANGED
@@ -580,4 +580,10 @@ function tx_footer_include(){
|
|
580 |
var tx_footer=jQuery('<div><span class="tx-outer-footer"><a href="http://www.templatesnext.org/icreate/?page_id=541">Demo and Documentation</a></span></div>').html();
|
581 |
//tx_footer=tx_footer.outerHTML;
|
582 |
return tx_footer;
|
583 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
580 |
var tx_footer=jQuery('<div><span class="tx-outer-footer"><a href="http://www.templatesnext.org/icreate/?page_id=541">Demo and Documentation</a></span></div>').html();
|
581 |
//tx_footer=tx_footer.outerHTML;
|
582 |
return tx_footer;
|
583 |
+
}
|
584 |
+
|
585 |
+
|
586 |
+
function tx_slider_cat(){
|
587 |
+
var tx_slider_cat_list = tx_t1;
|
588 |
+
return tx_slider_cat_list;
|
589 |
+
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: marsian
|
|
4 |
Tags: shortcode, shortcodes, columns, column, section, sections, portfolio, testimonial, border, borders, button, buttons, masonry, posts, post_type, font awesome, icons, fontawesome
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.1
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -26,5 +26,12 @@ Install the plugin into the `/wp-content/plugins/` folder, and activate it.
|
|
26 |
== Changelog ==
|
27 |
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
= 1.0.1 =
|
30 |
* Initial Version.
|
4 |
Tags: shortcode, shortcodes, columns, column, section, sections, portfolio, testimonial, border, borders, button, buttons, masonry, posts, post_type, font awesome, icons, fontawesome
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.1
|
7 |
+
Stable tag: 1.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
26 |
== Changelog ==
|
27 |
|
28 |
|
29 |
+
= 1.0.8 =
|
30 |
+
* Added pagination for recent posts (blog) shortcode.
|
31 |
+
* Added heading shortcode.
|
32 |
+
* Added product carousel for WooCommerce.
|
33 |
+
* Added Custom post type itrans slider.
|
34 |
+
* Added itrans slider shortcode.
|
35 |
+
|
36 |
= 1.0.1 =
|
37 |
* Initial Version.
|
shortcodes.php
CHANGED
@@ -35,6 +35,7 @@ function tx_blog_function($atts, $content = null) {
|
|
35 |
'columns' => 4,
|
36 |
'showcat' => 'show',
|
37 |
'category_id' => '',
|
|
|
38 |
'carousel' => 'no',
|
39 |
), $atts);
|
40 |
|
@@ -64,16 +65,30 @@ function tx_blog_function($atts, $content = null) {
|
|
64 |
'ignore_sticky_posts' => 1,
|
65 |
'category__in' => $post_in_cat, //use post ids
|
66 |
);
|
67 |
-
//$args['paging'] = true;
|
68 |
-
/**/
|
69 |
-
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
-
|
76 |
-
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
|
77 |
|
78 |
$return_string .= '<div class="tx-blog-item tx-post-col-'.$total_column.'"><div class="tx-border-box">';
|
79 |
|
@@ -107,11 +122,42 @@ function tx_blog_function($atts, $content = null) {
|
|
107 |
|
108 |
$return_string .= '</div>';
|
109 |
|
|
|
|
|
|
|
|
|
110 |
wp_reset_query();
|
111 |
|
112 |
return $return_string;
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
// row
|
116 |
|
117 |
function tx_row_function($atts, $content = null) {
|
@@ -328,7 +374,8 @@ function tx_portfolio_function($atts, $content = null) {
|
|
328 |
'columns' => 4,
|
329 |
'hide_cat' => 'no',
|
330 |
'hide_excerpt' => 'no',
|
331 |
-
'
|
|
|
332 |
), $atts);
|
333 |
|
334 |
|
@@ -356,14 +403,26 @@ function tx_portfolio_function($atts, $content = null) {
|
|
356 |
'orderby' => 'date',
|
357 |
'order' => 'DESC'
|
358 |
);
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
364 |
|
365 |
-
|
366 |
-
|
|
|
|
|
|
|
|
|
|
|
367 |
|
368 |
|
369 |
$return_string .= '<div class="tx-portfolio-item tx-post-col-'.$total_column.'"><div class="tx-border-box">';
|
@@ -390,11 +449,143 @@ function tx_portfolio_function($atts, $content = null) {
|
|
390 |
endif;
|
391 |
|
392 |
$return_string .= '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
|
394 |
wp_reset_query();
|
|
|
395 |
return $return_string;
|
396 |
}
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
|
399 |
|
400 |
function register_shortcodes(){
|
@@ -408,7 +599,10 @@ function register_shortcodes(){
|
|
408 |
add_shortcode('tx_services', 'tx_services_function');
|
409 |
add_shortcode('tx_portfolio', 'tx_portfolio_function');
|
410 |
add_shortcode('tx_blog', 'tx_blog_function');
|
411 |
-
add_shortcode('tx_divider', 'tx_divider_function');
|
|
|
|
|
|
|
412 |
}
|
413 |
|
414 |
add_action( 'init', 'register_shortcodes');
|
35 |
'columns' => 4,
|
36 |
'showcat' => 'show',
|
37 |
'category_id' => '',
|
38 |
+
'show_pagination' => 'no',
|
39 |
'carousel' => 'no',
|
40 |
), $atts);
|
41 |
|
65 |
'ignore_sticky_posts' => 1,
|
66 |
'category__in' => $post_in_cat, //use post ids
|
67 |
);
|
|
|
|
|
|
|
68 |
|
69 |
+
if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' )
|
70 |
+
{
|
71 |
+
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
72 |
+
$args['paged'] = $paged;
|
73 |
+
$args['prev_text'] = __('«','tx');
|
74 |
+
$args['next_text'] = __('»','tx');
|
75 |
+
$args['show_all'] = false;
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
query_posts( $args );
|
80 |
|
81 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
82 |
+
|
83 |
+
if (in_array("tx-medium", get_intermediate_image_sizes())) {
|
84 |
+
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'tx-medium' );
|
85 |
+
} else
|
86 |
+
{
|
87 |
+
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium' );
|
88 |
+
}
|
89 |
+
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
90 |
|
91 |
+
|
|
|
92 |
|
93 |
$return_string .= '<div class="tx-blog-item tx-post-col-'.$total_column.'"><div class="tx-border-box">';
|
94 |
|
122 |
|
123 |
$return_string .= '</div>';
|
124 |
|
125 |
+
if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' ) {
|
126 |
+
$return_string .= '<div class="nx-paging"><div class="nx-paging-inner">'.paginate_links( $args ).'</div></div>';
|
127 |
+
}
|
128 |
+
|
129 |
wp_reset_query();
|
130 |
|
131 |
return $return_string;
|
132 |
}
|
133 |
|
134 |
+
// heading
|
135 |
+
|
136 |
+
function tx_heading_function($atts, $content = null) {
|
137 |
+
|
138 |
+
//[tx_heading style=”default” heading_text=”Heading Text” tag=”h1″ size=”24″ margin=”24″]
|
139 |
+
|
140 |
+
$atts = shortcode_atts(array(
|
141 |
+
'style' => 'default',
|
142 |
+
'heading_text' => 'Heading Text',
|
143 |
+
'tag' => 'h2',
|
144 |
+
'size' => '24',
|
145 |
+
'margin' => '24',
|
146 |
+
'align' => 'left',
|
147 |
+
'class' => '',
|
148 |
+
), $atts);
|
149 |
+
|
150 |
+
$return_string ='';
|
151 |
+
|
152 |
+
$return_string .= '<div class="tx-heading" style="margin-bottom:'.$atts['margin'].'px; text-align: '.$atts['align'].';">';
|
153 |
+
$return_string .= '<'.$atts['tag'].' class="tx-heading-tag" style="font-size:'.$atts['size'].'px;">';
|
154 |
+
$return_string .= do_shortcode($atts['heading_text']);
|
155 |
+
$return_string .= '</'.$atts['tag'].'>';
|
156 |
+
$return_string .= '</div>';
|
157 |
+
|
158 |
+
return $return_string;
|
159 |
+
}
|
160 |
+
|
161 |
// row
|
162 |
|
163 |
function tx_row_function($atts, $content = null) {
|
374 |
'columns' => 4,
|
375 |
'hide_cat' => 'no',
|
376 |
'hide_excerpt' => 'no',
|
377 |
+
'show_pagination' => 'no',
|
378 |
+
'carousel' => 'no',
|
379 |
), $atts);
|
380 |
|
381 |
|
403 |
'orderby' => 'date',
|
404 |
'order' => 'DESC'
|
405 |
);
|
406 |
+
|
407 |
+
if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' )
|
408 |
+
{
|
409 |
+
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
410 |
+
$args['paged'] = $paged;
|
411 |
+
$args['prev_text'] = __('«','tx');
|
412 |
+
$args['next_text'] = __('»','tx');
|
413 |
+
}
|
414 |
+
|
415 |
+
query_posts( $args );
|
416 |
+
|
417 |
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
418 |
|
419 |
+
if (in_array("tx-medium", get_intermediate_image_sizes())) {
|
420 |
+
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'tx-medium' );
|
421 |
+
} else
|
422 |
+
{
|
423 |
+
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'medium' );
|
424 |
+
}
|
425 |
+
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
426 |
|
427 |
|
428 |
$return_string .= '<div class="tx-portfolio-item tx-post-col-'.$total_column.'"><div class="tx-border-box">';
|
449 |
endif;
|
450 |
|
451 |
$return_string .= '</div>';
|
452 |
+
|
453 |
+
if ($atts['show_pagination'] == 'yes' && $atts['carousel'] == 'no' )
|
454 |
+
{
|
455 |
+
$return_string .= '<div class="nx-paging"><div class="nx-paging-inner">'.paginate_links( $args ).'</div></div>';
|
456 |
+
}
|
457 |
+
|
458 |
|
459 |
wp_reset_query();
|
460 |
+
|
461 |
return $return_string;
|
462 |
}
|
463 |
|
464 |
+
// button
|
465 |
+
|
466 |
+
function tx_prodscroll_function($atts, $content = null) {
|
467 |
+
|
468 |
+
//[tx_prodscroll type="products" ids="21,28,54,87" columns="4" items="8"]
|
469 |
+
|
470 |
+
$atts = shortcode_atts(array(
|
471 |
+
'type' => 'products',
|
472 |
+
'ids' => '',
|
473 |
+
'columns' => '4',
|
474 |
+
'items' => '8',
|
475 |
+
'class' => '',
|
476 |
+
), $atts);
|
477 |
+
|
478 |
+
$return_string ='';
|
479 |
+
$prod_shortcode = '';
|
480 |
+
|
481 |
+
|
482 |
+
if ( !empty($atts['ids']) && ( $atts['type'] == 'product_categories' || $atts['type'] == 'products' ))
|
483 |
+
{
|
484 |
+
if ( $atts['type'] == 'product_categories' )
|
485 |
+
{
|
486 |
+
$prod_shortcode = '['.$atts['type'].' number="'.$atts['items'].'" columns="'.$atts['columns'].'" ids="'.$atts['ids'].'"]';
|
487 |
+
} else
|
488 |
+
{
|
489 |
+
$prod_shortcode = '['.$atts['type'].' per_page="'.$atts['items'].'" columns="'.$atts['columns'].'" ids="'.$atts['ids'].'"]';
|
490 |
+
}
|
491 |
+
} else
|
492 |
+
{
|
493 |
+
if ( $atts['type'] == 'product_categories' )
|
494 |
+
{
|
495 |
+
$prod_shortcode = '['.$atts['type'].' number="'.$atts['items'].'" columns="'.$atts['columns'].'"]';
|
496 |
+
} else
|
497 |
+
{
|
498 |
+
$prod_shortcode = '['.$atts['type'].' per_page="'.$atts['items'].'" columns="'.$atts['columns'].'"]';
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
+
$return_string = '<div class="tx-prod-carousel" data-columns="'.$atts['columns'].'">'.do_shortcode( $prod_shortcode ).'</div>';
|
503 |
+
|
504 |
+
return $return_string;
|
505 |
+
}
|
506 |
+
|
507 |
+
|
508 |
+
// recent posts [tx_blog items="3" colums="6" showcat="show" category_id="8,9"]
|
509 |
+
|
510 |
+
function tx_slider_function($atts, $content = null) {
|
511 |
+
|
512 |
+
$atts = shortcode_atts(array(
|
513 |
+
'items' => 4,
|
514 |
+
'category' => '',
|
515 |
+
'delay' => 8000,
|
516 |
+
'class' => '',
|
517 |
+
), $atts);
|
518 |
+
|
519 |
+
$return_string = '';
|
520 |
+
$cat_slug = '';
|
521 |
+
|
522 |
+
if(!empty($atts['category']))
|
523 |
+
{
|
524 |
+
$cat_slug = $atts['category'];
|
525 |
+
}
|
526 |
+
|
527 |
+
$posts_per_page = intval( $atts['items'] );
|
528 |
+
$tx_class = $atts['class'];
|
529 |
+
$tx_delay = $atts['delay'];
|
530 |
+
|
531 |
+
|
532 |
+
$return_string .= '<div class="tx-slider" data-delay="'.$tx_delay.'">';
|
533 |
+
|
534 |
+
|
535 |
+
wp_reset_query();
|
536 |
+
global $post;
|
537 |
+
|
538 |
+
$args = array(
|
539 |
+
'post_type' => 'itrans-slider',
|
540 |
+
'posts_per_page' => $posts_per_page,
|
541 |
+
'orderby' => 'date',
|
542 |
+
'order' => 'DESC',
|
543 |
+
'ignore_sticky_posts' => 1,
|
544 |
+
'itrans-slider-category' => $cat_slug, //use post ids
|
545 |
+
);
|
546 |
+
|
547 |
+
$full_image_url = '';
|
548 |
+
$large_image_url = '';
|
549 |
+
$image_url = '';
|
550 |
+
$width = 1200;
|
551 |
+
$height = 420;
|
552 |
+
|
553 |
+
query_posts( $args );
|
554 |
+
|
555 |
+
if ( have_posts() ) : while ( have_posts() ) : the_post();
|
556 |
+
|
557 |
+
$full_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
|
558 |
+
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
|
559 |
+
$image_url = tx_image_resize( $full_image_url[0], $width, $height, true, true );
|
560 |
+
|
561 |
+
$slide_link_text = rwmb_meta('tx_slide_link_text');
|
562 |
+
$show_link_url = rwmb_meta('tx_slide_link_url');
|
563 |
+
|
564 |
+
$return_string .= '<div class="tx-slider-item">';
|
565 |
+
$return_string .= '<div class="tx-slider-box">';
|
566 |
+
|
567 |
+
if ( has_post_thumbnail() ) {
|
568 |
+
$return_string .= '<div class="tx-slider-img"><a href="'.esc_url($large_image_url[0]).'" class="tx-colorbox">';
|
569 |
+
$return_string .= '<img src="'.esc_url($image_url["url"]).'" alt="" class="blog-image" /></a>';
|
570 |
+
$return_string .= '</div>';
|
571 |
+
}
|
572 |
+
/**/
|
573 |
+
$return_string .= '<div class="tx-slide-content"><div class="tx-slide-content-inner">';
|
574 |
+
$return_string .= '<h3 class="tx-slide-title">'.get_the_title().'</h3>';
|
575 |
+
$return_string .= '<div class="tx-slide-details"><p>'.tx_custom_excerpt(32).'</p></div>';
|
576 |
+
$return_string .= '<div class="tx-slide-button"><a href="'.esc_url( $show_link_url ).'">'.esc_attr( $slide_link_text ).'</a></div>';
|
577 |
+
$return_string .= '</div></div></div></div>';
|
578 |
+
|
579 |
+
|
580 |
+
endwhile; else :
|
581 |
+
$return_string .= '<p>Sorry, no slider matched your criteria. |'.$atts['category_id'].'|<pre>$post_in_cat</pre></p>';
|
582 |
+
endif;
|
583 |
+
|
584 |
+
$return_string .= '</div>';
|
585 |
+
|
586 |
+
wp_reset_query();
|
587 |
+
return $return_string;
|
588 |
+
}
|
589 |
|
590 |
|
591 |
function register_shortcodes(){
|
599 |
add_shortcode('tx_services', 'tx_services_function');
|
600 |
add_shortcode('tx_portfolio', 'tx_portfolio_function');
|
601 |
add_shortcode('tx_blog', 'tx_blog_function');
|
602 |
+
add_shortcode('tx_divider', 'tx_divider_function');
|
603 |
+
add_shortcode('tx_prodscroll', 'tx_prodscroll_function');
|
604 |
+
add_shortcode('tx_heading', 'tx_heading_function');
|
605 |
+
add_shortcode('tx_slider', 'tx_slider_function');
|
606 |
}
|
607 |
|
608 |
add_action( 'init', 'register_shortcodes');
|
tx-functions.php
CHANGED
@@ -54,3 +54,348 @@ if ( ! function_exists( 'tx_shortcodes_comma_delim_to_array' ) ) {
|
|
54 |
return $a;
|
55 |
}
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
return $a;
|
55 |
}
|
56 |
}
|
57 |
+
|
58 |
+
|
59 |
+
//add_image_size( $name, $width, $height, $crop );
|
60 |
+
|
61 |
+
|
62 |
+
function tx_get_category_list_key_array($category_name) {
|
63 |
+
|
64 |
+
$get_category = get_categories( array( 'taxonomy' => $category_name ));
|
65 |
+
$category_list = array( 'all' => 'Select Category');
|
66 |
+
|
67 |
+
foreach( $get_category as $category ){
|
68 |
+
if (isset($category->slug)) {
|
69 |
+
$category_list[$category->slug] = $category->cat_name;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
return $category_list;
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Resizes an image and returns an array containing the resized URL, width, height and file type. Uses native Wordpress functionality.
|
78 |
+
*
|
79 |
+
* @author Matthew Ruddy (http://easinglider.com)
|
80 |
+
* @return array An array containing the resized image URL, width, height and file type.
|
81 |
+
*/
|
82 |
+
function tx_image_resize( $url, $width = NULL, $height = NULL, $crop = true, $retina = false ) {
|
83 |
+
global $wp_version;
|
84 |
+
|
85 |
+
//######################################################################
|
86 |
+
// First implementation
|
87 |
+
//######################################################################
|
88 |
+
if ( isset( $wp_version ) && version_compare( $wp_version, '3.5' ) >= 0 ) {
|
89 |
+
global $wpdb;
|
90 |
+
if ( empty( $url ) )
|
91 |
+
return new WP_Error( 'no_image_url', 'No image URL has been entered.', $url );
|
92 |
+
// Get default size from database
|
93 |
+
$width = ( $width ) ? $width : get_option( 'thumbnail_size_w' );
|
94 |
+
$height = ( $height ) ? $height : get_option( 'thumbnail_size_h' );
|
95 |
+
// Allow for different retina sizes
|
96 |
+
$retina = $retina ? ( $retina === true ? 2 : $retina ) : 1;
|
97 |
+
// Get the image file path
|
98 |
+
$file_path = parse_url( $url );
|
99 |
+
$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];
|
100 |
+
// Check for Multisite
|
101 |
+
if ( is_multisite() ) {
|
102 |
+
global $blog_id;
|
103 |
+
$blog_details = get_blog_details( $blog_id );
|
104 |
+
$file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/' . $blog_id . '/files/', $file_path );
|
105 |
+
}
|
106 |
+
// Destination width and height variables
|
107 |
+
$dest_width = $width * $retina;
|
108 |
+
$dest_height = $height * $retina;
|
109 |
+
// File name suffix (appended to original file name)
|
110 |
+
$suffix = "{$dest_width}x{$dest_height}";
|
111 |
+
// Some additional info about the image
|
112 |
+
$info = pathinfo( $file_path );
|
113 |
+
$dir = $info['dirname'];
|
114 |
+
$ext = $info['extension'];
|
115 |
+
$name = wp_basename( $file_path, ".$ext" );
|
116 |
+
// Suffix applied to filename
|
117 |
+
$suffix = "{$dest_width}x{$dest_height}";
|
118 |
+
// Get the destination file name
|
119 |
+
$dest_file_name = "{$dir}/{$name}-{$suffix}.{$ext}";
|
120 |
+
if ( !file_exists( $dest_file_name ) ) {
|
121 |
+
$query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
|
122 |
+
$get_attachment = $wpdb->get_results( $query );
|
123 |
+
if ( !$get_attachment )
|
124 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
125 |
+
// Load Wordpress Image Editor
|
126 |
+
$editor = wp_get_image_editor( $file_path );
|
127 |
+
if ( is_wp_error( $editor ) )
|
128 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
129 |
+
// Get the original image size
|
130 |
+
$size = $editor->get_size();
|
131 |
+
$orig_width = $size['width'];
|
132 |
+
$orig_height = $size['height'];
|
133 |
+
$src_x = $src_y = 0;
|
134 |
+
$src_w = $orig_width;
|
135 |
+
$src_h = $orig_height;
|
136 |
+
if ( $crop ) {
|
137 |
+
|
138 |
+
$cmp_x = $orig_width / $dest_width;
|
139 |
+
$cmp_y = $orig_height / $dest_height;
|
140 |
+
|
141 |
+
// Calculate x or y coordinate, and width or height of source
|
142 |
+
if ( $cmp_x > $cmp_y ) {
|
143 |
+
$src_w = round( $orig_width / $cmp_x * $cmp_y );
|
144 |
+
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
|
145 |
+
}
|
146 |
+
else if ( $cmp_y > $cmp_x ) {
|
147 |
+
$src_h = round( $orig_height / $cmp_y * $cmp_x );
|
148 |
+
$src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
// Time to crop the image!
|
153 |
+
$editor->crop( $src_x, $src_y, $src_w, $src_h, $dest_width, $dest_height );
|
154 |
+
// Now let's save the image
|
155 |
+
$saved = $editor->save( $dest_file_name );
|
156 |
+
// Get resized image information
|
157 |
+
$resized_url = str_replace( basename( $url ), basename( $saved['path'] ), $url );
|
158 |
+
$resized_width = $saved['width'];
|
159 |
+
$resized_height = $saved['height'];
|
160 |
+
$resized_type = $saved['mime-type'];
|
161 |
+
// Add the resized dimensions to original image metadata (so we can delete our resized images when the original image is delete from the Media Library)
|
162 |
+
$metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
|
163 |
+
if ( isset( $metadata['image_meta'] ) ) {
|
164 |
+
$metadata['image_meta']['resized_images'][] = $resized_width . 'x' . $resized_height;
|
165 |
+
wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
|
166 |
+
}
|
167 |
+
// Create the image array
|
168 |
+
$image_array = array(
|
169 |
+
'url' => $resized_url,
|
170 |
+
'width' => $resized_width,
|
171 |
+
'height' => $resized_height,
|
172 |
+
'type' => $resized_type
|
173 |
+
);
|
174 |
+
}
|
175 |
+
else {
|
176 |
+
$image_array = array(
|
177 |
+
'url' => str_replace( basename( $url ), basename( $dest_file_name ), $url ),
|
178 |
+
'width' => $dest_width,
|
179 |
+
'height' => $dest_height,
|
180 |
+
'type' => $ext
|
181 |
+
);
|
182 |
+
}
|
183 |
+
// Return image array
|
184 |
+
return $image_array;
|
185 |
+
}
|
186 |
+
|
187 |
+
//######################################################################
|
188 |
+
// Second implementation
|
189 |
+
//######################################################################
|
190 |
+
else {
|
191 |
+
global $wpdb;
|
192 |
+
|
193 |
+
if ( empty( $url ) )
|
194 |
+
return new WP_Error( 'no_image_url', 'No image URL has been entered.', $url );
|
195 |
+
|
196 |
+
// Bail if GD Library doesn't exist
|
197 |
+
if ( !extension_loaded( 'gd' ) || !function_exists( 'gd_info' ) )
|
198 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
199 |
+
|
200 |
+
// Get default size from database
|
201 |
+
$width = ( $width ) ? $width : get_option( 'thumbnail_size_w' );
|
202 |
+
$height = ( $height ) ? $height : get_option( 'thumbnail_size_h' );
|
203 |
+
|
204 |
+
// Allow for different retina sizes
|
205 |
+
$retina = $retina ? ( $retina === true ? 2 : $retina ) : 1;
|
206 |
+
|
207 |
+
// Destination width and height variables
|
208 |
+
$dest_width = $width * $retina;
|
209 |
+
$dest_height = $height * $retina;
|
210 |
+
|
211 |
+
// Get image file path
|
212 |
+
$file_path = parse_url( $url );
|
213 |
+
$file_path = $_SERVER['DOCUMENT_ROOT'] . $file_path['path'];
|
214 |
+
|
215 |
+
// Check for Multisite
|
216 |
+
if ( is_multisite() ) {
|
217 |
+
global $blog_id;
|
218 |
+
$blog_details = get_blog_details( $blog_id );
|
219 |
+
$file_path = str_replace( $blog_details->path . 'files/', '/wp-content/blogs.dir/' . $blog_id . '/files/', $file_path );
|
220 |
+
}
|
221 |
+
|
222 |
+
// Some additional info about the image
|
223 |
+
$info = pathinfo( $file_path );
|
224 |
+
$dir = $info['dirname'];
|
225 |
+
$ext = $info['extension'];
|
226 |
+
$name = wp_basename( $file_path, ".$ext" );
|
227 |
+
|
228 |
+
// Suffix applied to filename
|
229 |
+
$suffix = "{$dest_width}x{$dest_height}";
|
230 |
+
|
231 |
+
// Get the destination file name
|
232 |
+
$dest_file_name = "{$dir}/{$name}-{$suffix}.{$ext}";
|
233 |
+
|
234 |
+
// No need to resize & create a new image if it already exists!
|
235 |
+
if ( !file_exists( $dest_file_name ) ) {
|
236 |
+
|
237 |
+
/*
|
238 |
+
* Bail if this image isn't in the Media Library either.
|
239 |
+
* We only want to resize Media Library images, so we can be sure they get deleted correctly when appropriate.
|
240 |
+
*/
|
241 |
+
$query = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE guid='%s'", $url );
|
242 |
+
$get_attachment = $wpdb->get_results( $query );
|
243 |
+
if ( !$get_attachment )
|
244 |
+
return array( 'url' => $url, 'width' => $width, 'height' => $height );
|
245 |
+
|
246 |
+
$image = wp_load_image( $file_path );
|
247 |
+
if ( !is_resource( $image ) )
|
248 |
+
return new WP_Error( 'error_loading_image_as_resource', $image, $file_path );
|
249 |
+
|
250 |
+
// Get the current image dimensions and type
|
251 |
+
$size = @getimagesize( $file_path );
|
252 |
+
if ( !$size )
|
253 |
+
return new WP_Error( 'file_path_getimagesize_failed', 'Failed to get $file_path information using getimagesize.' );
|
254 |
+
list( $orig_width, $orig_height, $orig_type ) = $size;
|
255 |
+
|
256 |
+
// Create new image
|
257 |
+
$new_image = wp_imagecreatetruecolor( $dest_width, $dest_height );
|
258 |
+
|
259 |
+
// Do some proportional cropping if enabled
|
260 |
+
if ( $crop ) {
|
261 |
+
|
262 |
+
$src_x = $src_y = 0;
|
263 |
+
$src_w = $orig_width;
|
264 |
+
$src_h = $orig_height;
|
265 |
+
|
266 |
+
$cmp_x = $orig_width / $dest_width;
|
267 |
+
$cmp_y = $orig_height / $dest_height;
|
268 |
+
|
269 |
+
// Calculate x or y coordinate, and width or height of source
|
270 |
+
if ( $cmp_x > $cmp_y ) {
|
271 |
+
$src_w = round( $orig_width / $cmp_x * $cmp_y );
|
272 |
+
$src_x = round( ( $orig_width - ( $orig_width / $cmp_x * $cmp_y ) ) / 2 );
|
273 |
+
}
|
274 |
+
else if ( $cmp_y > $cmp_x ) {
|
275 |
+
$src_h = round( $orig_height / $cmp_y * $cmp_x );
|
276 |
+
$src_y = round( ( $orig_height - ( $orig_height / $cmp_y * $cmp_x ) ) / 2 );
|
277 |
+
}
|
278 |
+
|
279 |
+
// Create the resampled image
|
280 |
+
imagecopyresampled( $new_image, $image, 0, 0, $src_x, $src_y, $dest_width, $dest_height, $src_w, $src_h );
|
281 |
+
}
|
282 |
+
else
|
283 |
+
imagecopyresampled( $new_image, $image, 0, 0, 0, 0, $dest_width, $dest_height, $orig_width, $orig_height );
|
284 |
+
|
285 |
+
// Convert from full colors to index colors, like original PNG.
|
286 |
+
if ( IMAGETYPE_PNG == $orig_type && function_exists( 'imageistruecolor' ) && !imageistruecolor( $image ) )
|
287 |
+
imagetruecolortopalette( $new_image, false, imagecolorstotal( $image ) );
|
288 |
+
|
289 |
+
// Remove the original image from memory (no longer needed)
|
290 |
+
imagedestroy( $image );
|
291 |
+
|
292 |
+
// Check the image is the correct file type
|
293 |
+
if ( IMAGETYPE_GIF == $orig_type ) {
|
294 |
+
if ( !imagegif( $new_image, $dest_file_name ) )
|
295 |
+
return new WP_Error( 'resize_path_invalid', 'Resize path invalid (GIF)' );
|
296 |
+
}
|
297 |
+
elseif ( IMAGETYPE_PNG == $orig_type ) {
|
298 |
+
if ( !imagepng( $new_image, $dest_file_name ) )
|
299 |
+
return new WP_Error( 'resize_path_invalid', 'Resize path invalid (PNG).' );
|
300 |
+
}
|
301 |
+
else {
|
302 |
+
|
303 |
+
// All other formats are converted to jpg
|
304 |
+
if ( 'jpg' != $ext && 'jpeg' != $ext )
|
305 |
+
$dest_file_name = "{$dir}/{$name}-{$suffix}.jpg";
|
306 |
+
if ( !imagejpeg( $new_image, $dest_file_name, apply_filters( 'resize_jpeg_quality', 90 ) ) )
|
307 |
+
return new WP_Error( 'resize_path_invalid', 'Resize path invalid (JPG).' );
|
308 |
+
}
|
309 |
+
|
310 |
+
// Remove new image from memory (no longer needed as well)
|
311 |
+
imagedestroy( $new_image );
|
312 |
+
|
313 |
+
// Set correct file permissions
|
314 |
+
$stat = stat( dirname( $dest_file_name ) );
|
315 |
+
$perms = $stat['mode'] & 0000666;
|
316 |
+
@chmod( $dest_file_name, $perms );
|
317 |
+
|
318 |
+
// Get some information about the resized image
|
319 |
+
$new_size = @getimagesize( $dest_file_name );
|
320 |
+
if ( !$new_size )
|
321 |
+
return new WP_Error( 'resize_path_getimagesize_failed', 'Failed to get $dest_file_name (resized image) info via @getimagesize', $dest_file_name );
|
322 |
+
list( $resized_width, $resized_height, $resized_type ) = $new_size;
|
323 |
+
|
324 |
+
// Get the new image URL
|
325 |
+
$resized_url = str_replace( basename( $url ), basename( $dest_file_name ), $url );
|
326 |
+
|
327 |
+
// Add the resized dimensions to original image metadata (so we can delete our resized images when the original image is delete from the Media Library)
|
328 |
+
$metadata = wp_get_attachment_metadata( $get_attachment[0]->ID );
|
329 |
+
if ( isset( $metadata['image_meta'] ) ) {
|
330 |
+
$metadata['image_meta']['resized_images'][] = $resized_width . 'x' . $resized_height;
|
331 |
+
wp_update_attachment_metadata( $get_attachment[0]->ID, $metadata );
|
332 |
+
}
|
333 |
+
|
334 |
+
// Return array with resized image information
|
335 |
+
$image_array = array(
|
336 |
+
'url' => $resized_url,
|
337 |
+
'width' => $resized_width,
|
338 |
+
'height' => $resized_height,
|
339 |
+
'type' => $resized_type
|
340 |
+
);
|
341 |
+
}
|
342 |
+
else {
|
343 |
+
$image_array = array(
|
344 |
+
'url' => str_replace( basename( $url ), basename( $dest_file_name ), $url ),
|
345 |
+
'width' => $dest_width,
|
346 |
+
'height' => $dest_height,
|
347 |
+
'type' => $ext
|
348 |
+
);
|
349 |
+
}
|
350 |
+
|
351 |
+
return $image_array;
|
352 |
+
}
|
353 |
+
}
|
354 |
+
|
355 |
+
/*-----------------------------------------------------------------------------------*/
|
356 |
+
/* changing default Excerpt length
|
357 |
+
/*-----------------------------------------------------------------------------------*/
|
358 |
+
|
359 |
+
if ( ! function_exists( 'tx_custom_excerpt' ) ) {
|
360 |
+
function tx_custom_excerpt($limit) {
|
361 |
+
$excerpt = explode(' ', get_the_excerpt(), $limit);
|
362 |
+
if (count($excerpt)>=$limit) {
|
363 |
+
array_pop($excerpt);
|
364 |
+
$excerpt = implode(" ",$excerpt).' ...';
|
365 |
+
} else {
|
366 |
+
$excerpt = implode(" ",$excerpt);
|
367 |
+
}
|
368 |
+
//$excerpt = preg_replace('`[[^]]*]`','',$excerpt);
|
369 |
+
$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
|
370 |
+
return $excerpt;
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
|
375 |
+
function tx_slider_cat_list ()
|
376 |
+
{
|
377 |
+
$post_type = 'itrans-slider';
|
378 |
+
$tax = 'itrans-slider-category';
|
379 |
+
$return = '';
|
380 |
+
|
381 |
+
$terms = get_terms('itrans-slider-category');
|
382 |
+
if ( !empty( $terms ) && !is_wp_error( $terms ) )
|
383 |
+
{
|
384 |
+
foreach ( $terms as $term )
|
385 |
+
{
|
386 |
+
$return .= '<option value="'.$term->slug.'">' . $term->name . '</option>';
|
387 |
+
}
|
388 |
+
}
|
389 |
+
|
390 |
+
return $return;
|
391 |
+
}
|
392 |
+
|
393 |
+
|
394 |
+
function tx_load_jqvariables(){
|
395 |
+
//wp_enqueue_script('lcjquerytest', get_stylesheet_directory_uri() . '/js/lc-jquery.js', array('jquery'), '1.0', true);
|
396 |
+
//wp_enqueue_script('tx-main', plugins_url('/js/tx_main.js', __FILE__));
|
397 |
+
|
398 |
+
$data = 'xyz';
|
399 |
+
wp_localize_script( 'tx-main', 'tx_t1', tx_slider_cat_list () );
|
400 |
+
}
|
401 |
+
add_action( 'admin_enqueue_scripts', 'tx_load_jqvariables' );
|
tx-shortcodes.js
CHANGED
@@ -21,39 +21,30 @@
|
|
21 |
// you should achieve this using AJAX instead of direct html code like this
|
22 |
var form_tx = jQuery('<div id="txshortcodes-form"><div id="tx-shortcode-form"><table id="txshortcodes-table" class="form-table">\
|
23 |
<tr>\
|
24 |
-
<td class="tx-heading"><h2>TX Shortcodes</h2></td>\
|
25 |
</tr>\
|
26 |
<tr>\
|
27 |
-
<td class="shortcode-list"><span id="columns">Columns</span></td>\
|
28 |
</tr>\
|
29 |
<tr>\
|
30 |
-
<td class="shortcode-list"><span id="
|
31 |
</tr>\
|
32 |
<tr>\
|
33 |
-
<td class="shortcode-list"><span id="
|
34 |
</tr>\
|
35 |
<tr>\
|
36 |
-
<td class="shortcode-list"><span id="
|
37 |
</tr>\
|
38 |
<tr>\
|
39 |
-
<td class="shortcode-list"><span id="
|
40 |
</tr>\
|
41 |
<tr>\
|
42 |
-
<td class="shortcode-list"><span id="
|
43 |
-
</tr>\
|
44 |
-
<tr>\
|
45 |
-
<td class="shortcode-list"><span id="services">Services</span></td>\
|
46 |
-
</tr>\
|
47 |
-
<tr>\
|
48 |
-
<td class="shortcode-list"><span id="portfolios">Portfolios</span></td>\
|
49 |
-
</tr>\
|
50 |
-
<tr>\
|
51 |
-
<td class="shortcode-list"><span id="recentposts">Recent Posts</span></td>\
|
52 |
</tr>\
|
53 |
</table>\
|
54 |
-
<
|
55 |
<input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
|
56 |
-
</
|
57 |
<div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
|
58 |
</div></div>');
|
59 |
|
@@ -77,7 +68,14 @@
|
|
77 |
setTimeout(function() {
|
78 |
jQuery.colorbox({inline:true, href:"#tx-devider-form"});
|
79 |
}, 500);
|
80 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
//call deviders
|
83 |
form_tx.find('#testimonials').click(function(){
|
@@ -126,7 +124,21 @@
|
|
126 |
setTimeout(function() {
|
127 |
jQuery.colorbox({inline:true, href:"#tx-spacer-form"});
|
128 |
}, 500);
|
129 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
form_tx.find('.modal-close').click(function(){
|
132 |
jQuery.colorbox.close();
|
@@ -168,6 +180,15 @@
|
|
168 |
</select>\
|
169 |
</td>\
|
170 |
</tr>\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
<tr>\
|
172 |
<th><label for="portfolio-carusel">Show as carousel</label></th>\
|
173 |
<td><select name="carusel" id="portfolio-carusel">\
|
@@ -198,10 +219,11 @@
|
|
198 |
var number_of_column = table.find('#portfolio-columns').val();
|
199 |
var hide_cat = table.find('#portfolio-hidecat').val();
|
200 |
var hide_excerpt = table.find('#portfolio-hideexcerpt').val();
|
|
|
201 |
var show_carusel = table.find('#portfolio-carusel').val();
|
202 |
|
203 |
|
204 |
-
var shortcode = '[tx_portfolio items="'+number_of_item+'" columns="'+number_of_column+'" hide_cat="'+hide_cat+'" hide_excerpt="'+hide_excerpt+'" carousel="'+show_carusel+'"]<br/>';
|
205 |
|
206 |
// inserts the shortcode into the active editor
|
207 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
@@ -253,6 +275,15 @@
|
|
253 |
</select><br />\
|
254 |
</td>\
|
255 |
</tr>\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
<tr>\
|
257 |
<th><label for="blog-carusel">Show as carousel</label></th>\
|
258 |
<td><select name="carusel" id="blog-carusel">\
|
@@ -283,9 +314,10 @@
|
|
283 |
var number_of_column = table.find('#blog-columns').val();
|
284 |
var show_hide_cat = table.find('#blog-hidecat').val();
|
285 |
var category_id = table.find('#blog-ids').val();
|
|
|
286 |
var show_carusel = table.find('#blog-carusel').val();
|
287 |
|
288 |
-
var shortcode = '[tx_blog items="'+number_of_item+'" columns="'+number_of_column+'" showcat="'+show_hide_cat+'" category_id="'+category_id+'" carousel="'+show_carusel+'"]<br/>';
|
289 |
|
290 |
// inserts the shortcode into the active editor
|
291 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
@@ -364,6 +396,97 @@
|
|
364 |
});
|
365 |
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
/*
|
368 |
* deviders form
|
369 |
*/
|
@@ -701,7 +824,145 @@
|
|
701 |
jQuery.colorbox.close();
|
702 |
});
|
703 |
|
704 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
705 |
|
706 |
|
707 |
|
21 |
// you should achieve this using AJAX instead of direct html code like this
|
22 |
var form_tx = jQuery('<div id="txshortcodes-form"><div id="tx-shortcode-form"><table id="txshortcodes-table" class="form-table">\
|
23 |
<tr>\
|
24 |
+
<td class="tx-heading" colspan="2"><h2>TX Shortcodes</h2></td>\
|
25 |
</tr>\
|
26 |
<tr>\
|
27 |
+
<td class="shortcode-list" width="50%"><span id="columns">Columns</span></td><td class="shortcode-list"><span id="deviders">Divider</span></td>\
|
28 |
</tr>\
|
29 |
<tr>\
|
30 |
+
<td class="shortcode-list"><span id="spacer">Spacer</span></td><td class="shortcode-list"><span id="testimonials">Testimonials</span></td>\
|
31 |
</tr>\
|
32 |
<tr>\
|
33 |
+
<td class="shortcode-list"><span id="buttons">Butons</span></td><td class="shortcode-list"><span id="calltoact">Call To Act</span></td>\
|
34 |
</tr>\
|
35 |
<tr>\
|
36 |
+
<td class="shortcode-list"><span id="services">Services</span></td><td class="shortcode-list"><span id="portfolios">Portfolios</span></td>\
|
37 |
</tr>\
|
38 |
<tr>\
|
39 |
+
<td class="shortcode-list"><span id="recentposts">Recent Posts</span></td><td class="shortcode-list"><span id="heading">Heading</span></td>\
|
40 |
</tr>\
|
41 |
<tr>\
|
42 |
+
<td class="shortcode-list"><span id="wooprods">Product Carousel <small>(WooCommerce)</small></span></td><td class="shortcode-list"><span id="itrans-slider">i-trans Slider</span></td>\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</tr>\
|
44 |
</table>\
|
45 |
+
<div class="nx-sh-cancel">\
|
46 |
<input type="button" class="modal-close button-primary" value="Cancel" name="Cancel" />\
|
47 |
+
</div>\
|
48 |
<div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
|
49 |
</div></div>');
|
50 |
|
68 |
setTimeout(function() {
|
69 |
jQuery.colorbox({inline:true, href:"#tx-devider-form"});
|
70 |
}, 500);
|
71 |
+
});
|
72 |
+
|
73 |
+
//call Heding
|
74 |
+
form_tx.find('#heading').click(function(){
|
75 |
+
setTimeout(function() {
|
76 |
+
jQuery.colorbox({inline:true, href:"#tx-heading-form"});
|
77 |
+
}, 500);
|
78 |
+
});
|
79 |
|
80 |
//call deviders
|
81 |
form_tx.find('#testimonials').click(function(){
|
124 |
setTimeout(function() {
|
125 |
jQuery.colorbox({inline:true, href:"#tx-spacer-form"});
|
126 |
}, 500);
|
127 |
+
});
|
128 |
+
|
129 |
+
//Woocommerce Products
|
130 |
+
form_tx.find('#wooprods').click(function(){
|
131 |
+
setTimeout(function() {
|
132 |
+
jQuery.colorbox({inline:true, href:"#tx-wooprods-form"});
|
133 |
+
}, 500);
|
134 |
+
});
|
135 |
+
|
136 |
+
//i-trans slider
|
137 |
+
form_tx.find('#itrans-slider').click(function(){
|
138 |
+
setTimeout(function() {
|
139 |
+
jQuery.colorbox({inline:true, href:"#tx-slider-form"});
|
140 |
+
}, 500);
|
141 |
+
});
|
142 |
|
143 |
form_tx.find('.modal-close').click(function(){
|
144 |
jQuery.colorbox.close();
|
180 |
</select>\
|
181 |
</td>\
|
182 |
</tr>\
|
183 |
+
<tr>\
|
184 |
+
<th><label for="portfolio-showpage">Show Pagination</label></th>\
|
185 |
+
<td><select name="showpage" id="portfolio-showpage">\
|
186 |
+
<option value="no">No</option>\
|
187 |
+
<option value="yes">Yes</option>\
|
188 |
+
</select><br />\
|
189 |
+
<small>Pagination will not work with carousel</small>\
|
190 |
+
</td>\
|
191 |
+
</tr>\
|
192 |
<tr>\
|
193 |
<th><label for="portfolio-carusel">Show as carousel</label></th>\
|
194 |
<td><select name="carusel" id="portfolio-carusel">\
|
219 |
var number_of_column = table.find('#portfolio-columns').val();
|
220 |
var hide_cat = table.find('#portfolio-hidecat').val();
|
221 |
var hide_excerpt = table.find('#portfolio-hideexcerpt').val();
|
222 |
+
var show_page = table.find('#portfolio-showpage').val();
|
223 |
var show_carusel = table.find('#portfolio-carusel').val();
|
224 |
|
225 |
|
226 |
+
var shortcode = '[tx_portfolio items="'+number_of_item+'" columns="'+number_of_column+'" hide_cat="'+hide_cat+'" hide_excerpt="'+hide_excerpt+'" show_pagination="'+show_page+'" carousel="'+show_carusel+'"]<br/>';
|
227 |
|
228 |
// inserts the shortcode into the active editor
|
229 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
275 |
</select><br />\
|
276 |
</td>\
|
277 |
</tr>\
|
278 |
+
<tr>\
|
279 |
+
<th><label for="blog-showpage">Show Pagination</label></th>\
|
280 |
+
<td><select name="showpage" id="blog-showpage">\
|
281 |
+
<option value="no">No</option>\
|
282 |
+
<option value="yes">Yes</option>\
|
283 |
+
</select><br />\
|
284 |
+
<small>Pagination will not work with carousel</small>\
|
285 |
+
</td>\
|
286 |
+
</tr>\
|
287 |
<tr>\
|
288 |
<th><label for="blog-carusel">Show as carousel</label></th>\
|
289 |
<td><select name="carusel" id="blog-carusel">\
|
314 |
var number_of_column = table.find('#blog-columns').val();
|
315 |
var show_hide_cat = table.find('#blog-hidecat').val();
|
316 |
var category_id = table.find('#blog-ids').val();
|
317 |
+
var show_page = table.find('#blog-showpage').val();
|
318 |
var show_carusel = table.find('#blog-carusel').val();
|
319 |
|
320 |
+
var shortcode = '[tx_blog items="'+number_of_item+'" columns="'+number_of_column+'" showcat="'+show_hide_cat+'" category_id="'+category_id+'" show_pagination="'+show_page+'" carousel="'+show_carusel+'"]<br/>';
|
321 |
|
322 |
// inserts the shortcode into the active editor
|
323 |
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
396 |
});
|
397 |
|
398 |
|
399 |
+
/*
|
400 |
+
* heading form
|
401 |
+
*/
|
402 |
+
jQuery(function(){
|
403 |
+
// creates a form to be displayed everytime the button is clicked
|
404 |
+
// you should achieve this using AJAX instead of direct html code like this
|
405 |
+
var form_heading = jQuery('<div id="heading-form" class="tx-sh-form"><div id="tx-heading-form"><table id="heading-table" class="form-table">\
|
406 |
+
<tr>\
|
407 |
+
<td class="tx-heading" colspan="2"><h2>Heading</h2></td>\
|
408 |
+
</tr>\
|
409 |
+
<tr>\
|
410 |
+
<th><label for="heading-style">Heading Style</label></th>\
|
411 |
+
<td><select name="style" id="heading-style">\
|
412 |
+
<option value="default">Default</option>\
|
413 |
+
</select><br />\
|
414 |
+
<small>Select the heading style</small></td>\
|
415 |
+
</tr>\
|
416 |
+
<tr>\
|
417 |
+
<th><label for="heading-text">Heading Text</label></th>\
|
418 |
+
<td><input type="text" name="text" id="heading-text" value="Heading Text" /><br />\
|
419 |
+
<small>Specify the heading text.</small>\
|
420 |
+
</tr>\
|
421 |
+
<tr>\
|
422 |
+
<th><label for="heading-tag">Heading Tag</label></th>\
|
423 |
+
<td><select name="tag" id="heading-tag">\
|
424 |
+
<option value="h1">H1</option>\
|
425 |
+
<option value="h2" selected>H2</option>\
|
426 |
+
<option value="h3">H3</option>\
|
427 |
+
<option value="h4">H4</option>\
|
428 |
+
<option value="h5">H5</option>\
|
429 |
+
<option value="h6">H6</option>\
|
430 |
+
</select><br />\
|
431 |
+
<small>Select the Heading tag.</small></td>\
|
432 |
+
</tr>\
|
433 |
+
<tr>\
|
434 |
+
<th><label for="heading-align">Text Alignment</label></th>\
|
435 |
+
<td><select name="align" id="heading-align">\
|
436 |
+
<option value="left">Left</option>\
|
437 |
+
<option value="center">Center</option>\
|
438 |
+
<option value="right">right</option>\
|
439 |
+
</select><br />\
|
440 |
+
<small>Select heading text alignment</small></td>\
|
441 |
+
</tr>\
|
442 |
+
<tr>\
|
443 |
+
<th><label for="heading-size">Heading Size</label></th>\
|
444 |
+
<td><input type="number" name="size" id="heading-size" min="0" max="120" value="24" /><br />\
|
445 |
+
<small>Heading font size in px</small>\
|
446 |
+
</tr>\
|
447 |
+
<tr>\
|
448 |
+
<th><label for="heading-margin">Heading Margin</label></th>\
|
449 |
+
<td><input type="number" name="margin" id="heading-margin" min="0" max="120" value="24" /><br />\
|
450 |
+
<small>Heading bottom margin in px</small>\
|
451 |
+
</tr>\
|
452 |
+
</table>\
|
453 |
+
<p class="submit">\
|
454 |
+
<input type="button" id="heading-submit" class="button-primary" value="Insert Heading" name="submit" />\
|
455 |
+
<input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
|
456 |
+
</p>\
|
457 |
+
<div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
|
458 |
+
</div></div>');
|
459 |
+
|
460 |
+
var table = form_heading.find('#heading-table');
|
461 |
+
form_heading.appendTo('body').hide();
|
462 |
+
|
463 |
+
// handles the click event of the submit button
|
464 |
+
form_heading.find('#heading-submit').click(function(){
|
465 |
+
|
466 |
+
var style = table.find('#heading-style').val();
|
467 |
+
var heading_text = table.find('#heading-text').val();
|
468 |
+
var tag = table.find('#heading-tag').val();
|
469 |
+
var size = table.find('#heading-size').val();
|
470 |
+
var margin = table.find('#heading-margin').val();
|
471 |
+
var align = table.find('#heading-align').val();
|
472 |
+
|
473 |
+
var shortcode = '[tx_heading style="'+style+'" heading_text="'+heading_text+'" tag="'+tag+'" size="'+size+'" margin="'+margin+'" align="'+align+'"]<br/>';
|
474 |
+
|
475 |
+
// inserts the shortcode into the active editor
|
476 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
477 |
+
|
478 |
+
// closes Thickbox
|
479 |
+
jQuery.colorbox.close();
|
480 |
+
});
|
481 |
+
|
482 |
+
form_heading.find('#modal-close').click(function(){
|
483 |
+
jQuery.colorbox.close();
|
484 |
+
});
|
485 |
+
|
486 |
+
});
|
487 |
+
|
488 |
+
|
489 |
+
|
490 |
/*
|
491 |
* deviders form
|
492 |
*/
|
824 |
jQuery.colorbox.close();
|
825 |
});
|
826 |
|
827 |
+
});
|
828 |
+
|
829 |
+
|
830 |
+
/*
|
831 |
+
* wooproducts form
|
832 |
+
*/
|
833 |
+
jQuery(function(){
|
834 |
+
var form_wooprods = jQuery('<div id="wooprods-form" class="tx-sh-form"><div id="tx-wooprods-form"><table id="wooprods-table" class="form-table">\
|
835 |
+
<tr>\
|
836 |
+
<td class="tx-heading" colspan="2"><h2>WooCommerce Products Carousel</h2></td>\
|
837 |
+
</tr>\
|
838 |
+
<tr>\
|
839 |
+
<th><label for="wooprods-type">Product Listing Type</label></th>\
|
840 |
+
<td><select name="style" id="wooprods-type">\
|
841 |
+
<option value="product_categories">Product Categories</option>\
|
842 |
+
<option value="recent_products">Recent Products</option>\
|
843 |
+
<option value="featured_products">Featured Products</option>\
|
844 |
+
<option value="sale_products">Products On Sale</option>\
|
845 |
+
<option value="best_selling_products">Best Selling Products</option>\
|
846 |
+
<option value="top_rated_products">Top Rated Products</option>\
|
847 |
+
<option value="products">Products By Ids</option>\
|
848 |
+
</select><br />\
|
849 |
+
<small>Specify product listing type</small></td>\
|
850 |
+
</tr>\
|
851 |
+
<tr>\
|
852 |
+
<th><label for="wooprods-ids">Category/Product Ids (optional)</label></th>\
|
853 |
+
<td><input type="text" name="ids" id="wooprods-ids" value="" /><br />\
|
854 |
+
<small>Comma separeted category or product ids (works with "Product Categories" and "Products By Ids" )</small>\
|
855 |
+
</tr>\
|
856 |
+
<tr>\
|
857 |
+
<th><label for="wooprods-columns">Number Of Columns</label></th>\
|
858 |
+
<td><input type="number" min="1" max="4" name="coumns" id="wooprods-columns" value="4" /><br />\
|
859 |
+
<small>Number of columns or items visible</small>\
|
860 |
+
</tr>\
|
861 |
+
<tr>\
|
862 |
+
<th><label for="wooprods-items">Number Of Items</label></th>\
|
863 |
+
<td><input type="number" min="1" max="16" name="items" id="wooprods-items" value="8" /><br />\
|
864 |
+
<small>Total number of items</small>\
|
865 |
+
</tr>\
|
866 |
+
</table>\
|
867 |
+
<div class="nx-sh-cancel">\
|
868 |
+
<input type="button" id="wooprods-submit" class="button-primary" value="Insert Wooprods" name="submit" />\
|
869 |
+
<input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
|
870 |
+
</div>\
|
871 |
+
<div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
|
872 |
+
</div></div>');
|
873 |
+
|
874 |
+
var table = form_wooprods.find('#wooprods-table');
|
875 |
+
form_wooprods.appendTo('body').hide();
|
876 |
+
|
877 |
+
// handles the click event of the submit button
|
878 |
+
form_wooprods.find('#wooprods-submit').click(function(){
|
879 |
+
|
880 |
+
var wooprods_type = table.find('#wooprods-type').val();
|
881 |
+
var wooprods_ids = table.find('#wooprods-ids').val();
|
882 |
+
var wooprods_columns = table.find('#wooprods-columns').val();
|
883 |
+
var wooprods_items = table.find('#wooprods-items').val();
|
884 |
+
|
885 |
+
var shortcode = '[tx_prodscroll type="'+wooprods_type+'" ids="'+wooprods_ids+'" columns="'+wooprods_columns+'" items="'+wooprods_items+'"]<br/>';
|
886 |
+
|
887 |
+
// inserts the shortcode into the active editor
|
888 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
889 |
+
|
890 |
+
// closes Thickbox
|
891 |
+
jQuery.colorbox.close();
|
892 |
+
});
|
893 |
+
|
894 |
+
form_wooprods.find('#modal-close').click(function(){
|
895 |
+
jQuery.colorbox.close();
|
896 |
+
});
|
897 |
+
|
898 |
+
});
|
899 |
+
|
900 |
+
|
901 |
+
/*
|
902 |
+
* Slider
|
903 |
+
*/
|
904 |
+
jQuery(function(){
|
905 |
+
var form_slider = jQuery('<div id="slider-form" class="tx-sh-form"><div id="tx-slider-form"><table id="slider-table" class="form-table">\
|
906 |
+
<tr>\
|
907 |
+
<td class="tx-heading" colspan="2"><h2>i-trans Slider</h2></td>\
|
908 |
+
</tr>\
|
909 |
+
<tr>\
|
910 |
+
<th><label for="slider-style">Slider Style</label></th>\
|
911 |
+
<td><select name="style" id="slider-style">\
|
912 |
+
<option value="default">Default</option>\
|
913 |
+
</select><br />\
|
914 |
+
<small>Select slider style</small></td>\
|
915 |
+
</tr>\
|
916 |
+
<tr>\
|
917 |
+
<th><label for="slider-category">Slider Category</label></th>\
|
918 |
+
<td><select name="category" id="slider-category">\
|
919 |
+
<option value="">All</option>'+tx_slider_cat()+'\
|
920 |
+
</select><br />\
|
921 |
+
<small>Select slider category for category based multiple slider(optional)</small></td>\
|
922 |
+
</tr>\
|
923 |
+
<tr>\
|
924 |
+
<th><label for="slider-items">Number Of Items (slides)</label></th>\
|
925 |
+
<td><input type="number" min="1" max="16" name="items" id="slider-items" value="4" /><br />\
|
926 |
+
<small>Number of slides in the slider</small>\
|
927 |
+
</tr>\
|
928 |
+
<tr>\
|
929 |
+
<th><label for="slider-delay">Delay</label></th>\
|
930 |
+
<td><input type="number" min="1000" max="16000" name="delay" step="500" id="slider-delay" value="8000" /><br />\
|
931 |
+
<small>Duration between slides in miliseconds</small>\
|
932 |
+
</tr>\
|
933 |
+
</table>\
|
934 |
+
<div class="nx-sh-cancel">\
|
935 |
+
<input type="button" id="slider-submit" class="button-primary" value="Insert Slider" name="submit" />\
|
936 |
+
<input type="button" id="modal-close" class="modal-close button-primary" value="Cancel" name="Cancel" />\
|
937 |
+
</div>\
|
938 |
+
<div class="tnext-bottom-lebel">'+tx_footer_include()+'</div>\
|
939 |
+
</div></div>');
|
940 |
+
|
941 |
+
var table = form_slider.find('#slider-table');
|
942 |
+
form_slider.appendTo('body').hide();
|
943 |
+
|
944 |
+
// handles the click event of the submit button
|
945 |
+
form_slider.find('#slider-submit').click(function(){
|
946 |
+
|
947 |
+
var style = table.find('#slider-style').val();
|
948 |
+
var category = table.find('#slider-category').val();
|
949 |
+
var slider_items = table.find('#slider-items').val();
|
950 |
+
var slider_delay = table.find('#slider-delay').val();
|
951 |
+
|
952 |
+
var shortcode = '[tx_slider style="'+style+'" category="'+category+'" delay="'+slider_delay+'" items="'+slider_items+'"]<br/>';
|
953 |
+
|
954 |
+
// inserts the shortcode into the active editor
|
955 |
+
tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode);
|
956 |
+
|
957 |
+
// closes Thickbox
|
958 |
+
jQuery.colorbox.close();
|
959 |
+
});
|
960 |
+
|
961 |
+
form_slider.find('#modal-close').click(function(){
|
962 |
+
jQuery.colorbox.close();
|
963 |
+
});
|
964 |
+
|
965 |
+
});
|
966 |
|
967 |
|
968 |
|
tx-toolkit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/*
|
4 |
Plugin Name: TemplatesNext ToolKit
|
5 |
Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
|
6 |
-
Version: 1.0.
|
7 |
Author: TemplatesNext
|
8 |
Author URI: http://templatesnext.org/
|
9 |
License: GPLv2 or later
|
@@ -51,12 +51,38 @@ function tx_enqueue_color_picker( $hook_suffix ) {
|
|
51 |
}
|
52 |
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
//require_once('post-types.php');
|
56 |
require_once('tx-functions.php');
|
57 |
require_once('shortcodes.php');
|
58 |
require_once('custom-post-types/testimonials-type.php');
|
59 |
require_once('custom-post-types/portfolio-type.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
|
62 |
|
3 |
/*
|
4 |
Plugin Name: TemplatesNext ToolKit
|
5 |
Description: Custom Portfolio and Shortcode functionality for TemplatesNext Wordpress Themes
|
6 |
+
Version: 1.0.8
|
7 |
Author: TemplatesNext
|
8 |
Author URI: http://templatesnext.org/
|
9 |
License: GPLv2 or later
|
51 |
}
|
52 |
|
53 |
|
54 |
+
// multiple featured image
|
55 |
+
add_theme_support( 'post-thumbnails' );
|
56 |
+
require_once('custom-post-types/multi-post-thumbnails.php'); /* Must be located directly under lib folder */
|
57 |
+
// Define additional "post thumbnails". Relies on MultiPostThumbnails to work
|
58 |
+
if (class_exists('MultiPostThumbnails')) {
|
59 |
+
|
60 |
+
$types = array('page', 'portfolio' ); /* 'landing_pages' adds support for landing pages CPT, 'post' adds support for blog single pages */
|
61 |
+
foreach($types as $type) {
|
62 |
+
new MultiPostThumbnails(array('label' => '2nd Feature Image', 'id' => 'feature-image-2', 'post_type' => $type));
|
63 |
+
new MultiPostThumbnails(array('label' => '3rd Feature Image', 'id' => 'feature-image-3', 'post_type' => $type));
|
64 |
+
//new MultiPostThumbnails(array('label' => '4th Feature Image', 'id' => 'feature-image-4', 'post_type' => $type));
|
65 |
+
//new MultiPostThumbnails(array('label' => '5th Feature Image', 'id' => 'feature-image-5', 'post_type' => $type));
|
66 |
+
}
|
67 |
+
|
68 |
+
};
|
69 |
+
|
70 |
+
// for thumb retrive https://github.com/voceconnect/multi-post-thumbnails/wiki
|
71 |
+
|
72 |
|
73 |
//require_once('post-types.php');
|
74 |
require_once('tx-functions.php');
|
75 |
require_once('shortcodes.php');
|
76 |
require_once('custom-post-types/testimonials-type.php');
|
77 |
require_once('custom-post-types/portfolio-type.php');
|
78 |
+
require_once('custom-post-types/itrans-slider.php');
|
79 |
+
|
80 |
+
/*-----------------------------------------------------------------------------------*/
|
81 |
+
/* Metabox
|
82 |
+
/*-----------------------------------------------------------------------------------*/
|
83 |
+
|
84 |
+
require_once('/inc/tnext-meta.php');
|
85 |
+
require_once('/inc/meta-box/meta-box.php');
|
86 |
|
87 |
|
88 |
|