first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
[data-notice="fcf-admin-notice"] {
padding: 20px;
}
[data-notice="fcf-admin-notice"] ~ [data-notice="fcf-admin-notice"] {
display: none;
}
[data-notice="fcf-admin-notice"] img {
float: left;
width: 82px;
height: auto;
margin-right: 20px;
}
[data-notice="fcf-admin-notice"] h2 {
max-width: 800px;
margin: 0;
padding: 0;
font-size: 16px;
line-height: 1.625;
}
[data-notice="fcf-admin-notice"] p {
max-width: 800px;
margin: 0;
padding: 3px 0;
font-size: 16px;
line-height: 1.625;
}
[data-notice="fcf-admin-notice"] p .dashicons {
font-size: 16px;
line-height: 1.625;
}
[data-notice="fcf-admin-notice"] .button {
margin: 10px 0;
}
[data-notice="fcf-admin-notice"] > div {
clear: both;
}

View File

@@ -0,0 +1 @@
[data-notice="fcf-admin-notice"]{padding:20px}[data-notice="fcf-admin-notice"]~[data-notice="fcf-admin-notice"]{display:none}[data-notice="fcf-admin-notice"] img{float:left;width:82px;height:auto;margin-right:20px}[data-notice="fcf-admin-notice"] h2{max-width:800px;margin:0;padding:0;font-size:16px;line-height:1.625}[data-notice="fcf-admin-notice"] p{max-width:800px;margin:0;padding:3px 0;font-size:16px;line-height:1.625}[data-notice="fcf-admin-notice"] p .dashicons{font-size:16px;line-height:1.625}[data-notice="fcf-admin-notice"] .button{margin:10px 0}[data-notice="fcf-admin-notice"]>div{clear:both}

View File

@@ -0,0 +1,30 @@
.inspire_checkout_fields_hide{
display: none;
}
.woocommerce-account input.button[name="save_address"]{
display: block!important;
clear: both;
}
.woocommerce-checkout .checkout .form-left{
float: left!important;
clear: left;
}
.woocommerce-checkout .checkout .form-right{
float: right!important;
}
.woocommerce-account .woocommerce .form-left{
float: left!important;
clear: left;
}
.woocommerce-account .woocommerce .form-right{
float: right!important;
}
span.inspire-file-error {
font-weight: bold;
}

View File

@@ -0,0 +1 @@
.inspire_checkout_fields_hide{display:none}.woocommerce-account input.button[name="save_address"]{display:block!important;clear:both}.woocommerce-checkout .checkout .form-left{float:left!important;clear:left}.woocommerce-checkout .checkout .form-right{float:right!important}.woocommerce-account .woocommerce .form-left{float:left!important;clear:left}.woocommerce-account .woocommerce .form-right{float:right!important}span.inspire-file-error{font-weight:700}

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -0,0 +1,474 @@
/*! jQuery UI - v1.9.2 - 2012-11-23
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css
* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
.ui-helper-clearfix:after { clear: both; }
.ui-helper-clearfix { zoom: 1; }
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; }
.ui-accordion .ui-accordion-icons { padding-left: 2.2em; }
.ui-accordion .ui-accordion-noicons { padding-left: .7em; }
.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; }
.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; }
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; }
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
.ui-button-icons-only { width: 3.4em; }
button.ui-button-icons-only { width: 3.7em; }
/*button text element */
.ui-button .ui-button-text { display: block; line-height: 1.4; }
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
/* no icon support for input elements, provide padding by default */
input.ui-button { padding: .4em 1em; }
/*button icon element(s) */
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
/*button sets*/
.ui-buttonset { margin-right: 7px; }
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
/* workarounds */
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
.ui-datepicker .ui-datepicker-prev { left:2px; }
.ui-datepicker .ui-datepicker-next { right:2px; }
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
.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; }
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year { width: 49%;}
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
.ui-datepicker td { border: 0; padding: 1px; }
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
.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; }
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
/* with multiple calendars */
.ui-datepicker.ui-datepicker-multi { width:auto; }
.ui-datepicker-multi .ui-datepicker-group { float:left; }
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
position: absolute; /*must have*/
z-index: -1; /*must have*/
filter: mask(); /*must have*/
top: -4px; /*must have*/
left: -4px; /*must have*/
width: 200px; /*must have*/
height: 200px; /*must have*/
}
.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; }
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
.ui-draggable .ui-dialog-titlebar { cursor: move; }
.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; }
.ui-menu .ui-menu { margin-top: -3px; position: absolute; }
.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; }
.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; }
.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; }
.ui-menu .ui-menu-item a.ui-state-focus,
.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; }
.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; }
.ui-menu .ui-state-disabled a { cursor: default; }
/* icon support */
.ui-menu-icons { position: relative; }
.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; }
/* left-aligned */
.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; }
/* right-aligned */
.ui-menu .ui-menu-icon { position: static; float: right; }
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
.ui-slider { position: relative; text-align: left; }
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
.ui-slider-horizontal { height: .8em; }
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
.ui-slider-vertical { width: .8em; height: 100px; }
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
.ui-slider-vertical .ui-slider-range-max { top: 0; }
.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
.ui-spinner-up { top: 0; }
.ui-spinner-down { bottom: 0; }
/* TR overrides */
.ui-spinner .ui-icon-triangle-1-s {
/* need to fix icons sprite */
background-position:-65px -16px;
}
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
/* Fades and background-images don't work well together in IE6, drop the image */
* html .ui-tooltip {
background-image: none;
}
body .ui-tooltip { border-width: 2px; }
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
.ui-widget-content a { color: #222222; }
.ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
.ui-widget-header a { color: #222222; }
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */
/* Icons
----------------------------------*/
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.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; }
.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; }
.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; }
.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; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,54 @@
body {
width: 100% !important;
}
#wrapper {
padding: 0 !important;
}
.print {
display: none !important;
}
table {
}
tr{
}
td{
vertical-align: middle!important;
}
.pagebreak {
page-break-before: always;
}
.no-page-break {
page-break-after: avoid;
}
h1{
font-size: 1.8em;
line-height: 1.8em;
font-weight: bold!important;
}
h2{
font-size: 1.6em;
line-height: 1.6em;
padding: 0 0 80px 0!important;
}
h3{
line-height: 1.2em;
font-size: 1.2em;
font-weight: bold!important;
}
.product thead tr{
background: #cfcfcf;
}
.product tr.color{
background: #efefef;
}

View File

@@ -0,0 +1 @@
body{width:100%!important}#wrapper{padding:0!important}.print{display:none!important}td{vertical-align:middle!important}.pagebreak{page-break-before:always}.no-page-break{page-break-after:avoid}h1{font-size:1.8em;line-height:1.8em;font-weight:bold!important}h2{font-size:1.6em;line-height:1.6em;padding:0 0 80px 0!important}h3{line-height:1.2em;font-size:1.2em;font-weight:bold!important}.product thead tr{background:#cfcfcf}.product tr.color{background:#efefef}

View File

@@ -0,0 +1,7 @@
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}

View File

@@ -0,0 +1 @@
html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,select,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,button,caption,cite,code,dfn,em,input,optgroup,option,select,strong,textarea,th,var{font:inherit}del,ins{text-decoration:none}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:baseline}sub{vertical-align:baseline}legend{color:#000}

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe900;" glyph-name="align-left" d="M29.248 228.576h599.552c16.224 0 29.248 13.024 29.248 29.248 0 0 0 0 0 0v87.552c0 16.224-13.024 29.248-29.248 29.248 0 0 0 0 0 0h-599.552c-16.224 0.224-29.248-12.8-29.248-29.024 0 0 0 0 0 0v-87.552c0-16.448 13.024-29.472 29.248-29.472 0 0 0 0 0 0zM29.248 813.728h599.552c16.224 0 29.248 13.024 29.248 29.248 0 0 0 0 0 0v87.776c0.224 16.224-12.8 29.248-29.024 29.248 0 0 0 0 0 0h-599.776c-16.224 0-29.248-13.024-29.248-29.248 0 0 0 0 0 0v-87.552c0-16.448 13.024-29.472 29.248-29.472 0 0 0 0 0 0zM987.424 667.424h-950.848c-20.128 0-36.576-16.448-36.576-36.576v-73.152c0-20.128 16.448-36.576 36.576-36.576h950.848c20.128 0 36.576 16.448 36.576 36.576v73.152c0 20.128-16.448 36.576-36.576 36.576zM987.424 82.272h-950.848c-20.128 0-36.576-16.448-36.576-36.576v-73.152c0-20.128 16.448-36.576 36.576-36.576h950.848c20.128 0 36.576 16.448 36.576 36.576v73.152c0 20.128-16.448 36.576-36.576 36.576z" />
<glyph unicode="&#xe901;" glyph-name="brush" d="M832 960h-640c-35.392 0-64-28.608-64-64v-448h768v448c0 35.392-28.608 64-64 64zM128 320c0-70.784 57.408-128 128-128h128v-128c0-70.784 57.408-128 128-128s128 57.216 128 128v128h128c70.592 0 128 57.216 128 128v64h-768v-64zM512 112c26.592 0 48-21.408 48-48s-21.6-48-48-48-48 21.6-48 48c0 26.592 21.6 48 48 48z" />
<glyph unicode="&#xe902;" glyph-name="calendar-alt" d="M360 384h-80c-13.184 0-24 10.784-24 24v80c0 13.184 10.816 24 24 24h80c13.184 0 24-10.816 24-24v-80c0-13.216-10.816-24-24-24zM576 408v80c0 13.184-10.784 24-24 24h-80c-13.184 0-24-10.816-24-24v-80c0-13.216 10.816-24 24-24h80c13.216 0 24 10.784 24 24zM768 408v80c0 13.184-10.784 24-24 24h-80c-13.216 0-24-10.816-24-24v-80c0-13.216 10.784-24 24-24h80c13.216 0 24 10.784 24 24zM576 216v80c0 13.216-10.784 24-24 24h-80c-13.184 0-24-10.784-24-24v-80c0-13.216 10.816-24 24-24h80c13.216 0 24 10.784 24 24zM384 216v80c0 13.216-10.816 24-24 24h-80c-13.184 0-24-10.784-24-24v-80c0-13.216 10.816-24 24-24h80c13.184 0 24 10.784 24 24zM768 216v80c0 13.216-10.784 24-24 24h-80c-13.216 0-24-10.784-24-24v-80c0-13.216 10.784-24 24-24h80c13.216 0 24 10.784 24 24zM960 736v-704c0-52.992-43.008-96-96-96h-704c-52.992 0-96 43.008-96 96v704c0 52.992 43.008 96 96 96h96v104c0 13.184 10.816 24 24 24h80c13.184 0 24-10.816 24-24v-104h256v104c0 13.184 10.784 24 24 24h80c13.216 0 24-10.816 24-24v-104h96c52.992 0 96-43.008 96-96zM864 44v596h-704v-596c0-6.592 5.408-12 12-12h680c6.592 0 12 5.408 12 12z" />
<glyph unicode="&#xe903;" glyph-name="caret-down" horiz-adv-x="1806" d="M121.471 960h1562.724c108.109 0 162.164-130.581 85.637-207.108l-781.058-781.665c-47.374-47.374-124.508-47.374-171.881 0l-781.058 781.665c-76.527 76.527-22.472 207.108 85.637 207.108z" />
<glyph unicode="&#xe904;" glyph-name="caret-left" horiz-adv-x="581" d="M580.863 891.137v-885.929c0-61.289-74.028-91.933-117.412-48.549l-443.137 442.792c-26.857 26.857-26.857 70.585 0 97.442l442.792 442.792c43.384 43.384 117.757 12.74 117.757-48.549z" />
<glyph unicode="&#xe905;" glyph-name="caret-right" horiz-adv-x="581" d="M0 4.863v886.273c0 61.289 74.028 91.933 117.412 48.549l443.137-443.137c26.857-26.857 26.857-70.585 0-97.442l-443.137-442.792c-43.384-43.384-117.412-12.74-117.412 48.549z" />
<glyph unicode="&#xe906;" glyph-name="caret-up" horiz-adv-x="1805" d="M1683.803-64h-1562.404c-108.045 0-162.068 130.504-85.586 206.985l781.202 781.202c47.346 47.346 124.434 47.346 171.779 0l781.202-781.202c75.874-75.874 21.852-206.985-86.193-206.985v0z" />
<glyph unicode="&#xe907;" glyph-name="check" d="M347.8 81.2l-332.8 332.8c-20 20-20 52.4 0 72.4l72.4 72.4c20 20 52.4 20 72.4 0l224.2-224.2 480.2 480.2c20 20 52.4 20 72.4 0l72.4-72.4c20-20 20-52.4 0-72.4l-588.799-588.799c-20-20-52.4-20-72.4 0v0z" />
<glyph unicode="&#xe908;" glyph-name="check-square" d="M914.272 960h-804.576c-60.576 0-109.728-49.152-109.728-109.728v-804.576c0-60.576 49.152-109.728 109.728-109.728h804.576c60.576 0 109.728 49.152 109.728 109.728v804.576c0 60.576-49.152 109.728-109.728 109.728zM914.272 45.728h-804.576v804.576h804.576v-804.576zM832.224 598.176l-394.528-391.328c-10.752-10.752-28.128-10.528-38.848 0.224l-207.552 209.152c-10.752 10.752-10.528 28.128 0.224 38.848l51.872 51.424c10.752 10.752 28.128 10.528 38.848-0.224l136.672-137.824 323.2 320.448c10.752 10.752 28.128 10.528 38.848-0.224l51.424-51.872c10.752-10.528 10.528-27.872-0.224-38.624v0z" />
<glyph unicode="&#xe909;" glyph-name="clock" d="M512 960c-282.848 0-512-229.152-512-512s229.152-512 512-512 512 229.152 512 512-229.152 512-512 512zM512 35.104c-228.128 0-412.896 184.768-412.896 412.896s184.768 412.896 412.896 412.896 412.896-184.768 412.896-412.896-184.768-412.896-412.896-412.896zM639.584 250.624l-175.264 127.392c-6.4 4.736-10.112 12.192-10.112 20.032v339.008c0 13.632 11.136 24.768 24.768 24.768h66.080c13.632 0 24.768-11.136 24.768-24.768v-292.544l137.92-100.32c11.136-8.064 13.408-23.52 5.376-34.688l-38.816-53.472c-8.064-10.944-23.52-13.408-34.688-5.376v0z" />
<glyph unicode="&#xe90a;" glyph-name="code" d="M446.24 39.264l-97.6 28.32c-10.24 2.88-16 13.6-13.12 23.84l218.368 752.256c2.88 10.24 13.6 16 23.84 13.12l97.6-28.32c10.24-2.88 16-13.6 13.12-23.84l-218.368-752.256c-3.040-10.24-13.6-16.16-23.84-13.12zM263.872 218.752l69.6 74.24c7.36 7.84 6.88 20.32-1.28 27.52l-144.96 127.52 144.96 127.52c8.16 7.2 8.8 19.68 1.28 27.52l-69.6 74.24c-7.2 7.68-19.36 8.16-27.2 0.8l-230.528-215.968c-8.16-7.52-8.16-20.48 0-28l230.528-216.128c7.84-7.36 20-7.040 27.2 0.8v0zM787.328 217.792l230.528 216.128c8.16 7.52 8.16 20.48 0 28l-230.528 216.288c-7.68 7.2-19.84 6.88-27.2-0.8l-69.6-74.24c-7.36-7.84-6.88-20.32 1.28-27.52l144.96-127.68-144.96-127.52c-8.16-7.2-8.8-19.68-1.28-27.52l69.6-74.24c7.2-7.84 19.36-8.16 27.2-0.96v0z" />
<glyph unicode="&#xe90b;" glyph-name="cog" d="M989.6 324.96l-87.936 50.784c8.864 47.904 8.864 97.024 0 144.928l87.936 50.784c10.112 5.792 14.656 17.76 11.36 28.896-22.912 73.504-61.92 139.968-112.928 195.296-7.84 8.48-20.64 10.528-30.56 4.736l-87.936-50.784c-36.96 31.808-79.488 56.352-125.536 72.48v101.376c0 11.552-8.064 21.664-19.392 24.16-75.776 16.928-153.408 16.096-225.44 0-11.36-2.464-19.392-12.608-19.392-24.16v-101.568c-45.824-16.32-88.352-40.864-125.536-72.48l-87.744 50.784c-10.112 5.792-22.72 3.936-30.56-4.736-51.008-55.136-90.016-121.6-112.928-195.296-3.52-11.136 1.248-23.136 11.36-28.896l87.936-50.784c-8.864-47.904-8.864-97.024 0-144.928l-87.936-50.784c-10.112-5.792-14.656-17.76-11.36-28.896 22.912-73.504 61.92-139.968 112.928-195.296 7.84-8.48 20.64-10.528 30.56-4.736l87.936 50.784c36.96-31.808 79.488-56.352 125.536-72.48v-101.568c0-11.552 8.064-21.664 19.392-24.16 75.776-16.928 153.408-16.096 225.44 0 11.36 2.464 19.392 12.608 19.392 24.16v101.568c45.824 16.32 88.352 40.864 125.536 72.48l87.936-50.784c10.112-5.792 22.72-3.936 30.56 4.736 51.008 55.136 90.016 121.6 112.928 195.296 3.104 11.36-1.44 23.328-11.552 29.12zM511.872 283.040c-91.040 0-165.152 74.112-165.152 165.152s74.112 165.152 165.152 165.152 165.152-74.112 165.152-165.152-74.112-165.152-165.152-165.152z" />
<glyph unicode="&#xe90c;" glyph-name="cogs" d="M819.456 550.816l-13.12-22.88c-4.8-8.48-15.040-12-24.16-8.64-18.88 7.040-36.16 17.12-51.36 29.76-7.36 6.080-9.28 16.8-4.48 25.12l13.12 22.88c-11.040 12.8-19.68 27.68-25.44 43.84h-26.4c-9.6 0-17.92 6.88-19.52 16.48-3.2 19.2-3.36 39.36 0 59.36 1.6 9.6 9.92 16.64 19.52 16.64h26.4c5.76 16.16 14.4 31.040 25.44 43.84l-13.12 22.88c-4.8 8.32-3.040 19.040 4.48 25.12 15.2 12.64 32.64 22.72 51.36 29.76 9.12 3.36 19.36-0.16 24.16-8.64l13.12-22.88c16.8 3.040 33.92 3.040 50.72 0l13.12 22.88c4.8 8.48 15.040 12 24.16 8.64 18.88-7.040 36.16-17.12 51.36-29.76 7.36-6.080 9.28-16.8 4.48-25.12l-13.12-22.88c11.040-12.8 19.68-27.68 25.44-43.84h26.4c9.6 0 17.92-6.88 19.52-16.48 3.2-19.2 3.36-39.36 0-59.36-1.6-9.6-9.92-16.64-19.52-16.64h-26.4c-5.76-16.16-14.4-31.040-25.44-43.84l13.12-22.88c4.8-8.32 3.040-19.040-4.48-25.12-15.2-12.64-32.64-22.72-51.36-29.76-9.12-3.36-19.36 0.16-24.16 8.64l-13.12 22.88c-16.64-3.040-33.92-3.040-50.72 0zM802.656 644.896c61.6-47.36 131.84 22.88 84.48 84.48-61.6 47.52-131.84-22.88-84.48-84.48zM618.144 398.624l53.92-26.88c16.16-9.28 23.2-28.96 16.8-46.56-14.24-38.72-42.24-74.24-68.16-105.28-11.84-14.24-32.32-17.76-48.48-8.48l-46.56 26.88c-25.6-21.92-55.36-39.36-87.84-50.72v-53.76c0-18.56-13.28-34.56-31.52-37.76-39.36-6.72-80.64-7.040-121.44 0-18.4 3.2-32 19.040-32 37.76v53.76c-32.48 11.52-62.24 28.8-87.84 50.72l-46.56-26.72c-16-9.28-36.64-5.76-48.48 8.48-25.92 31.040-53.28 66.56-67.52 105.12-6.4 17.44 0.64 37.12 16.8 46.56l53.28 26.88c-6.24 33.44-6.24 67.84 0 101.44l-53.28 27.040c-16.16 9.28-23.36 28.96-16.8 46.4 14.24 38.72 41.6 74.24 67.52 105.28 11.84 14.24 32.32 17.76 48.48 8.48l46.56-26.88c25.6 21.92 55.36 39.36 87.84 50.72v53.92c0 18.4 13.12 34.4 31.36 37.6 39.36 6.72 80.8 7.040 121.6 0.16 18.4-3.2 32-19.040 32-37.76v-53.76c32.48-11.52 62.24-28.8 87.84-50.72l46.56 26.88c16 9.28 36.64 5.76 48.48-8.48 25.92-31.040 53.12-66.56 67.36-105.28 6.4-17.44 0.16-37.12-16-46.56l-53.92-26.88c6.24-33.6 6.24-68 0-101.6zM429.984 364.864c94.72 123.2-45.92 263.872-169.12 169.12-94.72-123.2 45.92-263.872 169.12-169.12zM819.456 72.544l-13.12-22.88c-4.8-8.48-15.040-12-24.16-8.64-18.88 7.040-36.16 17.12-51.36 29.76-7.36 6.080-9.28 16.8-4.48 25.12l13.12 22.88c-11.040 12.8-19.68 27.68-25.44 43.84h-26.4c-9.6 0-17.92 6.88-19.52 16.48-3.2 19.2-3.36 39.36 0 59.36 1.6 9.6 9.92 16.64 19.52 16.64h26.4c5.76 16.16 14.4 31.040 25.44 43.84l-13.12 22.88c-4.8 8.32-3.040 19.040 4.48 25.12 15.2 12.64 32.64 22.72 51.36 29.76 9.12 3.36 19.36-0.16 24.16-8.64l13.12-22.88c16.8 3.040 33.92 3.040 50.72 0l13.12 22.88c4.8 8.48 15.040 12 24.16 8.64 18.88-7.040 36.16-17.12 51.36-29.76 7.36-6.080 9.28-16.8 4.48-25.12l-13.12-22.88c11.040-12.8 19.68-27.68 25.44-43.84h26.4c9.6 0 17.92-6.88 19.52-16.48 3.2-19.2 3.36-39.36 0-59.36-1.6-9.6-9.92-16.64-19.52-16.64h-26.4c-5.76-16.16-14.4-31.040-25.44-43.84l13.12-22.88c4.8-8.32 3.040-19.040-4.48-25.12-15.2-12.64-32.64-22.72-51.36-29.76-9.12-3.36-19.36 0.16-24.16 8.64l-13.12 22.88c-16.64-3.040-33.92-3.040-50.72 0zM802.656 166.784c61.6-47.36 131.84 22.88 84.48 84.48-61.6 47.36-131.84-22.88-84.48-84.48v0z" />
<glyph unicode="&#xe90d;" glyph-name="dollar-sign" d="M642.4 493.184l-216 63.2c-24.992 7.2-42.4 30.592-42.4 56.608 0 32.608 26.4 59.008 59.008 59.008h132.608c24.384 0 48.384-7.392 68.384-20.992 12.192-8.192 28.608-6.208 39.008 4l69.6 68c14.208 13.792 12.192 36.8-3.616 48.992-48.992 38.4-110.208 59.808-172.992 60v96c0 17.6-14.4 32-32 32h-64c-17.6 0-32-14.4-32-32v-96h-4.992c-127.392 0-229.792-109.408-218.016-239.2 8.416-92.192 78.816-167.2 167.616-193.184l204.992-60c24.992-7.392 42.4-30.592 42.4-56.608 0-32.608-26.4-59.008-59.008-59.008h-132.608c-24.384 0-48.384 7.392-68.384 20.992-12.192 8.192-28.608 6.208-39.008-4l-69.6-68c-14.208-13.792-12.192-36.8 3.616-48.992 48.992-38.4 110.208-59.808 172.992-60v-96c0-17.6 14.4-32 32-32h64c17.6 0 32 14.4 32 32v96.384c93.216 1.792 180.608 57.216 211.392 145.408 43.008 123.2-29.216 249.6-144.992 283.392v0z" />
<glyph unicode="&#xe90e;" glyph-name="ellipsis-v" d="M637.568 61.568c0-69.344-56.224-125.568-125.568-125.568s-125.568 56.224-125.568 125.568c0 69.344 56.224 125.568 125.568 125.568s125.568-56.224 125.568-125.568zM637.568 447.872c0-69.344-56.224-125.568-125.568-125.568s-125.568 56.224-125.568 125.568c0 69.344 56.224 125.568 125.568 125.568s125.568-56.224 125.568-125.568zM637.568 834.432c0-69.344-56.224-125.568-125.568-125.568s-125.568 56.224-125.568 125.568c0 69.344 56.224 125.568 125.568 125.568s125.568-56.224 125.568-125.568z" />
<glyph unicode="&#xe90f;" glyph-name="exchange-alt" d="M271.904 911.712v-719.52h95.936c42.912 0 63.968-51.968 34.112-82.080l-159.904-159.904c-18.912-18.912-49.312-18.912-67.68 0l-159.904 159.904c-30.368 30.368-9.056 82.080 33.568 82.080h95.936v719.52c0 26.656 21.6 47.968 47.968 47.968h31.968c26.368 0 47.968-21.312 47.968-47.968v0zM799.84-63.68h31.968c26.656 0 47.968 21.312 47.968 47.968v719.52h95.936c42.912 0 63.968 51.712 34.112 82.080l-159.904 159.904c-18.656 18.912-49.024 18.912-67.68 0l-159.904-159.904c-30.368-30.368-8.8-82.080 33.568-82.080h95.936v-719.52c0-26.656 21.6-47.968 47.968-47.968v0z" />
<glyph unicode="&#xe910;" glyph-name="eye" d="M511.936 647.136c-18.848-0.352-37.504-3.2-55.456-8.896 8.352-14.592 12.8-31.104 12.8-48 0-54.944-44.64-99.552-99.552-99.552-16.896 0.192-33.408 4.608-48 12.8-30.4-105.248 30.4-215.488 135.84-245.696 105.44-30.4 215.488 30.4 245.888 135.84s-30.4 215.488-135.84 245.888c-18.144 5.152-36.8 7.648-55.648 7.648zM1017.728 473.952c-96.352 188.096-287.296 315.392-505.792 315.392s-409.44-127.296-505.792-315.392c-8.192-16.352-8.192-35.552 0-51.904 96.352-188.096 287.296-315.392 505.792-315.392s409.44 127.296 505.792 315.392c8.352 16.352 8.352 35.552 0 51.904zM511.936 192c-175.296 0-336.192 97.792-422.944 256 86.752 158.24 247.488 256 422.944 256s336.192-97.792 422.944-256c-86.752-158.24-247.488-256-422.944-256z" />
<glyph unicode="&#xe911;" glyph-name="font" d="M987.424 82.272h-53.472l-298.752 828.128c-10.048 29.728-37.952 49.6-69.248 49.6h-107.872c-31.328 0-59.2-19.872-69.248-49.6l-298.752-828.128h-53.472c-20.128 0-36.576-16.448-36.576-36.576v-73.152c0-20.128 16.448-36.576 36.576-36.576h292.576c20.128 0 36.576 16.448 36.576 36.576v73.152c0 20.128-16.448 36.576-36.576 36.576h-44.8l53.248 146.272h348.8l53.248-146.272h-44.8c-20.128 0-36.576-16.448-36.576-36.576v-73.152c0-20.128 16.448-36.576 36.576-36.576h292.576c20.128 0 36.576 16.448 36.576 36.576v73.152c0 20.128-16.448 36.576-36.576 36.576zM404.352 411.424l107.648 296 107.648-296h-215.328z" />
<glyph unicode="&#xe912;" glyph-name="heading" d="M921.6 789.344v-682.656h68.256c18.784 0 34.144-15.36 34.144-34.144v-68.256c0-18.784-15.36-34.144-34.144-34.144h-341.344c-18.784 0-34.144 15.36-34.144 34.144v68.256c0 18.784 15.36 34.144 34.144 34.144h68.256v273.056h-409.6v-273.056h68.256c18.784 0 34.144-15.36 34.144-34.144v-68.256c0-18.784-15.36-34.144-34.144-34.144h-341.344c-18.784 0-34.144 15.36-34.144 34.144v68.256c0 18.784 15.36 34.144 34.144 34.144h68.256v682.656h-68.256c-18.784 0-34.144 15.36-34.144 34.144v68.256c0 18.784 15.36 34.144 34.144 34.144h341.344c18.784 0 34.144-15.36 34.144-34.144v-68.256c0-18.784-15.36-34.144-34.144-34.144h-68.256v-273.056h409.6v273.056h-68.256c-18.784 0-34.144 15.36-34.144 34.144v68.256c0 18.784 15.36 34.144 34.144 34.144h341.344c18.784 0 34.144-15.36 34.144-34.144v-68.256c0-18.784-15.36-34.144-34.144-34.144h-68.256z" />
<glyph unicode="&#xe913;" glyph-name="list-ul" d="M96 864c-52.992 0-96-43.008-96-96s43.008-96 96-96 96 43.008 96 96-43.008 96-96 96zM96 544c-52.992 0-96-43.008-96-96s43.008-96 96-96 96 43.008 96 96-43.008 96-96 96zM96 224c-52.992 0-96-43.008-96-96s43.008-96 96-96 96 43.008 96 96-43.008 96-96 96zM992 192h-640c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32zM992 832h-640c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32zM992 512h-640c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h640c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32z" />
<glyph unicode="&#xe914;" glyph-name="long-arrow-alt-down" horiz-adv-x="503" d="M343.086 242.514v690.057c0 15.086-12.343 27.429-27.429 27.429h-128c-15.086 0-27.429-12.343-27.429-27.429v-690.057h-105.371c-48.914 0-73.371-59.2-38.857-93.714l196.8-196.8c21.486-21.486 56.229-21.486 77.486 0l196.8 196.8c34.514 34.514 10.057 93.714-38.857 93.714h-105.143z" />
<glyph unicode="&#xe915;" glyph-name="long-arrow-alt-left" horiz-adv-x="2083" d="M623.608 261.987h1403.931c30.692 0 55.804 25.112 55.804 55.804v260.418c0 30.692-25.112 55.804-55.804 55.804h-1403.931v214.38c0 99.517-120.443 149.275-190.663 79.055l-400.392-400.392c-43.713-43.713-43.713-114.398 0-157.646l400.392-400.392c70.22-70.22 190.663-20.461 190.663 79.055v213.915z" />
<glyph unicode="&#xe916;" glyph-name="long-arrow-alt-right" horiz-adv-x="2083" d="M1459.735 634.013h-1403.931c-30.692 0-55.804-25.112-55.804-55.804v-260.418c0-30.692 25.112-55.804 55.804-55.804h1403.931v-214.38c0-99.517 120.443-149.275 190.663-79.055l400.392 400.392c43.713 43.713 43.713 114.398 0 157.646l-400.392 400.392c-70.22 70.22-190.663 20.461-190.663-79.055v-213.915z" />
<glyph unicode="&#xe917;" glyph-name="long-arrow-alt-up" horiz-adv-x="503" d="M160.229 653.486v-690.057c0-15.086 12.343-27.429 27.429-27.429h128c15.086 0 27.429 12.343 27.429 27.429v690.057h105.371c48.914 0 73.371 59.2 38.857 93.714l-196.8 196.8c-21.486 21.486-56.229 21.486-77.486 0l-196.8-196.8c-34.514-34.514-10.057-93.714 38.857-93.714h105.143z" />
<glyph unicode="&#xe918;" glyph-name="magic" d="M448 768.032l32 64 64 32-64 32-32 64-32-64-64-32 64-32 32-64zM160.064 640.064l53.376 106.592 106.592 53.376-106.592 53.376-53.376 106.592-53.376-106.592-106.592-53.376 106.592-53.376 53.376-106.592zM863.936 384.096l-53.376-106.592-106.592-53.376 106.592-53.376 53.376-106.592 53.376 106.592 106.592 53.376-106.592 53.376-53.376 106.592zM1005.12 771.648l-169.568 169.568c-12.608 12.608-28.992 18.784-45.376 18.784s-32.8-6.208-45.184-18.784l-726.048-726.048c-24.992-24.992-24.992-65.6 0-90.592l169.568-169.76c12.608-12.608 28.8-18.784 45.184-18.784s32.8 6.208 45.184 18.784l726.048 726.048c25.184 25.184 25.184 65.792 0.192 90.784zM718.976 553.088l-101.792 101.792 172.96 173.152 101.792-101.792-172.96-173.152z" />
<glyph unicode="&#xe919;" glyph-name="palette" d="M408.576 949.92c-198.816-38.816-359.008-198.592-398.208-396.8-74.016-374.016 263.392-652.8 517.6-613.408 82.4 12.8 122.816 109.216 84.992 183.392-46.208 90.816 19.808 196.8 121.792 196.8h159.392c71.616 0 129.6 59.2 129.792 130.592-0.992 315.2-287.808 563.2-615.424 499.424zM191.968 319.904c-35.392 0-64 28.608-64 64s28.608 64 64 64 64-28.608 64-64-28.608-64-64-64zM256 575.936c-35.392 0-64 28.608-64 64s28.608 64 64 64 64-28.608 64-64-28.608-64-64-64zM512 703.936c-35.392 0-64 28.608-64 64s28.608 64 64 64 64-28.608 64-64-28.608-64-64-64zM768 575.936c-35.392 0-64 28.608-64 64s28.608 64 64 64 64-28.608 64-64-28.608-64-64-64z" />
<glyph unicode="&#xe91a;" glyph-name="plus" d="M950.857 557.714h-329.143v329.143c0 40.457-32.686 73.143-73.143 73.143h-73.143c-40.457 0-73.143-32.686-73.143-73.143v-329.143h-329.143c-40.457 0-73.143-32.686-73.143-73.143v-73.143c0-40.457 32.686-73.143 73.143-73.143h329.143v-329.143c0-40.457 32.686-73.143 73.143-73.143h73.143c40.457 0 73.143 32.686 73.143 73.143v329.143h329.143c40.457 0 73.143 32.686 73.143 73.143v73.143c0 40.457-32.686 73.143-73.143 73.143z" />
<glyph unicode="&#xe91b;" glyph-name="question-circle" d="M512 960c-282.848 0-512-229.376-512-512 0-282.848 229.152-512 512-512s512 229.152 512 512c0 282.624-229.152 512-512 512zM512 35.104c-228.128 0-412.896 184.576-412.896 412.896 0 228.128 184.768 412.896 412.896 412.896s412.896-184.768 412.896-412.896c0-228.128-184.576-412.896-412.896-412.896zM733.312 561.952c0-138.528-149.472-140.608-149.472-191.808v-12.992c0-13.632-11.136-24.768-24.768-24.768h-94.144c-13.632 0-24.768 11.136-24.768 24.768v17.952c0 73.696 55.936 103.232 98.272 126.976 36.32 20.224 58.432 34.080 58.432 61.12 0 35.52-45.408 59.264-82.176 59.264-47.904 0-69.984-22.72-100.96-61.92-8.48-10.528-23.744-12.608-34.464-4.32l-57.408 43.552c-10.528 8.064-12.992 22.912-5.376 33.856 48.736 71.648 110.88 111.904 207.68 111.904 101.152-0.192 209.12-79.264 209.12-183.52zM598.72 216.768c0-47.904-38.816-86.72-86.72-86.72s-86.72 38.816-86.72 86.72 38.816 86.72 86.72 86.72 86.72-38.816 86.72-86.72z" />
<glyph unicode="&#xe91c;" glyph-name="tasks-alt" d="M278.4 889.6c-9.6 9.6-22.4 9.6-32 0v0l-128-128-44.8 44.8c-9.6 9.6-25.6 9.6-35.2 0v0l-32-32c-9.6-9.6-9.6-25.6 0-35.2v0l96-96c9.6-9.6 25.6-9.6 35.2 0l176 176c9.6 9.6 9.6 25.6 0 35.2l-35.2 35.2zM992 192h-576c-19.2 0-32-16-32-32v-64c0-16 12.8-32 32-32h576c16 0 32 16 32 32v64c0 19.2-16 32-32 32zM992 832h-576c-19.2 0-32-16-32-32v-64c0-19.2 12.8-32 32-32h576c16 0 32 12.8 32 32v64c0 19.2-16 32-32 32zM992 512h-576c-19.2 0-32-12.8-32-32v-64c0-16 12.8-32 32-32h576c16 0 32 16 32 32v64c0 19.2-16 32-32 32z" />
<glyph unicode="&#xe91d;" glyph-name="tasks" d="M279.232 889.568c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-127.392-126.592-45.408 44.192c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-31.392-31.392c-9.408-9.408-9.408-24.608 0-33.984 0 0 0 0 0 0l95.2-94.784c9.792-9.408 25.408-9.408 35.2 0l175.584 175.584c9.408 9.408 9.408 24.608 0.192 33.984l-33.984 32.992zM279.232 571.2c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-127.392-127.392-45.408 44.192c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-31.392-31.392c-9.408-9.408-9.408-24.608 0-33.984 0 0 0 0 0 0l95.008-95.008c9.792-9.408 25.408-9.408 35.2 0l175.776 175.808c9.408 9.408 9.408 24.384 0.192 33.792l-33.984 33.984zM992 192.608h-575.968c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h575.968c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32zM992 832.576h-575.968c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h575.968c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32zM992 512.608h-575.968c-17.6 0-32-14.4-32-32v-64c0-17.6 14.4-32 32-32h575.968c17.6 0 32 14.4 32 32v64c0 17.6-14.4 32-32 32zM279.232 250.016c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-127.392-127.392-45.408 44.192c-9.408 9.408-24.608 9.408-33.984 0 0 0 0 0 0 0l-31.392-31.392c-9.408-9.408-9.408-24.608 0-33.984 0 0 0 0 0 0l95.008-95.008c9.792-9.408 25.408-9.408 35.2 0l175.776 175.808c9.408 9.408 9.408 24.384 0.192 33.792l-33.984 33.984z" />
<glyph unicode="&#xe91e;" glyph-name="times" d="M706.036 448l291.2 291.2c35.782 35.782 35.782 93.673 0 129.455l-64.582 64.582c-35.782 35.782-93.673 35.782-129.455 0l-291.2-291.2-291.2 291.2c-35.491 35.782-93.673 35.782-129.164 0l-64.873-64.582c-35.782-35.782-35.782-93.673 0-129.455l291.2-291.2-291.2-291.2c-35.782-35.782-35.782-93.673 0-129.455l64.582-64.582c35.782-35.782 93.673-35.782 129.455 0l291.2 291.2 291.2-291.2c35.782-35.782 93.673-35.782 129.455 0l64.582 64.582c35.782 35.782 35.782 93.673 0 129.455l-291.2 291.2z" />
<glyph unicode="&#xe91f;" glyph-name="upload" d="M592 192.064h-160c-26.592 0-48 21.408-48 48v336h-175.392c-35.584 0-53.408 43.008-28.192 68.192l304.192 304.384c15.008 15.008 39.584 15.008 54.592 0l304.384-304.384c25.216-25.184 7.392-68.192-28.192-68.192h-175.392v-336c0-26.592-21.408-48-48-48zM1024 208.064v-224c0-26.592-21.408-48-48-48h-928c-26.592 0-48 21.408-48 48v224c0 26.592 21.408 48 48 48h272v-16c0-61.792 50.208-112 112-112h160c61.792 0 112 50.208 112 112v16h272c26.592 0 48-21.408 48-48zM776 32.064c0 22.016-18.016 40-40 40s-40-18.016-40-40 18.016-40 40-40 40 18.016 40 40zM904 32.064c0 22.016-18.016 40-40 40s-40-18.016-40-40 18.016-40 40-40 40 18.016 40 40z" />
<glyph unicode="&#xe920;" glyph-name="bookmark" d="M0.267-64c0 348-0.533 637.867 0 1024h1024c0-275.2 0-675.467 0-1024l-511.467 512-512.533-512z" />
<glyph unicode="&#xe921;" glyph-name="heart" horiz-adv-x="1170" d="M1056.686 890.057c-125.257 106.743-311.543 87.543-426.514-31.086l-45.029-46.4-45.029 46.4c-114.743 118.629-301.257 137.829-426.514 31.086-143.543-122.514-151.086-342.4-22.629-475.2l442.286-456.686c28.571-29.486 74.971-29.486 103.543 0l442.286 456.686c128.686 132.8 121.143 352.686-22.4 475.2v0z" />
<glyph unicode="&#xe922;" glyph-name="star" horiz-adv-x="1070" d="M477.507 924.407l-130.574-264.748-292.143-42.592c-52.39-7.599-73.386-72.186-35.393-109.179l211.359-205.96-49.99-290.943c-8.998-52.59 46.391-91.982 92.782-67.387l261.349 137.373 261.349-137.373c46.391-24.395 101.78 14.797 92.782 67.387l-49.99 290.943 211.359 205.96c37.993 36.993 16.997 101.58-35.393 109.179l-292.143 42.592-130.574 264.748c-23.395 47.191-91.182 47.791-114.778 0v0z" />
<glyph unicode="&#xe923;" glyph-name="plugin-symbol" d="M142.222 391.111h-113.778c-15.644 0-28.444-12.8-28.444-28.444v-113.778c0-15.644 12.8-28.444 28.444-28.444h113.778c15.644 0 28.444 12.8 28.444 28.444v113.778c0 15.644-12.8 28.444-28.444 28.444zM142.222 960h-113.778c-15.644 0-28.444-12.8-28.444-28.444v-113.778c0-15.644 12.8-28.444 28.444-28.444h113.778c15.644 0 28.444 12.8 28.444 28.444v113.778c0 15.644-12.8 28.444-28.444 28.444zM142.222 675.556h-113.778c-15.644 0-28.444-12.8-28.444-28.444v-113.778c0-15.644 12.8-28.444 28.444-28.444h113.778c15.644 0 28.444 12.8 28.444 28.444v113.778c0 15.644-12.8 28.444-28.444 28.444zM995.556 362.667h-682.667c-15.644 0-28.444-12.8-28.444-28.444v-56.889c0-15.644 12.8-28.444 28.444-28.444h682.667c15.644 0 28.444 12.8 28.444 28.444v56.889c0 15.644-12.8 28.444-28.444 28.444zM995.556 931.556h-682.667c-15.644 0-28.444-12.8-28.444-28.444v-56.889c0-15.644 12.8-28.444 28.444-28.444h682.667c15.644 0 28.444 12.8 28.444 28.444v56.889c0 15.644-12.8 28.444-28.444 28.444zM995.556 647.111h-682.667c-15.644 0-28.444-12.8-28.444-28.444v-56.889c0-15.644 12.8-28.444 28.444-28.444h682.667c15.644 0 28.444 12.8 28.444 28.444v56.889c0 15.644-12.8 28.444-28.444 28.444zM142.222 106.667h-113.778c-15.644 0-28.444-12.8-28.444-28.444v-113.778c0-15.644 12.8-28.444 28.444-28.444h113.778c15.644 0 28.444 12.8 28.444 28.444v113.778c0 15.644-12.8 28.444-28.444 28.444zM995.556 78.222h-682.667c-15.644 0-28.444-12.8-28.444-28.444v-56.889c0-15.644 12.8-28.444 28.444-28.444h682.667c15.644 0 28.444 12.8 28.444 28.444v56.889c0 15.644-12.8 28.444-28.444 28.444z" />
<glyph unicode="&#xe924;" glyph-name="trash-alt" d="M599.999 128h48c13.255 0 24 10.745 24 24v0 432c0 13.255-10.745 24-24 24v0h-48c-13.255 0-24-10.745-24-24v0-432c0-13.255 10.745-24 24-24v0zM927.999 800h-164.82l-68 113.4c-17.083 28.11-47.539 46.6-82.314 46.6-0.016 0-0.032 0-0.048 0h-201.637c-0.002 0-0.004 0-0.006 0-34.775 0-65.231-18.49-82.074-46.175l-0.24-0.425-68.040-113.4h-164.82c-17.673 0-32-14.327-32-32v0-32c0-17.673 14.327-32 32-32v0h32v-672c0-53.019 42.981-96 96-96v0h576c53.019 0 96 42.981 96 96v0 672h32c17.673 0 32 14.327 32 32v0 32c0 17.673-14.327 32-32 32v0zM407.679 858.18c2.136 3.511 5.941 5.82 10.286 5.82 0.012 0 0.024 0 0.036 0h187.998c0.004 0 0.009 0 0.014 0 4.345 0 8.15-2.309 10.256-5.767l0.030-0.053 34.92-58.18h-278.44zM799.999 32h-576v672h576zM375.999 128h48c13.255 0 24 10.745 24 24v0 432c0 13.255-10.745 24-24 24v0h-48c-13.255 0-24-10.745-24-24v0-432c0-13.255 10.745-24 24-24v0z" />
<glyph unicode="&#xe925;" glyph-name="spinner" d="M608 864c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM512 128c-53.020 0-96-42.98-96-96s42.98-96 96-96 96 42.98 96 96-42.98 96-96 96zM928 544c-53.020 0-96-42.98-96-96s42.98-96 96-96 96 42.98 96 96-42.98 96-96 96zM192 448c0 53.020-42.98 96-96 96s-96-42.98-96-96 42.98-96 96-96 96 42.98 96 96zM217.844 249.844c-53.020 0-96-42.98-96-96s42.98-96 96-96 96 42.98 96 96c0 53.018-42.982 96-96 96zM806.156 249.844c-53.020 0-96-42.98-96-96s42.98-96 96-96 96 42.98 96 96c0 53.018-42.98 96-96 96zM217.844 838.156c-53.020 0-96-42.98-96-96s42.98-96 96-96 96 42.98 96 96-42.982 96-96 96z" />
<glyph unicode="&#xe926;" glyph-name="exclamation-triangle" d="M1012.475 120.866c32.814-56.878-8.375-127.977-73.915-127.977h-853.13c-65.666 0-106.665 71.209-73.915 127.977l426.571 739.605c32.83 56.905 115.058 56.802 147.829 0l426.56-739.605zM512.001 273.778c-45.164 0-81.778-36.613-81.778-81.778s36.613-81.778 81.778-81.778 81.778 36.613 81.778 81.778-36.613 81.778-81.778 81.778zM434.36 567.726l13.188-241.778c0.617-11.314 9.972-20.171 21.301-20.171h86.304c11.33 0 20.684 8.857 21.301 20.171l13.188 241.778c0.667 12.22-9.063 22.496-21.301 22.496h-112.681c-12.238 0-21.966-10.276-21.3-22.496z" />
<glyph unicode="&#xe927;" glyph-name="image" d="M928 832h-832c-53.020 0-96-42.98-96-96v-576c0-53.020 42.98-96 96-96h832c53.020 0 96 42.98 96 96v576c0 53.020-42.98 96-96 96zM916 160h-808c-6.627 0-12 5.373-12 12v0 552c0 6.627 5.373 12 12 12v0h808c6.627 0 12-5.373 12-12v0-552c0-6.627-5.373-12-12-12v0zM256 656c-44.182 0-80-35.818-80-80s35.818-80 80-80 80 35.818 80 80-35.818 80-80 80zM192 256h640v160l-175.030 175.030c-9.372 9.372-24.568 9.372-33.942 0l-239.028-239.030-79.030 79.030c-9.372 9.372-24.568 9.372-33.942 0l-79.028-79.030v-96z" />
<glyph unicode="&#xe928;" glyph-name="images" horiz-adv-x="1152" d="M960 128v-32c0-53.020-42.98-96-96-96h-768c-53.020 0-96 42.98-96 96v512c0 53.020 42.98 96 96 96h32v-416c0-88.224 71.776-160 160-160h672zM1152 288v512c0 53.020-42.98 96-96 96h-768c-53.020 0-96-42.98-96-96v-512c0-53.020 42.98-96 96-96h768c53.020 0 96 42.98 96 96zM512 704c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM320 416l111.030 111.030c9.372 9.372 24.568 9.372 33.942 0l79.028-79.030 271.030 271.030c9.372 9.372 24.568 9.372 33.942 0l175.028-175.030v-224h-704v96z" />
<glyph unicode="&#xe929;" glyph-name="digits" d="M588.003 441.422c-60.949-16.998-108.18-63.488-125.914-122.722l-0.33-1.282c-4.736-15.503-7.463-33.324-7.463-51.781 0-94.882 72.066-172.934 164.447-182.402l0.781-0.065c-13.826-11.62-29.646-21.542-46.742-29.104l-1.26-0.497c-12.569-6.351-21.038-19.165-21.038-33.955 0-4.518 0.79-8.852 2.24-12.87l-0.083 0.264 22.561-45.761c4.722-14.752 18.315-25.247 34.357-25.247 4.92 0 9.61 0.987 13.881 2.774l-0.238-0.088c132.964 56.642 197.286 141.285 197.286 301.29v24.961c-0.135 100.991-82.036 182.809-183.046 182.809-17.602 0-34.624-2.484-50.734-7.122l1.292 0.318zM637.765 219.495c-0.048 0-0.104 0-0.16 0-25.362 0-45.921 20.56-45.921 45.921s20.56 45.921 45.921 45.921c25.362 0 45.921-20.56 45.921-45.921v0c0 0 0 0 0 0 0-25.306-20.469-45.83-45.752-45.921h-0.009zM240.152 813.754h36.481v-146.085h-36.481c-0.048 0-0.104 0-0.16 0-20.148 0-36.481-16.334-36.481-36.481 0-0.056 0-0.113 0-0.169v0.009-72.962c0-0.048 0-0.104 0-0.16 0-20.148 16.334-36.481 36.481-36.481 0.056 0 0.113 0 0.169 0h219.518c0.048 0 0.105 0 0.161 0 20.060 0 36.321 16.262 36.321 36.321 0 0.113-0.001 0.225-0.002 0.338v-0.017 72.962c0.001 0.095 0.001 0.208 0.001 0.32 0 20.060-16.262 36.321-36.321 36.321-0.057 0-0.113 0-0.17 0h-36.792v256.008c-0.091 20.080-16.389 36.321-36.481 36.321-0.056 0-0.113 0-0.169 0h-109.595c-14.042-0.083-26.155-8.265-31.908-20.109l-0.093-0.212-37.121-72.962c-2.478-4.806-3.931-10.489-3.931-16.513 0-14.136 8.005-26.403 19.73-32.513l0.203-0.096c4.676-2.423 10.209-3.845 16.074-3.845 0.199 0 0.398 0.002 0.597 0.005h-0.030z" />
<glyph unicode="&#xe92a;" glyph-name="check-double" d="M1010.013 610.402l-79.188 79.188c-18.797 18.797-49.193 18.797-67.79 0l-478.93-478.93-222.767 222.967c-18.797 18.797-49.193 18.797-67.79 0l-79.388-79.388c-18.797-18.797-18.797-49.193 0-67.99l335.951-336.151c18.797-18.797 49.193-18.797 67.79 0l591.913 592.313c18.797 18.997 18.797 49.393 0.2 67.99zM361.508 398.433c12.398-12.598 32.795-12.598 45.193 0l415.939 416.339c12.398 12.598 12.398 32.795 0 45.193l-90.387 90.587c-12.398 12.598-32.795 12.598-45.193 0l-302.956-302.956-110.784 110.984c-12.398 12.598-32.795 12.598-45.193 0l-90.587-90.587c-12.398-12.598-12.398-32.795 0-45.193l223.967-224.367z" />
<glyph unicode="&#xe92b;" glyph-name="at-email" d="M512 960c-282.961 0-512-228.994-512-512 0-282.961 228.994-512 512-512 99.415 0 196.835 29.192 279.552 83.041 24.785 16.134 30.194 50.143 11.462 73.026l-21.011 25.668c-15.837 19.347-43.724 24.087-64.77 10.589-60.883-39.048-132.327-60.195-205.234-60.195-209.462 0-379.871 170.409-379.871 379.871s170.409 379.871 379.871 379.871c206.739 0 379.871-118.955 379.871-330.323 0-80.074-43.547-164.629-120.093-172.786-35.817 0.937-34.911 26.543-27.821 61.985l48.378 250.034c5.917 30.573-17.505 58.961-48.644 58.961h-92.864c0 0 0 0-0.001 0-14.304 0-26.094-10.761-27.717-24.629l-0.012-0.131-0.021-0.19c-30.342 36.957-83.506 44.955-123.811 44.955-153.972 0-284.554-128.483-284.554-312.692 0-134.819 75.943-218.57 198.194-218.57 55.709 0 118.439 32.283 154.82 79.139 19.658-70.408 83.846-70.406 145.982-70.406 224.842 0 310.295 147.844 310.295 304.33 0 281.491-227.049 462.452-512 462.452zM467.241 331.499c-45.933 0-74.467 32.254-74.467 84.172 0 92.889 63.544 150.15 121.043 150.15 46.022 0 73.499-31.465 73.499-84.17 0-93.029-69.935-150.152-120.074-150.152z" />
<glyph unicode="&#xe92c;" glyph-name="paragraph" d="M987.427 923.429v-73.143c0-20.198-16.374-36.571-36.571-36.571v0h-109.714v-841.143c0-20.198-16.374-36.571-36.571-36.571v0h-73.143c-20.198 0-36.571 16.374-36.571 36.571v0 841.143h-73.143v-841.143c0-20.198-16.374-36.571-36.571-36.571v0h-73.143c-20.198 0-36.571 16.374-36.571 36.571v0 256h-73.143c-201.978 0-365.714 163.736-365.714 365.714s163.736 365.714 365.714 365.714v0h548.571c20.198 0 36.571-16.374 36.571-36.571v0z" />
<glyph unicode="&#xe92d;" glyph-name="link" d="M653.225 589.218c119.494-119.618 117.854-311.395 0.72-429.179-0.22-0.24-0.48-0.5-0.72-0.74l-134.4-134.4c-118.54-118.54-311.397-118.524-429.919 0-118.54 118.52-118.54 311.399 0 429.919l74.212 74.212c19.68 19.68 53.572 6.6 54.588-21.212 1.296-35.444 7.652-71.054 19.38-105.442 3.972-11.644 1.134-24.524-7.566-33.224l-26.174-26.174c-56.052-56.052-57.81-147.32-2.31-203.92 56.048-57.158 148.172-57.498 204.65-1.020l134.4 134.38c56.382 56.382 56.146 147.514 0 203.66-7.402 7.388-14.858 13.128-20.682 17.138-8.122 5.632-13.481 14.755-13.892 25.151l-0.002 0.061c-0.792 21.134 6.696 42.912 23.396 59.612l42.108 42.11c11.042 11.042 28.364 12.398 41.168 3.462 15.28-10.741 28.689-22.040 41.044-34.394v0zM935.094 871.101c-118.522 118.524-311.379 118.54-429.919 0l-134.4-134.4c-0.24-0.24-0.5-0.5-0.72-0.74-117.132-117.784-118.774-309.561 0.72-429.179 12.354-12.354 25.763-23.652 40.080-33.749l0.962-0.643c12.804-8.936 30.128-7.578 41.168 3.462l42.108 42.11c16.7 16.7 24.188 38.478 23.396 59.612-0.413 10.457-5.772 19.58-13.788 25.142l-0.106 0.070c-5.824 4.010-13.28 9.75-20.682 17.138-56.146 56.146-56.382 147.278 0 203.66l134.4 134.38c56.478 56.478 148.6 56.138 204.65-1.020 55.5-56.6 53.744-147.868-2.31-203.92l-26.174-26.174c-8.7-8.7-11.538-21.58-7.566-33.224 11.728-34.388 18.084-69.998 19.38-105.442 1.018-27.812 34.908-40.892 54.588-21.212l74.212 74.212c118.542 118.518 118.542 311.397 0.002 429.917z" />
<glyph unicode="&#xe92e;" glyph-name="paint-brush" d="M334.040 341.32c-80.24-5.16-153.060-35.72-194.38-144.6-4.7-12.42-16-19.96-29.18-19.96-22.22 0-90.92 55.34-110.5 68.7 0.020-164.7 75.88-309.46 256.020-309.46 151.72 0 256 87.54 256 240.38 0 6.22-1.3 12.16-1.94 18.26l-176.020 146.68zM915.78 960c-30.32 0-58.74-13.42-80.42-32.9-408.82-365.2-451.36-373.78-451.36-481.28 0-27.4 6.5-53.52 17.46-77.4l127.64-106.36c14.42-3.6 29.28-6.060 44.78-6.060 124.22 0 196.22 90.94 422.32 512.92 14.76 28.7 27.8 59.7 27.8 91.98 0 57.82-52 99.1-108.22 99.1z" />
<glyph unicode="&#xe92f;" glyph-name="check-square-multi" d="M914.286 960h-804.571c-60.571 0-109.714-49.143-109.714-109.714v-804.571c0-60.571 49.143-109.714 109.714-109.714h804.571c60.571 0 109.714 49.143 109.714 109.714v804.571c0 60.571-49.143 109.714-109.714 109.714zM914.286 45.714h-804.571v804.571h804.571v-804.571zM831.543 552.229l-50.743 50.743c-12.114 12.114-31.543 12.114-43.429 0l-307.429-307.2-142.857 143.086c-12.114 12.114-31.543 12.114-43.429 0l-50.971-50.971c-12.114-12.114-12.114-31.543 0-43.657l215.543-215.543c12.114-12.114 31.543-12.114 43.429 0l379.657 379.886c12.114 12.114 12.114 31.771 0.229 43.657v0zM415.543 416.229c8-8 21.029-8 29.029 0l266.743 267.2c8 8 8 21.029 0 29.029l-58.057 58.057c-8 8-21.029 8-29.029 0l-194.286-194.286-71.086 71.086c-8 8-21.029 8-29.029 0l-58.057-58.057c-8-8-8-21.029 0-29.029l143.771-144z" />
<glyph unicode="&#xe930;" glyph-name="phone" d="M986.8 910.8l-208 48c-22.6 5.2-45.8-6.6-55-27.8l-96-224c-8.4-19.6-2.8-42.6 13.8-56l121.2-99.2c-72-153.4-197.8-281-354.4-354.4l-99.2 121.2c-13.6 16.6-36.4 22.2-56 13.8l-224-96c-21.4-9.4-33.2-32.6-28-55.2l48-208c5-21.6 24.2-37.2 46.8-37.2 512.2 0 928 415 928 928 0 22.4-15.4 41.8-37.2 46.8z" />
<glyph unicode="&#xe931;" glyph-name="eye-slash" d="M241.117 709.171c70.879 55.2 161.759 97.231 270.878 97.231 129.279 0 232.798-58.943 308.157-128.959 74.879-69.439 124.959-151.199 148.639-209.758 5.28-12.64 5.28-26.72 0-39.36-21.44-51.68-64.479-124.479-127.839-189.438l168.319-131.839c16.64-13.12 19.68-37.28 6.56-53.92s-37.28-19.68-53.92-6.56l-947.198 742.41c-16.691 13.088-19.617 37.216-6.534 53.91 13.085 16.691 37.212 19.617 53.916 6.534l179.022-140.252zM356.956 618.404l144.479-113.279c6.72 13.6 10.56 28.96 10.56 46.72 0 16.96-6.24 34.24-13.44 49.12 4.48 0.48 8.96 2.080 13.44 2.080 84.799 0 153.599-68.799 153.599-153.599 0-23.36-4.64-44.16-14.24-63.039l63.199-48.32c17.76 32.64 27.84 70.079 27.84 111.359 0 125.759-103.199 230.398-230.398 230.398-59.679 0-114.239-24.16-155.039-61.439zM511.995 89.608c-129.279 0-232.798 58.879-308.157 128.959-74.847 70.879-124.895 152.639-148.703 209.758-5.248 12.64-5.248 26.72 0 39.36 15.264 36.64 41.328 83.999 77.807 131.519l150.895-118.879c-1.44-10.56-2.24-21.28-2.24-30.88 0-128.639 103.199-231.838 230.398-231.838 29.92 0 58.559 5.76 84.799 16.16l117.119-92.159c-58.079-31.36-125.439-52-201.918-52v0z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 36 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -0,0 +1,41 @@
jQuery( document ).ready( function() {
var notice_selector = '[data-notice="fcf-admin-notice"]';
var button_close_selector = '.notice-dismiss';
var button_hide_selector = '[data-notice-button]';
var notice_wrapper = document.querySelector( notice_selector );
if ( ! notice_wrapper ) {
return;
}
var close_notice = function ( is_permanently ) {
jQuery.ajax(
notice_wrapper.getAttribute( 'data-notice-url' ),
{
type: 'POST',
data: {
action: notice_wrapper.getAttribute( 'data-notice-action' ),
is_permanently: ( is_permanently ) ? 1 : 0,
},
}
);
if ( is_permanently ) {
notice_wrapper.querySelector( button_close_selector ).click();
}
}
var click_on_close = function( e ) {
notice_wrapper.removeEventListener( 'click', click_on_close );
if ( e.target.matches( button_close_selector ) ) {
close_notice( false );
} else if ( e.target.matches( button_hide_selector ) ) {
close_notice( true );
}
}
notice_wrapper.addEventListener( 'click', click_on_close );
} );

View File

@@ -0,0 +1,4 @@
jQuery(document).ready(function(){var notice_selector='[data-notice="fcf-admin-notice"]';var button_close_selector='.notice-dismiss';var button_hide_selector='[data-notice-button]';var notice_wrapper=document.querySelector(notice_selector);if(!notice_wrapper){return}
var close_notice=function(is_permanently){jQuery.ajax(notice_wrapper.getAttribute('data-notice-url'),{type:'POST',data:{action:notice_wrapper.getAttribute('data-notice-action'),is_permanently:(is_permanently)?1:0,},});if(is_permanently){notice_wrapper.querySelector(button_close_selector).click()}}
var click_on_close=function(e){notice_wrapper.removeEventListener('click',click_on_close);if(e.target.matches(button_close_selector)){close_notice(!1)}else if(e.target.matches(button_hide_selector)){close_notice(!0)}}
notice_wrapper.addEventListener('click',click_on_close)})

View File

@@ -0,0 +1,22 @@
(function($) {
$(function() {
var i = 0;
$('.post-type-shop_order .edit_address .form-field').each(function () {
if($(this).width() != 100){
if(i % 2 == 0){
$(this).addClass('form-left');
}
else{
$(this).addClass('form-right');
}
i++;
}
else{
i = 0;
}
});
});
})(jQuery);

View File

@@ -0,0 +1,2 @@
(function($){$(function(){var i=0;$('.post-type-shop_order .edit_address .form-field').each(function(){if($(this).width()!=100){if(i%2==0){$(this).addClass('form-left')}else{$(this).addClass('form-right')}
i++}else{i=0}})})})(jQuery)

View File

@@ -0,0 +1,68 @@
jQuery(document).on("click",".inspire-file-add-button",function() {
jQuery(this).parent().find('input[type=file]').click();
});
jQuery(document).on("click",".inspire-file-delete-button",function() {
jQuery(this).parent().find('input[type=file]').val('');
jQuery(this).parent().find('input[type=text]').val('');
jQuery(this).parent().find('.inspire-file-info').empty();
jQuery(this).parent().find('.inspire-file-info').hide();
jQuery(this).parent().find('.inspire-file-delete-button').hide();
jQuery(this).parent().find('.inspire-file-add-button').show();
jQuery(this).parent().find('input[type=text]').trigger('change');
});
jQuery(document).on("change",".inspire-file-file",function() {
var id = jQuery(this).parent().attr('id');
var $file_info = jQuery('#' + id).find('.inspire-file-info');
var $file_error = jQuery('#' + id).find('.inspire-file-error');
var $file_add_button = jQuery('#' + id).find('.inspire-file-add-button');
$file_info.empty();
$file_error.empty();
$file_error.hide();
$file_info.show();
$file_info.append( words.uploading );
jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());
$file_add_button.hide();
var fd = new FormData();
var file = jQuery(this).prop('files')[0];
var filename = file.name;
fd.append(jQuery(this).attr('field_name'), file);
fd.append( 'action', 'cf_upload' );
fd.append( 'inspire_upload_nonce', inspire_upload_nonce );
jQuery('#place_order').prop('disabled',true);
jQuery.ajax({
type: 'POST',
url: fcf_ajaxurl,
data: fd,
contentType: false,
processData: false,
success: function(response){
jQuery('#place_order').prop('disabled',false);
if ( response != 0 ) {
response = JSON.parse(response);
if ( response.status != 'ok' ) {
$file_add_button.show();
$file_info.empty();
$file_info.hide();
$file_error.empty();
$file_error.append( response.message + '<br/>' );
$file_error.show();
jQuery('#' + id).find('.inspire-file-file').val('');
jQuery('#' + id).find('.inspire-file').val('');
jQuery('#' + id).find('.inspire-file').trigger('change');
}
else {
jQuery('#' + id).find('.inspire-file-delete-button').show();
$file_error.empty();
$file_error.hide();
$file_info.empty();
$file_info.show();
$file_info.append(filename + '<br/>');
}
}
}
});
});

View File

@@ -0,0 +1 @@
jQuery(document).on("click",".inspire-file-add-button",function(){jQuery(this).parent().find('input[type=file]').click()});jQuery(document).on("click",".inspire-file-delete-button",function(){jQuery(this).parent().find('input[type=file]').val('');jQuery(this).parent().find('input[type=text]').val('');jQuery(this).parent().find('.inspire-file-info').empty();jQuery(this).parent().find('.inspire-file-info').hide();jQuery(this).parent().find('.inspire-file-delete-button').hide();jQuery(this).parent().find('.inspire-file-add-button').show();jQuery(this).parent().find('input[type=text]').trigger('change')});jQuery(document).on("change",".inspire-file-file",function(){var id=jQuery(this).parent().attr('id');var $file_info=jQuery('#'+id).find('.inspire-file-info');var $file_error=jQuery('#'+id).find('.inspire-file-error');var $file_add_button=jQuery('#'+id).find('.inspire-file-add-button');$file_info.empty();$file_error.empty();$file_error.hide();$file_info.show();$file_info.append(words.uploading);jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());$file_add_button.hide();var fd=new FormData();var file=jQuery(this).prop('files')[0];var filename=file.name;fd.append(jQuery(this).attr('field_name'),file);fd.append('action','cf_upload');fd.append('inspire_upload_nonce',inspire_upload_nonce);jQuery('#place_order').prop('disabled',!0);jQuery.ajax({type:'POST',url:fcf_ajaxurl,data:fd,contentType:!1,processData:!1,success:function(response){jQuery('#place_order').prop('disabled',!1);if(response!=0){response=JSON.parse(response);if(response.status!='ok'){$file_add_button.show();$file_info.empty();$file_info.hide();$file_error.empty();$file_error.append(response.message+'<br/>');$file_error.show();jQuery('#'+id).find('.inspire-file-file').val('');jQuery('#'+id).find('.inspire-file').val('');jQuery('#'+id).find('.inspire-file').trigger('change')}else{jQuery('#'+id).find('.inspire-file-delete-button').show();$file_error.empty();$file_error.hide();$file_info.empty();$file_info.show();$file_info.append(filename+'<br/>')}}}})})

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
/*!
* vanilla-picker v2.12.1
* https://vanilla-picker.js.org
*
* Copyright 2017-2021 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
* Released under the ISC license.
*/

View File

@@ -0,0 +1,66 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
class Flexible_Checkout_Fields_Activation_Tracker {
/** @var string */
private $namespace;
/**
* Flexible_Checkout_Fields_Activation_Tracker constructor.
*
* @param $namespace string for settings
*/
public function __construct( $namespace ) {
$this->namespace = $namespace;
}
/**
* Option name for date storage
*
* @return string
*/
private function get_option_name_activation_date() {
return $this->namespace . '_activation';
}
/**
* Returns activation date and sets it if were not set before
*
* @return int unix timestamp for activation datetime
*/
public function get_activation_date() {
$activation_date
= get_option( $this->get_option_name_activation_date() );
if ( empty( $activation_date ) ) {
return $this->touch_activation_date();
}
return intval( $activation_date );
}
/**
* Was activation more than two weeks before today
*
* @return bool
*/
public function is_activated_more_than_two_weeks() {
$two_weeks = 60 * 60 * 24 * 7 * 2;
return $this->get_activation_date() + $two_weeks < time();
}
/**
* Sets activatiion date for today
*
* @return int unit timestamp for now
*/
public function touch_activation_date() {
$now = time();
update_option( $this->get_option_name_activation_date(), $now );
return $now;
}
}

View File

@@ -0,0 +1,478 @@
<?php
class Flexible_Checkout_Fields_Disaplay_Options {
const HOOK_PRIORITY_LAST = 999999;
const DISPLAY_ON_ADDRESS = 'display_on_address';
const DISPLAY_ON_THANK_YOU = 'display_on_thank_you';
const DISPLAY_ON_ORDER = 'display_on_order';
const DISPLAY_ON_EMAILS = 'display_on_emails';
protected $plugin;
protected $current_address_type = 'shipping';
protected $in_email_address = false;
/**
* Flexible_Checkout_Fields_Disaplay_Options constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
$this->hooks();
}
/**
*
*/
protected function hooks() {
add_filter( 'woocommerce_localisation_address_formats', array( $this, 'woocommerce_localisation_address_formats_filter' ), self::HOOK_PRIORITY_LAST );
add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'woocommerce_formatted_address_replacements' ), self::HOOK_PRIORITY_LAST, 2 );
add_filter( 'woocommerce_order_formatted_billing_address', array( $this, 'woocommerce_order_formatted_billing_address' ), self::HOOK_PRIORITY_LAST, 2 );
add_filter( 'woocommerce_order_formatted_shipping_address', array( $this, 'woocommerce_order_formatted_shipping_address' ), self::HOOK_PRIORITY_LAST, 2 );
// addresses in my account
add_filter( 'woocommerce_my_account_my_address_formatted_address', array( $this, 'woocommerce_my_account_my_address_formatted_address' ), 10, 3 );
add_action( 'woocommerce_billing_fields', array($this, 'woocommerce_billing_fields'), 19999 );
add_action( 'woocommerce_shipping_fields', array($this, 'woocommerce_shipping_fields'), 19999 );
add_action( 'woocommerce_email_customer_details', array( $this, 'woocommerce_email_customer_details_start' ), 10 );
add_action( 'woocommerce_email_customer_details', array( $this, 'woocommerce_email_customer_details_end' ), 10000 );
// additional fields
add_action( 'woocommerce_thankyou', array( $this, 'additional_information_fields' ), 75 );
add_action( 'woocommerce_email_order_meta', array( $this, 'email_additional_information_fields' ), 195 );
add_action( 'woocommerce_view_order', array( $this, 'additional_information_fields' ), 195 );
add_action( 'woocommerce_edit_account_form', array( $this, 'woocommerce_edit_account_form' ) );
}
public function woocommerce_edit_account_form() {
}
public function email_additional_information_fields( $order ) {
$this->in_email_address = true;
$this->additional_information_fields( wpdesk_get_order_id( $order ) );
$this->in_email_address = false;
}
/**
* Displays additional fields.
*
* @param int $order_id Order id.
*/
public function additional_information_fields( $order_id ) {
$settings = $this->plugin->getCheckoutFields( $this->plugin->get_settings() );
$checkout_field_type = $this->plugin->get_fields();
if ( ! empty( $settings ) && is_array( $settings ) ) {
$return = array();
foreach ( $settings as $key => $type ) {
if ( in_array( $key, array( 'billing', 'shipping' ), true ) ) {
continue;
}
if ( isset( $type ) && is_array( $type ) ) {
foreach ( $type as $field ) {
if ( isset( $field['visible'] ) && 0 === intval( $field['visible'] ) && isset( $field['custom_field'] ) && 1 === intval( $field['custom_field'] ) ) {
$value = wpdesk_get_order_meta( $order_id, '_' . $field['name'], true );
if ( $this->is_field_displayable( $field ) && '' !== $value ) {
if ( ! empty( $checkout_field_type[ $field['type'] ]['has_options'] ) ) {
$options = $field['options'];
if ( isset( $options[ $value ] ) ) {
$value = $options[ $value ];
}
}
$value = apply_filters( 'flexible_checkout_fields_print_value', $value, $field );
if ( '' !== $value ) {
$return[] = strip_tags( wpdesk__( $field['label'], 'flexible-checkout-fields' ) ) . ': ' . esc_html( $value );
}
}
}
}
}
}
if ( count( $return ) > 0 ) {
echo '<div class="inspire_checkout_fields_additional_information">';
echo '<h3>' . __( 'Additional Information', 'flexible-checkout-fields' ) . '</h3>';
echo '<p>' . implode( '<br />', $return ) . '</p>';
echo '</div>';
}
}
}
public function woocommerce_email_customer_details_start() {
$this->in_email_address = true;
}
public function woocommerce_email_customer_details_end() {
$this->in_email_address = false;
}
public function woocommerce_my_account_my_address_formatted_address( $address, $customer_id, $address_type ) {
$checkout_field_type = $this->plugin->get_fields();
$this->current_address_type = $address_type;
WC()->countries->address_formats = '';
$cf_fields = $this->getCheckoutFields( array(), $address_type );
$is_empty_address = $this->check_if_address_is_empty ( $address );
foreach ( $cf_fields as $field_key => $field ) {
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin);
if ( !isset( $address[$field['name']] ) ) {
$val = '';
if ( $fcf_field->is_custom_field() && $fcf_field->get_display_on_option_show_label() === '1' ) {
$val .= strip_tags( wpdesk__( $field['label'], 'flexible-checkout-fields' ) ) . ': ';
}
$meta_value = get_user_meta( $customer_id, $field_key, true );
$meta_value = apply_filters( 'flexible_checkout_fields_user_meta_display_value', $meta_value, $field );
$val .= $meta_value;
if ( $is_empty_address && ( $meta_value === '' ) ) {
$val = '';
}
$address[$field['name']] = $val;
$address[$this->replace_only_first( $address_type . '_', '', $field['name'] )] = $val;
}
}
return $address;
}
public function getCheckoutFields( $fields, $request_type = null ) {
return $this->plugin->getCheckoutFields( $fields, $request_type );
}
/**
* Checks if all values in address array are empty.
*
* @param string[] $address Array keys are field names and values are field values.
*
* @return bool Status if all values are empty string.
*/
private function check_if_address_is_empty( array $address ) {
foreach ( $address as $field_key => $field_value ) {
if ( $field_value !== '' ) {
return false;
}
}
return true;
}
/**
* Append field to address format.
*
* @param string $format
* @param string $field_key
* @param array $field
*
* @return string
*/
private function append_field_to_address_format( $format, $field_key, $field ) {
if ( ( $this->is_thankyou_page() || $this->is_in_email() || $this->is_order_page() )
&& in_array( $field_key, array( 'billing_phone', 'billing_email' ) )
) {
return $format;
}
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin );
if ( isset( $field['type'] ) && in_array( $field['type'], array( 'heading', 'info', 'paragraph', 'image' ) ) ) {
return $format;
}
if ( $this->is_field_displayable( $field ) ) {
if ( $format != '' ) {
if ( $fcf_field->get_display_on_option_new_line_before() === '1' ) {
$format .= "\n";
} elseif ( ! $fcf_field->get_display_comma_before() ) {
$format .= ' ';
}
}
if ( $fcf_field->get_display_comma_before() ) {
$format .= ', ';
}
$field_name = $fcf_field->get_name_for_address_format();
$format .= '{' . $this->replace_only_first( $this->current_address_type . '_', '', $field_name . '}' );
}
return $format;
}
/**
* Localisation address formats - woocommerce filter.
*
* @param array $formats
*
* @return array
*/
public function woocommerce_localisation_address_formats_filter( $formats ) {
$fields = $this->getCheckoutFields( array(), $this->current_address_type );
if ( empty( $fields ) ) {
return $formats;
}
foreach ( $formats as $format_key => $format ) {
if ( $this->is_edit_address_page()
|| $this->is_order_page()
|| $this->is_in_email()
|| $this->is_thankyou_page()
) {
$formats[ $format_key ] = '';
foreach ( $fields as $field_key => $field ) {
$formats[ $format_key ] = $this->append_field_to_address_format( $formats[ $format_key ], $field_key, $field );
}
}
}
return $formats;
}
private function is_field_displayable( $field ) {
$displayable = true;
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin );
if ( $this->is_edit_address_page() ) {
$displayable = !isset( $field[self::DISPLAY_ON_ADDRESS] ) || $field[self::DISPLAY_ON_ADDRESS] == '1';
if ( $fcf_field->is_field_excluded_for_user() ) {
$displayable = false;
}
}
if ( $this->is_order_page() ) {
$displayable = !isset( $field[self::DISPLAY_ON_ORDER] ) || $field[self::DISPLAY_ON_ORDER] == '1';
}
if ( $this->is_in_email() ) {
$displayable = !isset( $field[self::DISPLAY_ON_EMAILS] ) || $field[self::DISPLAY_ON_EMAILS] == '1';
}
if ( $this->is_thankyou_page() ) {
$displayable = !isset( $field[self::DISPLAY_ON_THANK_YOU] ) || $field[self::DISPLAY_ON_THANK_YOU] == '1';
}
return $displayable;
}
public function is_admin_edit_order() {
$admin_edit_order = false;
if ( is_admin() ) {
$admin_edit_order = true;
}
return $admin_edit_order;
}
public function is_edit_address_page() {
global $wp;
$edit_address_page = false;
if ( is_account_page() ) {
if ( isset( $wp->query_vars['edit-address'] ) ) {
$edit_address_page = true;
}
}
return $edit_address_page;
}
public function is_order_page() {
global $wp;
$order_page = false;
if ( is_account_page() ) {
if ( isset( $wp->query_vars['view-order'] ) ) {
$order_page = true;
}
}
return $order_page;
}
public function is_in_email() {
$in_email = false;
if ( $this->in_email_address ) {
$in_email = true;
}
return $in_email;
}
public function is_thankyou_page() {
global $wp;
$thankyou_page = false;
if ( is_checkout() ) {
if ( isset( $wp->query_vars['order-received'] ) ) {
$thankyou_page = true;
}
}
return $thankyou_page;
}
public function woocommerce_formatted_address_replacements( $fields, $args ) {
foreach ( $args as $arg_key => $arg ) {
if ( !isset( $fields['{' . $arg_key . '}'] ) ) {
$fields['{' . $arg_key . '}'] = $arg;
}
}
return $fields;
}
public function woocommerce_order_formatted_billing_address( $fields, $order ) {
$this->current_address_type = 'billing';
WC()->countries->address_formats = '';
return $this->woocommerce_order_formatted_address( $fields, $order, 'billing' );
}
/**
* @param array $fields
* @param WC_Order $order
* @param string $address_type
*
* @return mixed
*/
public function woocommerce_order_formatted_address( $fields, $order, $address_type ) {
$cf_fields = $this->getCheckoutFields( array(), $address_type );
$checkout_field_type = $this->plugin->get_fields();
foreach ( $cf_fields as $field_key => $field ) {
$val = wpdesk_get_order_meta( $order, '_' . $field_key, true );
if ( empty( $val ) && isset( $fields[ $field_key ] ) ) {
$val = $fields[ $field_key ];
}
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin );
if ( (isset( $field['custom_field'] ) && $field['custom_field'] == '1')) {
$val = '';
if ( $fcf_field->is_custom_field() && $fcf_field->get_display_on_option_show_label() === '1' ) {
$val = strip_tags( wpdesk__( $field['label'], 'flexible-checkout-fields' ) ) . ': ';
}
$meta_value = wpdesk_get_order_meta( $order, '_' . $field_key, true );
$meta_value = apply_filters( 'flexible_checkout_fields_print_value', $meta_value, $field );
$val .= $meta_value;
}
$val = $this->flexible_invoices_ask_field_integration($val, $field, $field_key, $fields);
$val = wp_kses_post( $val );
$fields[$field['name']] = $val;
$fields[$this->replace_only_first( $address_type . '_', '', $field['name'] )] = $val;
}
return $fields;
}
/**
* Similar to str_replace but replaces only the first occurrence.
*
* @param string $needle search for it.
* @param string $replace change the needle to this value.
* @param string $haystack here we are searching
*
* @return string
*/
private function replace_only_first($needle, $replace, $haystack) {
$pos = strpos($haystack, $needle);
if ($pos !== false) {
return substr_replace($haystack, $replace, $pos, strlen($needle));
}
return $haystack;
}
/**
* Return value for invoice ask field prepared by FI plugin. If can't then fallback.
*
* @param string $val Prepared by FCF field value.
* @param array $field FCF field def.
* @param string $field_key Field key that is currently processed. Needed to check if val should be replaced.
* @param array $fields Prepared by WC field values
*
* @return string New field value
*/
private function flexible_invoices_ask_field_integration( $val, $field, $field_key, $fields ) {
if ( apply_filters( 'flexible_checkout_fields_invoices_integration_enabled', true ) ) {
// FI ask field integration
if ( $field_key === 'invoice_ask' && ! empty( $fields['invoice_ask_field'] ) ) {
return $fields['invoice_ask_field'];
}
// wFirma/Fakturownia/iFirma/inFakt ask field integration
$supported_ask_fields = array(
'billing_faktura',
'billing_invoice',
'billing_rachunek'
);
if ( in_array( $field_key, $supported_ask_fields, true ) ) {
$wc_meta_key_definitions = apply_filters( 'woocommerce_customer_meta_fields', [] );
$label = strip_tags( wpdesk__( $field['label'], 'flexible-checkout-fields' ) );
// original plugin is probably(?) disabled if the field is not accessible
if ( isset( $wc_meta_key_definitions[ $this->current_address_type ]['fields'][ $field_key ] ) ) {
$wc_field_def = $wc_meta_key_definitions[ $this->current_address_type ]['fields'][ $field_key ];
// if field exists and is defined as select we can use this data. If not then better do not touch as it's probably optional checkbox
if ( isset( $wc_field_def['options'] ) ) {
$select_options = $wc_meta_key_definitions[ $this->current_address_type ]['fields'][ $field_key ]['options'];
$option_val = isset( $select_options[ $val ] ) ? $select_options[ $val ] : '';
return $label . ': ' . $option_val;
} elseif ( (int) $val === 1 ) {
return $label;
}
}
}
}
return $val;
}
/**
* Mainly injects FCF data values into WC formatted shipping address.
* Also changes current_address_type indicator and do some shady stuff to WC()->countries.
*
* @param array|string $fields Fields can be string when shipment is disabled
* @param WC_Order $order
*
* @return array|string
*/
public function woocommerce_order_formatted_shipping_address( $fields, $order ) {
$this->current_address_type = 'shipping';
WC()->countries->address_formats = '';
if ( ! is_array( $fields ) ) {
return $fields;
}
return $this->woocommerce_order_formatted_address( $fields, $order, 'shipping' );
}
public function woocommerce_billing_fields( $fields ) {
return $this->woocommerce_fields( $fields, 'billing' );
}
public function woocommerce_shipping_fields( $fields ) {
return $this->woocommerce_fields( $fields, 'shipping' );
}
protected function woocommerce_fields( $fields, $section ) {
global $wp;
$cf_fields = $this->getCheckoutFields( array(), $section );
$edit_address_page = false;
if ( is_account_page() ) {
if ( isset( $wp->query_vars['edit-address'] ) ) {
$edit_address_page = true;
}
}
foreach ( $cf_fields as $cf_field_key => $cf_field ) {
$remove_field = false;
if ( $edit_address_page ) {
$remove_field = true;
if ( !isset( $cf_field[self::DISPLAY_ON_ADDRESS] ) || $cf_field[self::DISPLAY_ON_ADDRESS] == '1' ) {
$remove_field = false;
}
}
if ( $remove_field ) {
unset( $fields[$cf_field_key] );
}
}
return $fields;
}
}

View File

@@ -0,0 +1,49 @@
<?php
/**
* Field type settings.
*/
class Flexible_Checkout_Fields_Field_Type_Settings {
const FIELD_TYPE_TEXT = 'text';
const FIELD_TYPE_TEXTAREA = 'textarea';
/**
* Field type data.
*
* @var array
*/
private $field_type_settings;
public function __construct( array $field_type_settings ) {
$this->field_type_settings = $field_type_settings;
}
/**
* .
*
* @return bool
*/
public function has_options() {
return isset( $this->field_type_settings['has_options'] ) && $this->field_type_settings['has_options'];
}
/**
* .
*
* @return bool
*/
public function has_default_value() {
return isset( $this->field_type_settings['has_default_value'] ) && $this->field_type_settings['has_default_value'];
}
/**
* Is pro indicator set?
*
* @return bool
*/
public function is_pro() {
return isset( $this->field_type_settings['pro'] ) ? intval( $this->field_type_settings['pro'] ) === 1 : false;
}
}

View File

@@ -0,0 +1,272 @@
<?php
/**
* Checkout field settings.
*/
class Flexible_Checkout_Fields_Field {
const FIELD_TYPE = 'type';
const FIELD_CUSTOM_FIELD = 'custom_field';
const FIELD_VISIBLE = 'visible';
const FIELD_DEFAULT = 'default';
const FIELD_DISPLAY_ON_OPTION_NEW_LINE_BEFORE = 'display_on_option_new_line_before';
const FIELD_DISPLAY_ON_OPTION_SHOW_LABEL = 'display_on_option_show_label';
const FIELD_TYPE_EXCLUDE_IN_ADMIN = 'exclude_in_admin';
const FIELD_TYPE_EXCLUDE_FOR_USER = 'exclude_for_user';
const DEFAULT_FIELD_TYPE = Flexible_Checkout_Fields_Field_Type_Settings::FIELD_TYPE_TEXT;
const FIELD_TYPE_STATE = 'state';
const DISPLAY_OPTION_STATE_CODE = 'state_code';
const DISPLAY_OPTION_STATE_COMMA_BEFORE = 'state_code_comma_before';
/**
* Field data.
*
* @var array
*/
private $field_data;
/**
* Plugin.
*
* @var Flexible_Checkout_Fields_Plugin
*/
private $plugin;
/**
* Flexible_Checkout_Fields_Field constructor.
*
* @param array $field_data Field data.
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
*/
public function __construct( array $field_data, $plugin ) {
$this->plugin = $plugin;
$this->field_data = $field_data;
}
/**
* @param array $field_data Field data.
* @param array $field_settings .
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
*
* @return Flexible_Checkout_Fields_Field
*/
public static function create_with_settings( $field_data, $field_settings, $plugin ) {
$fcf_field = new self( $field_data, $plugin );
$fcf_field->add_field_settings( $field_settings );
return $fcf_field;
}
/**
* Add settings to field.
*
* @param array $field_settings .
*/
public function add_field_settings( array $field_settings ) {
foreach ( $field_settings as $key => $setting ) {
$this->field_data[ $key ] = $setting;
}
}
/**
* Get field setting.
*
* @param string $setting_name .
* @param null|string|array $default_value .
*
* @return array|string|null
*/
public function get_field_setting( $setting_name, $default_value = null ) {
if ( $setting_name === self::FIELD_DISPLAY_ON_OPTION_SHOW_LABEL ) {
return $this->get_display_on_option_show_label();
}
if ( $setting_name === self::FIELD_DISPLAY_ON_OPTION_NEW_LINE_BEFORE ) {
return $this->get_display_on_option_new_line_before();
}
if ( isset( $this->field_data[ $setting_name ] ) ) {
return $this->field_data[ $setting_name ];
} else {
return $default_value;
}
}
/**
* Get field types from plugin.
*
* @return array
*/
private function get_field_types_from_plugin() {
return $this->plugin->get_fields();
}
/**
* Get field type settings.
*
* @return array
*/
private function get_field_type_settings() {
$default_values = array(
self::FIELD_TYPE_EXCLUDE_IN_ADMIN => false,
self::FIELD_TYPE_EXCLUDE_FOR_USER => false,
);
$field_types = $this->get_field_types_from_plugin();
if ( isset( $this->field_data[ self::FIELD_TYPE ] ) && isset( $field_types[ $this->field_data[ self::FIELD_TYPE ] ] ) ) {
$field_type_settings = $field_types[ $this->field_data[ self::FIELD_TYPE ] ];
$field_type_settings = array_merge( $default_values, $field_type_settings );
return $field_type_settings;
}
return $default_values;
}
/**
* Is visible?
*
* @return bool
*/
public function is_custom_field() {
if ( isset( $this->field_data[ self::FIELD_CUSTOM_FIELD ] ) && 1 === intval( $this->field_data[ self::FIELD_CUSTOM_FIELD ] ) ) {
return true;
}
return false;
}
/**
* Is visible?
*
* @return bool
*/
public function is_visible() {
if ( isset( $this->field_data[ self::FIELD_VISIBLE ] ) && 0 === intval( $this->field_data[ self::FIELD_VISIBLE ] ) ) {
return false;
}
return true;
}
/**
* Is field excluded for user?
* Field is excluded from user when is custom field and is not visible or field type is excluded for user.
*
* @return bool
*/
public function is_field_excluded_for_user() {
if ( ! $this->is_custom_field() ) {
return false;
}
$field_type_settings = $this->get_field_type_settings();
if ( true === $field_type_settings[ self::FIELD_TYPE_EXCLUDE_FOR_USER ] ) {
return true;
}
return false;
}
/**
* Is field excluded in admin?
*
* @return bool
*/
public function is_field_excluded_in_admin() {
if ( ! $this->is_custom_field() ) {
return false;
}
$field_type_settings = $this->get_field_type_settings();
if ( true === $field_type_settings[ self::FIELD_TYPE_EXCLUDE_IN_ADMIN ] ) {
return true;
}
return false;
}
/**
* .
*
* @return string
*/
public function get_display_on_option_new_line_before() {
if ( isset( $this->field_data[ self::FIELD_DISPLAY_ON_OPTION_NEW_LINE_BEFORE ] ) ) {
return $this->field_data[ self::FIELD_DISPLAY_ON_OPTION_NEW_LINE_BEFORE ];
} else {
return '1';
}
}
/**
* .
*
* @return string
*/
public function get_display_on_option_show_label() {
if ( isset( $this->field_data[ self::FIELD_DISPLAY_ON_OPTION_SHOW_LABEL ] ) ) {
return $this->field_data[ self::FIELD_DISPLAY_ON_OPTION_SHOW_LABEL ];
} else {
if ( $this->is_custom_field() ) {
return '1';
} else {
return '0';
}
}
}
/**
* Set field type.
*
* @param string $type .
*/
public function set_type( $type ) {
$this->field_data[ self::FIELD_TYPE ] = $type;
}
/**
* Get field type.
*
* @return string
*/
public function get_type() {
return isset( $this->field_data[ self::FIELD_TYPE ] ) ? $this->field_data[ self::FIELD_TYPE ] : self::DEFAULT_FIELD_TYPE;
}
/**
* Get default value.
*
* @return string
*/
public function get_default() {
return isset( $this->field_data[ self::FIELD_DEFAULT ] ) ? $this->field_data[ self::FIELD_DEFAULT ] : '';
}
/**
* Prepare display_on option name.
*
* @param string $display_on
*
* @return string
*/
public function prepare_display_on_option_name( $display_on ) {
return 'display_on_option_' . $display_on;
}
/**
* Get field name for formatted address.
*/
public function get_name_for_address_format() {
$name = $this->field_data['name'];
if ( isset( $this->field_data[ $this->prepare_display_on_option_name( self::DISPLAY_OPTION_STATE_CODE ) ] )
&& 1 === intval( $this->field_data[ $this->prepare_display_on_option_name( self::DISPLAY_OPTION_STATE_CODE ) ] )
) {
$name = 'state_code';
}
return $name;
}
/**
* Get display comma before field.
* Currently used only on state/county field.
*/
public function get_display_comma_before() {
return isset( $this->field_data[ $this->prepare_display_on_option_name( self::DISPLAY_OPTION_STATE_COMMA_BEFORE ) ] )
? $this->field_data[ $this->prepare_display_on_option_name( self::DISPLAY_OPTION_STATE_COMMA_BEFORE ) ] : '0';
}
}

View File

@@ -0,0 +1,104 @@
<?php
use WPDesk\FCF\Free\Field\Type\FileType;
use WPDesk\FCF\Free\Field\Type\MultiCheckboxType;
use WPDesk\FCF\Free\Field\Type\MultiSelectType;
use WPDesk\FCF\Free\Field\Type\TextareaType;
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class Flexible_Checkout_Fields_Field_Validation {
/**
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* Flexible_Checkout_Fields_Field_Validation constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
}
/**
*
*/
public function hooks() {
add_action( 'woocommerce_after_checkout_validation', array( $this, 'woocommerce_after_checkout_validation_action' ) );
add_filter( 'woocommerce_checkout_required_field_notice', array( $this, 'woocommerce_checkout_required_field_notice_filter' ), 10, 2 );
}
public function woocommerce_checkout_required_field_notice_filter( $notice, $field_label ) {
$field_label = strip_tags( $field_label );
$notice = sprintf( __( '%s is a required field.', 'woocommerce' ), '<strong>' . $field_label . '</strong>' );
return $notice;
}
/**
* @param $data
*/
public function woocommerce_after_checkout_validation_action( $data ) {
foreach ( $data as $field => $value ) {
do_action( 'flexible_checkout_fields_validate_' . $field, $value );
}
$settings = $this->plugin->get_settings();
$custom_validations = $this->get_custom_validations();
foreach ( $settings as $section => $fields ) {
foreach ( $fields as $field_key => $field ) {
if ( isset( $_POST[$field_key] ) && !empty( $field['validation'] ) && array_key_exists( $field['validation'], $custom_validations ) ) {
call_user_func( $custom_validations[$field['validation']]['callback'], $field['label'], sanitize_textarea_field($_POST[$field_key]), $field );
}
if ( ! ( $field['custom_field'] ?? false ) ) {
continue;
}
if ( in_array( $field['type'], [ TextareaType::FIELD_TYPE ] ) ) {
$value = sanitize_textarea_field( wp_unslash( $_POST[ $field_key ] ?? '' ) );
} elseif ( in_array( $field['type'], [ MultiCheckboxType::FIELD_TYPE, MultiSelectType::FIELD_TYPE, FileType::FIELD_TYPE ] ) ) {
$value = json_encode( wp_unslash( $_POST[ $field_key ] ?? [] ) );
} else {
$value = sanitize_text_field( wp_unslash( $_POST[ $field_key ] ?? '' ) );
}
do_action( 'flexible_checkout_fields_validate_' . $field['type'], $value, $field );
}
}
}
/**
* Get custom validations.
*
* @param string $section .
* @return array
*/
public function get_custom_validations( $section = '' ) {
return apply_filters( 'flexible_checkout_fields_custom_validation', array(), $section );
}
/**
* Get validation options.
*
* @param string $section .
* @return array
*/
public function get_validation_options( $section = '' ) {
$validation_options = array(
'' => __( 'Default', 'flexible-checkout-fields' ),
'none' => __( 'None', 'flexible-checkout-fields' ),
'email' => __( 'Email', 'flexible-checkout-fields' ),
'phone' => __( 'Phone', 'flexible-checkout-fields' ),
);
if ( in_array( $section, array( 'billing', 'shipping' ), true ) ) {
$validation_options['postcode'] = __( 'Postcode', 'flexible-checkout-fields' );
}
$custom_validations = $this->get_custom_validations( $section );
foreach ( $custom_validations as $custom_validation_key => $custom_validation ) {
$validation_options[ $custom_validation_key ] = $custom_validation['label'];
}
return $validation_options;
}
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* Class Flexible_Checkout_Fields_Myaccount_Edit_Address
*/
class Flexible_Checkout_Fields_Myaccount_Edit_Address {
/**
* Plugin.
*
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* Flexible_Checkout_Fields_Myaccount_Edit_Address constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
}
/**
* Hooks.
*/
public function hooks() {
add_filter( 'woocommerce_address_to_edit', array( $this, 'filter_edit_address_fields' ), 10, 2 );
}
/**
* Filter edit address fields.
*
* @param array $fields Fields.
* @param string $section Section.
*
* @return array
*/
public function filter_edit_address_fields( array $fields, $section ) {
foreach ( $fields as $key => $field ) {
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin );
if ( $fcf_field->is_field_excluded_for_user() ) {
unset( $fields[ $key ] );
}
}
return $fields;
}
}

View File

@@ -0,0 +1,91 @@
<?php
use WPDesk\FCF\Free\Field\Type\FileType;
use WPDesk\FCF\Free\Field\Type\MultiCheckboxType;
use WPDesk\FCF\Free\Field\Type\MultiSelectType;
use WPDesk\FCF\Free\Field\Type\TextareaType;
/**
* Class Flexible_Checkout_Fields_Myaccount_Field_Processor
*/
class Flexible_Checkout_Fields_Myaccount_Field_Processor {
/**
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* Flexible_Checkout_Fields_Myaccount_Field_Processor constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
}
/**
* Is custom field?
*
* @param array $field Field.
*
* @return bool
*/
private function is_custom_field( $field ) {
if ( isset( $field['custom_field'] ) && 1 === intval( $field['custom_field'] ) ) {
return true;
}
return false;
}
/**
* Hooks.
*/
public function hooks() {
$settings = $this->plugin->get_settings();
foreach ( $settings as $section ) {
if ( is_array( $section ) ) {
foreach ( $section as $key => $field ) {
if ( ! $this->is_custom_field( $field ) ) {
continue;
}
if ( in_array( $field['type'], [ TextareaType::FIELD_TYPE ] ) ) {
add_filter( 'woocommerce_process_myaccount_field_' . $key, [ $this, 'sanitize_textarea_value' ] );
} else if ( in_array( $field['type'], [ MultiCheckboxType::FIELD_TYPE, MultiSelectType::FIELD_TYPE, FileType::FIELD_TYPE ] ) ) {
add_filter( 'woocommerce_process_myaccount_field_' . $key, [ $this, 'sanitize_array_value' ] );
} else {
add_filter( 'woocommerce_process_myaccount_field_' . $key, [ $this, 'sanitize_text_value' ] );
}
}
}
}
}
/**
* @param string|null $value .
*
* @return string
*/
public function sanitize_textarea_value( $value ) {
return sanitize_textarea_field( wp_unslash( $value ) );
}
/**
* @param string|null $value .
*
* @return string
*/
public function sanitize_array_value( $value ) {
return json_encode( wp_unslash( $value ) );
}
/**
* @param string|null $value .
*
* @return string
*/
public function sanitize_text_value( $value ) {
return sanitize_text_field( wp_unslash( $value ) );
}
}

View File

@@ -0,0 +1,949 @@
<?php
use WPDesk\FCF\Free\Field\Type\FileType;
use WPDesk\FCF\Free\Field\Type\MultiCheckboxType;
use WPDesk\FCF\Free\Field\Type\MultiSelectType;
use WPDesk\FCF\Free\Field\Type\TextareaType;
use WPDesk\FCF\Free\Plugin as PluginFree;
/**
* Class Plugin
*
* @package WPDesk\WooCommerceFakturownia
*/
class Flexible_Checkout_Fields_Plugin extends \FcfVendor\WPDesk\PluginBuilder\Plugin\AbstractPlugin {
/** @see validate_checkout method https://github.com/woocommerce/woocommerce/blob/master/includes/class-wc-checkout.php#L719 */
const FIELDS_REQUIREMENT_CONTROLLED_BY_WOOCOMMERCE = array(
'billing_country',
'shipping_country',
'billing_state',
'shipping_state',
'billing_postcode',
'shipping_postcode',
);
/**
* Scripts version.
*
* @var string
*/
private $scripts_version = FLEXIBLE_CHECKOUT_FIELDS_VERSION . '.19';
protected $fields = array();
public $sections = array();
public $all_sections = array();
public $page_size = array();
public $field_validation;
/**
* Plugin path.
*
* @var string
*/
private $plugin_path;
/**
* Plugin namespaces
*
* Fot backward compatibility
*
* @var string
*/
public $plugin_namespace = 'inspire_checkout_fields';
/**
* Instance of new version main class of plugin.
*
* @var PluginFree
*/
private $plugin_free;
/**
* Plugin constructor.
*
* @param \WPDesk_Plugin_Info $plugin_info Plugin info.
*/
public function __construct( \FcfVendor\WPDesk_Plugin_Info $plugin_info ) {
parent::__construct( $plugin_info );
$this->plugin_info = $plugin_info;
$this->plugin_free = new PluginFree( $plugin_info, $this );
}
/**
* Init base variables for plugin
*/
public function init_base_variables() {
$this->plugin_url = $this->plugin_info->get_plugin_url();
$this->plugin_path = $this->plugin_info->get_plugin_dir();
$this->template_path = $this->plugin_info->get_text_domain();
$this->settings_url = admin_url( 'admin.php?page=wc-settings&tab=integration&section=integration-fakturownia' );
$this->default_view_args = [ 'plugin_url' => $this->get_plugin_url() ];
$this->plugin_has_settings = false;
$this->plugin_namespace = 'inspire_checkout_fields';
}
/**
* Init.
*/
public function init() {
$this->plugin_free->init();
$this->init_base_variables();
$this->load_dependencies();
$this->hooks();
}
/**
* Load dependencies.
*/
private function load_dependencies() {
new WPDesk_Flexible_Checkout_Fields_Tracker();
require_once __DIR__ . '/settings.php';
}
/**
* Hooks.
*/
public function hooks() {
$this->plugin_free->hooks();
parent::hooks();
$this->settings = new Flexible_Checkout_Fields_Settings( $this, self::FIELDS_REQUIREMENT_CONTROLLED_BY_WOOCOMMERCE );
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 100 );
add_action( 'woocommerce_checkout_fields', array( $this, 'changeCheckoutFields' ), 9999 );
add_action( 'woocommerce_checkout_update_order_meta', array( $this, 'updateCheckoutFields' ), 9, 2 );
add_action( 'woocommerce_admin_order_data_after_billing_address', array(
$this,
'addCustomBillingFieldsToAdmin'
) );
add_action( 'woocommerce_admin_order_data_after_shipping_address', array(
$this,
'addCustomShippingFieldsToAdmin'
) );
add_action( 'woocommerce_admin_order_data_after_shipping_address', array(
$this,
'addCustomOrderFieldsToAdmin'
) );
add_action( 'woocommerce_billing_fields', array( $this, 'addCustomFieldsBillingFields' ), 9999 );
add_action( 'woocommerce_shipping_fields', array( $this, 'addCustomFieldsShippingFields' ), 9999 );
add_action( 'woocommerce_order_fields', array( $this, 'addCustomFieldsOrderFields' ), 9999 );
add_action( 'woocommerce_before_checkout_form', array( $this, 'woocommerce_before_checkout_form' ), 10 );
add_action( 'woocommerce_before_edit_address_form_shipping', array(
$this,
'woocommerce_before_checkout_form'
), 10 );
add_action( 'woocommerce_before_edit_address_form_billing', array(
$this,
'woocommerce_before_checkout_form'
), 10 );
add_filter( 'flexible_chekout_fields_fields', array( $this, 'getCheckoutFields' ), 10, 2 );
add_action( 'woocommerce_default_address_fields', array( $this, 'woocommerce_default_address_fields' ), 9999 );
add_filter( 'woocommerce_get_country_locale', array( $this, 'woocommerce_get_country_locale' ), 9999 );
add_filter( 'woocommerce_get_country_locale_base', array( $this, 'woocommerce_get_country_locale_base' ), 9999 );
add_action( 'woocommerce_get_country_locale_default', array( $this, 'woocommerce_get_country_locale_default' ), 11 );
add_filter( 'woocommerce_screen_ids', array( $this, 'add_woocommerce_screen_ids' ) );
new Flexible_Checkout_Fields_Disaplay_Options( $this );
$user_meta = new Flexible_Checkout_Fields_User_Meta( $this );
$user_profile = new Flexible_Checkout_Fields_User_Profile( $this, $user_meta );
$user_profile->hooks();
$user_meta = new Flexible_Checkout_Fields_User_Meta_Checkout( $this, $user_meta );
$user_meta->hooks();
$this->field_validation = new Flexible_Checkout_Fields_Field_Validation( $this );
$this->field_validation->hooks();
$my_account_fields_processor = new Flexible_Checkout_Fields_Myaccount_Field_Processor( $this );
$my_account_fields_processor->hooks();
$my_account_edit_address = new Flexible_Checkout_Fields_Myaccount_Edit_Address( $this );
$my_account_edit_address->hooks();
$plugin = $this;
add_filter( 'flexible_checkout_fields', static function() use( $plugin ) {
return $plugin;
});
}
/**
* Get plugin path.
*
* @return string
*/
public function get_plugin_path() {
return $this->plugin_path;
}
/**
* Load plugin textdomain
*/
public function load_plugin_text_domain() {
load_plugin_textdomain( 'wpdesk-plugin', false, $this->get_text_domain() . '/classes/wpdesk/lang/' );
load_plugin_textdomain( $this->get_text_domain(), false, $this->get_text_domain() . '/lang/' );
}
public function plugins_loaded() {
$this->init_fields();
//do użycia dla pola miasto, kod pocztowy i stan
$this->init_sections();
}
/**
* Get setting value.
*
* @param string $name Setting name.
* @param mixed $default Default setting value.
*
* @return mixed|void
*/
public function get_setting_value( $name, $default = null ) {
return get_option( $this->get_namespace() . '_' . $name, $default );
}
/**
* Change params used by js locale woocommerce/assets/js/frontend/address-i18n.js so it would not overwrite backend settings.
*
* This is a locale for default country.
*
* @param array $base Local base.
*
* @return array
*/
public function woocommerce_get_country_locale_base( $base ) {
$settings = $this->get_settings();
foreach ( $base as $key => $field ) {
unset( $base[ $key ]['placeholder'] );
unset( $base[ $key ]['label'] );
if ( version_compare( WC()->version, '4.4.1', '>=' ) ) {
unset( $base[ $key ]['class'] );
}
// field is force-required for given locale when FCF have shipping or billing field required
$shipping_key = 'shipping_' . $key;
$billing_key = 'billing_' . $key;
if ( ( isset( $settings['shipping'][ $shipping_key ] ) && $settings['shipping'][ $shipping_key ]['required'] )
|| ( isset( $settings['billing'][ $billing_key ] ) && $settings['billing'][ $billing_key ]['required'] ) ) {
$base [ $key ]['required'] = true;
}
}
return $base;
}
/**
* Change params used by js locale woocommerce/assets/js/frontend/address-i18n.js so it would not overwrite backend settings
*
* @param array $locale Table of field settings per locale
*
* @return array
*/
public function woocommerce_get_country_locale( $locale ) {
if ( is_checkout() || is_account_page() ) {
foreach ( $locale as $country => $fields ) {
foreach ( $fields as $field => &$settings ) {
unset( $locale[ $country ][ $field ]['priority'] );
unset( $locale[ $country ][ $field ]['label'] );
unset( $locale[ $country ][ $field ]['placeholder'] );
}
}
}
return $locale;
}
/**
* Remove priority from default address field
*
* @param array $fields Fields.
*
* @return array
*/
public function woocommerce_default_address_fields( $fields ) {
if ( is_checkout() || is_account_page() ) {
foreach ( $fields as $key => $field ) {
unset( $fields[ $key ]['priority'] );
}
}
return $fields;
}
/**
* Init sections.
*/
public function init_sections() {
$sections = array(
'billing' => array(
'section' => 'billing',
'tab' => 'fields_billing',
'tab_title' => __( 'Billing', 'flexible-checkout-fields' ),
'custom_section' => false,
'user_meta' => true,
),
'shipping' => array(
'section' => 'shipping',
'tab' => 'fields_shipping',
'tab_title' => __( 'Shipping', 'flexible-checkout-fields' ),
'custom_section' => false,
'user_meta' => true,
),
'order' => array(
'section' => 'order',
'tab' => 'fields_order',
'tab_title' => __( 'Order', 'flexible-checkout-fields' ),
'custom_section' => false,
'user_meta' => false,
),
);
$all_sections = unserialize( serialize( $sections ) );
$this->sections = apply_filters( 'flexible_checkout_fields_sections', $sections );
$this->all_sections = apply_filters( 'flexible_checkout_fields_all_sections', $all_sections );
}
private function init_fields() {
$field_types = apply_filters( 'flexible_checkout_fields/field_types', [] );
foreach ( $field_types as $field_type ) {
if ( $field_type['is_hidden'] ) {
continue;
}
$this->fields[ $field_type['type'] ] = [
'name' => $field_type['label'],
];
}
}
public function get_fields() {
return apply_filters( 'flexible_checkout_fields_fields', $this->fields );
}
/**
* Remove unavailable sections from settings.
* Removes sections added by PRO plugin, after PRO plugin disable.
*
* @param array $settings Settings.
*
* @return array
*/
private function get_settings_for_available_sections( array $settings ) {
$this->init_sections();
if ( is_array( $settings ) && is_array( $this->sections ) ) {
foreach ( $settings as $section => $section_settings ) {
$unset = true;
foreach ( $this->sections as $section_data ) {
if ( $section_data['section'] === $section ) {
$unset = false;
}
}
if ( $unset ) {
unset( $settings[ $section ] );
}
}
}
return $settings;
}
/**
* Get settings.
*
* @return array
*/
public function get_settings() {
$settings = get_option( 'inspire_checkout_fields_settings', array() );
if ( ! is_array( $settings ) ) {
$settings = array();
}
return $this->get_settings_for_available_sections( $settings );
}
public function woocommerce_before_checkout_form() {
WC()->session->set( 'checkout-fields', array() );
$settings = $this->get_settings();
$args = array( 'settings' => $settings );
include $this->plugin_path . '/views/before-checkout-form.php';
}
/**
* @param array $settings
* @param array $fields
* @param array $new
* @param null|string $request_type
*
* @return array
*/
private function append_other_plugins_fields_to_checkout_fields( $settings, $fields, $new, $request_type ) {
if ( $request_type === null ) {
if ( ! empty( $fields ) && is_array( $fields ) ) {
foreach ( $fields as $section => $section_fields ) {
if ( ! empty( $section_fields ) && is_array( $section_fields ) ) {
foreach ( $section_fields as $key => $field ) {
if ( empty( $settings[ $section ][ $key ] ) ) {
$new[ $section ][ $key ] = $field;
}
}
}
}
}
} else {
foreach ( $fields as $key => $field ) {
if ( empty( $settings[ $request_type ][ $key ] ) ) {
$new[ $request_type ][ $key ] = $field;
}
}
}
return $new;
}
/**
* Is field requirement controlled by woocommerce.
*
* @param string $field_name .
*
* @return bool
*/
private function is_field_requirement_controlled_by_woocommerce( $field_name ) {
return in_array( $field_name, self::FIELDS_REQUIREMENT_CONTROLLED_BY_WOOCOMMERCE, true );
}
/**
* @param array $fields
* @param null|string $request_type
*
* @return array
*/
public function getCheckoutFields( $fields, $request_type = null ) {
$settings = $this->get_settings();
$checkout_field_type = $this->get_fields();
if ( ! empty( $settings ) ) {
$new = array();
if ( isset( $fields['account'] ) ) {
$new['account'] = array();
}
$priority = 0;
foreach ( $settings as $key => $type ) {
if ( $key !== 'billing' && $key !== 'shipping' && $key !== 'order' ) {
if ( get_option( 'inspire_checkout_fields_' . $key, '0' ) == '0' ) {
continue;
}
}
if ( ! is_array( $type ) ) {
continue;
}
if ( $request_type == null || $request_type == $key ) {
if ( ! isset( $new[ $key ] ) ) {
$new[ $key ] = array();
}
$fields_found = true;
foreach ( $type as $field_name => $field ) {
if ( apply_filters( 'flexible_checkout_fields_condition', true, $field ) ) {
if ( $field['visible'] == 0 or
( ( isset( $_GET['page'] ) && $_GET['page'] == 'inspire_checkout_fields_settings' ) && $field['visible'] == 1 ) || $field['name'] == 'billing_country' || $field['name'] == 'shipping_country' ) {
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this );
$custom_field = $fcf_field->is_custom_field();
if ( isset( $fields[ $key ][ $field['name'] ] ) ) {
$new[ $key ][ $field['name'] ] = $fields[ $key ][ $field['name'] ];
} else {
$new[ $key ][ $field['name'] ] = $type[ $field['name'] ];
}
if ( ! $this->is_field_requirement_controlled_by_woocommerce( $field_name ) ) {
if ( 1 === intval( $field['required'] ?? 0 ) ) {
$new[ $key ][ $field['name'] ]['required'] = true;
} else {
$new[ $key ][ $field['name'] ]['required'] = false;
if ( isset( $new[ $key ][ $field['name'] ]['validate'] ) ) {
unset( $new[ $key ][ $field['name'] ]['validate'] );
}
}
} else {
if ( isset( $fields[ $key ][ $field['name'] ] ) ) {
$new[ $key ][ $field['name'] ]['required'] = $fields[ $key ][ $field['name'] ]['required'];
}
}
if ( isset( $field['label'] ) ) {
$new[ $key ][ $field['name'] ]['label'] = stripcslashes( wpdesk__( $field['label'], 'flexible-checkout-fields' ) );
// Support for fields rendered by WooCommerce
if ( isset( $field['type'] ) && in_array( $field['type'], array( 'text', 'textarea', 'select' ), true ) ) {
$new[ $key ][ $field['name'] ]['label'] = wp_kses_post( $new[ $key ][ $field['name'] ]['label'] );
}
}
if ( isset( $field['placeholder'] ) ) {
$new[ $key ][ $field['name'] ]['placeholder'] = wpdesk__( $field['placeholder'], 'flexible-checkout-fields' );
} else {
$new[ $key ][ $field['name'] ]['placeholder'] = '';
}
if ( isset( $field['class'] ) && ! is_array( $field['class'] ) ) {
$new[ $key ][ $field['name'] ]['class'] = explode( ' ', $field['class'] );
}
if ( ( $field['name'] == 'billing_country' || $field['name'] == 'shipping_country' ) && $field['visible'] == 1 ) {
$new[ $key ][ $field['name'] ]['class'][1] = "inspire_checkout_fields_hide";
}
if ( ! $custom_field ) {
if ( isset( $field['validation'] ) && $field['validation'] != '' ) {
if ( $field['validation'] == 'none' ) {
unset( $new[ $key ][ $field['name'] ]['validate'] );
} else {
$new[ $key ][ $field['name'] ]['validate'] = array( $field['validation'] );
}
}
} else {
if ( isset( $field['validation'] ) && $field['validation'] != 'none' ) {
$new[ $key ][ $field['name'] ]['validate'] = array( $field['validation'] );
}
}
if ( ! empty( $field['type'] ) ) {
$new[ $key ][ $field['name'] ]['type'] = $field['type'];
}
if ( $custom_field ) {
$new[ $key ][ $field['name'] ]['type'] = $field['type'] ?? '';
}
if ( '' !== $fcf_field->get_default() ) {
$new[ $key ][ $field['name'] ]['default'] = wpdesk__( $fcf_field->get_default(), 'flexible-checkout-fields' );
} elseif ( $field['options'] ?? [] ) {
$default = [];
foreach ( $field['options'] as $option ) {
if ( $option['default_checked'] ?? false ) {
$default[] = $option['key'];
}
}
$new[ $key ][ $field['name'] ]['default'] = $default;
}
}
}
}
}
}
$new = $this->append_other_plugins_fields_to_checkout_fields( $settings, $fields, $new, $request_type );
foreach ( $new as $type => $new_fields ) {
$priority = 0;
foreach ( $new_fields as $key => $field ) {
$priority += 10;
$new[ $type ][ $key ]['priority'] = $priority;
}
}
if ( $request_type == null ) {
if ( ! empty( $fields['account'] ) ) {
$new['account'] = $fields['account'];
}
$new = $this->restore_default_city_validation( $new, $_POST, 'billing' );
$new = $this->restore_default_city_validation( $new, $_POST, 'shipping' );
return $new;
}
if ( isset( $new[ $request_type ] ) ) {
$new = $this->restore_default_city_validation( $new, $_POST, $request_type );
return $new[ $request_type ];
} else {
return array();
}
} else {
return $fields;
}
}
/**
* Restores the default validation for the city
*
* @param array $fields Fields.
* @param array|null $request Request.
* @param string $request_type the type of shipping address (billing or shipping).
*
* @return array
*/
private function restore_default_city_validation( array $fields, $request, $request_type ) {
if ( null === $request ) {
$request = array();
}
$city = $request_type . '_city';
$country = $request_type . '_country';
if ( isset( $fields[ $request_type ][ $city ]['required'] ) && isset( $request[ $country ] ) ) {
$slug = $request[ $country ];
$countries = new WC_Countries();
$locales = $countries->get_country_locale();
if ( isset( $locales[ $slug ]['city']['required'] ) ) {
$required = $locales[ $slug ]['city']['required'];
if ( ! $required ) {
$fields[ $request_type ][ $city ]['required'] = 0;
$fields[ $request_type ][ $city ]['hidden'] = 1;
}
}
}
return $fields;
}
public function getCheckoutUserFields( $fields, $request_type = null ) {
$settings = $this->get_settings();
$checkout_field_type = $this->get_fields();
$priority = 0;
if ( ! empty( $settings[ $request_type ] ) ) {
foreach ( $settings[ $request_type ] as $key => $field ) {
if ( $field['visible'] == 0 || $field['name'] === 'billing_country' || $field['name'] === 'shipping_country' || ( isset( $_GET['page'] ) && $_GET['page'] === 'inspire_checkout_fields_settings' && $field['visible'] == 1 ) ) {
if ( ! empty( $fields[ $key ] ) ) {
$new[ $key ] = $fields[ $key ];
}
if ( ! $this->is_field_requirement_controlled_by_woocommerce( $key ) ) {
if ( ( $field['required'] ?? 0 ) == 1 ) {
$new[ $key ]['required'] = true;
} else {
$new[ $key ]['required'] = false;
}
}
if ( isset( $field['label'] ) ) {
$new[ $key ]['label'] = wpdesk__( $field['label'], 'flexible-checkout-fields' );
}
if ( isset( $field['placeholder'] ) ) {
$new[ $key ]['placeholder'] = wpdesk__( $field['placeholder'], 'flexible-checkout-fields' );
} else {
$new[ $key ]['placeholder'] = '';
}
if ( isset( $field['class'] ) ) {
if ( is_array( $field['class'] ) ) {
$new[ $key ]['class'] = explode( ' ', esc_attr( implode( ' ', $field['class'] ) ) );
} else {
$new[ $key ]['class'] = explode( ' ', esc_attr( $field['class'] ) );
}
}
if ( ! empty( $field['name'] ) ) {
if ( ( $field['name'] === 'billing_country' || $field['name'] === 'shipping_country' ) && $field['visible'] == 1 ) {
$new[ $key ]['class'][] = "inspire_checkout_fields_hide";
}
}
if ( ! empty( $field['type'] ) ) {
$new[ $key ]['type'] = $field['type'];
}
$new[ $key ]['custom_attributes'] = apply_filters(
'flexible_checkout_fields_custom_attributes',
$field['custom_attributes'] ?? [],
$field
);
}
}
if ( count( $fields ) ) {
foreach ( $new as $key => $field ) {
if ( empty( $fields[ $key ] ) ) {
$new[ $key ]['custom_field'] = 1;
}
}
}
foreach ( $new as $key => $field ) {
$priority += 10;
$new[ $key ]['priority'] = $priority;
}
return $new;
} else {
return $fields;
}
}
public function printCheckoutFields( $order, $request_type = null ) {
$settings = $this->getCheckoutFields( $this->get_settings() );
$checkout_field_type = $this->get_fields();
if ( ! empty( $settings ) ) {
foreach ( $settings as $key => $type ) {
if ( $request_type == null || $request_type == $key ) {
$return = [];
foreach ( $type as $field ) {
if ( ( isset( $field['custom_field'] ) && $field['custom_field'] == 1 )
&& ( empty( $field['type'] ) || ( ! empty( $checkout_field_type[ $field['type'] ] ) && empty( $checkout_field_type[ $field['type'] ]['exclude_in_admin'] ) ) )
) {
if ( $value = wpdesk_get_order_meta( $order, '_' . $field['name'], true ) ) {
if ( isset( $field['type'] ) ) {
$value = apply_filters( 'flexible_checkout_fields_print_value', nl2br( $value ), $field );
}
$return[] = sprintf(
'<strong>%1$s</strong>: %2$s',
strip_tags( $field['label'] ),
wp_kses_post( $value )
);
}
}
}
}
}
if ( ! empty( $return ) ) {
echo '<div class="address_flexible_checkout_fields"><p class="form-field form-field-wide">' . implode( '<br />', $return ) . '</p></div>';
}
}
}
public function changeCheckoutFields( $fields ) {
return $this->getCheckoutFields( $fields );
}
public function changeShippingFields( $fields ) {
return $this->getCheckoutFields( $fields, 'shipping' );
}
public function changeBillingFields( $fields ) {
return $this->getCheckoutFields( $fields, 'billing' );
}
public function changeOrderFields( $fields ) {
return $this->getCheckoutFields( $fields, 'order' );
}
public function addCustomBillingFieldsToAdmin( $order ) {
$this->printCheckoutFields( $order, 'billing' );
}
public function addCustomShippingFieldsToAdmin( $order ) {
$this->printCheckoutFields( $order, 'shipping' );
}
public function addCustomOrderFieldsToAdmin( $order ) {
$this->printCheckoutFields( $order, 'order' );
}
public function addCustomFieldsBillingFields( $fields ) {
return $this->getCheckoutUserFields( $fields, 'billing' );
}
public function addCustomFieldsShippingFields( $fields ) {
return $this->getCheckoutUserFields( $fields, 'shipping' );
}
public function addCustomFieldsOrderFields( $fields ) {
return $this->getCheckoutUserFields( $fields, 'order' );
}
/**
* Update fields on checkout.
*
* @param int $order_id Order id.
* @param array $data Posted data.
*/
function updateCheckoutFields( $order_id, $data ) {
$settings = $this->get_settings();
if ( ! empty( $settings ) ) {
$fields = [];
foreach ( $settings as $section_fields ) {
$fields += $section_fields;
}
foreach ( $data as $key => $value ) {
if ( isset( $fields[ $key ] ) ) {
$fcf_field = new Flexible_Checkout_Fields_Field( $fields[ $key ], $this );
if ( $fcf_field->is_custom_field() ) {
if ( in_array( $fcf_field->get_type(), [ TextareaType::FIELD_TYPE ] ) ) {
update_post_meta( $order_id, '_' . $key, sanitize_textarea_field( wp_unslash( $value ) ) );
} elseif ( in_array( $fcf_field->get_type(), [ MultiCheckboxType::FIELD_TYPE, MultiSelectType::FIELD_TYPE, FileType::FIELD_TYPE ] ) ) {
update_post_meta( $order_id, '_' . $key, json_encode( wp_unslash( $value ) ) );
} else {
update_post_meta( $order_id, '_' . $key, sanitize_text_field( wp_unslash( $value ) ) );
}
}
}
}
}
do_action( 'flexible_checkout_fields_checkout_update_order_meta', $order_id, $data );
}
public static function flexible_checkout_fields_section_settings( $key, $settings ) {
echo 1;
}
public function woocommerce_get_country_locale_default( $address_fields ) {
return $address_fields;
}
/**
* Add woocommerce screen ids.
*
* @param array $screen_ids Screen ids.
*
* @return array
*/
public function add_woocommerce_screen_ids( $screen_ids ) {
$screen_ids[] = 'woocommerce_page_inspire_checkout_fields_settings';
return $screen_ids;
}
/**
* Admin enqueue scripts.
*/
public function admin_enqueue_scripts() {
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if (function_exists('get_current_screen')) {
$current_screen = get_current_screen();
}
$deps = array(
'jquery',
'jquery-ui-sortable',
'jquery-ui-tooltip',
'jquery-ui-datepicker',
);
wp_enqueue_script( 'inspire_checkout_fields_admin_js', trailingslashit( $this->get_plugin_assets_url() ) . 'js/admin' . $suffix . '.js', $deps, $this->scripts_version );
}
/**
* Frontend enqueue scripts.
*/
public function wp_enqueue_scripts() {
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
if ( is_checkout() || is_account_page() ) {
if ( $this->get_setting_value( 'css_disable' ) != 1 ) {
wp_enqueue_style( 'jquery-ui-style', trailingslashit( $this->get_plugin_assets_url() ) . 'css/jquery-ui' . $suffix . '.css', array(), $this->scripts_version );
}
wp_enqueue_style( 'inspire_checkout_fields_public_style', trailingslashit( $this->get_plugin_assets_url() ) . 'css/front' . $suffix . '.css', array(), $this->scripts_version );
}
if ( is_checkout() || is_account_page() ) {
add_action( 'wp_enqueue_scripts', array( $this, 'wp_localize_jquery_ui_datepicker' ), 1000 );
$deps = array(
'jquery',
'jquery-ui-datepicker',
);
wp_register_script( 'inspire_checkout_fields_checkout_js', trailingslashit( $this->get_plugin_assets_url() ) . 'js/checkout' . $suffix . '.js', $deps, $this->scripts_version );
$translation_array = array(
'uploading' => __( 'Uploading file...', 'flexible-checkout-fields' ),
);
wp_localize_script( 'inspire_checkout_fields_checkout_js', 'words', $translation_array );
wp_enqueue_script( 'inspire_checkout_fields_checkout_js' );
wp_enqueue_script( 'jquery-ui-datepicker' );
}
}
function wp_localize_jquery_ui_datepicker() {
global $wp_locale;
global $wp_version;
if ( ! wp_script_is( 'jquery-ui-datepicker', 'enqueued' ) || version_compare( $wp_version, '4.6' ) != - 1 ) {
return;
}
// Convert the PHP date format into jQuery UI's format.
$datepicker_date_format = str_replace(
array(
'd',
'j',
'l',
'z', // Day.
'F',
'M',
'n',
'm', // Month.
'Y',
'y' // Year.
),
array(
'dd',
'd',
'DD',
'o',
'MM',
'M',
'm',
'mm',
'yy',
'y'
),
get_option( 'date_format' )
);
$datepicker_defaults = wp_json_encode( array(
'closeText' => __( 'Close' ),
'currentText' => __( 'Today' ),
'monthNames' => array_values( $wp_locale->month ),
'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
'nextText' => __( 'Next' ),
'prevText' => __( 'Previous' ),
'dayNames' => array_values( $wp_locale->weekday ),
'dayNamesShort' => array_values( $wp_locale->weekday_abbrev ),
'dayNamesMin' => array_values( $wp_locale->weekday_initial ),
'dateFormat' => $datepicker_date_format,
'firstDay' => absint( get_option( 'start_of_week' ) ),
'isRTL' => $wp_locale->is_rtl(),
) );
wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
}
/**
* Links filter.
*
* @param array $links Links.
*
* @return array
*/
public function links_filter( $links ) {
$plugin_links = array(
'<a href="' . admin_url( 'admin.php?page=inspire_checkout_fields_settings' ) . '">' . __( 'Settings', 'flexible-checkout-fields' ) . '</a>',
'<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-row-action-docs' ) ) . '" target="_blank">' . __( 'Docs', 'flexible-checkout-fields' ) . '</a>',
'<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-row-action-support' ) ) . '" target="_blank">' . __( 'Support', 'flexible-checkout-fields' ) . '</a>',
);
if ( ! wpdesk_is_plugin_active( 'flexible-checkout-fields-pro/flexible-checkout-fields-pro.php' ) ) {
$plugin_links[] = '<a href="' . esc_url( apply_filters( 'flexible_checkout_fields/short_url', '#', 'fcf-settings-row-action-upgrade' ) ) . '" target="_blank" style="color:#d64e07;font-weight:bold;">' . __( 'Upgrade', 'flexible-checkout-fields' ) . '</a>';
}
return array_merge( $plugin_links, $links );
}
}

View File

@@ -0,0 +1,77 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
class Flexible_Checkout_Fields_Settings {
/**
* Flexible_Checkout_Fields_Settings constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin .
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
add_action( 'init', array($this, 'init_polylang') );
add_action( 'admin_init', array($this, 'init_wpml') );
}
function init_polylang() {
if ( function_exists( 'pll_register_string' ) ) {
$settings = get_option('inspire_checkout_fields_settings', array() );
foreach ( $settings as $section ) {
if ( is_array( $section ) ) {
foreach ( $section as $field ) {
if ( isset( $field['label'] ) && $field['label'] !== '' ) {
pll_register_string( $field['label'], $field['label'], __('Flexible Checkout Fields', 'flexible-checkout-fields' ) );
}
if ( isset( $field['placeholder'] ) && $field['placeholder'] !== '' ) {
pll_register_string( $field['placeholder'], $field['placeholder'], __('Flexible Checkout Fields', 'flexible-checkout-fields' ) );
}
if ( isset( $field['default'] ) && $field['default'] !== '' ) {
pll_register_string( $field['default'], $field['default'], __('Flexible Checkout Fields', 'flexible-checkout-fields' ) );
}
if ( isset( $field['options'] ) ) {
foreach ( $field['options'] as $option_data ) {
pll_register_string( $option_data['value'], $option_data['value'], __('Flexible Checkout Fields', 'flexible-checkout-fields' ) );
}
}
if ( isset( $field['regex_message'] ) && $field['regex_message'] !== '' ) {
pll_register_string( $field['regex_message'], $field['regex_message'], __('Flexible Checkout Fields', 'flexible-checkout-fields' ) );
}
}
}
}
}
}
function init_wpml() {
if ( function_exists( 'icl_register_string' ) ) {
$icl_language_code = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : get_bloginfo('language');
$settings = get_option('inspire_checkout_fields_settings', array() );
foreach ( $settings as $section ) {
if ( is_array( $section ) ) {
foreach ( $section as $field ) {
if ( isset( $field['label'] ) && $field['label'] !== '' ) {
icl_register_string( 'flexible-checkout-fields', $field['label'], $field['label'], false, $icl_language_code );
}
if ( isset( $field['placeholder'] ) && $field['placeholder'] !== '' ) {
icl_register_string( 'flexible-checkout-fields', $field['placeholder'], $field['placeholder'], false, $icl_language_code );
}
if ( isset( $field['default'] ) && $field['default'] !== '' ) {
icl_register_string( 'flexible-checkout-fields', $field['default'], $field['default'], false, $icl_language_code );
}
if ( isset( $field['options'] ) ) {
foreach ( $field['options'] as $option_data ) {
icl_register_string( 'flexible-checkout-fields', $option_data['value'], $option_data['value'], false, $icl_language_code );
}
}
if ( isset( $field['regex_message'] ) && $field['regex_message'] !== '' ) {
icl_register_string( 'flexible-checkout-fields', $field['regex_message'], $field['regex_message'], false, $icl_language_code );
}
}
}
}
}
}
}

View File

@@ -0,0 +1,368 @@
<?php
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! class_exists( 'WPDesk_Flexible_Checkout_Fields_Tracker' ) ) {
class WPDesk_Flexible_Checkout_Fields_Tracker {
public static $script_version = '11';
public function __construct() {
$this->hooks();
}
public function hooks() {
add_filter( 'wpdesk_tracker_data', array( $this, 'wpdesk_tracker_data' ), 11 );
add_filter( 'wpdesk_tracker_notice_screens', array( $this, 'wpdesk_tracker_notice_screens' ) );
add_filter( 'plugin_action_links_flexible-checkout-fields/flexible-checkout-fields.php', array( $this, 'plugin_action_links' ) );
add_action( 'activated_plugin', array( $this, 'activated_plugin' ), 10, 2 );
}
public function wpdesk_tracker_data( $data ) {
$sections = array(
'billing',
'shipping',
'order',
'before_customer_details',
'after_customer_details',
'before_checkout_billing_form',
'after_checkout_billing_form',
'before_checkout_shipping_form',
'after_checkout_shipping_form',
'before_checkout_registration_form',
'after_checkout_registration_form',
'before_order_notes',
'after_order_notes',
'review_order_before_submit',
'review_order_after_submit',
);
$settings_fields = get_option('inspire_checkout_fields_settings', array() );
if ( ! is_array( $settings_fields ) ) {
$settings_fields = array();
}
$plugin_data = [
'sections' => $this->get_sections_data( $sections, $settings_fields ),
'fields_names' => $this->get_fields_names( $settings_fields ),
'options' => array(
'css_disable' => get_option( 'inspire_checkout_fields_css_disable', '0' )
),
'pro_version' => array(
'is_active' => is_flexible_checkout_fields_pro_active() ? '1' : '0',
'is_activated' => ( get_option( 'api_flexible-checkout-fields-pro_activated', '' ) === 'Activated' ) ? '1' : '0',
),
];
$data['flexible_checkout_fields'] = $plugin_data;
return $data;
}
private function get_fields_names( $settings_fields ) {
$items = array();
foreach ( $settings_fields as $section_key => $fields ) {
foreach ( $fields as $field_name => $field ) {
$name = str_replace( $section_key . '_', '', $field_name );
if ( !isset( $items[ $name ] ) ) {
$items[ $name ] = 0;
}
$items[ $name ]++;
}
}
return $items;
}
private function get_sections_data( $sections, $settings_fields ) {
$settings_sections = get_option('inspire_checkout_fields_section_settings', array() );
if ( ! is_array( $settings_sections ) ) {
$settings_sections = array();
}
$default_data = array(
'enabled' => 0,
'has_title' => 0,
'has_css' => 0,
'fields' => array(),
'fields_count' => 0,
);
$data = array();
foreach ( $sections as $section ) {
$data[$section] = $default_data;
if ( in_array( $section, array( 'billing', 'shipping', 'order' ) )
|| get_option( 'inspire_checkout_fields_' . $section, '0' ) ) {
$data[$section]['enabled'] = '1';
}
if ( isset( $settings_sections[ $section ] ) && ! empty( $settings_sections[ $section ]['section_title'] ) ) {
$data[$section]['has_title'] = '1';
}
if ( isset( $settings_sections[ $section ] ) && ! empty( $settings_sections[ $section ]['section_css'] ) ) {
$data[$section]['has_css'] = '1';
}
$data[$section]['fields'] = $this->get_fields_data( $section, $settings_fields );
if ( isset( $settings_fields[ $section ] ) ) {
$data[$section]['fields_count'] = count( $settings_fields[ $section ] );
}
}
return $data;
}
private function get_fields_data( $section, $settings ) {
if ( ! isset( $settings[ $section ] ) ) {
return array();
}
$default_data = array(
'count' => 0,
'enabled' => 0,
'required' => 0,
'validation' => array(),
'default_value' => 0,
'placeholder' => 0,
'display_on' => array(
'thank_you' => 0,
'on_address' => 0,
'on_order' => 0,
'on_emails' => 0,
'option_new_line_before' => 0,
'option_show_label' => 0,
),
'conditional_logic' => array(),
'pricing' => array(
'enabled' => 0,
'types' => array(),
'values' => array(),
'tax_classes' => array(),
),
);
$data = array();
foreach ( $settings[ $section ] as $field ) {
$field_type = ( isset( $field['type'] ) ) ? $field['type'] : '_null_';
if ( ! isset( $data[ $field_type ] ) ) {
$data[ $field_type ] = $default_data;
}
$data[ $field_type ]['count']++;
if ( isset( $field['visible'] ) && ! $field['visible'] ) {
$data[ $field_type ]['enabled']++;
}
if ( isset( $field['required'] ) && $field['required'] ) {
$data[ $field_type ]['required']++;
}
if ( isset( $field['validation'] ) && $field['validation'] ) {
if ( ! isset( $data[ $field_type ]['validation'][ $field['validation'] ] ) ) {
$data[ $field_type ]['validation'][ $field['validation'] ] = 0;
}
$data[ $field_type ]['validation'][ $field['validation'] ]++;
}
if ( isset( $field['default'] ) && $field['default'] ) {
$data[ $field_type ]['default_value']++;
}
if ( isset( $field['placeholder'] ) && $field['placeholder'] ) {
$data[ $field_type ]['placeholder']++;
}
if ( isset( $field['display_on_thank_you'] ) && $field['display_on_thank_you'] ) {
$data[ $field_type ]['display_on']['thank_you']++;
}
if ( isset( $field['display_on_address'] ) && $field['display_on_address'] ) {
$data[ $field_type ]['display_on']['on_address']++;
}
if ( isset( $field['display_on_order'] ) && $field['display_on_order'] ) {
$data[ $field_type ]['display_on']['on_order']++;
}
if ( isset( $field['display_on_emails'] ) && $field['display_on_emails'] ) {
$data[ $field_type ]['display_on']['on_emails']++;
}
if ( isset( $field['display_on_option_new_line_before'] ) && $field['display_on_option_new_line_before'] ) {
$data[ $field_type ]['display_on']['option_new_line_before']++;
}
if ( isset( $field['display_on_option_show_label'] ) && $field['display_on_option_show_label'] ) {
$data[ $field_type ]['display_on']['option_show_label']++;
}
if ( isset( $field['pricing_enabled'] ) && $field['pricing_enabled'] ) {
$data[ $field_type ]['pricing']['enabled']++;
}
if ( isset( $field['pricing_values'] ) && $field['pricing_values'] ) {
foreach ( $field['pricing_values'] as $pricing_value ) {
if ( ! isset( $data[ $field_type ]['pricing']['types'][ $pricing_value['type'] ] ) ) {
$data[ $field_type ]['pricing']['types'][ $pricing_value['type'] ] = 0;
}
$data[ $field_type ]['pricing']['types'][ $pricing_value['type'] ]++;
}
foreach ( $field['pricing_values'] as $pricing_value ) {
if ( ! isset( $data[ $field_type ]['pricing']['values'][ $pricing_value['value'] ] ) ) {
$data[ $field_type ]['pricing']['values'][ $pricing_value['value'] ] = 0;
}
$data[ $field_type ]['pricing']['values'][ $pricing_value['value'] ]++;
}
foreach ( $field['pricing_values'] as $pricing_value ) {
if ( ! isset( $data[ $field_type ]['pricing']['tax_classes'][ $pricing_value['tax_class'] ] ) ) {
$data[ $field_type ]['pricing']['tax_classes'][ $pricing_value['tax_class'] ] = 0;
}
$data[ $field_type ]['pricing']['tax_classes'][ $pricing_value['tax_class'] ]++;
}
}
$data[ $field_type ]['conditional_logic'] = $this->get_conditional_logic_data(
$field,
$data[ $field_type ]['conditional_logic']
);
}
return $data;
}
private function get_conditional_logic_data( $field, $current_data ) {
$default_data = array(
'enabled' => 0,
'action' => array(),
'operator' => array(),
'rule_options' => array(),
'rule_operators' => array(),
);
$data = ( $current_data )
? $current_data
: array(
'products' => $default_data,
'fields' => $default_data,
'shipping' => $default_data,
)
;
if ( isset( $field['conditional_logic'] ) && $field['conditional_logic'] ) {
$data['products']['enabled']++;
}
if ( isset( $field['conditional_logic_action'] ) && $field['conditional_logic_action'] ) {
if ( ! isset( $data['products']['action'][ $field['conditional_logic_action'] ] ) ) {
$data['products']['action'][ $field['conditional_logic_action'] ] = 0;
}
$data['products']['action'][ $field['conditional_logic_action'] ]++;
}
if ( isset( $field['conditional_logic_operator'] ) && $field['conditional_logic_operator'] ) {
if ( ! isset( $data['products']['operator'][ $field['conditional_logic_operator'] ] ) ) {
$data['products']['operator'][ $field['conditional_logic_operator'] ] = 0;
}
$data['products']['operator'][ $field['conditional_logic_operator'] ]++;
}
if ( isset( $field['conditional_logic_rules'] ) && $field['conditional_logic_rules'] ) {
foreach ( $field['conditional_logic_rules'] as $rule ) {
if ( ! isset( $data['products']['rule_options'][ $rule['condition'] ] ) ) {
$data['products']['rule_options'][ $rule['condition'] ] = 0;
}
$data['products']['rule_options'][ $rule['condition'] ]++;
if ( ! isset( $data['products']['rule_operators'][ $rule['what'] ] ) ) {
$data['products']['rule_operators'][ $rule['what'] ] = 0;
}
$data['products']['rule_operators'][ $rule['what'] ]++;
}
}
if ( isset( $field['conditional_logic_fields'] ) && $field['conditional_logic_fields'] ) {
$data['fields']['enabled']++;
}
if ( isset( $field['conditional_logic_fields_action'] ) && $field['conditional_logic_fields_action'] ) {
if ( ! isset( $data['fields']['action'][ $field['conditional_logic_fields_action'] ] ) ) {
$data['fields']['action'][ $field['conditional_logic_fields_action'] ] = 0;
}
$data['fields']['action'][ $field['conditional_logic_fields_action'] ]++;
}
if ( isset( $field['conditional_logic_fields_operator'] ) && $field['conditional_logic_fields_operator'] ) {
if ( ! isset( $data['fields']['operator'][ $field['conditional_logic_fields_operator'] ] ) ) {
$data['fields']['operator'][ $field['conditional_logic_fields_operator'] ] = 0;
}
$data['fields']['operator'][ $field['conditional_logic_fields_operator'] ]++;
}
if ( isset( $field['conditional_logic_fields_rules'] ) && $field['conditional_logic_fields_rules'] ) {
foreach ( $field['conditional_logic_fields_rules'] as $rule ) {
if ( ! isset( $data['fields']['rule_operators'][ $rule['condition'] ] ) ) {
$data['fields']['rule_operators'][ $rule['condition'] ] = 0;
}
$data['fields']['rule_operators'][ $rule['condition'] ]++;
}
}
if ( isset( $field['conditional_logic_shipping_fields'] ) && $field['conditional_logic_shipping_fields'] ) {
$data['shipping']['enabled']++;
}
if ( isset( $field['conditional_logic_shipping_fields_action'] ) && $field['conditional_logic_shipping_fields_action'] ) {
if ( ! isset( $data['shipping']['action'][ $field['conditional_logic_shipping_fields_action'] ] ) ) {
$data['shipping']['action'][ $field['conditional_logic_shipping_fields_action'] ] = 0;
}
$data['shipping']['action'][ $field['conditional_logic_shipping_fields_action'] ]++;
}
if ( isset( $field['conditional_logic_shipping_fields_operator'] ) && $field['conditional_logic_shipping_fields_operator'] ) {
if ( ! isset( $data['shipping']['operator'][ $field['conditional_logic_shipping_fields_operator'] ] ) ) {
$data['shipping']['operator'][ $field['conditional_logic_shipping_fields_operator'] ] = 0;
}
$data['shipping']['operator'][ $field['conditional_logic_shipping_fields_operator'] ]++;
}
return $data;
}
public function wpdesk_tracker_notice_screens( $screens ) {
$current_screen = get_current_screen();
if ( $current_screen->id == 'woocommerce_page_inspire_checkout_fields_settings' ) {
$screens[] = $current_screen->id;
}
return $screens;
}
public function plugin_action_links( $links ) {
if ( !wpdesk_tracker_enabled() || apply_filters( 'wpdesk_tracker_do_not_ask', false ) ) {
return $links;
}
$options = get_option('wpdesk_helper_options', array() );
if ( !is_array( $options )) {
$options = array();
}
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
$options['wpdesk_tracker_agree'] = '0';
}
$plugin_links = array();
if ( $options['wpdesk_tracker_agree'] == '0' ) {
$opt_in_link = admin_url( 'admin.php?page=wpdesk_tracker&plugin=flexible-checkout-fields/flexible-checkout-fields.php' );
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-in', 'flexible-checkout-fields' ) . '</a>';
}
else {
$opt_in_link = admin_url( 'plugins.php?wpdesk_tracker_opt_out=1&plugin=flexible-checkout-fields/flexible-checkout-fields.php' );
$plugin_links[] = '<a href="' . $opt_in_link . '">' . __( 'Opt-out', 'flexible-checkout-fields' ) . '</a>';
}
return array_merge( $plugin_links, $links );
}
public function activated_plugin( $plugin, $network_wide ) {
if ( $network_wide ) {
return;
}
if ( defined( 'WP_CLI' ) && WP_CLI ) {
return;
}
if ( !wpdesk_tracker_enabled() ) {
return;
}
if ( $plugin == 'flexible-checkout-fields/flexible-checkout-fields.php' ) {
$options = get_option('wpdesk_helper_options', array() );
if ( empty( $options ) ) {
$options = array();
}
if ( empty( $options['wpdesk_tracker_agree'] ) ) {
$options['wpdesk_tracker_agree'] = '0';
}
$wpdesk_tracker_skip_plugin = get_option( 'wpdesk_tracker_skip_flexible_checkout_fields', '0' );
if ( $options['wpdesk_tracker_agree'] == '0' && $wpdesk_tracker_skip_plugin == '0' ) {
update_option( 'wpdesk_tracker_notice', '1' );
update_option( 'wpdesk_tracker_skip_flexible_checkout_fields', '1' );
if ( !apply_filters( 'wpdesk_tracker_do_not_ask', false ) ) {
wp_redirect( admin_url( 'admin.php?page=wpdesk_tracker&plugin=flexible-checkout-fields/flexible-checkout-fields.php' ) );
exit;
}
}
}
}
}
}

View File

@@ -0,0 +1,54 @@
<?php
/**
* User meta hooks.
*
* @package Flexible Checkout Fields
*/
/**
* Handles user meta on checkout.
*/
class Flexible_Checkout_Fields_User_Meta_Checkout {
/**
* Plugin.
*
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* .
*
* @var Flexible_Checkout_Fields_User_Meta
*/
private $user_meta;
/**
* Flexible_Checkout_Fields_User_Profile constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
* @param Flexible_Checkout_Fields_User_Meta $user_meta .
*/
public function __construct( Flexible_Checkout_Fields_Plugin $plugin, Flexible_Checkout_Fields_User_Meta $user_meta ) {
$this->plugin = $plugin;
$this->user_meta = $user_meta;
}
/**
* Hooks.
*/
public function hooks() {
add_filter( 'woocommerce_checkout_update_user_meta', array( $this, 'update_customer_meta_fields_on_checkout' ), 10, 2 );
}
/**
* Update customer meta data on checkout.
*
* @param int $customer_id Customer ID.
* @param array $data Posted checkout data.
*/
public function update_customer_meta_fields_on_checkout( $customer_id, $data ) {
$this->user_meta->update_customer_meta_fields( $customer_id, $data );
}
}

View File

@@ -0,0 +1,99 @@
<?php
/**
* User meta.
*
* @package Flexible Checkout Fields
*/
use WPDesk\FCF\Free\Field\Type\FileType;
use WPDesk\FCF\Free\Field\Type\MultiCheckboxType;
use WPDesk\FCF\Free\Field\Type\MultiSelectType;
use WPDesk\FCF\Free\Field\Type\TextareaType;
/**
* Can update user meta.
*/
class Flexible_Checkout_Fields_User_Meta {
/**
* Plugin.
*
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
*/
public function __construct( $plugin ) {
$this->plugin = $plugin;
}
/**
* Is flexible checkout fields section?
*
* @param string $settings_section .
*
* @return bool
*/
public function is_fcf_section( $settings_section ) {
$sections = $this->plugin->sections;
foreach ( $sections as $section ) {
if ( isset( $section['section'] ) && $section['section'] === $settings_section ) {
return true;
}
}
return false;
}
/**
* Is allowed section to be stored in User Metadata?
*
* @param string $settings_section Key of fields section.
*
* @return bool Status of section, returns true if no data.
*/
public function is_section_allowed_for_usermeta( $settings_section ) {
$sections = $this->plugin->sections;
foreach ( $sections as $section ) {
if ( isset( $section['section'] ) && $section['section'] === $settings_section ) {
return ( ! isset( $section['user_meta'] ) || $section['user_meta'] );
}
}
return true;
}
/**
* Update customer meta data.
*
* @param int $customer_id Customer ID.
* @param array $data Posted checkout data.
*/
public function update_customer_meta_fields( $customer_id, $data ) {
$settings = $this->plugin->get_settings();
if ( ! empty( $settings ) ) {
foreach ( $settings as $key => $type ) {
if ( ! $this->is_fcf_section( $key ) || ! $this->is_section_allowed_for_usermeta( $key ) ) {
continue;
}
foreach ( $type as $field ) {
$field_name = $field['name'];
$fcf_field = new Flexible_Checkout_Fields_Field( $field, $this->plugin );
if ( ! $fcf_field->is_field_excluded_for_user() ) {
$value = '';
if ( isset( $data[ $field_name ] ) ) {
if ( in_array( $fcf_field->get_type(), [ TextareaType::FIELD_TYPE ] ) ) {
$value = sanitize_textarea_field( wp_unslash( $data[ $field_name ] ) );
} elseif ( in_array( $fcf_field->get_type(), [ MultiCheckboxType::FIELD_TYPE, MultiSelectType::FIELD_TYPE, FileType::FIELD_TYPE ] ) ) {
$value = json_encode( wp_unslash( $data[ $field_name ] ) );
} else {
$value = sanitize_text_field( wp_unslash( $data[ $field_name ] ) );
}
}
update_user_meta( $customer_id, $field_name, $value );
}
}
}
}
}
}

View File

@@ -0,0 +1,114 @@
<?php
/**
* User profile hooks.
*
* @package Flexible Checkout Fields
*/
/**
* User profile hooks.
*
* Class Flexible_Checkout_Fields_User_Profile
*/
class Flexible_Checkout_Fields_User_Profile {
const FIELD_TYPE = 'type';
const FIELD_TYPE_SELECT = 'select';
const FIELD_TYPE_INSPIRECHECKBOX = 'inspirecheckbox';
const FIELD_TYPE_INSPIRERADIO = 'inspireradio';
const FIELD_COPY_BILLING = 'copy_billing';
/**
* Plugin.
*
* @var Flexible_Checkout_Fields_Plugin
*/
protected $plugin;
/**
* .
*
* @var Flexible_Checkout_Fields_User_Meta
*/
private $user_meta;
/**
* Flexible_Checkout_Fields_User_Profile constructor.
*
* @param Flexible_Checkout_Fields_Plugin $plugin Plugin.
* @param Flexible_Checkout_Fields_User_Meta $user_meta .
*/
public function __construct( Flexible_Checkout_Fields_Plugin $plugin, Flexible_Checkout_Fields_User_Meta $user_meta ) {
$this->plugin = $plugin;
$this->user_meta = $user_meta;
}
/**
* Hooks.
*/
public function hooks() {
add_action( 'show_user_profile', [ $this, 'add_custom_user_fields_admin' ], 75 );
add_action( 'edit_user_profile', [ $this, 'add_custom_user_fields_admin' ], 75 );
add_action( 'personal_options_update', [ $this, 'save_custom_user_fields_admin' ] );
add_action( 'edit_user_profile_update', [ $this, 'save_custom_user_fields_admin' ] );
}
/**
* Add custom fields to edit user admin /wp-admin/profile.php.
*
* @param mixed $user .
*
* @return void
*/
public function add_custom_user_fields_admin( $user ) {
$settings = $this->plugin->get_settings();
$sections = $this->plugin->sections;
if ( ! $settings ) {
return;
}
foreach ( $settings as $key => $type ) {
if ( ! $this->user_meta->is_fcf_section( $key )
|| ! $this->user_meta->is_section_allowed_for_usermeta( $key )
|| ! is_array( $type ) ) {
continue;
}
$section_data = $sections[ $key ] ?? ( $sections[ 'woocommerce_' . $key ] ?? null );
if ( $section_data === null ) {
continue;
}
echo '<h3>' . esc_html( $section_data['tab_title'] ) . '</h3>';
echo '<div class="fcf-admin-fields postbox">';
echo '<div class="inside">';
foreach ( $type as $field ) {
if ( isset( $field['visible'] ) && 0 === intval( $field['visible'] )
&& ( isset( $field['custom_field'] ) && 1 === intval( $field['custom_field'] ) ) ) {
$field_value = htmlspecialchars_decode( get_the_author_meta( $field['name'], $user->ID ) );
echo apply_filters( 'flexible_checkout_fields_form_field', '', $field['name'], $field, $field_value );
}
}
echo '</div>';
echo '</div>';
}
}
/**
* Save custom user fields in admin.
*
* @param int $user_id User ID.
*/
public function save_custom_user_fields_admin( $user_id ) {
if ( ! current_user_can( 'edit_user', $user_id ) ) {
return;
}
if ( wp_verify_nonce( $_POST['_wpnonce'], 'update-user_' . $user_id ) ) { // phpcs:ignore
$this->user_meta->update_customer_meta_fields( $user_id, $_POST );
}
}
}

View File

@@ -0,0 +1,79 @@
<?php
/**
* Plugin Name: Flexible Checkout Fields
* Plugin URI: https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/
* Description: Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields.
* Version: 3.4.2
* Author: WP Desk
* Author URI: https://www.wpdesk.net/
* Text Domain: flexible-checkout-fields
* Domain Path: /lang/
* Requires at least: 5.7
* Tested up to: 6.0
* WC requires at least: 6.5
* WC tested up to: 6.9
* Requires PHP: 7.0
*
* Copyright 2017 WP Desk Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @package Flexible Checkout Fields
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
} // Exit if accessed directly
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
$plugin_version = '3.4.2';
/*
* Update when conditions are met:
* - major version: no compatibility (disables dependent plugins)
* - minor version: compatibility problems (displays notice in dependent plugins)
*/
$plugin_version_dev = '2.0';
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION_DEV', $plugin_version_dev );
if ( ! defined( 'FCF_VERSION' ) ) {
define( 'FCF_VERSION', FLEXIBLE_CHECKOUT_FIELDS_VERSION );
}
$plugin_name = 'Flexible Checkout Fields';
$plugin_class_name = 'Flexible_Checkout_Fields_Plugin';
$plugin_text_domain = 'flexible-checkout-fields';
$product_id = 'Flexible Checkout Fields';
$plugin_file = __FILE__;
$plugin_dir = dirname( __FILE__ );
define( $plugin_class_name, $plugin_version );
$requirements = [
'php' => '7.0',
'wp' => '5.2',
'plugins' => [
[
'name' => 'woocommerce/woocommerce.php',
'nice_name' => 'WooCommerce',
],
],
];
require_once __DIR__ . '/inc/wpdesk-woo27-functions.php';
require __DIR__ . '/vendor_prefixed/wpdesk/wp-plugin-flow/src/plugin-init-php52-free.php';

View File

@@ -0,0 +1,508 @@
<?php
if ( !function_exists( 'wpdesk_activated_plugin_activation_date' ) ) {
function wpdesk_activated_plugin_activation_date( $plugin, $network_wide ) {
$option_name = 'plugin_activation_' . $plugin;
$activation_date = get_option( $option_name, '' );
if ( $activation_date == '' ) {
$activation_date = current_time( 'mysql' );
update_option( $option_name, $activation_date );
}
}
add_action( 'activated_plugin', 'wpdesk_activated_plugin_activation_date', 10, 2 );
}
if ( !function_exists( 'wpdesk_tracker_enabled' ) ) {
function wpdesk_tracker_enabled() {
$tracker_enabled = true;
if ( !empty( $_SERVER['SERVER_ADDR'] ) && $_SERVER['SERVER_ADDR'] == '127.0.0.1' ) {
$tracker_enabled = false;
}
return apply_filters( 'wpdesk_tracker_enabled', $tracker_enabled );
// add_filter( 'wpdesk_tracker_enabled', '__return_true' );
// add_filter( 'wpdesk_tracker_do_not_ask', '__return_true' );
}
}
function flexible_checkout_fields() {
$object = new stdClass();
return apply_filters( 'flexible_checkout_fields', $object );
}
if ( !function_exists( 'wpdesk_is_plugin_active' ) ) {
function wpdesk_is_plugin_active( $plugin_file ) {
$active_plugins = (array) get_option( 'active_plugins', array() );
if ( is_multisite() ) {
$active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
}
return in_array( $plugin_file, $active_plugins, true ) || array_key_exists( $plugin_file, $active_plugins );
}
}
if ( !function_exists( 'is_flexible_checkout_fields_pro_active' ) ) {
/**
* Get PRO plugin.
*
* @return Flexible_Checkout_Fields_Pro_Plugin|null
*/
function get_flexible_checkout_fields_pro_plugin() {
if ( class_exists( '\WPDesk\PluginBuilder\Storage\StaticStorage' ) ) {
$storage = new \WPDesk\PluginBuilder\Storage\StaticStorage();
try {
return $storage->get_from_storage( Flexible_Checkout_Fields_Pro_Plugin::class );
} catch ( \WPDesk\PluginBuilder\Storage\Exception\ClassNotExists $e ) {
return null;
}
}
return null;
}
/**
* Checks if Flexible Checkout Fields PRO is active
*
* @return bool
*/
function is_flexible_checkout_fields_pro_active() {
$pro_plugin = get_flexible_checkout_fields_pro_plugin();
return wpdesk_is_plugin_active( 'flexible-checkout-fields-pro/flexible-checkout-fields-pro.php' );
}
}
if ( !function_exists( 'wpdesk__' ) ) {
function wpdesk__( $text, $domain ) {
if ( function_exists( 'pll__' ) ) {
return pll__( $text );
}
return __( $text, $domain );
}
}
if ( !function_exists( 'wpdesk__e' ) ) {
function wpdesk__e( $text, $domain ) {
echo wpdesk__( $text, $domain );
}
}
add_action( 'plugins_loaded', 'flexible_chekout_fields_plugins_loaded', 9 );
function flexible_chekout_fields_plugins_loaded() {
if ( ! function_exists( 'should_enable_wpdesk_tracker' ) ) {
function should_enable_wpdesk_tracker() {
$tracker_enabled = true;
if ( ! empty( $_SERVER['SERVER_ADDR'] ) && $_SERVER['SERVER_ADDR'] === '127.0.0.1' ) {
$tracker_enabled = false;
}
return apply_filters( 'wpdesk_tracker_enabled', $tracker_enabled );
}
}
if ( class_exists( 'WPDesk_Tracker_Factory' ) ) {
$tracker_factory = new WPDesk_Tracker_Factory();
$tracker_factory->create_tracker( basename( dirname( __FILE__ ) ) );
}
}
if ( !function_exists( 'wpdesk_get_order_id' ) ) {
function wpdesk_get_order_id( $order ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->id;
} else {
return $order->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_order_item_meta_data' ) ) {
function wpdesk_get_order_item_meta_data( WC_Order $order, $item_id, $convert_to_array = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->has_meta( $item_id );
}
else {
if ( $convert_to_array ) {
$metas = $order->get_item( $item_id )->get_meta_data();
$ret = array();
foreach ( $metas as $meta ) {
$ret[] = array( 'id' => $meta->id, 'meta_id' => $meta->id, 'meta_key' => $meta->key, 'meta_value' => $meta->value );
}
return $ret;
}
else {
return $order->get_item( $item_id )->get_meta_data();
}
}
}
}
if ( !function_exists( 'wpdesk_get_order_meta' ) ) {
function wpdesk_get_order_meta( $order, $meta_key, $single = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
$load_order = false;
if ( in_array( $meta_key, array( 'order_date', 'customer_note' ) ) ) {
$load_order = true;
}
if ( is_numeric( $order ) && ! $load_order ) {
if ( $meta_key == '_currency' ) {
$meta_key = '_order_currency';
}
return get_post_meta( $order, $meta_key, $single );
} else {
switch ( $meta_key ) {
case 'order_date':
return $order->order_date;
case 'customer_note':
return $order->customer_note;
default:
return get_post_meta( $order->id, $meta_key, $single );
}
}
} else {
if ( is_numeric( $order ) ) {
$order = wc_get_order( $order );
}
switch ( $meta_key ) {
case '_parent_id':
return $order->get_parent_id();
break;
case '_status':
return $order->get_status();
break;
case '_order_currency':
case '_currency':
return $order->get_currency();
break;
case '_version':
return $order->get_version();
break;
case '_prices_include_tax':
return $order->get_prices_include_tax();
break;
case '_date_created':
return date( "Y-m-d H:i:s", get_date_created()->getTimestamp() );
break;
case '_date_modified':
return date( "Y-m-d H:i:s", $order->get_date_modified()->getTimestamp() );
break;
case '_discount_total':
return $order->get_discount_total();
break;
case '_discount_tax':
return $order->get_discount_tax();
break;
case '_shipping_total':
return $order->get_shipping_total();
break;
case '_shipping_tax':
return $order->get_shipping_tax();
break;
case '_cart_tax':
return $order->get_cart_tax();
break;
case '_total':
return $order->get_total();
break;
case '_total_tax':
return $order->get_total_tax();
break;
case '_customer_id':
return $order->get_customer_id();
break;
case '_order_key':
return $order->get_order_key();
break;
case '_billing_first_name':
return $order->get_billing_first_name();
break;
case '_billing_last_name':
return $order->get_billing_last_name();
break;
case '_billing_company':
return $order->get_billing_company();
break;
case '_billing_address_1':
return $order->get_billing_address_1();
break;
case '_billing_address_2':
return $order->get_billing_address_2();
break;
case '_billing_city':
return $order->get_billing_city();
break;
case '_billing_state':
return $order->get_billing_state();
break;
case '_billing_postcode':
return $order->get_billing_postcode();
break;
case '_billing_country':
return $order->get_billing_country();
break;
case '_billing_email':
return $order->get_billing_email();
break;
case '_billing_phone':
return $order->get_billing_phone();
break;
case '_shipping_first_name':
return $order->get_shipping_first_name();
break;
case '_shipping_last_name':
return $order->get_shipping_last_name();
break;
case '_shipping_company':
return $order->get_shipping_company();
break;
case '_shipping_address_1':
return $order->get_shipping_address_1();
break;
case '_shipping_address_2':
return $order->get_shipping_address_2();
break;
case '_shipping_city':
return $order->get_shipping_city();
break;
case '_shipping_state':
return $order->get_shipping_state();
break;
case '_shipping_postcode':
return $order->get_shipping_postcode();
break;
case '_shipping_country':
return $order->get_shipping_country();
break;
case '_payment_method':
return $order->get_payment_method();
break;
case '_payment_method_title':
return $order->get_payment_method_title();
break;
case '_transaction_id':
return $order->get_transaction_id();
break;
case '_customer_ip_address':
return $order->get_customer_ip_address();
break;
case '_customer_user_agent':
return $order->get_customer_user_agent();
break;
case '_created_via':
return $order->get_created_via();
break;
case '_customer_note':
return $order->get_customer_note();
break;
case '_completed_date':
case '_date_completed':
$date_completed = $order->get_date_completed();
if ( isset( $date_completed ) ) {
return date( "Y-m-d H:i:s", $date_completed->getTimestamp() );
}
return null;
break;
case '_date_paid':
return $order->get_date_paid();
break;
case '_cart_hash':
return $order->get_cart_hash();
break;
case 'order_date':
return date( "Y-m-d H:i:s", $order->get_date_created()->getTimestamp() );
break;
default:
$ret = $order->get_meta( $meta_key, $single );
return $ret;
}
}
}
}
if ( !function_exists( 'wpdesk_update_order_meta' ) ) {
function wpdesk_update_order_meta( $order, $meta_key, $meta_value ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $order ) ) {
$order_id = $order;
}
else {
$order_id = $order->id;
}
update_post_meta( $order_id, $meta_key, $meta_value );
}
else {
if ( is_numeric( $order ) ) {
$order_id = $order;
$order = wc_get_order( $order_id );
}
$order->update_meta_data( $meta_key, $meta_value );
$order->save();
}
}
}
if ( !function_exists( 'wpdesk_get_product_id' ) ) {
function wpdesk_get_product_id( WC_Product $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_product_variation_id' ) ) {
function wpdesk_get_product_variation_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->variation_id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_variation_id' ) ) {
function wpdesk_get_variation_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->variation_id;
} else {
return $product->get_id();
}
}
}
if ( !function_exists( 'wpdesk_get_variation_parent_id' ) ) {
function wpdesk_get_variation_parent_id( WC_Product_Variation $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->id;
} else {
return $product->get_parent_id();
}
}
}
if ( !function_exists( 'wpdesk_get_price_including_tax' ) ) {
function wpdesk_get_price_including_tax( WC_Product $product, $qty = 1, $price = '' ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_price_including_tax( $qty, $price );
}
else {
$args = array( 'qty' => $qty, 'price' => $price );
return wc_get_price_including_tax( $product, $args );
}
}
}
if ( !function_exists( 'wpdesk_get_price_excluding_tax' ) ) {
function wpdesk_get_price_excluding_tax( WC_Product $product, $qty = 1, $price = '' ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_price_excluding_tax( $qty, $price );
}
else {
$args = array( 'qty' => $qty, 'price' => $price );
return wc_get_price_excluding_tax( $product, $args );
}
}
}
if ( !function_exists( 'wpdesk_reduce_stock_levels' ) ) {
function wpdesk_reduce_stock_levels( WC_Order $order ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $order->reduce_order_stock();
} else {
wc_reduce_stock_levels( $order->get_id() );
}
}
}
if ( !function_exists( 'wpdesk_get_product_meta' ) ) {
function wpdesk_get_product_meta( $product, $meta_key, $single = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $product ) ) {
return get_post_meta( $product, $meta_key, $single );
} else {
return get_post_meta( $product->id, $meta_key, $single );
}
} else {
if ( is_numeric( $product ) ) {
$product = wc_get_product( $product );
}
switch ( $meta_key ) {
case '_stock_status' :
return $product->get_stock_status();
default:
break;
}
return $product->get_meta( $meta_key, $single );
}
}
}
if ( !function_exists( 'wpdesk_update_product_meta' ) ) {
function wpdesk_update_product_meta( $product, $meta_key, $meta_value ) {
$product_id = false;
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $product ) ) {
$product_id = $product;
}
else {
$product_id = $product->id;
}
update_post_meta( $product_id, $meta_key, $meta_value );
}
else {
if ( is_numeric( $product ) ) {
$product_id = $product;
$product = wc_get_product( $product_id );
}
$product->update_meta_data( $meta_key, $meta_value );
$product->save();
}
}
}
if ( !function_exists( 'wpdesk_get_variation_meta' ) ) {
function wpdesk_get_variation_meta( $variation, $meta_key, $single = false ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
if ( is_numeric( $variation ) ) {
return get_post_meta( $variation, $meta_key, $single );
} else {
return get_post_meta( $variation->variation_id, $meta_key, $single );
}
} else {
if ( is_numeric( $variation ) ) {
$variation = wc_get_product( $variation );
}
switch ( $meta_key ) {
case '_stock_status' :
return $variation->get_stock_status();
default:
break;
}
return $variation->get_meta( $meta_key, $single );
}
}
}
if ( !function_exists( 'wpdesk_get_product_post' ) ) {
function wpdesk_get_product_post( WC_Product $product ) {
if ( version_compare( WC_VERSION, '2.7', '<' ) ) {
return $product->get_post_data();
}
else {
return get_post( $product->get_id() );
}
}
}

View File

@@ -0,0 +1,702 @@
# Copyright (C) 2022 WP Desk
# This file is distributed under the same license as the Flexible Checkout Fields plugin.
msgid ""
msgstr ""
"Project-Id-Version: Flexible Checkout Fields 3.4.2\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/flexible-checkout-fields\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2022-09-08T13:27:46+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: flexible-checkout-fields\n"
#. Plugin Name of the plugin
#: classes/settings.php:26
#: classes/settings.php:29
#: classes/settings.php:32
#: classes/settings.php:36
#: classes/settings.php:40
#: templates/views/admin-page.php:19
msgid "Flexible Checkout Fields"
msgstr ""
#. Plugin URI of the plugin
msgid "https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/"
msgstr ""
#. Description of the plugin
msgid "Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields."
msgstr ""
#. Author of the plugin
msgid "WP Desk"
msgstr ""
#. Author URI of the plugin
msgid "https://www.wpdesk.net/"
msgstr ""
#: classes/display-options.php:103
msgid "Additional Information"
msgstr ""
#: classes/filed-validation.php:89
#: src/Settings/Option/ValidationOption.php:47
#: src/Settings/Option/ValidationPostcodeOption.php:15
#: src/Settings/Option/ValidationWcOption.php:15
msgid "Default"
msgstr ""
#: classes/filed-validation.php:90
#: src/Settings/Option/ValidationPostcodeOption.php:16
#: src/Settings/Option/ValidationWcOption.php:16
msgid "None"
msgstr ""
#: classes/filed-validation.php:91
msgid "Email"
msgstr ""
#: classes/filed-validation.php:92
#: src/Field/Type/PhoneType.php:51
#: src/Settings/Option/ValidationPostcodeOption.php:18
#: src/Settings/Option/ValidationWcOption.php:18
msgid "Phone"
msgstr ""
#: classes/filed-validation.php:95
#: src/Settings/Option/ValidationPostcodeOption.php:19
msgid "Postcode"
msgstr ""
#: classes/plugin.php:299
#: src/Settings/Menu.php:68
msgid "Billing"
msgstr ""
#: classes/plugin.php:306
#: src/Settings/Menu.php:69
msgid "Shipping"
msgstr ""
#: classes/plugin.php:313
#: src/Settings/Menu.php:70
msgid "Order"
msgstr ""
#: classes/plugin.php:864
msgid "Uploading file..."
msgstr ""
#: classes/plugin.php:937
#: src/Settings/Menu.php:33
msgid "Settings"
msgstr ""
#: classes/plugin.php:938
msgid "Docs"
msgstr ""
#: classes/plugin.php:939
msgid "Support"
msgstr ""
#: classes/plugin.php:943
msgid "Upgrade"
msgstr ""
#: classes/tracker.php:326
msgid "Opt-in"
msgstr ""
#: classes/tracker.php:330
msgid "Opt-out"
msgstr ""
#: src/Field/Type/CheckboxType.php:44
msgid "Checkbox"
msgstr ""
#: src/Field/Type/ColorType.php:47
msgid "Color"
msgstr ""
#: src/Field/Type/DateType.php:25
msgid "Date"
msgstr ""
#: src/Field/Type/DefaultType.php:46
msgid "Default Field"
msgstr ""
#: src/Field/Type/EmailType.php:49
#: src/Settings/Option/ValidationPostcodeOption.php:17
#: src/Settings/Option/ValidationWcOption.php:17
msgid "E-mail"
msgstr ""
#: src/Field/Type/FileType.php:25
msgid "File Upload"
msgstr ""
#: src/Field/Type/HeadingType.php:38
msgid "Heading"
msgstr ""
#: src/Field/Type/HiddenType.php:25
msgid "Hidden"
msgstr ""
#: src/Field/Type/HtmlType.php:38
msgid "HTML"
msgstr ""
#: src/Field/Type/ImageType.php:39
#: src/Settings/Option/ImageOption.php:48
msgid "Image"
msgstr ""
#: src/Field/Type/MultiCheckboxType.php:25
msgid "Multi-checkbox"
msgstr ""
#: src/Field/Type/MultiSelectType.php:25
msgid "Multi-select"
msgstr ""
#: src/Field/Type/NumberType.php:52
msgid "Number"
msgstr ""
#: src/Field/Type/ParagraphType.php:38
msgid "Paragraph"
msgstr ""
#: src/Field/Type/RadioColorsType.php:25
msgid "Radio with colors"
msgstr ""
#: src/Field/Type/RadioImagesType.php:25
msgid "Radio with images"
msgstr ""
#: src/Field/Type/RadioType.php:25
msgid "Radio"
msgstr ""
#: src/Field/Type/SelectType.php:28
msgid "Select"
msgstr ""
#: src/Field/Type/TextareaType.php:50
msgid "Textarea"
msgstr ""
#: src/Field/Type/TextType.php:50
msgid "Text"
msgstr ""
#: src/Field/Type/TimeType.php:25
msgid "Time"
msgstr ""
#: src/Field/Type/UrlType.php:49
msgid "URL"
msgstr ""
#: src/Field/Type/Wc/WcAddress2Type.php:43
#: src/Field/Type/Wc/WcContactType.php:42
#: src/Field/Type/Wc/WcCountryType.php:40
#: src/Field/Type/Wc/WcDefaultType.php:43
#: src/Field/Type/Wc/WcNotesType.php:42
#: src/Field/Type/Wc/WcPostcodeType.php:41
#: src/Field/Type/Wc/WcStateType.php:41
msgid "WooCommerce Default Field"
msgstr ""
#: src/Settings/Form/EditFieldsForm.php:77
msgid "Order Notes"
msgstr ""
#: src/Settings/Form/EditFieldsForm.php:78
msgid "Notes about your order, e.g. special notes for delivery."
msgstr ""
#: src/Settings/Menu.php:34
msgid "Checkout Sections"
msgstr ""
#: src/Settings/Option/CssOption.php:39
msgid "CSS class"
msgstr ""
#: src/Settings/Option/CssOption.php:46
msgid "Enter CSS classes separated by a space."
msgstr ""
#: src/Settings/Option/DisplayOnAccountAddressOption.php:30
msgid "My Account - address"
msgstr ""
#: src/Settings/Option/DisplayOnAccountOrderOption.php:30
msgid "My Account - order"
msgstr ""
#: src/Settings/Option/DisplayOnEmailsOption.php:30
msgid "E-mails"
msgstr ""
#: src/Settings/Option/DisplayOnOption.php:39
msgid "Pages/e-mails"
msgstr ""
#: src/Settings/Option/DisplayOnThankYouOption.php:30
msgid "Thank You Page"
msgstr ""
#: src/Settings/Option/EnabledOption.php:39
msgid "Enable field"
msgstr ""
#: src/Settings/Option/ExternalFieldInfoOption.php:48
msgid "Another plugin has added this field but FCF is taking control of it. Editing is OK but keep in mind the functioning of the plugin that uses it."
msgstr ""
#: src/Settings/Option/FormattingFieldLabelOption.php:30
msgid "Display field label"
msgstr ""
#: src/Settings/Option/FormattingNewLineOption.php:30
msgid "Display the field on a new line"
msgstr ""
#: src/Settings/Option/FormattingOption.php:39
msgid "Formatting on pages/e-mails"
msgstr ""
#: src/Settings/Option/FormattingStateAbbrOption.php:30
msgid "Display state abbreviations"
msgstr ""
#: src/Settings/Option/FormattingStateCommaOption.php:30
msgid "Display a comma before if the field is not on a new line"
msgstr ""
#: src/Settings/Option/FormattingStateOption.php:39
msgid "State/County formatting"
msgstr ""
#: src/Settings/Option/ImageOption.php:40
#: src/Settings/Option/ImageWidthOption.php:40
#: src/Settings/Option/LabelOption.php:40
#: src/Settings/Page.php:212
msgid "This field is required."
msgstr ""
#: src/Settings/Option/ImageWidthOption.php:48
msgid "Image width (in pixels)"
msgstr ""
#: src/Settings/Option/LabelOption.php:48
#: src/Settings/Page.php:210
msgid "Label"
msgstr ""
#. translators: %1$s: anchor opening tag, %2$s: anchor closing tag, %3$s: anchor opening tag, %4$s: anchor closing tag, %5$s: anchor opening tag, %6$s: anchor closing tag, %7$s: break line, %8$s: anchor opening tag, %9$s: anchor closing tag
#: src/Settings/Option/LogicAdvOption.php:45
msgid "Add conditional logic based on %1$sproducts and categories%2$s as well as %3$sFCF fields%4$s and %5$sshipping methods%6$s set. %7$s%8$sUpgrade to PRO%9$s"
msgstr ""
#: src/Settings/Option/NameOption.php:46
msgid "Meta name"
msgstr ""
#: src/Settings/Option/PlaceholderCheckboxOption.php:23
msgid "Value"
msgstr ""
#: src/Settings/Option/PlaceholderOption.php:39
msgid "Placeholder"
msgstr ""
#. translators: %1$s: break line, %2$s: anchor opening tag, %3$s: anchor closing tag
#: src/Settings/Option/PricingAdvOption.php:42
msgid "Add a fixed or percentage price to the field and set the tax on this price.%1$s %2$sUpgrade to PRO%3$s"
msgstr ""
#: src/Settings/Option/RegexMessageOption.php:39
msgid "Validation error message"
msgstr ""
#. translators: %s field label
#: src/Settings/Option/RegexMessageOption.php:47
msgid "The value for the %s field should conform to the required format."
msgstr ""
#: src/Settings/Option/RegexPhoneOption.php:39
msgid "Validation regex"
msgstr ""
#: src/Settings/Option/RegexPhoneOption.php:46
msgid "Enter the number format using the regex code. Our documentation contains sample formats."
msgstr ""
#: src/Settings/Option/RequiredOption.php:39
msgid "Required field"
msgstr ""
#: src/Settings/Option/RequiredWcHiddenOption.php:14
msgid "Requirement of this field is controlled by WooCommerce and cannot be changed."
msgstr ""
#: src/Settings/Option/SettingJqueryCssOption.php:30
msgid "Disable jquery-ui.css on the frontend"
msgstr ""
#: src/Settings/Option/SettingJqueryCssOption.php:39
msgid "Remember that some fields, i.e. datepicker use jQuery UI CSS. The plugin adds a default CSS but sometimes it can create some visual glitches."
msgstr ""
#: src/Settings/Option/SettingJqueryOption.php:30
msgid "jQuery UI"
msgstr ""
#: src/Settings/Option/SettingSectionsAdvOption.php:31
msgid "Get Flexible Checkout Fields PRO to use Custom Sections"
msgstr ""
#: src/Settings/Option/SettingSectionsAdvOption.php:33
msgid "Extend the form with additional fields. Insert Text inputs and Headings. Add Checkboxes and fields with options like DropDown or Radio."
msgstr ""
#: src/Settings/Option/SettingSectionsAdvOption.php:34
msgid "Add conditional logic based on products and categories as well as FCF fields and shipping methods."
msgstr ""
#: src/Settings/Option/SettingSectionsAdvOption.php:35
msgid "Add a fixed or percentage price to the field and set the tax on this price."
msgstr ""
#: src/Settings/Option/SettingSectionsAdvOption.php:37
msgid "Upgrade to PRO"
msgstr ""
#. translators: %1$s: anchor opening tag, %2$s: anchor closing tag
#: src/Settings/Option/ValidationInfoOption.php:42
msgid "You can to add custom validation in the functions.php file. %1$sRead more%2$s"
msgstr ""
#: src/Settings/Option/ValidationOption.php:39
msgid "Validation"
msgstr ""
#: src/Settings/Option/ValueMaxOption.php:39
msgid "Max value"
msgstr ""
#: src/Settings/Option/ValueMinOption.php:39
msgid "Min value"
msgstr ""
#: src/Settings/Option/ValueStepOption.php:39
msgid "Step value"
msgstr ""
#: src/Settings/Page.php:59
msgid "Checkout Fields Settings"
msgstr ""
#: src/Settings/Page.php:60
msgid "Checkout Fields"
msgstr ""
#: src/Settings/Page.php:140
msgid "Text Fields"
msgstr ""
#: src/Settings/Page.php:144
msgid "Option Fields"
msgstr ""
#: src/Settings/Page.php:148
msgid "Picker Fields"
msgstr ""
#: src/Settings/Page.php:152
msgid "Other Fields"
msgstr ""
#: src/Settings/Page.php:196
msgid "Edit form"
msgstr ""
#: src/Settings/Page.php:197
msgid "Add new field"
msgstr ""
#: src/Settings/Page.php:198
msgid "Edit section"
msgstr ""
#: src/Settings/Page.php:199
msgid "Edit settings"
msgstr ""
#: src/Settings/Page.php:200
msgid "Add Field"
msgstr ""
#: src/Settings/Page.php:201
msgid "Add New"
msgstr ""
#: src/Settings/Page.php:202
msgid "Save Changes"
msgstr ""
#: src/Settings/Page.php:203
msgid "Reset Section Settings"
msgstr ""
#: src/Settings/Page.php:204
msgid "Read more"
msgstr ""
#: src/Settings/Page.php:205
msgid "Yes"
msgstr ""
#: src/Settings/Page.php:206
msgid "No"
msgstr ""
#: src/Settings/Page.php:207
msgid "Upload image"
msgstr ""
#: src/Settings/Page.php:208
msgid "Select color"
msgstr ""
#: src/Settings/Page.php:209
msgid "Field Type"
msgstr ""
#: src/Settings/Page.php:211
msgid "Name"
msgstr ""
#: src/Settings/Page.php:213
msgid "This value is too long."
msgstr ""
#: src/Settings/Page.php:214
msgid "Field name should contains only lowercase letters, numbers and underscore sign."
msgstr ""
#: src/Settings/Page.php:215
msgid "Select..."
msgstr ""
#: src/Settings/Page.php:216
msgid "Loading..."
msgstr ""
#: src/Settings/Page.php:217
msgid "No options."
msgstr ""
#. translators: %1$s: break line, %2$s: anchor opening tag, %3$s: anchor closing tag
#: src/Settings/Page.php:220
msgid "This field is available in the PRO version.%1$s %2$sUpgrade to PRO%3$s"
msgstr ""
#: src/Settings/Page.php:225
msgid "Are you sure you want to delete this field? Deleting a field will remove it from all orders."
msgstr ""
#: src/Settings/Page.php:226
msgid "Do you really want to reset section settings? Resetting a section remove all added fields from orders."
msgstr ""
#: src/Settings/Page.php:227
msgid "No fields available."
msgstr ""
#: src/Settings/Page.php:228
msgid "Failed to connect to WordPress REST API."
msgstr ""
#: src/Settings/Route/RouteIntegration.php:76
msgid "An unknown error occurred while processing the request."
msgstr ""
#: src/Settings/Tab/AdvancedTab.php:23
msgid "Advanced"
msgstr ""
#: src/Settings/Tab/AppearanceTab.php:23
msgid "Appearance"
msgstr ""
#: src/Settings/Tab/DisplayTab.php:23
msgid "Display On"
msgstr ""
#: src/Settings/Tab/GeneralTab.php:23
msgid "General"
msgstr ""
#: src/Settings/Tab/LogicTab.php:23
msgid "Conditional Logic"
msgstr ""
#: src/Settings/Tab/PricingTab.php:23
msgid "Pricing"
msgstr ""
#: src/Tracker/DeactivationTracker.php:51
msgid "The plugin does not work properly"
msgstr ""
#. translators: %1$s: anchor opening tag, %2$s: anchor closing tag, %3$s: anchor opening tag, %4$s: anchor closing tag
#: src/Tracker/DeactivationTracker.php:54
msgid "Contact us on %1$sthe support forum%2$s or read %3$sthe plugin FAQ%4$s for help."
msgstr ""
#: src/Tracker/DeactivationTracker.php:60
msgid "Please tell us what was the problem."
msgstr ""
#: src/Tracker/DeactivationTracker.php:67
msgid "The plugin is difficult to use"
msgstr ""
#. translators: %1$s: anchor opening tag, %2$s: anchor closing tag, %3$s: anchor opening tag, %4$s: anchor closing tag
#: src/Tracker/DeactivationTracker.php:70
msgid "Check %1$sthe documentation%2$s or contact us on %3$sthe support forum%4$s for help."
msgstr ""
#: src/Tracker/DeactivationTracker.php:76
msgid "How can we do it better? Please write what was problematic."
msgstr ""
#: src/Tracker/DeactivationTracker.php:83
msgid "The plugin does not meet all the requirements"
msgstr ""
#: src/Tracker/DeactivationTracker.php:85
msgid "Please write what function is missing."
msgstr ""
#: src/Tracker/DeactivationTracker.php:92
msgid "I found a better plugin"
msgstr ""
#: src/Tracker/DeactivationTracker.php:94
msgid "Please write what plugin is it and what was the reason for choosing it."
msgstr ""
#: src/Tracker/DeactivationTracker.php:101
msgid "The plugin is no longer needed"
msgstr ""
#: src/Tracker/DeactivationTracker.php:103
msgid "What is the reason for that?"
msgstr ""
#: src/Tracker/DeactivationTracker.php:110
msgid "It's a temporary deactivation (I'm just debugging an issue)"
msgstr ""
#: src/Tracker/DeactivationTracker.php:117
msgid "Other"
msgstr ""
#: src/Tracker/DeactivationTracker.php:119
msgid "Please tell us what made you click this option."
msgstr ""
#. translators: %1$s: field label
#: src/Validator/Error/InvalidEmailError.php:16
msgid "The e-mail address provided is not valid for the %1$s field."
msgstr ""
#. translators: %1$s: field label
#: src/Validator/Error/InvalidUrlError.php:16
msgid "The URL address provided is not valid for the %1$s field."
msgstr ""
#. translators: %1$s: field label
#: src/Validator/Error/InvalidValueError.php:16
msgid "The value provided is not valid for the %1$s field."
msgstr ""
#. translators: %1$s: field label, %2$s: minimum value
#: src/Validator/Error/NumberMaxError.php:18
msgid "The maximum value for the %1$s field is %2$s."
msgstr ""
#. translators: %1$s: field label, %2$s: minimum value
#: src/Validator/Error/NumberMinError.php:18
msgid "The minimum value for the %1$s field is %2$s."
msgstr ""
#. translators: %1$s: field label, %2$s: divider
#: src/Validator/Error/NumberStepError.php:18
msgid "The value of the %1$s field should be divisible by %2$s."
msgstr ""
#: templates/fields/colorpicker.php:22
#: templates/fields/email.php:22
#: templates/fields/inspirecheckbox.php:33
#: templates/fields/number.php:22
#: templates/fields/phone.php:22
#: templates/fields/text.php:22
#: templates/fields/textarea.php:22
#: templates/fields/url.php:22
msgid "Required Field"
msgstr ""
#: templates/notices/flexible-wishlist.php:20
msgid "New free plugin by WP Desk: Flexible Wishlist for WooCommerce"
msgstr ""
#. translators: %1$s: open strong tag, %2$s: open strong tag, %3$s: heart icon, %4$s: open anchor tag, %5$s: open anchor tag
#: templates/notices/flexible-wishlist.php:27
msgid "Introducing our new %1$sWooCommerce Wishlist plugin%2$s %3$s It's lightweight. It's free. Fits any theme. 100%% customizable and flexible. %4$sRead more%5$s and try it now. Uninstall any time with just one click."
msgstr ""
#: templates/notices/flexible-wishlist.php:40
msgid "Try for free"
msgstr ""
#: templates/notices/flexible-wishlist.php:44
msgid "Do not show again"
msgstr ""
#: templates/notices/review.php:17
msgid "Thanks for using the free version of Flexible Checkout Fields!"
msgstr ""
#. translators: %1$s: dashicon, %2$s: break-line tag
#: templates/notices/review.php:24
msgid "We are glad that (with our little help %1$s) the shop is now better suited to the needs. We will be grateful for the rating and feedback. %2$sIt will take less than reading this and it will help us a lot!"
msgstr ""
#: templates/notices/review.php:35
msgid "Add review"
msgstr ""
#: templates/notices/review.php:39
msgid "I added review, do not show again"
msgstr ""
#. translators: %$1s: love icon, %$2s: anchor opening tag, %$3s: anchor closing tag, %$4s: anchor opening tag, %$5s: anchor closing tag
#: templates/views/admin-page.php:65
msgid "Created with %1$s by Rangers from %2$sWP Desk%3$s - if you like FCF %4$srate us%5$s"
msgstr ""

View File

@@ -0,0 +1,758 @@
=== Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager ===
Contributors: wpdesk,dyszczo,grola,piotrpo,marcinkolanko,mateuszgbiorczyk,sebastianpisula,bartj
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
Tags: woocommerce checkout fields, woocommerce custom fields, woocommerce checkout manager, woocommerce checkout editor, woocommerce fields manager, woocommerce fields editor, woocommerce custom checkout fields, woocommerce checkout options, woocommerce checkout pro, woocommerce custom sections, woocommerce file upload
Requires at least: 4.9
Tested up to: 6.0
Stable tag: 3.4.2
Requires PHP: 7.0
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
The best WooCommerce checkout manager. Add, edit, remove WooCommerce checkout fields and customize WooCommerce checkout. WooCommerce checkout customizer.
== Description ==
We think WooCommerce is the best ecommerce plugin for WordPress. But it lacks some very basic features like customizing checkout fields with a checkout manager in an easy to use interface. You can do it by hooks and filters but why bother if you can do it by Flexible Checkout Fields for WooCommerce - WooCommerce Checkout Manager. With this single page checkout plugin you can edit the default fields (change labels, hide, delete) or add your own checkout fields. You can set your own fields order. There"s a lot of field types such as a checkbox field, a date field or a color picker field (some of them exclusively in the PRO version). Read on to see how easy it is to edit WooCommerce checkout fields with this plugin and how powerful it is.
[youtube https://www.youtube.com/watch?v=VTRnSU0OLV4]
= The WordPress Look&Feel =
Flexible Checkout Fields beautifully integrates with the WordPress dashboard. It is probably the best looking checkout field editor for WooCommerce on the market. And you can do some powerful stuff with it too. [See some screenshots →](https://wordpress.org/plugins/flexible-checkout-fields/screenshots/)
* [>>> Go to the FCF client area demo <<<](https://wpde.sk/fcf-demo-repo) - here you can test the product configured with the **Flexible Checkout Fields** plugin (no registration needed)
* [>>> Go to the FCF admin demo <<<](https://demo.wpdesk.org/?utm_source=wordpress-repository&utm_medium=demo-link&utm_campaign=demo-flexible-checkout-fields) - here you can test the admin panel of all WP Desk plugins including **Flexible Checkout Fields**
= Fields Order =
Just drag&drop to reorder checkout fields on the checkout page. You can reorder WooCommerce built-in fields as well as custom fields that you add yourself. Mix them any way you like or need. Simply customize checkout yourself. If other plugins add their custom fields in many cases you will also be able to rearrange them (if added properly by the plugin author).
= Labels and Placeholders =
Want to change *Company name* to just *Company* or *Your Awesome Company*? Just edit the label and it will instantly appear in the checkout page. **Pro tip**: You can also use HTML inside labels!
Want to give your customers a tip on how to fill a checkout field? You can do it with an explanatory placeholder (it will show inside the field). For example *Enter your full company name*.
= Show or Hide Fields =
You do not need a customer's phone number or second line address? Just hide the fields from the checkout and you're good to go. This is just one click away. Decide to show it later? Just another click and the field shows again. You can validate email too and hide WooCommerce price.
= Display Checkout Fields on Other Pages =
You can display the fields not only in the checkout page. Just mark a specific checkbox under the "Display On" tab as checked. You have 4 different locations to use:
* Thank You Page
* My Account - address
* My Account - order
* Emails
= Required or Optional Fields =
This WooCommerce Checkout Editor will let you easily manage which fields should be required and which optional. Just click a *required* checkbox in the field settings and make a field required or optional. Works both ways.
= Custom CSS Class =
Add some style to your fields. By adding a custom class to each field you can then uniquely style it in your theme's stylesheet.
= Add New WooCommerce Custom Checkout Fields =
Add WooCommerce additional fields to your checkout page with your new WooCommerce checkout customizer:
**Free**
* [Text](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Text)
* [Textarea](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Textarea)
* [Number](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Number) (New feature)
* [E-mail](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Email) (New feature)
* [Phone](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Phone) (New feature)
* [URL](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#URL) (New feature)
* [Checkbox](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Checkbox)
* [Color](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Color)
* [Headline](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Headline)
* [Paragraph](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Paragraph) (New feature)
* [Image](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Image) (New feature)
* [HTML](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#HTML)
**PRO**
* [Multi-checkbox](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Multi-checkbox) (New feature)
* [Select](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Select)
* [Multi-select](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Multi-select)
* [Radio](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Radio)
* [Radio with images](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Radio_with_images) (New feature)
* [Radio with colors](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Radio_with_colors) (New feature)
* [Date](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Date)
* [Time](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Time)
* [File Upload](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#File_Upload)
* [Hidden](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/#Hidden)
= Multilanguage ready =
Flexible Checkout Fields (checkout manager) is compatible with WPML and Polylang and lets you translate fields data to other languages.
= Use your meta names =
Are you a developer? You can set any meta name you want. This is the name of the field in the database. You can easily integrate this WooCommerce plugin for one page checkout with your custom code due to this function.
= Field validation =
WooCommerce has built-in validation of a phone number, an email address (validate email) and a postcode. We let you use this validation in the new fields you add to your store using this plugin.
Standard WooCommerce validation is not enough? You can add your own validation to any field you create in this plugin. You can find a code example in [Flexible Checkout Fields docs →](https://www.wpdesk.net/docs/flexible-checkout-fields-pro-woocommerce-docs/)
= Custom Field Sections (PRO) =
Billing, Shipping or Order sections are not enough? Now you can add fields to 12 other checkout sections. Below you will find all sections and their corresponding hooks (hooks are just for developers' reference - if you do not know what hooks are, just ignore them and you'll be just fine - it will just work).
* Before Customer Details
* After Customer Details
* Before Billing Form
* After Billing Form
* Before Shipping Form
* After Shipping Form
* Before Registration Form
* After Registration Form
* Before Order Notes
* After Order Notes
* Before Submit
* After Submit
= Conditional Logic for Fields (PRO) =
Enable conditional logic (show or hide) for fields based on other fields values (checkbox, radio, select).
= Conditional Logic for Shipping Methods (PRO) =
Enable conditional logic (show or hide) for fields based on selected shipping method.
= Conditional Logic for Products and Categories (PRO) =
Enable conditional logic (show or hide) for fields based on products and/or categories in the cart, i.e.:
* Show engraving field for jewelery category
* Show delivery date option only for physical products
* Show VAT Number for digital goods
* Hide address fields for digital goods
This plugin is compatible with variable products.
> **Upgrade to Flexible Checkout Fields PRO**<br />
> Get all PRO features and priority e-mail support. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)
= Well Documented =
We are proud of our docs. We spend a great deal of time to polish them and make them as complete as possible. [Read Flexible Checkout Fields Docs →](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)
= Support Policy =
We provide a limited support for the free version in the [plugin Support Forum](https://wordpress.org/support/plugin/flexible-checkout-fields/). Please purchase a PRO version to get priority e-mail support as well as all e-commerce features. [Upgrade Now →](https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/?utm_source=wporg&utm_medium=link&utm_campaign=wporg-fcf)
> **Get more WooCommerce plugins from WP Desk**<br />
> We provide premium plugins for customizing checkout, shipping, invoicing and more. Check out our [premium WooCommerce plugins here →](https://www.wpdesk.net/products/)
= Flexible Checkout Fields in a nutshell =
Key features:
* make the purchasing experience as flawless as possible for your users. Single page checkout is just 1 click away,
* remove pain points related to the checkout process,
* allow for delivery personalization,
* manage fields in WooCommerce,
* text fields in WooCommerce checkout,
* time picker in WooCommerce checkout,
* date picker in WooCommerce checkout,
* checkbox in WooCommerce checkout,
* color picker in WooCommerce checkout,
* file upload in WooCommerce checkout,
* manage fields in WooCommerce,
* add WooCommerce VAT ID number,
* add WooCommerce checkout fields,
* price per date,
* checkout phone validator,
* fixed price,
* add WooCommerce custom checkout fields.
== Installation ==
You can install this plugin like any other WordPress plugin.
1. Download and unzip the latest release zip file.
2. Upload the entire plugin directory to your /wp-content/plugins/ directory.
3. Activate the plugin through the Plugins menu in WordPress Administration.
You can also use WordPress uploader to upload plugin zip file in menu Plugins -> Add New -> Upload Plugin. Then go directly to point 3.
== Frequently Asked Questions ==
= Where I can find the plugin docs? =
The docs are located here: [Flexible Checkout Fields Docs](https://www.wpdesk.net/docs/woocommerce-checkout-fields-docs/)
= Can I add custom field sections? =
Yes, but you will have to purchase [Flexible Checkout Fields PRO](https://www.wpdesk.net/products/woocommerce-checkout-fields/).
= I have installed the plugin but I do not know where the plugin settings are =
The plugin is available in the WordPress menu in the WooCommerce > Checkout Fields tab.
The plugin menu is in the upper left corner and contains two items. The first is Settings where it is possible to turn on additional sections. The second item is Checkout Sections and clicking on it will show all sections enabled in the Settings tab.
= I am using this plugin to insert fields in another form but it does not work as it should =
Our plugin supports fields on the Checkout page (hence its name). So the plugin will work if the form is on the page set in WooCommerce as Checkout.
WooCommerce > Settings > Advanced > Checkout page
Our plugin uses the Checkout subpage environment and WooCommerce purchasing mechanisms. These two conditions must be met. The plugin will not work if e.g. there is a quotation plugin that skips this purchasing process.
== Screenshots ==
1. Add new field section
2. Form with fields available in the free version
3. General options for the Text field
4. General options for the Textarea field
5. General options for the Number field
6. General options for the E-mail field
7. General options for the Phone field
8. General options for the URL field
9. General options for the Checkbox field
10. General options for the Color field
11. Settings in the Advanced tab
12. Settings in the Appearance tab
13. Settings in the Display On tab
== Upgrade Notice ==
If you are upgrading from the old WooCommerce Checkout Fields version (1.1, woocommerce-checkout-fields) make sure to completely delete the old version first. Your settings will be kept. If you install the new version without deleting the old one you may break your WordPress installation.
== Changelog ==
= 3.4.2 - 2022-09-08 =
* Added support for WooCommerce 6.9
= 3.4.1 - 2022-08-01 =
* Fixed data loading into widget in Admin Dashboard
* Added support for WooCommerce 6.8
= 3.4.0 - 2022-07-28 =
* Fixed escaping of field label
* Fixed translation for Select field
* Fixed image refreshing for Image field
* Added support for upload_mimes filter
* Added support for WooCommerce 6.7
= 3.3.0 - 2022-06-20 =
* Added compatibility with FCF PRO 3.3.0
= 3.2.4 - 2022-06-14 =
* Fixed hiding fields in form
* Added shipping_phone as reserved name for new field
* Added support for WooCommerce 6.6
= 3.2.3 - 2022-05-12 =
* Fixed default value for Multi-checkbox field type
* Added support for WordPress 6.0
* Added support for WooCommerce 6.5
= 3.2.2 - 2022-03-09 =
* Fixed ability to edit fields from custom sections in user profile
* Fixed loading of Select field in Order section
* Added validation rules for Number field
* Added support for WooCommerce 6.3
= 3.2.1 - 2022-02-15 =
* Fixed saving values for fields from custom sections
* Fixed field translations
* Fixed validation classes for field templates
* Fixed template of HTML field
* Added support for WooCommerce 6.2
= 3.2.0 - 2022-02-08 =
* Added new field type: Number
* Added new field type: E-mail
* Added new field type: Phone
* Added new field type: URL
* Added new field type: Checkbox
* Added new field type: Heading
* Added new field type: Paragraph
* Added new field type: Image
* Added new field type: HTML
* Added ability to edit all field types in address edit form in My Account page
* Added ability to edit all field types in user edit form in WordPress Dashboard
= 3.1.3 - 2022-02-03 =
* Added settings migration tool
* Added support for WordPress 5.9
* Added support for WooCommerce 6.1
= 3.1.2 - 2021-11-29 =
* Fixed saving line breaks for textarea field
* Added support for WooCommerce 6.0
= 3.1.1 - 2021-11-04 =
* Changed plugin deactivation modal
= 3.1.0 - 2021-09-09 =
* Removed duplicate contact details in order edit in administration panel
* Fixed validation of field value in plugin settings
* Changed plugin deactivation modal
* Added limit length of field name
= 3.0.11 - 2021-07-15 =
* Added support for WordPress 5.8
* Added support for WooCommerce 5.5
= 3.0.10 - 2021-05-20 =
* Fixed support for checkbox, radio and select fields added by other plugins
* Added support for WooCommerce 5.3
= 3.0.9 - 2021-04-28 =
* Fixed compatibility with WPML
* Added support for WooCommerce 5.2
= 3.0.8 - 2021-03-31 =
* Removed validation for Postcode for fields other than Postcode/ZIP
* Fixed formatting values of State/County fields
= 3.0.7 - 2021-03-18 =
* Fixed support for fields generated by other plugins
* Fixed Days before / Days after options for Date field type
* Added notice for fields generated by other plugins
= 3.0.6 - 2021-03-12 =
* Fixed displaying Country/Region field
= 3.0.5 - 2021-03-11 =
* Fixed displaying fields without specific field type
* Added support for WordPress 5.7
* Added support for WooCommerce 5.1
= 3.0.4 - 2021-03-03 =
* Fixed support for default checkbox field type
= 3.0.3 - 2021-03-02 =
* Fixed displaying address fields on Order editing screen
* Fixed issue about footer in administration panel
* Fixed retrieval of options for Select fields
= 3.0.2 - 2021-03-01 =
* Fixed editing of order in administration panel
= 3.0.1 - 2021-03-01 =
* Fixed adding of new field
= 3.0.0 - 2021-03-01 =
* Major Update!
* Dropped support for Flexible Checkout Fields PRO version lower than 3.0
* Added new admin page to manage plugin settings
* Added validation for fields on settings page
= 2.9.2 - 2021-02-11 =
* Added support for WooCommerce 5.0
= 2.9.1 - 2021-01-14 =
* Updated hook for integration with FCF plugin
= 2.9.0 - 2020-12-16 =
* Changed hook for integration with FCF plugin
* Changed URLs for docs
* Added notice asking for plugin review
= 2.8.0 - 2020-12-09 =
* Added hook for integration with FCF plugin
= 2.7.1 - 2020-12-01 =
* Added support for WooCommerce 4.8
* Added support for WordPress 5.6
= 2.7.0 - 2020-11-02 =
* Added support for pricing in FCF PRO
= 2.6.0 - 2020-10-15 =
* Changed required PHP version to 7.0
* Fixed integration with Flexible Invoices (VAT Number field)
* Fixed display of HTML code in Additional Information section on Thank You Page
* Added support for WooCommerce 4.6
= 2.5.7 - 2020-10-01 =
* Fixed saving field values to User Metadata from Order section
* Added escaping output for field label
= 2.5.6 - 2020-09-23 =
* Added notice of planned change of required PHP version to 7.0
= 2.5.5 - 2020-09-17 =
* Fixed placeholder option for Radio and Multi-select field
= 2.5.4 - 2020-09-16 =
* Added placeholder option for Select field (with empty value)
= 2.5.3 - 2020-09-01 =
* Fixed copying shipping details from billing details for same fields
* Added support for WooCommerce 4.5
= 2.5.2 - 2020-08-25 =
* Fixed overwriting of field classes by WooCommerce locale
= 2.5.1 - 2020-08-10 =
* Added support for WordPress 5.5
= 2.5.0 - 2020-08-06 =
* Added action `flexible_checkout_fields_validate_{$field_type}` for custom validation
* Added new argument to callback function for filter `flexible_checkout_fields_custom_validation`
= 2.4.14 - 2020-07-22 =
* Fixed displaying empty address in user profile
= 2.4.13 - 2020-07-08 =
* Fixed SyntaxError in JavaScript
= 2.4.12 - 2020-06-23 =
* Added additional request sanitization
= 2.4.11 - 2020-05-12 =
* Fixed field name validation - validation works only on currently added fields
= 2.4.10 - 2020-05-04 =
* Fixed additional fields not saved in user profile
= 2.4.9 - 2020-04-21 =
* Fixed missing Copy from billing address button
= 2.4.8 - 2020-04-09 =
* Fixed warnings on settings saving
= 2.4.7 - 2020-04-03 =
* Fixed warnings on settings page
= 2.4.6 - 2020-03-30 =
* Fixed missing jQuery UI images
* Fixed checkboxes in user profile
* Fixed 0 in default value
= 2.4.5 - 2020-03-23 =
* Fixed HTML in field label
* Fixed file upload error
= 2.4.4 - 2020-03-20 =
* Fixed fatal error in user profile
= 2.4.3 - 2020-03-12 =
* Fixed user profile form
* Fixed field name validation
* Fixed multiselect value warning
* Added ability to display state code
= 2.4.2 - 2020-03-12 =
* Fixed error in settings on unknown field type
= 2.4.1 - 2020-03-10 =
* Added formatting for billing and shipping fields on pages and emails
= 2.4.0 - 2020-03-06 =
* Added additional request sanitization
* Tweaked remote calling css files
= 2.3.4 - 2020-02-25 =
* Fixed attibute/value escaping in admin panel and on checkout page
* Added additional security hardenings
= 2.3.3 - 2020-02-25 =
* Added security nonce to settings form
= 2.3.2 - 2020-02-25 =
* Fixed security issue on settings update
= 2.3.1 - 2020-02-20 =
* Added support for the latest Flexible Checkout Fields PRO release
* Fixed customer address' details on thank you page
= 2.2.4 - 2020-01-27 =
* Fixed typo in the settings' field tooltip
= 2.2.3 - 2020-01-03 =
* Added support for WooCommerce 3.9
= 2.2.2 - 2019-12-17 =
* Fixed WPML compatibility
= 2.2.1 - 2019-11-05 =
* Fixed fakepath in the file's name
= 2.2.0 - 2019-09-23 =
* Prefixed libraries
= 2.1.4 - 2019-09-19 =
* Fixed invoice fields integration for wFirma/iFirma/inFakt/Fakturownia
= 2.1.3 - 2019-09-09 =
* Fixed display of fields that contains name 'billing'
= 2.1.2 - 2019-09-04 =
* Fixed reordering fields in account address page
* Fixed set require for WC predefined fields
= 2.1.1 - 2019-08-29 =
* Fixed warning "Illegal string offset" when shipment is disabled
= 2.1.0 - 2019-08-21 =
* Fixed integration with Flexible Invoices invoice_ask field
* Added filter flexible_checkout_fields_invoices_integration_enabled
= 2.0.10 - 2019-08-19 =
* Fixed required field validation for html field
* Fixed "display on" section in custom sections
= 2.0.8 - 2019-08-13 =
* Fixed fatal error when WPDesk_Tracker_Factory is not loaded by autoloader
= 2.0.7 - 2019-08-12 =
* Fixed warning in admin are on CSS class
= 2.0.5 - 2019-08-06 =
* Postcode validation is available only in billing and shipping sections
= 2.0.4 - 2019-07-11 =
* Fixed error while activating in multisite environment
= 2.0.3 - 2019-07-11 =
* Fixed rare change for fatal error when activating plugin
= 2.0.2 - 2019-07-03 =
* Fixed integration with a PRO plugin
= 2.0.1 - 2019-07-02 =
* Fixed jQuery conflict with WOOBE Bulk editor plugin
= 2.0.0 - 2019-06-25 =
* Fixed state field: requirement is controlled by WooCommerce
* Added support for WPDesk libraries
= 1.9.3 - 2019-05-06 =
* Fixed field name verification - used toLowerCase method.
= 1.9.2 - 2019-04-04 =
* Fixed fatal error in restore_default_city_validation
= 1.9.1 - 2019-03-14 =
* Fixed account error notice on checkout page
* Fixed single quote in placeholder
* Fixed licence checking
* Remove slashes from additional information
= 1.9.0 - 2019-02-26 =
* Fixed section settings fields saving
= 1.8.3 - 2019-02-25 =
* Tweaked FCF PRO activation checking
* Fixed error of sorting fields
= 1.8.2 - 2019-01-31 =
* Fixed fields order in configuration
* Fixed unwanted validation on additional sections when PRO plugin disabled
* Fixed box display for incorrect validation
* Fixed errors after save fields
* Fixed Polylang translations on select options
* Fixed non city countries validation
= 1.8.1 - 2019-01-15 =
* Fixed CSS WP Menu
= 1.8 - 2018-12-19 =
* Added ability to edit placeholder on City and Postcode
* Added file field in thank you page and emails
* Added functionality for removed ability to edit file field for customer
* Fixed: PHP warning invalid argument supplied for foreach
* Removed display checkbox on My Account - address for file field
= 1.7.2 - 2018-12-19 =
* Fixed missing additional fields in emails
= 1.7.1 - 2018-12-13 =
* Added DIVI compatibility
= 1.7.0 - 2018-12-06 =
* Added required changes for PRO version and multi-select field
* Added required changes for PRO version and select2 styling
= 1.6.10 - 2018-10-16 =
* Added support for WooCommerce 3.5
* Dropped support for WooCommerce 3.0 and older (the plugin may still work with older versions but we do not declare official support)
= 1.6.9 - 2018-09-18 =
* Fixed edit address pages for WPML Strings
= 1.6.8 - 2018-07-10 =
* Removed fields name validation on existing fields
= 1.6.7 - 2018-06-26 =
* Fixed error with conflict in tracker
= 1.6.6 - 2018-06-25 =
* Tweaked tracker data anonymization
* Fixed tracker notice
= 1.6.5 - 2018-05-25 =
* Fixed missing address in emails
= 1.6.4 - 2018-05-23 =
* Added support for WooCommerce 3.4
= 1.6.3 - 2018-04-19 =
* Fixed hooks priority for Display On settings tab
* Fixed required field message - removed HTML tags from field label
* Fixed add field function with HTML in label
* Fixed display NIP field added by the iFirma plugin
= 1.6.2 - 2018-03-29 =
* Fixed problems with display email and phone fields on order edit page in admin area
* Fixed display the checkbox 'I would like to receive a VAT invoice in checkout' after turn on the Flexible Checkout Fields plugin when Flexible Invoices is available
* Removed hiding fields on order edit (the field will always be display on)
* Removed 'fakepath' from upload field
= 1.6.1 - 2018-03-01 =
* Fixed problems with deactivation plugin on multisite
* Fixed some minor issues
= 1.6 - 2018-01-21 =
* Added the option of disabling the display of fields in the Thank You Page and Emails, My Account
* Added protection removing the field and resetting the section settings
* Added the option to set custom meta name for the field
* Added standard WooCommerce validation for fields
* Added a filter to add custom validation
* Added a field type name to the field bar
* Fixed bug if WooCommerce is turn off
= 1.5.8 - 2018-01-28 =
* Added support for WooCommerce 3.3
= 1.5.7 - 2017-12-14 =
* Fixed issue with changing name and placeholder for core WooCommerce fields
* Fixed displaying field name when it's removed
= 1.5.6 - 2017-11-22 =
* Added unintrusive review request for WordPress.org - please support the free version and add a 5-star review!
* Fixed a minor display glitch in the admin
= 1.5.5 - 2017-11-08 =
* Fixed a bug with character encoding in emails
* Fixed a bug with required fields if option is unchecked
* Fixed fields position in My Account in Addresses tab
= 1.5.4 - 2017-10-25 =
* Fixed docs links
* Fixed some warnings in WooCommerce dashboard
= 1.5.3 - 2017-10-10 =
* Added support for WooCommerce 3.2
* Dropped support for WooCommerce 2.5.x (the plugin may still work but we do not declare official support)
= 1.5.2 - 2017-07-27 =
* Fixed issue with the fields order in the checkout
* Tweaked message in WP Desk Tracker class
= 1.5.1 - 2017-05-30 =
* Fixed fields sorting bug
* Integrated WP Desk Tracker class to help us understand how you use the plugin (you need to opt in to enable it)
* Added upgrade link to quick links
= 1.5 - 2017-04-03 =
* Added support for upcoming WooCommerce 3.0
* Dropped support for WooCommerce below 2.5 (the plugin may still work with older versions but we do not declare official support)
= 1.4 - 2017-02-15 =
* Added support for conditional logic in FCF PRO 1.4 (this update is necessary for FCF PRO 1.4)
* Disabled editing field name for: Town, State, Postcode (unsupported in WooCommerce)
* CSS tweaks for WordPress 4.7.x
= 1.3.3 - 2016-11-28 =
* Fixed radio buttons saving
* Strip tags from labels when viewing fields settings
= 1.3.2 - 2016-11-23 =
* Limit field names to 20 characters in order to prevent DB problems (this is only behind the scenes, labels and all user visible elements remain intact)
= 1.3.1 - 2016-10-24 =
* Fixed resetting section's settings which blocked ability to edit fields in the order
* Fixed potential warning on the thank you page
= 1.3 - 2016-10-07 =
* Added support for fields conditional logic based on products and categories (available in the PRO version)
* Added option to reset section settings
* Added better support for third party plugins that add checkout fields
* Added WPML and Polylang support
= 1.2.3 - 2016-09-22 =
* Fixed a warning on line 530
= 1.2.2 - 2016-09-16 =
* Fixed removing the last field from the section
* Fixed checkboxes default settings
* Fixed select not showing up
* Fixed removing order notes field
= 1.2.1 - 2016-09-08 =
* Fixed saving select field
= 1.2 - 2016-09-07 =
* Major Update!
* Released in WordPress Plugin Directory
* Changed name from WooCommerce Checkout Fields to Flexible Checkout Fields for WooCommerce
* Released a PRO version
= 1.1 2016-06-21 =
* Added new field: file upload
* Completely new look and feel that plays well with WordPress dashboard
* Converted to English
* Added Polish (pl_PL) translation
* Prepared the code for plugin new versions
= 1.0.2 - 2016-03-08 =
* Fixed (again) required asterisk for not required fields
= 1.0.1 - 2016-03-07 =
* Fixed required asterisk for not required fields
= 1.0 - 2016-01-26 =
* Automatic updates and license system
= 0.9.12 - 2015-04-14 =
* Added possibility to add HTML to labels
= 0.9.11 - 2015-02-27 =
* Tweaked editing custom fields in order details
* Added possibility to add HTML to additional checkboxes
= 0.9.10 - 2015-02-27 =
* Tweaked errors display for WooCommerce 2.3 compatibility
= 0.9.9 - 2015-01-20 =
* Fixed (again) additional checkboxes warnings
= 0.9.8 - 2015-01-20 =
* Fixed additional checkboxes warnings
= 0.9.7 - 2015-01-20 =
* Added additional checkboxes settings to display under payment details
= 0.9.6 - 2014-12-19 =
* Added new fields: select, radio, checkbox
= 0.9.5 - 2014-12-04 =
* Added e-mail and phone fields in order details
* Tweaked label, placeholder and class fields not to be required
= 0.9.4 - 2014-12-01 =
* Fixed Shipping Address override when the checkbox is checked
= 0.9.3 - 2014-11-26 =
* Tweaked CSS files to load only on required pages
* Added Settings tab and option to disable jQuery UI CSS
= 0.9.2 - 2014-11-24 =
* Fixed a bug preventing checkout registration
= 0.9.1 - 2014-11-04 =
* Fixed checkout fields CSS styles
= 0.9 - 2014-11-04 =
* Release!

View File

@@ -0,0 +1,9 @@
<?php
namespace WPDesk\FCF\Free\Exception;
/** * .
*/
class TemplateLoadingFailed extends \Exception {
}

View File

@@ -0,0 +1,60 @@
<?php
namespace WPDesk\FCF\Free\Field;
use WPDesk\FCF\Free\Field\Type\DefaultType;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
/**
* Generates field data based on options for field type.
*/
class FieldData {
/**
* Returns parsed data for field.
*
* @param array $field_settings Settings of field.
* @param bool $is_decode Is it decoding (used saved settings) data instead of encoding (for settings save).
*
* @return array Data of field.
*/
public static function get_field_data( array $field_settings, bool $is_decode = true ): array {
$field_data = [];
$option_objects = self::get_field_options( $field_settings );
if ( ! $option_objects ) {
return $field_data;
}
$field_data['name'] = $field_settings['name'];
foreach ( $option_objects as $field_option ) {
$field_data = $field_option[ ( $is_decode ) ? 'update_field_callback' : 'save_field_callback' ](
$field_data,
$field_settings
);
}
return $field_data;
}
/**
* Returns list of option objects.
*
* @param array $field_settings Settings of field.
*
* @return OptionInterface[] List of options.
*/
public static function get_field_options( array $field_settings ): array {
$field_types = apply_filters( 'flexible_checkout_fields/field_types', [] );
foreach ( $field_types as $field_type ) {
if ( in_array( $field_settings['name'], $field_type['reserved_field_names'], true ) ) {
return $field_type['options'];
}
}
foreach ( $field_types as $field_type ) {
if ( isset( $field_settings['type'] ) && ( $field_settings['type'] === $field_type['type'] ) ) {
return $field_type['options'];
}
}
return $field_types[ DefaultType::FIELD_TYPE ]['options'] ?? [];
}
}

View File

@@ -0,0 +1,113 @@
<?php
namespace WPDesk\FCF\Free\Field;
use FcfVendor\WPDesk\PluginBuilder\Plugin\Hookable;
use WPDesk\FCF\Free\Exception\TemplateLoadingFailed;
use WPDesk\FCF\Free\Service\TemplateLoader;
use WPDesk\FCF\Free\Settings\Form\EditFieldsForm;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
/**
* .
*/
class FieldTemplateLoader implements Hookable {
/**
* @var TemplateLoader
*/
private $template_loader;
/**
* Class constructor.
*/
public function __construct( TemplateLoader $template_loader ) {
$this->template_loader = $template_loader;
}
/**
* {@inheritdoc}
*/
public function hooks() {
add_filter( 'woocommerce_form_field', [ $this, 'load_field_template' ], 999, 4 );
add_filter( 'flexible_checkout_fields_form_field', [ $this, 'load_field_template' ], 10, 4 );
add_filter( 'woocommerce_form_field_args', [ $this, 'load_default_field_args' ], 10, 1 );
}
/**
* @param string $output HTML output.
* @param string $key Field name.
* @param array $args Fields args.
* @param mixed $value .
*
* @return string
*
* @throws TemplateLoadingFailed
* @internal
*/
public function load_field_template( $output, $key, $args, $value ) {
if ( ! isset( $args[ CustomFieldOption::FIELD_NAME ] ) || ! $args[ CustomFieldOption::FIELD_NAME ] ) {
return $output;
}
$field_data = $this->get_field_data( $key );
if ( $field_data === null ) {
return $output;
}
$field_type = $args[ FieldTypeOption::FIELD_NAME ];
$field_types = apply_filters( 'flexible_checkout_fields/field_types', [] );
if ( ! isset( $field_types[ $field_type ] ) || ! $field_types[ $field_type ]['is_available'] ) {
return $output;
}
remove_filter( 'woocommerce_form_field', [ $this, 'load_field_template' ], 999 );
$output = $this->template_loader->load_template(
'fields/' . $field_type,
[
'args' => apply_filters( 'flexible_checkout_fields_field_args', $field_data, $key ),
'key' => $key,
'value' => $value,
'custom_attributes' => apply_filters( 'flexible_checkout_fields_custom_attributes', [], $field_data ),
]
);
add_filter( 'woocommerce_form_field', [ $this, 'load_field_template' ], 999, 4 );
return $output;
}
/**
* @param string $field_name .
*
* @return mixed|null
*/
private function get_field_data( string $field_name ) {
$fields_settings = get_option( EditFieldsForm::SETTINGS_OPTION_NAME, [] );
foreach ( $fields_settings as $group_name => $fields ) {
foreach ( $fields as $field_id => $field_data ) {
if ( $field_id === $field_name ) {
return $field_data;
}
}
}
return null;
}
/**
* @param array $args .
*
* @return array
* @internal
*/
public function load_default_field_args( $args ) {
if ( ! isset( $args[ CustomFieldOption::FIELD_NAME ] ) || ! $args[ CustomFieldOption::FIELD_NAME ] ) {
return $args;
}
$args['options'] = [];
return $args;
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace WPDesk\FCF\Free\Field;
use FcfVendor\WPDesk\PluginBuilder\Plugin\Hookable;
/**
* Supports translating field settings via external plugins.
*/
class FieldTranslator implements Hookable {
/**
* {@inheritdoc}
*/
public function hooks() {
add_filter( 'flexible_checkout_fields_field_args', [ $this, 'translate_field' ], 10, 2 );
}
/**
* @param mixed[] $field_data .
* @param string $field_name .
*
* @return mixed[]
*/
public function translate_field( $field_data, $field_name ) {
if ( isset( $field_data['label'] ) ) {
$field_data['label'] = wpdesk__( $field_data['label'], 'flexible-checkout-fields' );
}
if ( isset( $field_data['placeholder'] ) ) {
$field_data['placeholder'] = wpdesk__( $field_data['placeholder'], 'flexible-checkout-fields' );
}
if ( isset( $field_data['default'] ) ) {
$field_data['default'] = wpdesk__( $field_data['default'], 'flexible-checkout-fields' );
}
if ( isset( $field_data['options'] ) ) {
foreach ( $field_data['options'] as $option_index => $option ) {
$field_data['options'][ $option_index ]['value'] = wpdesk__( $option['value'], 'flexible-checkout-fields' );
}
}
return $field_data;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class CheckboxDefaultType extends DefaultType implements TypeInterface {
const FIELD_TYPE = 'checkbox';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
$options = parent::get_options_objects();
$options[ GeneralTab::TAB_NAME ][ FieldTypeOption::FIELD_NAME ] = new FieldTypeOption();
return $options;
}
}

View File

@@ -0,0 +1,99 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DefaultOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\PlaceholderCheckboxOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class CheckboxType extends TypeAbstract {
const FIELD_TYPE = 'inspirecheckbox';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Checkbox', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-check-square';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
PlaceholderCheckboxOption::FIELD_NAME => new PlaceholderCheckboxOption(),
DefaultOption::FIELD_NAME => new DefaultOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DefaultOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class ColorType extends TypeAbstract {
const FIELD_TYPE = 'colorpicker';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Color', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_PICKER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-paint-brush';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
DefaultOption::FIELD_NAME => new DefaultOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class DateType extends TypeAbstract {
const FIELD_TYPE = 'datepicker';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Date', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_PICKER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-calendar-alt';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldDisabledOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeDefaultOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class DefaultType extends TypeAbstract {
const FIELD_TYPE = 'fcf_default';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeDefaultOption::FIELD_NAME => new FieldTypeDefaultOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldDisabledOption::FIELD_NAME => new CustomFieldDisabledOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,111 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class EmailType extends TypeAbstract {
const FIELD_TYPE = 'email';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'E-mail', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-at-email';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class FileType extends TypeAbstract {
const FIELD_TYPE = 'file';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'File Upload', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_PICKER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-upload';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredHiddenOption;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class HeadingType extends TypeAbstract {
const FIELD_TYPE = 'heading';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Heading', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OTHER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-heading';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredHiddenOption::FIELD_NAME => new RequiredHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class HiddenType extends TypeAbstract {
const FIELD_TYPE = 'hidden';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Hidden', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OTHER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-eye-slash';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredHiddenOption;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class HtmlType extends TypeAbstract {
const FIELD_TYPE = 'info';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'HTML', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OTHER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-code';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredHiddenOption::FIELD_NAME => new RequiredHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,88 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\ImageOption;
use WPDesk\FCF\Free\Settings\Option\ImageWidthOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredHiddenOption;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class ImageType extends TypeAbstract {
const FIELD_TYPE = 'image';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Image', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OTHER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-image';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredHiddenOption::FIELD_NAME => new RequiredHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
ImageOption::FIELD_NAME => new ImageOption(),
ImageWidthOption::FIELD_NAME => new ImageWidthOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class MultiCheckboxType extends TypeAbstract {
const FIELD_TYPE = 'multicheckbox';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Multi-checkbox', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-check-square-multi';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class MultiSelectType extends TypeAbstract {
const FIELD_TYPE = 'wpdeskmultiselect';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Multi-select', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-tasks';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,117 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Option\ValueMaxOption;
use WPDesk\FCF\Free\Settings\Option\ValueMinOption;
use WPDesk\FCF\Free\Settings\Option\ValueStepOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class NumberType extends TypeAbstract {
const FIELD_TYPE = 'number';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Number', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-digits';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValueMinOption::FIELD_NAME => new ValueMinOption(),
ValueMaxOption::FIELD_NAME => new ValueMaxOption(),
ValueStepOption::FIELD_NAME => new ValueStepOption(),
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,86 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredHiddenOption;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class ParagraphType extends TypeAbstract {
const FIELD_TYPE = 'paragraph';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Paragraph', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OTHER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-paragraph';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredHiddenOption::FIELD_NAME => new RequiredHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,115 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RegexMessageOption;
use WPDesk\FCF\Free\Settings\Option\RegexPhoneOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class PhoneType extends TypeAbstract {
const FIELD_TYPE = 'phone';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Phone', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-phone';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
RegexPhoneOption::FIELD_NAME => new RegexPhoneOption(),
RegexMessageOption::FIELD_NAME => new RegexMessageOption(),
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class RadioColorsType extends TypeAbstract {
const FIELD_TYPE = 'radiocolors';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Radio with colors', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-palette';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class RadioDefaultType extends DefaultType implements TypeInterface {
const FIELD_TYPE = 'radio';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
$options = parent::get_options_objects();
$options[ GeneralTab::TAB_NAME ][ FieldTypeOption::FIELD_NAME ] = new FieldTypeOption();
return $options;
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class RadioImagesType extends TypeAbstract {
const FIELD_TYPE = 'radioimages';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Radio with images', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-images';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class RadioType extends TypeAbstract {
const FIELD_TYPE = 'inspireradio';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Radio', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-list-ul';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,71 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class SelectType extends DefaultType implements TypeInterface {
const FIELD_TYPE = 'select';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Select', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_OPTION;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-tasks-alt';
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return false;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
$options = parent::get_options_objects();
$options[ GeneralTab::TAB_NAME ][ FieldTypeOption::FIELD_NAME ] = new FieldTypeOption();
return $options;
}
}

View File

@@ -0,0 +1,113 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DefaultOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class TextType extends TypeAbstract {
const FIELD_TYPE = 'text';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Text', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-font';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
DefaultOption::FIELD_NAME => new DefaultOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,113 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DefaultOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class TextareaType extends TypeAbstract {
const FIELD_TYPE = 'textarea';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Textarea', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-align-left';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
DefaultOption::FIELD_NAME => new DefaultOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,48 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
/**
* {@inheritdoc}
*/
class TimeType extends TypeAbstract {
const FIELD_TYPE = 'timepicker';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'Time', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_PICKER;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-clock';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
}

View File

@@ -0,0 +1,73 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Settings\Option\OptionIntegration;
/**
* {@inheritdoc}
*/
abstract class TypeAbstract implements TypeInterface {
/**
* {@inheritdoc}
*/
public function get_raw_field_type(): string {
return $this->get_field_type();
}
/**
* {@inheritdoc}
*/
public function get_field_group() {
return null;
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [];
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return '';
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return false;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return false;
}
/**
* {@inheritdoc}
*/
public function get_options_objects(): array {
return [];
}
/**
* {@inheritdoc}
*/
public function get_options(): array {
$options = [];
foreach ( $this->get_options_objects() as $option_objects ) {
foreach ( $option_objects as $option_object ) {
$options[] = ( new OptionIntegration( $option_object ) )->get_field_settings();
}
}
return $options;
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
/**
* Initializes integration for REST API route.
*/
class TypeIntegration {
/**
* Class object for field type.
*
* @var TypeInterface
*/
private $type_object;
/**
* Class constructor.
*
* @param TypeInterface $type_object Class object of field type.
*/
public function __construct( TypeInterface $type_object ) {
$this->type_object = $type_object;
}
/**
* {@inheritdoc}
*/
public function hooks() {
add_filter( 'flexible_checkout_fields/field_types', [ $this, 'add_field_type' ], 0 );
}
/**
* Adds new field type with settings of field type.
*
* @param array $types List of field types.
*
* @return array Updated list of field types.
* @internal
*/
public function add_field_type( array $types ): array {
$field_type = $this->type_object->get_field_type();
$types[ $field_type ] = $this->get_field_type_settings();
return $types;
}
/**
* Returns list of settings for field type.
*
* @return array Settings of field type.
*/
private function get_field_type_settings(): array {
return [
'type' => $this->type_object->get_field_type(),
'field_group' => $this->type_object->get_field_group(),
'reserved_field_names' => $this->type_object->get_reserved_field_names(),
'label' => $this->type_object->get_field_type_label(),
'icon' => $this->type_object->get_field_type_icon(),
'is_hidden' => $this->type_object->is_hidden(),
'is_available' => $this->type_object->is_available(),
'options' => $this->type_object->get_options(),
];
}
}

View File

@@ -0,0 +1,81 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
/**
* Interface of field type.
*/
interface TypeInterface {
/**
* Returns value of field type.
*
* @return string Field type.
*/
public function get_field_type(): string;
/**
* Returns value of field type used in HTML.
*
* @return string Field type.
*/
public function get_raw_field_type(): string;
/**
* Returns reserved field names, overriding this field type for selected field names.
*
* @return array Field names.
*/
public function get_reserved_field_names(): array;
/**
* Returns label of field type.
*
* @return string Field label.
*/
public function get_field_type_label(): string;
/**
* Returns key of field group.
*
* @return string|null
*/
public function get_field_group();
/**
* Returns field icon as CSS Class supported by Icomoon.
*
* @return string Field icon.
*/
public function get_field_type_icon(): string;
/**
* Returns whether field type is hidden.
*
* @return bool Status if field type is hidden.
*/
public function is_hidden(): bool;
/**
* Returns whether field type is available for plugin version.
*
* @return bool Status if field type is available.
*/
public function is_available(): bool;
/**
* Returns list of options objects for field settings.
*
* @return OptionInterface[] List of field options objects.
*/
public function get_options_objects(): array;
/**
* Returns list of options for field settings.
*
* @return array List of field options.
*/
public function get_options(): array;
}

View File

@@ -0,0 +1,111 @@
<?php
namespace WPDesk\FCF\Free\Field\Type;
use WPDesk\FCF\Free\Field\Types;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\CustomFieldOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldInfoOption;
use WPDesk\FCF\Free\Settings\Option\ExternalFieldOption;
use WPDesk\FCF\Free\Settings\Option\FieldTypeOption;
use WPDesk\FCF\Free\Settings\Option\FormattingOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PricingAdvOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
use WPDesk\FCF\Free\Settings\Tab\PricingTab;
/**
* {@inheritdoc}
*/
class UrlType extends TypeAbstract {
const FIELD_TYPE = 'url';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'URL', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_field_group(): string {
return Types::FIELD_GROUP_TEXT;
}
/**
* {@inheritdoc}
*/
public function get_field_type_icon(): string {
return 'icon-link';
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
ExternalFieldInfoOption::FIELD_NAME => new ExternalFieldInfoOption(),
PriorityOption::FIELD_NAME => new PriorityOption(),
FieldTypeOption::FIELD_NAME => new FieldTypeOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
CustomFieldOption::FIELD_NAME => new CustomFieldOption(),
ExternalFieldOption::FIELD_NAME => new ExternalFieldOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationOption::FIELD_NAME => new ValidationOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingOption::FIELD_NAME => new FormattingOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
PricingTab::TAB_NAME => [
PricingAdvOption::FIELD_NAME => new PricingAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,101 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOptionallyOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class WcAddress2Type extends TypeAbstract {
const FIELD_TYPE = 'wc_address2';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_address_2',
'shipping_address_2',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOptionallyOption::FIELD_NAME => new LabelOptionallyOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,99 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOnlyAddressOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class WcContactType extends TypeAbstract {
const FIELD_TYPE = 'wc_contact';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_phone',
'billing_email',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOnlyAddressOption::FIELD_NAME => new DisplayOnOnlyAddressOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredWcHiddenOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class WcCountryType extends TypeAbstract {
const FIELD_TYPE = 'wc_country';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_country',
'shipping_country',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredWcHiddenOption::FIELD_NAME => new RequiredWcHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
],
];
}
}

View File

@@ -0,0 +1,109 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class WcDefaultType extends TypeAbstract {
const FIELD_TYPE = 'wc_text';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_first_name',
'billing_last_name',
'billing_company',
'billing_address_1',
'billing_city',
'shipping_first_name',
'shipping_last_name',
'shipping_company',
'shipping_address_1',
'shipping_city',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnWithoutAddressOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\LogicAdvOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
use WPDesk\FCF\Free\Settings\Tab\LogicTab;
/**
* {@inheritdoc}
*/
class WcNotesType extends TypeAbstract {
const FIELD_TYPE = 'wc_notes';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'order_comments',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredOption::FIELD_NAME => new RequiredOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnWithoutAddressOption::FIELD_NAME => new DisplayOnWithoutAddressOption(),
],
LogicTab::TAB_NAME => [
LogicAdvOption::FIELD_NAME => new LogicAdvOption(),
],
];
}
}

View File

@@ -0,0 +1,96 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PlaceholderOption;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredWcHiddenOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationPostcodeOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class WcPostcodeType extends TypeAbstract {
const FIELD_TYPE = 'wc_postcode';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_postcode',
'shipping_postcode',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredWcHiddenOption::FIELD_NAME => new RequiredWcHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationPostcodeOption::FIELD_NAME => new ValidationPostcodeOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
PlaceholderOption::FIELD_NAME => new PlaceholderOption(),
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
],
];
}
}

View File

@@ -0,0 +1,96 @@
<?php
namespace WPDesk\FCF\Free\Field\Type\Wc;
use WPDesk\FCF\Free\Field\Type\TypeAbstract;
use WPDesk\FCF\Free\Settings\Option\CssOption;
use WPDesk\FCF\Free\Settings\Option\DisplayOnOption;
use WPDesk\FCF\Free\Settings\Option\EnabledOption;
use WPDesk\FCF\Free\Settings\Option\FormattingStateOption;
use WPDesk\FCF\Free\Settings\Option\FormattingWcOption;
use WPDesk\FCF\Free\Settings\Option\LabelOption;
use WPDesk\FCF\Free\Settings\Option\NameOption;
use WPDesk\FCF\Free\Settings\Option\OptionInterface;
use WPDesk\FCF\Free\Settings\Option\PriorityOption;
use WPDesk\FCF\Free\Settings\Option\RequiredWcHiddenOption;
use WPDesk\FCF\Free\Settings\Option\ValidationInfoOption;
use WPDesk\FCF\Free\Settings\Option\ValidationWcOption;
use WPDesk\FCF\Free\Settings\Tab\AdvancedTab;
use WPDesk\FCF\Free\Settings\Tab\AppearanceTab;
use WPDesk\FCF\Free\Settings\Tab\DisplayTab;
use WPDesk\FCF\Free\Settings\Tab\GeneralTab;
/**
* {@inheritdoc}
*/
class WcStateType extends TypeAbstract {
const FIELD_TYPE = 'wc_state';
/**
* {@inheritdoc}
*/
public function get_field_type(): string {
return self::FIELD_TYPE;
}
/**
* {@inheritdoc}
*/
public function get_field_type_label(): string {
return __( 'WooCommerce Default Field', 'flexible-checkout-fields' );
}
/**
* {@inheritdoc}
*/
public function get_reserved_field_names(): array {
return [
'billing_state',
'shipping_state',
];
}
/**
* {@inheritdoc}
*/
public function is_hidden(): bool {
return true;
}
/**
* {@inheritdoc}
*/
public function is_available(): bool {
return true;
}
/**
* Returns list of options for field settings.
*
* @return OptionInterface[] List of option fields.
*/
public function get_options_objects(): array {
return [
GeneralTab::TAB_NAME => [
PriorityOption::FIELD_NAME => new PriorityOption(),
EnabledOption::FIELD_NAME => new EnabledOption(),
RequiredWcHiddenOption::FIELD_NAME => new RequiredWcHiddenOption(),
LabelOption::FIELD_NAME => new LabelOption(),
NameOption::FIELD_NAME => new NameOption(),
],
AdvancedTab::TAB_NAME => [
ValidationWcOption::FIELD_NAME => new ValidationWcOption(),
ValidationInfoOption::FIELD_NAME => new ValidationInfoOption(),
],
AppearanceTab::TAB_NAME => [
CssOption::FIELD_NAME => new CssOption(),
],
DisplayTab::TAB_NAME => [
DisplayOnOption::FIELD_NAME => new DisplayOnOption(),
FormattingWcOption::FIELD_NAME => new FormattingWcOption(),
FormattingStateOption::FIELD_NAME => new FormattingStateOption(),
],
];
}
}

View File

@@ -0,0 +1,92 @@
<?php
namespace WPDesk\FCF\Free\Field;
use WPDesk\FCF\Free\Field\Type\CheckboxDefaultType;
use WPDesk\FCF\Free\Field\Type\CheckboxType;
use WPDesk\FCF\Free\Field\Type\ColorType;
use WPDesk\FCF\Free\Field\Type\DateType;
use WPDesk\FCF\Free\Field\Type\DefaultType;
use WPDesk\FCF\Free\Field\Type\EmailType;
use WPDesk\FCF\Free\Field\Type\FileType;
use WPDesk\FCF\Free\Field\Type\HeadingType;
use WPDesk\FCF\Free\Field\Type\HiddenType;
use WPDesk\FCF\Free\Field\Type\HtmlType;
use WPDesk\FCF\Free\Field\Type\ImageType;
use WPDesk\FCF\Free\Field\Type\MultiCheckboxType;
use WPDesk\FCF\Free\Field\Type\MultiSelectType;
use WPDesk\FCF\Free\Field\Type\NumberType;
use WPDesk\FCF\Free\Field\Type\ParagraphType;
use WPDesk\FCF\Free\Field\Type\PhoneType;
use WPDesk\FCF\Free\Field\Type\RadioColorsType;
use WPDesk\FCF\Free\Field\Type\RadioDefaultType;
use WPDesk\FCF\Free\Field\Type\RadioImagesType;
use WPDesk\FCF\Free\Field\Type\RadioType;
use WPDesk\FCF\Free\Field\Type\SelectType;
use WPDesk\FCF\Free\Field\Type\TextareaType;
use WPDesk\FCF\Free\Field\Type\TextType;
use WPDesk\FCF\Free\Field\Type\TimeType;
use WPDesk\FCF\Free\Field\Type\TypeIntegration;
use WPDesk\FCF\Free\Field\Type\UrlType;
use WPDesk\FCF\Free\Field\Type\Wc\WcAddress2Type;
use WPDesk\FCF\Free\Field\Type\Wc\WcContactType;
use WPDesk\FCF\Free\Field\Type\Wc\WcCountryType;
use WPDesk\FCF\Free\Field\Type\Wc\WcDefaultType;
use WPDesk\FCF\Free\Field\Type\Wc\WcNotesType;
use WPDesk\FCF\Free\Field\Type\Wc\WcPostcodeType;
use WPDesk\FCF\Free\Field\Type\Wc\WcStateType;
/**
* Supports management for field types.
*/
class Types {
const FIELD_GROUP_TEXT = 'text';
const FIELD_GROUP_OPTION = 'option';
const FIELD_GROUP_PICKER = 'picker';
const FIELD_GROUP_OTHER = 'other';
/**
* Initializes actions for class.
*
* @return void
*/
public function init() {
( new TypeIntegration( new TextType() ) )->hooks();
( new TypeIntegration( new TextareaType() ) )->hooks();
( new TypeIntegration( new NumberType() ) )->hooks();
( new TypeIntegration( new EmailType() ) )->hooks();
( new TypeIntegration( new PhoneType() ) )->hooks();
( new TypeIntegration( new UrlType() ) )->hooks();
( new TypeIntegration( new CheckboxType() ) )->hooks();
( new TypeIntegration( new MultiCheckboxType() ) )->hooks();
( new TypeIntegration( new SelectType() ) )->hooks();
( new TypeIntegration( new MultiSelectType() ) )->hooks();
( new TypeIntegration( new RadioType() ) )->hooks();
( new TypeIntegration( new RadioImagesType() ) )->hooks();
( new TypeIntegration( new RadioColorsType() ) )->hooks();
( new TypeIntegration( new ColorType() ) )->hooks();
( new TypeIntegration( new DateType() ) )->hooks();
( new TypeIntegration( new TimeType() ) )->hooks();
( new TypeIntegration( new FileType() ) )->hooks();
( new TypeIntegration( new HeadingType() ) )->hooks();
( new TypeIntegration( new ParagraphType() ) )->hooks();
( new TypeIntegration( new ImageType() ) )->hooks();
( new TypeIntegration( new HtmlType() ) )->hooks();
( new TypeIntegration( new HiddenType() ) )->hooks();
( new TypeIntegration( new DefaultType() ) )->hooks();
( new TypeIntegration( new CheckboxDefaultType() ) )->hooks();
( new TypeIntegration( new RadioDefaultType() ) )->hooks();
( new TypeIntegration( new WcDefaultType() ) )->hooks();
( new TypeIntegration( new WcContactType() ) )->hooks();
( new TypeIntegration( new WcAddress2Type() ) )->hooks();
( new TypeIntegration( new WcCountryType() ) )->hooks();
( new TypeIntegration( new WcPostcodeType() ) )->hooks();
( new TypeIntegration( new WcStateType() ) )->hooks();
( new TypeIntegration( new WcNotesType() ) )->hooks();
}
}

View File

@@ -0,0 +1,82 @@
<?php
namespace WPDesk\FCF\Free\Form;
use FcfVendor\WPDesk\PluginBuilder\Plugin\Hookable;
use FcfVendor\WPDesk_Plugin_Info;
/**
* Initiates loading of assets required to handle the form.
*/
class Assets implements Hookable {
const ASSETS_HANDLE_PATTERN = 'fcf-assets-%s';
/**
* @var WPDesk_Plugin_Info
*/
private $plugin_info;
public function __construct( WPDesk_Plugin_Info $plugin_info ) {
$this->plugin_info = $plugin_info;
}
/**
* {@inheritdoc}
*/
public function hooks() {
add_action( 'wp_enqueue_scripts', [ $this, 'load_front_assets' ] );
add_action( 'admin_print_scripts-post.php', [ $this, 'load_admin_order_assets' ] );
add_action( 'admin_print_scripts-post-new.php', [ $this, 'load_admin_order_assets' ] );
add_action( 'admin_print_scripts-profile.php', [ $this, 'load_checkout_assets' ] );
}
/**
* @return void
*
* @internal
*/
public function load_front_assets() {
if ( ! is_checkout() && ! is_account_page() ) {
return;
}
$this->load_checkout_assets();
}
/**
* @return void
*
* @internal
*/
public function load_admin_order_assets() {
global $post_type;
if ( $post_type !== 'shop_order' ) {
return;
}
$this->load_checkout_assets();
}
/**
* @return void
*
* @internal
*/
public function load_checkout_assets() {
wp_enqueue_style(
sprintf( self::ASSETS_HANDLE_PATTERN, 'new-admin-css' ),
sprintf( '%1$s/assets/css/new-front.css', untrailingslashit( $this->plugin_info->get_plugin_url() ) ),
[],
$this->plugin_info->get_version()
);
wp_enqueue_script(
sprintf( self::ASSETS_HANDLE_PATTERN, 'new-admin-js' ),
sprintf( '%1$s/assets/js/new-front.js', untrailingslashit( $this->plugin_info->get_plugin_url() ) ),
[ 'jquery' ],
$this->plugin_info->get_version(),
true
);
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace WPDesk\FCF\Free\Integration;
/**
* .
*/
class Field implements FieldInterface {
/**
* Settings of field.
*
* @var array
*/
private $field_data;
/**
* Key of field group.
*
* @var string
*/
private $field_group;
/**
* Class constructor.
*
* @param array $field_data Settings of field.
* @param string $field_group Key of field group.
*/
public function __construct( array $field_data, string $field_group ) {
$this->field_data = $field_data;
$this->field_group = $field_group;
}
/**
* Returns key of field.
*
* @return string Field key.
*/
public function get_field_key(): string {
return $this->field_data['name'];
}
/**
* Returns type of field.
*
* @return string Field type, if known.
*/
public function get_field_type(): string {
return $this->field_data['type'] ?? '';
}
/**
* Returns label of field.
*
* @return string Field label.
*/
public function get_field_label(): string {
return $this->field_data['label'];
}
/**
* Returns status if field is custom.
*
* @return bool If field is custom?
*/
public function is_custom_field(): bool {
return ( isset( $this->field_data['custom_field'] ) && $this->field_data['custom_field'] );
}
/**
* Returns key of field group.
*
* @return string Group key.
*/
public function get_group_key(): string {
return $this->field_group;
}
}

Some files were not shown because too many files have changed in this diff Show More