From 98aec7ffef9948d06e51d10ada6d1328450b178b Mon Sep 17 00:00:00 2001 From: Torben Lundsgaard Date: Mon, 2 Oct 2023 14:33:02 +0200 Subject: [PATCH] Remove old GUI --- assets/css/admin.css | 1874 ----------------- assets/js/admin.js | 1 - inc/main.php | 2 - package.json | 9 +- src/Admin/AbstractOptionsPage.php | 34 - src/Admin/MetaBox.php | 121 -- src/Admin/OptionTab.php | 114 - src/Admin/OptionTabs.php | 167 -- src/Admin/OptionsForm.php | 541 ----- src/js/admin.js | 78 - src/scss/admin.scss | 856 -------- src/views/admin-sidebar.php | 19 - src/views/integrations-metabox.php | 97 - src/views/tabs/general/container.php | 161 -- src/views/tabs/general/dashboard.php | 109 - .../tabs/general/google_consent_mode.php | 94 - src/views/tabs/general/misc.php | 115 - src/views/tabs/general/post_data.php | 100 - src/views/tabs/general/user_data.php | 61 - src/views/tabs/general/whats_new.php | 111 - src/views/tabs/help/help.php | 63 - src/views/tabs/help/support.php | 40 - src/views/tabs/integrations/cf7.php | 74 - src/views/tabs/integrations/edd.php | 120 -- src/views/tabs/integrations/integrations.php | 28 - src/views/tabs/integrations/woocommerce.php | 269 --- src/views/tutorials-metabox.php | 54 - 27 files changed, 3 insertions(+), 5309 deletions(-) delete mode 100644 assets/css/admin.css delete mode 100644 assets/js/admin.js delete mode 100644 src/Admin/MetaBox.php delete mode 100644 src/Admin/OptionTab.php delete mode 100644 src/Admin/OptionTabs.php delete mode 100644 src/Admin/OptionsForm.php delete mode 100644 src/js/admin.js delete mode 100644 src/scss/admin.scss delete mode 100644 src/views/admin-sidebar.php delete mode 100644 src/views/integrations-metabox.php delete mode 100644 src/views/tabs/general/container.php delete mode 100644 src/views/tabs/general/dashboard.php delete mode 100644 src/views/tabs/general/google_consent_mode.php delete mode 100644 src/views/tabs/general/misc.php delete mode 100644 src/views/tabs/general/post_data.php delete mode 100644 src/views/tabs/general/user_data.php delete mode 100644 src/views/tabs/general/whats_new.php delete mode 100644 src/views/tabs/help/help.php delete mode 100644 src/views/tabs/help/support.php delete mode 100644 src/views/tabs/integrations/cf7.php delete mode 100644 src/views/tabs/integrations/edd.php delete mode 100644 src/views/tabs/integrations/integrations.php delete mode 100644 src/views/tabs/integrations/woocommerce.php delete mode 100644 src/views/tutorials-metabox.php diff --git a/assets/css/admin.css b/assets/css/admin.css deleted file mode 100644 index c1c462d..0000000 --- a/assets/css/admin.css +++ /dev/null @@ -1,1874 +0,0 @@ -:root { - --gtmkit-background-white: #fff; - --gtmkit-background-grey: #f0f0f1; - --gtmkit-border-color: #ddd; - --gtmkit-text-color-heading: #454545; - --gtmkit-text-color-grey: #777777; - --gtmkit-color-primary: #3969bb; - --gtmkit-color-secondary: #00a32a; - --gtmkit-color-button: #3969bb; - --gtmkit-color-success: #00a32a; - --gtmkit-color-warning: orange; - --gtmkit-color-error: red; - --gtmkit-space-h: 2rem; - --gtmkit-space-v: 1.5rem; - --gtmkit-font-size-l: 18px; - --gtmkit-font-size-m: 16px; - --gtmkit-font-size-s: 14px; - --gtmkit-font-size-xl: 22px; - --gtmkit-font-size-xs: 12px; - --gtmkit-font-size-xxl: 24px; - --gtmkit-button-disabled: #bbb; - --gtmkit-button-disabled-bg: #F5F5F5; - --gtmkit-button-disabled-border: 1px solid #DDDDDD; - --gtmkit-button-disabled-text: #bbb; - --gtmkit-button-primary-bg: var(--gtmkit-color-primary); - --gtmkit-button-primary-bg-hover: #397EEB; - --gtmkit-button-primary-text: #fff; - --gtmkit-button-primary-text-hover: #fff; - --gtmkit-button-secondary-bg: #F8F8F8; - --gtmkit-button-secondary-bg-hover: #fff; - --gtmkit-button-secondary-border: #DDDDDD; - --gtmkit-button-secondary-text: #777; - --gtmkit-button-secondary-text-hover: #454545; -} - -/* -! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com -*/ -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: #e5e7eb; - /* 2 */ -} - -::before, -::after { - --tw-content: ""; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -5. Use the user's configured `sans` font-feature-settings by default. -6. Use the user's configured `sans` font-variation-settings by default. -*/ -html { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - -o-tab-size: 4; - tab-size: 4; - /* 3 */ - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - /* 4 */ - font-feature-settings: normal; - /* 5 */ - font-variation-settings: normal; - /* 6 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ -abbr:where([title]) { - -webkit-text-decoration: underline dotted; - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. -*/ -code, -kbd, -samp, -pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* -Add the correct font size in all browsers. -*/ -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ -button, -[type=button], -[type=reset], -[type=submit] { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ -[type=search] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ -input::-moz-placeholder, textarea::-moz-placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: #9ca3af; - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ -button, -[role=button] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ -img, -video { - max-width: 100%; - height: auto; -} - -/* Make elements with the HTML hidden attribute stay hidden by default */ -[hidden] { - display: none; -} - -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-gradient-from-position: ; - --tw-gradient-via-position: ; - --tw-gradient-to-position: ; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -.gtmkit-absolute { - position: absolute; -} - -.gtmkit-relative { - position: relative; -} - -.gtmkit-sticky { - position: sticky; -} - -.gtmkit-inset-0 { - inset: 0px; -} - -.gtmkit-z-10 { - z-index: 10; -} - -.gtmkit-m-4 { - margin: 1rem; -} - -.gtmkit-mx-auto { - margin-left: auto; - margin-right: auto; -} - -.gtmkit-my-16 { - margin-top: 4rem; - margin-bottom: 4rem; -} - -.gtmkit-my-4 { - margin-top: 1rem; - margin-bottom: 1rem; -} - -.gtmkit-my-6 { - margin-top: 1.5rem; - margin-bottom: 1.5rem; -} - -.gtmkit-my-8 { - margin-top: 2rem; - margin-bottom: 2rem; -} - -.\!gtmkit-mt-4 { - margin-top: 1rem !important; -} - -.gtmkit-mb-12 { - margin-bottom: 3rem; -} - -.gtmkit-mb-14 { - margin-bottom: 3.5rem; -} - -.gtmkit-mb-2 { - margin-bottom: 0.5rem; -} - -.gtmkit-mb-20 { - margin-bottom: 5rem; -} - -.gtmkit-mb-4 { - margin-bottom: 1rem; -} - -.gtmkit-mb-5 { - margin-bottom: 1.25rem; -} - -.gtmkit-mb-6 { - margin-bottom: 1.5rem; -} - -.gtmkit-mb-8 { - margin-bottom: 2rem; -} - -.gtmkit-ml-2 { - margin-left: 0.5rem; -} - -.gtmkit-ml-4 { - margin-left: 1rem; -} - -.gtmkit-mr-8 { - margin-right: 2rem; -} - -.gtmkit-mt-12 { - margin-top: 3rem; -} - -.gtmkit-mt-16 { - margin-top: 4rem; -} - -.gtmkit-mt-3 { - margin-top: 0.75rem; -} - -.gtmkit-mt-4 { - margin-top: 1rem; -} - -.gtmkit-mt-6 { - margin-top: 1.5rem; -} - -.gtmkit-mt-8 { - margin-top: 2rem; -} - -.gtmkit-block { - display: block; -} - -.gtmkit-inline-block { - display: inline-block; -} - -.gtmkit-flex { - display: flex; -} - -.gtmkit-list-item { - display: list-item; -} - -.gtmkit-hidden { - display: none; -} - -.gtmkit-h-0 { - height: 0px; -} - -.gtmkit-h-0\.5 { - height: 0.125rem; -} - -.gtmkit-h-2 { - height: 0.5rem; -} - -.gtmkit-h-2\.5 { - height: 0.625rem; -} - -.gtmkit-h-5 { - height: 1.25rem; -} - -.gtmkit-h-8 { - height: 2rem; -} - -.gtmkit-min-h-\[175px\] { - min-height: 175px; -} - -.gtmkit-w-2 { - width: 0.5rem; -} - -.gtmkit-w-2\.5 { - width: 0.625rem; -} - -.gtmkit-w-3\/4 { - width: 75%; -} - -.gtmkit-w-5 { - width: 1.25rem; -} - -.gtmkit-w-8 { - width: 2rem; -} - -.gtmkit-w-\[225px\] { - width: 225px; -} - -.gtmkit-w-\[250px\] { - width: 250px; -} - -.gtmkit-w-full { - width: 100%; -} - -.gtmkit-max-w-3xl { - max-width: 48rem; -} - -.gtmkit-max-w-\[1536px\] { - max-width: 1536px; -} - -.gtmkit-max-w-\[90\%\] { - max-width: 90%; -} - -.gtmkit-max-w-lg { - max-width: 32rem; -} - -.gtmkit-max-w-max { - max-width: -moz-max-content; - max-width: max-content; -} - -.gtmkit-max-w-md { - max-width: 28rem; -} - -.gtmkit-max-w-xl { - max-width: 36rem; -} - -.gtmkit-shrink-0 { - flex-shrink: 0; -} - -.gtmkit-table-fixed { - table-layout: fixed; -} - -.gtmkit-grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); -} - -.gtmkit-items-center { - align-items: center; -} - -.gtmkit-justify-center { - justify-content: center; -} - -.gtmkit-justify-between { - justify-content: space-between; -} - -.gtmkit-gap-16 { - gap: 4rem; -} - -.gtmkit-gap-6 { - gap: 1.5rem; -} - -.gtmkit-space-x-8 > :not([hidden]) ~ :not([hidden]) { - --tw-space-x-reverse: 0; - margin-right: calc(2rem * var(--tw-space-x-reverse)); - margin-left: calc(2rem * (1 - var(--tw-space-x-reverse))); -} - -.gtmkit-space-y-1 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.25rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.25rem * var(--tw-space-y-reverse)); -} - -.gtmkit-space-y-2 > :not([hidden]) ~ :not([hidden]) { - --tw-space-y-reverse: 0; - margin-top: calc(0.5rem * (1 - var(--tw-space-y-reverse))); - margin-bottom: calc(0.5rem * var(--tw-space-y-reverse)); -} - -.gtmkit-whitespace-nowrap { - white-space: nowrap; -} - -.gtmkit-rounded { - border-radius: 0.25rem; -} - -.gtmkit-rounded-full { - border-radius: 9999px; -} - -.gtmkit-rounded-md { - border-radius: 0.375rem; -} - -.gtmkit-border { - border-width: 1px; -} - -.gtmkit-border-2 { - border-width: 2px; -} - -.gtmkit-border-y { - border-top-width: 1px; - border-bottom-width: 1px; -} - -.gtmkit-border-b { - border-bottom-width: 1px; -} - -.gtmkit-border-b-2 { - border-bottom-width: 2px; -} - -.gtmkit-border-b-4 { - border-bottom-width: 4px; -} - -.gtmkit-border-t-4 { - border-top-width: 4px; -} - -.gtmkit-border-color-border { - border-color: var(--gtmkit-border-color); -} - -.gtmkit-border-color-grey { - border-color: var(--gtmkit-text-color-grey); -} - -.gtmkit-border-color-primary { - border-color: var(--gtmkit-color-primary); -} - -.gtmkit-border-white { - --tw-border-opacity: 1; - border-color: rgb(255 255 255/var(--tw-border-opacity)); -} - -.gtmkit-border-b-color-primary { - border-bottom-color: var(--gtmkit-color-primary); -} - -.gtmkit-bg-color-border { - background-color: var(--gtmkit-border-color); -} - -.gtmkit-bg-color-button-disabled { - background-color: var(--gtmkit-button-disabled); -} - -.gtmkit-bg-color-primary { - background-color: var(--gtmkit-color-primary); -} - -.gtmkit-bg-color-success { - background-color: var(--gtmkit-color-success); -} - -.gtmkit-bg-white { - --tw-bg-opacity: 1; - background-color: rgb(255 255 255/var(--tw-bg-opacity)); -} - -.gtmkit-p-3 { - padding: 0.75rem; -} - -.gtmkit-p-6 { - padding: 1.5rem; -} - -.gtmkit-p-8 { - padding: 2rem; -} - -.\!gtmkit-px-6 { - padding-left: 1.5rem !important; - padding-right: 1.5rem !important; -} - -.\!gtmkit-px-8 { - padding-left: 2rem !important; - padding-right: 2rem !important; -} - -.\!gtmkit-py-4 { - padding-top: 1rem !important; - padding-bottom: 1rem !important; -} - -.\!gtmkit-py-6 { - padding-top: 1.5rem !important; - padding-bottom: 1.5rem !important; -} - -.gtmkit-px-16 { - padding-left: 4rem; - padding-right: 4rem; -} - -.gtmkit-px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} - -.gtmkit-px-20 { - padding-left: 5rem; - padding-right: 5rem; -} - -.gtmkit-px-3 { - padding-left: 0.75rem; - padding-right: 0.75rem; -} - -.gtmkit-px-4 { - padding-left: 1rem; - padding-right: 1rem; -} - -.gtmkit-px-5 { - padding-left: 1.25rem; - padding-right: 1.25rem; -} - -.gtmkit-px-6 { - padding-left: 1.5rem; - padding-right: 1.5rem; -} - -.gtmkit-px-8 { - padding-left: 2rem; - padding-right: 2rem; -} - -.gtmkit-py-1 { - padding-top: 0.25rem; - padding-bottom: 0.25rem; -} - -.gtmkit-py-12 { - padding-top: 3rem; - padding-bottom: 3rem; -} - -.gtmkit-py-2 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; -} - -.gtmkit-py-3 { - padding-top: 0.75rem; - padding-bottom: 0.75rem; -} - -.gtmkit-py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.gtmkit-py-6 { - padding-top: 1.5rem; - padding-bottom: 1.5rem; -} - -.gtmkit-py-8 { - padding-top: 2rem; - padding-bottom: 2rem; -} - -.gtmkit-pb-6 { - padding-bottom: 1.5rem; -} - -.gtmkit-pb-\[18px\] { - padding-bottom: 18px; -} - -.gtmkit-pt-5 { - padding-top: 1.25rem; -} - -.gtmkit-text-left { - text-align: left; -} - -.gtmkit-text-center { - text-align: center; -} - -.gtmkit-text-2xl { - font-size: 1.5rem; - line-height: 2rem; -} - -.gtmkit-text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} - -.gtmkit-text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} - -.gtmkit-text-base { - font-size: 1rem; - line-height: 1.5rem; -} - -.gtmkit-text-lg { - font-size: 1.125rem; - line-height: 1.75rem; -} - -.gtmkit-text-sm { - font-size: 0.875rem; - line-height: 1.25rem; -} - -.gtmkit-text-xl { - font-size: 1.25rem; - line-height: 1.75rem; -} - -.gtmkit-text-xs { - font-size: 0.75rem; - line-height: 1rem; -} - -.gtmkit-font-bold { - font-weight: 700; -} - -.gtmkit-font-light { - font-weight: 300; -} - -.gtmkit-font-medium { - font-weight: 500; -} - -.gtmkit-font-semibold { - font-weight: 600; -} - -.gtmkit-uppercase { - text-transform: uppercase; -} - -.gtmkit-leading-5 { - line-height: 1.25rem; -} - -.gtmkit-text-color-grey { - color: var(--gtmkit-text-color-grey); -} - -.gtmkit-text-color-heading { - color: var(--gtmkit-text-color-heading); -} - -.gtmkit-text-color-primary { - color: var(--gtmkit-color-primary); -} - -.gtmkit-text-red-600 { - --tw-text-opacity: 1; - color: rgb(220 38 38/var(--tw-text-opacity)); -} - -.gtmkit-text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255/var(--tw-text-opacity)); -} - -.gtmkit-underline { - text-decoration-line: underline; -} - -.gtmkit-opacity-100 { - opacity: 1; -} - -.gtmkit-outline-0 { - outline-width: 0px; -} - -.gtmkit-drop-shadow-md { - --tw-drop-shadow: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); - filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); -} - -.gtmkit-transition-opacity { - transition-property: opacity; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} - -.gtmkit-duration-500 { - transition-duration: 500ms; -} - -.hover\:gtmkit-border-color-grey:hover { - border-color: var(--gtmkit-text-color-grey); -} - -.hover\:gtmkit-underline:hover { - text-decoration-line: underline; -} - -.disabled\:\!gtmkit-bg-color-button-disabled:disabled { - background-color: var(--gtmkit-button-disabled) !important; -} - -.disabled\:\!gtmkit-text-color-grey:disabled { - color: var(--gtmkit-text-color-grey) !important; -} - -.gtmkit-group:hover .group-hover\:gtmkit-block { - display: block; -} - -.gtmkit-group:hover .group-hover\:gtmkit-hidden { - display: none; -} - -@media (min-width: 768px) { - .md\:gtmkit-mt-10 { - margin-top: 2.5rem; - } - .md\:gtmkit-mt-12 { - margin-top: 3rem; - } - .md\:gtmkit-mt-16 { - margin-top: 4rem; - } - .md\:gtmkit-mt-8 { - margin-top: 2rem; - } - .md\:gtmkit-grid { - display: grid; - } - .md\:gtmkit-max-w-xl { - max-width: 36rem; - } -} -@media (min-width: 1024px) { - .lg\:gtmkit-flex { - display: flex; - } - .lg\:gtmkit-grid { - display: grid; - } - .lg\:gtmkit-w-1\/2 { - width: 50%; - } - .lg\:gtmkit-grid-cols-2 { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .lg\:gtmkit-justify-between { - justify-content: space-between; - } -} -@media (min-width: 1280px) { - .xl\:gtmkit-grid-cols-3 { - grid-template-columns: repeat(3, minmax(0, 1fr)); - } -} -@media (min-width: 1536px) { - .\32 xl\:gtmkit-w-1\/3 { - width: 33.333333%; - } -} -.gtmkit-admin-page #wpcontent { - padding-left: 0 !important; -} -.gtmkit-admin-page #wpcontent *, -.gtmkit-admin-page #wpcontent *::before, -.gtmkit-admin-page #wpcontent *::after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.gtmkit_header { - padding: 24px var(--gtmkit-space-h); -} -.gtmkit_header h1#gtmkit-title { - margin: 0; - display: flex; - align-items: center; - font-size: 28px; - font-weight: 500; -} -.gtmkit_header h1#gtmkit-title img { - margin-right: 1em; -} - -.gtmkit-header-navigation { - align-items: center; - background: var(--gtmkit-background-white); - border-color: var(--gtmkit-border-color); - border-style: solid; - border-width: 1px 0; - display: flex; - justify-content: space-between; - min-height: 60px; - padding: 0 var(--gtmkit-space-h); -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper { - display: flex; - align-items: center; - margin: 0; -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper li { - margin-bottom: 0; - margin-right: 2rem; - outline: 0 !important; - border-top: none; -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a { - border-bottom: 4px solid var(--gtmkit-background-white); - color: var(--gtmkit-text-color-grey); - display: block; - font-weight: 600; - padding: 20px 0 18px 0; - text-decoration: none; - transition: border 300ms ease; - box-shadow: none; -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a.active, .gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a.active:focus, .gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a.active:focus:active { - border-color: var(--gtmkit-color-primary); - color: var(--gtmkit-text-color-heading); - border-top: none; -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a.active:hover, .gtmkit-header-navigation .gtmkit-nav-tab-wrapper li a:hover { - border-color: var(--gtmkit-text-color-grey); -} -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper .nav-tab-active, -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper .nav-tab-active:focus, -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper .nav-tab-active:focus:active, -.gtmkit-header-navigation .gtmkit-nav-tab-wrapper .nav-tab-active:hover { - border-color: var(--gtmkit-color-primary); - color: var(--gtmkit-text-color-heading); -} - -.gtmkit-tab { - padding: 24px var(--gtmkit-space-h); - display: none; - max-width: 1920px; -} -.gtmkit-tab.active { - display: block; -} -.gtmkit-tab label.select, -.gtmkit-tab label.textinput { - float: left; - width: 200px; - margin: 5px 0; -} -.gtmkit-tab input.textinput, .gtmkit-tab select, .gtmkit-tab textarea { - width: 400px; -} -.gtmkit-tab .description { - margin: 5px; -} -.gtmkit-tab .success { - color: var(--gtmkit-color-success); -} -.gtmkit-tab .error { - color: var(--gtmkit-color-error); -} -.gtmkit-tab input[type=radio] { - margin-bottom: -4px; -} -.gtmkit-tab .form-table { - margin-top: 20px; -} -.gtmkit-tab .form-table th, -.gtmkit-tab .form-table td { - padding-top: 16px; - padding-bottom: 16px; -} -.gtmkit-tab .form-table td fieldset label { - font-size: 13px; -} -.gtmkit-tab .form-table td fieldset label.radio { - line-height: 1; -} -.gtmkit-tab .gtmkit-form-legend { - font-size: 14px; - font-weight: 600; -} - -.gtmkit-metabox { - background: var(--gtmkit-background-white); - border: 1px solid var(--gtmkit-border-color); - border-radius: 4px; -} - -.gtmkit-items-list { - padding: calc(var(--gtmkit-space-v) / 2) 12px 0; - width: 100%; -} -.gtmkit-items-list ul { - align-content: stretch; - display: flex; - flex-wrap: wrap; - justify-content: flex-start; - margin-bottom: 0; -} -.gtmkit-items-list.single-item { - padding-left: 0; -} -.gtmkit-items-list.single-item ul { - justify-content: space-between; -} -.gtmkit-items-list.single-item .gtmkit-list-item { - margin-left: 0; - margin-right: 0; -} - -.gtmkit-list-item { - background: var(--gtmkit-background-white); - border: 1px solid var(--gtmkit-border-color); - border-radius: 4px; - margin-bottom: 24px; - margin-right: 12px; - margin-left: 12px; - max-width: 100%; - padding: 16px 20px; - position: relative; - width: 100%; -} -.gtmkit-list-item.disabled { - opacity: 0.5; -} -.gtmkit-list-item h3 { - font-size: var(--gtmkit-font-size-m); - line-height: 1.2; - margin: 0; - overflow: hidden; - position: relative; - text-overflow: ellipsis; - white-space: nowrap; -} -.gtmkit-list-item p { - margin-bottom: 0; -} -.gtmkit-list-item .gtmkit-list-item-pill { - position: absolute; - top: 16px; - right: 16px; - font-size: 12px; - font-weight: 700; - text-transform: uppercase; - line-height: 1; - padding: 4px 8px; - border-radius: 40px; -} -.gtmkit-list-item .gtmkit-list-item-pill.gtmkit-list-item-pill-green { - background: var(--gtmkit-color-success); - color: #fff; -} -.gtmkit-list-item .gtmkit-list-item-pill.gtmkit-list-item-pill-orange { - background: var(--gtmkit-color-warning); - color: #fff; -} -.gtmkit-list-item .gtmkit-list-item-pill.gtmkit-list-item-pill-red { - background: var(--gtmkit-color-error); - color: #fff; -} -.gtmkit-list-item .gtmkit-list-item-pill.gtmkit-list-item-pill-grey { - background: var(--gtmkit-button-disabled); - color: #fff; -} -.gtmkit-list-item.gtmkit-list-item-has-pill h3 { - max-width: calc(100% - 60px); -} - -@media (min-width: 1024px) { - .gtmkit-list-item { - width: calc(50% - 24px); - } -} -@media (min-width: 1440px) { - .gtmkit-list-item { - width: calc(33.3333333333% - 24px); - } -} -.gtmkit-list-item-actions { - position: relative; - min-height: 40px; -} - -.gtmkit-list-item:hover .gtmkit-list-item-description, .gtmkit-list-item:focus .gtmkit-list-item-description { - opacity: 0; -} - -.gtmkit-list-item:hover .gtmkit-list-item-buttons, .gtmkit-list-item:focus .gtmkit-list-item-buttons { - opacity: 1; -} - -.gtmkit-list-item-buttons { - display: flex; - justify-content: space-between; - opacity: 0; - position: absolute; - top: 0; - width: 100%; - z-index: 10; -} -.gtmkit-list-item-buttons .gtmkit-button { - flex-grow: 1; - margin-left: 10px; - text-align: center; - background-color: var(--gtmkit-button-primary-bg); - border: 1px solid var(--gtmkit-button-primary-bg); - border-radius: 4px; - color: var(--gtmkit-button-primary-text); - cursor: pointer; - display: inline-block; - font-size: var(--gtmkit-font-size-s); - font-weight: 700; - line-height: 1; - padding: 10px 16px; - text-decoration: none; -} -.gtmkit-list-item-buttons .gtmkit-button.gtmkit-button-secondary { - background-color: var(--gtmkit-button-secondary-bg); - border: 1px solid var(--gtmkit-button-secondary-border); - color: var(--gtmkit-button-secondary-text); -} -.gtmkit-list-item-buttons .gtmkit-button.gtmkit-button-secondary:hover, .gtmkit-list-item-buttons .gtmkit-button.gtmkit-button-secondary:focus { - background-color: var(--gtmkit-button-secondary-bg-hover); - border-color: var(--gtmkit-button-secondary-border); - color: var(--gtmkit-button-secondary-text-hover); -} -.gtmkit-list-item-buttons .gtmkit-button:first-child { - margin-left: 0; -} -.gtmkit-list-item-buttons .gtmkit-button:hover, .gtmkit-list-item-buttons .gtmkit-button:focus { - background-color: var(--gtmkit-button-primary-bg-hover); - border-color: var(--gtmkit-button-primary-bg-hover); - color: var(--gtmkit-button-primary-text-hover); -} - -#gtmkit-submit-container { - padding: 24px var(--gtmkit-space-h); -} - -#sidebar-container { - width: 300px; - padding-left: 20px; - padding-top: 10px; -} -#sidebar-container h3 { - padding: 8px 12px; - margin: 0; - line-height: 1.4; -} -#sidebar-container ul { - margin: 1em; -} -#sidebar-container a { - text-decoration: none; -} -#sidebar-container .inside { - background: var(--gtmkit-background-white); - border-left: 0; - border-right: 0; -} -#sidebar-container #credit { - text-align: center; - font-size: 10px; - color: #888; - line-height: 3em; - margin: 3em 0; - min-width: 255px; -} - -.gtmkit-clear:before { - content: " "; - display: table; -} -.gtmkit-clear:after { - clear: both; - content: " "; - display: table; -} - -.gtmkit-setting-row { - border-bottom: 1px solid #e4e4e4; - padding: 30px 0; - font-size: 14px; - line-height: 1.3; -} -.gtmkit-setting-row:first-of-type { - padding-top: 10px !important; -} -.gtmkit-setting-row.inactive { - display: none; -} -.gtmkit-setting-row .gtmkit-setting-mid-row-sep { - background: #e4e4e4; - height: 1px; - border: 0; - margin: 15px 0; -} -.gtmkit-setting-row.section-heading { - padding: 20px 0; -} -.gtmkit-setting-row.section-heading.no-desc h2, -.gtmkit-setting-row.section-heading.no-desc h4 { - margin: 0; -} -.gtmkit-setting-row.section-heading .gtmkit-setting-field { - margin: 0; - max-width: 1005px; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox input[type=checkbox] { - float: left; - margin: 1px 0 0 0; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox input[type=checkbox] + label { - margin: 0 0 0 8px; - vertical-align: baseline; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox .desc { - margin: 0 0 0 30px; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox input[type=checkbox] + label + .desc { - margin: 8px 0 0 0; -} -.gtmkit-setting-row.gtmkit-setting-row-text .gtmkit-setting-label, .gtmkit-setting-row.gtmkit-setting-row-password .gtmkit-setting-label, .gtmkit-setting-row.gtmkit-setting-row-number .gtmkit-setting-label, .gtmkit-setting-row.gtmkit-setting-row-email .gtmkit-setting-label { - padding-top: 8px; -} -.gtmkit-setting-row.gtmkit-setting-row-select .gtmkit-setting-label { - padding-top: 8px; -} -.gtmkit-setting-row.gtmkit-setting-row-radio .gtmkit-setting-field input[type=radio] { - margin: -3px 10px 0 0; -} -.gtmkit-setting-row.gtmkit-setting-row-radio .gtmkit-setting-field label { - margin-right: 30px; - display: inline-block; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field label { - vertical-align: middle; - display: inline-block; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox] { - position: absolute; - top: auto; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); - width: 1px; - height: 1px; - white-space: nowrap; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked + .gtmkit-setting-toggle-switch { - background-color: #00a32a; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked + .gtmkit-setting-toggle-switch:before { - -webkit-transform: translateX(16px); - -ms-transform: translateX(16px); - transform: translateX(16px); -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled:checked:hover + .gtmkit-setting-toggle-switch, .gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled:not(:checked):hover + .gtmkit-setting-toggle-switch { - box-shadow: none; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled:not(:checked):hover + .gtmkit-setting-toggle-switch { - background-color: #ddd; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled + .gtmkit-setting-toggle-switch { - background-color: #ddd; - cursor: default; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled:checked + .gtmkit-setting-toggle-switch { - background-color: #24ff5c; - cursor: default; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label { - display: inline-block; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label + .gtmkit-setting-toggle-unchecked-label { - display: none; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label, .gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:disabled + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-unchecked-label { - color: #aaaaaa; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked:hover + .gtmkit-setting-toggle-switch, .gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:checked:focus + .gtmkit-setting-toggle-switch { - box-shadow: 0 0 0 1px #fff, 0 0 0 3px #00a32a; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:not(:checked):hover + .gtmkit-setting-toggle-switch, .gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field input[type=checkbox]:not(:checked):focus + .gtmkit-setting-toggle-switch { - background-color: #999; - box-shadow: 0 0 0 1px #fff, 0 0 0 3px #999; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field .gtmkit-setting-toggle-unchecked-label, -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field .gtmkit-setting-toggle-checked-label { - text-transform: uppercase; - font-weight: 400; - color: #777; - font-size: 13px; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field .gtmkit-setting-toggle-checked-label { - display: none; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field .gtmkit-setting-toggle-switch { - position: relative; - cursor: pointer; - background-color: #ccc; - border-radius: 15px; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - vertical-align: middle; - display: inline-block; - margin: 0 5px 0 0; - width: 36px; - height: 20px; -} -.gtmkit-setting-row.gtmkit-setting-row-checkbox-toggle .gtmkit-setting-field .gtmkit-setting-toggle-switch:before { - position: absolute; - content: ""; - height: 16px; - width: 16px; - left: 2px; - top: 2px; - background-color: #fff; - border-radius: 50%; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} -.gtmkit-setting-row h2, .gtmkit-setting-row h4 { - color: #444; - font-size: 20px; - font-weight: 700; - margin: 0 0 6px 0; -} -.gtmkit-setting-row h2 { - margin-bottom: 15px; -} -.gtmkit-setting-row h3 { - color: #444; - font-size: 24px; - font-weight: 600; - margin: 0 0 20px 0; -} -.gtmkit-setting-row h5 { - color: #444; - font-size: 16px; - font-weight: 600; - margin: 0 0 20px 0; -} -.gtmkit-setting-row p { - margin: 12px 0 0; - font-size: 14px; - line-height: 1.5em; -} -.gtmkit-setting-row p:first-of-type { - margin: 8px 0 0; -} -.gtmkit-setting-row p.desc { - font-style: italic; - color: #777; -} -.gtmkit-setting-row p.buttonned { - margin-top: 30px; -} -.gtmkit-setting-row ul { - margin: 8px 0 0; -} -.gtmkit-setting-row ul.list li { - margin-left: 20px; - list-style-type: disc; -} -.gtmkit-setting-row table.actions-list td, .gtmkit-setting-row table.actions-list th { - padding: 5px 5px 5px 0; - text-align: left; -} -.gtmkit-setting-row table.actions-list td.email { - padding-right: 2em; -} -.gtmkit-setting-row table.actions-list td.status { - width: 100px; -} -.gtmkit-setting-row table.actions-list td.actions a { - border-bottom: 1px solid; - display: inline-block; - margin-right: 5px; - text-decoration: none; -} -.gtmkit-setting-row table.actions-list td.actions a[class*=delete], .gtmkit-setting-row table.actions-list td.actions a[class*=error] { - color: #a00; -} -.gtmkit-setting-row table.actions-list td.actions a[class*=delete]:hover, .gtmkit-setting-row table.actions-list td.actions a[class*=delete]:active, .gtmkit-setting-row table.actions-list td.actions a[class*=delete]:focus, .gtmkit-setting-row table.actions-list td.actions a[class*=error]:hover, .gtmkit-setting-row table.actions-list td.actions a[class*=error]:active, .gtmkit-setting-row table.actions-list td.actions a[class*=error]:focus { - color: #440000; -} -.gtmkit-setting-row input[type=text], -.gtmkit-setting-row input[type=email], -.gtmkit-setting-row input[type=number], -.gtmkit-setting-row input[type=password], -.gtmkit-setting-row select { - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - box-shadow: none; - color: #333; - display: inline-block; - vertical-align: middle; - padding: 7px 12px; - margin: 0 10px 0 0; - width: 400px; - min-height: 35px; - line-height: 1.3; -} -.gtmkit-setting-row input[type=text][readonly], -.gtmkit-setting-row input[type=email][readonly], -.gtmkit-setting-row input[type=number][readonly], -.gtmkit-setting-row input[type=password][readonly], -.gtmkit-setting-row select[readonly] { - background-color: #f9f9f9; -} -.gtmkit-setting-row input[type=text].small-text, -.gtmkit-setting-row input[type=email].small-text, -.gtmkit-setting-row input[type=number].small-text, -.gtmkit-setting-row input[type=password].small-text, -.gtmkit-setting-row select.small-text { - width: 75px; -} -.gtmkit-setting-row input[type=text]:focus, -.gtmkit-setting-row input[type=email]:focus, -.gtmkit-setting-row input[type=number]:focus, -.gtmkit-setting-row input[type=password]:focus, -.gtmkit-setting-row select:focus { - border: 1px solid #016AAB; - box-shadow: 0 0 0 1px #016AAB; - outline: none; -} -.gtmkit-setting-row input[type=text]:disabled, -.gtmkit-setting-row input[type=email]:disabled, -.gtmkit-setting-row input[type=number]:disabled, -.gtmkit-setting-row input[type=password]:disabled, -.gtmkit-setting-row select:disabled { - opacity: 0.6; -} -.gtmkit-setting-row input[type=checkbox]:focus, -.gtmkit-setting-row input[type=radio]:focus { - border: 1px solid #016AAB; - box-shadow: 0 0 0 1px #016AAB; - outline: none; -} -.gtmkit-setting-row .gtmkit-dashicons-yes-alt-green.gtmkit-animate { - -webkit-animation: gtmkit-fade-in-stop-out 1s linear; - animation: gtmkit-fade-in-stop-out 1s linear; -} -.gtmkit-setting-row .gtmkit-dashicons-yes-alt-green.gtmkit-success { - color: #00a32a; -} - -.gtmkit-setting-label { - display: block; - float: left; - width: 225px; - padding: 0 20px 0 0; -} -.gtmkit-setting-label label { - display: block; - font-weight: 600; -} - -.gtmkit-setting-field { - display: block; - margin: 0 0 0 225px; - max-width: 800px; -} -.gtmkit-setting-field hr { - margin: 20px 0; -} -.gtmkit-setting-field .gtmkit-setting-field-row { - display: flex; - flex-wrap: wrap; -} -.gtmkit-setting-field .gtmkit-setting-field-row > .gtmkit-btn { - margin-right: 10px; -} - -.gtmkit_radio_block { - line-height: 20px; -} - -[class^=gtmkit-dashicons] { - display: inline-block; - width: 20px; - height: 20px; -} - -.gtmkit-dashicons-yes-alt-green { - background-image: url("../images/icons/dashicons/dashicons-yes-alt-green.svg"); -} - -.gtmkit-dashicons-pdf-gray { - background-image: url("../images/icons/dashicons/dashicons-pdf-grey.svg"); -} - -code { - font-style: normal; -} - -.gtmkit_section_message { - width: 75%; -} -.gtmkit_section_message.space-top { - margin-top: 100px; -} -.gtmkit_section_message.warning { - margin-top: 10px; - width: fit-content; -} -.gtmkit_section_message h3 { - padding: 8px 12px; - margin: 0; - line-height: 1.4; -} -.gtmkit_section_message h3 .version { - color: #777; - font-size: 12px; - margin-left: 8px; - font-weight: 400; -} -.gtmkit_section_message .inside { - margin: 1em; -} -.gtmkit_section_message ul li { - margin-bottom: 12px; -} - -/*# sourceMappingURL=admin.css.map */ diff --git a/assets/js/admin.js b/assets/js/admin.js deleted file mode 100644 index 6fec47c..0000000 --- a/assets/js/admin.js +++ /dev/null @@ -1 +0,0 @@ -jQuery(function(i){i(document).ready(function(){i("#gtmkit-tabs").find("a").on("click",function(){i("#gtmkit-tabs").find("a").removeClass("active"),i(".gtmkit-tab").removeClass("active");var t=i(this).attr("id").replace("-tab",""),t=i("#"+t);t.addClass("active"),i(this).addClass("active"),t.hasClass("nosave")?i("#gtmkit-submit-container").hide():i("#gtmkit-submit-container").show()}),i(".gtmkit-items-list").find("a.gtmkit-open-tab").on("click",function(){i("#gtmkit-tabs").find("a").removeClass("active"),i(".gtmkit-tab").removeClass("active");var t=i(this).attr("id").replace("gtmkit-open-tab-",""),a=i("#"+t),t=i("#"+t+"-tab");a.addClass("active"),t.addClass("active"),a.hasClass("nosave")?i("#gtmkit-submit-container").hide():i("#gtmkit-submit-container").show()});{let t=window.location.hash.replace("#top#","");""!==(t=-1!==t.search("#top")?window.location.hash.replace("#top%23",""):t)&&"#"!==t.charAt(0)||(t=jQuery(".gtmkit-tab").attr("id")),jQuery("#"+t).addClass("active"),jQuery("#"+t+"-tab").addClass("active").trigger("click")}})}); \ No newline at end of file diff --git a/inc/main.php b/inc/main.php index be81e50..9240e00 100644 --- a/inc/main.php +++ b/inc/main.php @@ -11,7 +11,6 @@ use TLA_Media\GTM_Kit\Admin\Analytics; use TLA_Media\GTM_Kit\Admin\HelpOptionsPage; use TLA_Media\GTM_Kit\Admin\IntegrationsOptionsPage; -use TLA_Media\GTM_Kit\Admin\MetaBox; use TLA_Media\GTM_Kit\Admin\SetupWizard; use TLA_Media\GTM_Kit\Common\RestAPIServer; use TLA_Media\GTM_Kit\Common\Util; @@ -135,7 +134,6 @@ function gtmkit_admin_init(): void { $util = new Util( $rest_api_server ); ( new SetupWizard( $options, $util ) )->hooks(); - MetaBox::register( $options ); Analytics::register( $options, $util ); GeneralOptionsPage::register( $options, $util ); IntegrationsOptionsPage::register( $options, $util ); diff --git a/package.json b/package.json index 199f7ba..3c92a43 100644 --- a/package.json +++ b/package.json @@ -21,22 +21,18 @@ }, "scripts": { "build": "wp-scripts build src/js/frontend/woocommerce-blocks.js --output-path=build/frontend", - "build:assets": "npm run clean:assets && npm run build:css && npm run build:js && npm run copy:images", - "build:css": "npm run compile:sass && postcss assets/css/admin.css --output assets/css/admin.css", - "build:js": "npm run uglify:woocommerce && npm run uglify:woocommerce-checkout && npm run uglify:edd && npm run uglify:edd-checkout && npm run uglify:cf7 && npm run uglify:admin", + "build:assets": "npm run clean:assets && npm run build:js && npm run copy:images", + "build:js": "npm run uglify:woocommerce && npm run uglify:woocommerce-checkout && npm run uglify:edd && npm run uglify:edd-checkout && npm run uglify:cf7", "clean:assets": "del assets", "i18n:textdomain": "wpi18n addtextdomain", "i18n:pot": "wp i18n make-pot ./ languages/gtm-kit.pot", "change-version": "./bin/change-version.sh $npm_package_version", "zip-package": "./bin/zip-package.sh", - "compile:sass": "sass src/scss/admin.scss:assets/css/admin.css", - "compile:tailwind": "npx tailwindcss -i ./src/scss/tailwind.scss -o ./src/scss/_tailwind-compiled.scss --watch", "uglify:woocommerce": "mkdirp assets/js && uglifyjs src/js/woocommerce.js --compress --mangle --output assets/js/woocommerce.js", "uglify:woocommerce-checkout": "mkdirp assets/js && uglifyjs src/js/woocommerce-checkout.js --compress --mangle --output assets/js/woocommerce-checkout.js", "uglify:edd": "mkdirp assets/js && uglifyjs src/js/edd.js --compress --mangle --output assets/js/edd.js", "uglify:edd-checkout": "mkdirp assets/js && uglifyjs src/js/edd-checkout.js --compress --mangle --output assets/js/edd-checkout.js", "uglify:cf7": "mkdirp assets/js && uglifyjs src/js/contact-form-7.js --compress --mangle --output assets/js/contact-form-7.js", - "uglify:admin": "mkdirp assets/js && uglifyjs src/js/admin.js --compress --mangle --output assets/js/admin.js", "copy:images": "node ./bin/copy-images.js", "format": "wp-scripts format", "lint:css": "wp-scripts lint-style", @@ -44,6 +40,7 @@ "lint:js:src": "wp-scripts lint-js ./src/js", "lint:js-fix": "wp-scripts lint-js --fix", "watch": "wp-scripts start src/js/frontend/woocommerce-blocks.js --output-path=build/frontend", + "watch:tailwind": "npx tailwindcss -i ./src/scss/tailwind.scss -o ./src/scss/_tailwind-compiled.scss --watch", "audit:prod": "npm audit --omit=dev", "lint:pkg-json": "wp-scripts lint-pkg-json", "packages-update": "wp-scripts packages-update", diff --git a/src/Admin/AbstractOptionsPage.php b/src/Admin/AbstractOptionsPage.php index ad3e92f..0eb93ad 100644 --- a/src/Admin/AbstractOptionsPage.php +++ b/src/Admin/AbstractOptionsPage.php @@ -141,40 +141,6 @@ protected function get_position(): ?int { return null; } - /** - * Enqueue admin area scripts and styles. - * - * @param string $hook Current hook. - */ - public function admin_enqueue_scripts( string $hook ) { - - if ( \strpos( $hook, GTMKIT_ADMIN_SLUG ) === true ) { - // General styles and js. - wp_enqueue_style( - 'gtmkit-admin-css', - GTMKIT_URL . 'assets/css/admin.css', - false, - $this->util->get_plugin_version() - ); - wp_enqueue_script( - 'gtmkit-admin', - GTMKIT_URL . 'assets/js/admin.js', - [ 'jquery' ], - $this->util->get_plugin_version(), - true - ); - - $script_data = [ - 'plugin_url' => GTMKIT_URL, - 'nonce' => wp_create_nonce( 'gtmkit-admin' ), - 'ajax_url' => admin_url( 'admin-ajax.php' ), - ]; - - wp_localize_script( 'gtmkit-admin', 'gtmkit', $script_data ); - - } - } - /** * Enqueue admin page scripts and styles. * diff --git a/src/Admin/MetaBox.php b/src/Admin/MetaBox.php deleted file mode 100644 index 8623221..0000000 --- a/src/Admin/MetaBox.php +++ /dev/null @@ -1,121 +0,0 @@ -options = $options; - } - - /** - * Register meta box - * - * @param Options $options The Options instance. - */ - public static function register( Options $options ): void { - $page = new MetaBox( $options ); - - add_action( 'add_meta_boxes', [ $page, 'add_meta_boxes' ] ); - add_action( 'save_post', [ $page, 'save_meta_box_options' ] ); - } - - /** - * Add "GTM Kit" meta box - */ - public function add_meta_boxes() { - if ( current_user_can( 'manage_options' ) ) { - $post_types = get_post_types( - [ - 'public' => true, - ], - 'objects' - ); - if ( isset( $post_types['attachment'] ) ) { - unset( $post_types['attachment'] ); - } - - foreach ( $post_types as $post_type => $post_type_object ) { - $label = $post_type_object->labels->singular_name; - add_meta_box( - 'gtmkit_options', - sprintf( __( 'GTM Kit', 'gtm-kit' ), $label ), - [ - $this, - 'display_meta_boxes', - ], - $post_type, - 'side', - 'core' - ); - } - } - } - - /** - * Displays some checkbox to de/activate some cache options - */ - public function display_meta_boxes() { - if ( current_user_can( 'manage_options' ) ) { - wp_nonce_field( 'gtmkit_box_option', '_gtmkitnonce', false ); - $page_type = get_post_meta( get_the_ID(), 'gtmkit_page_type', true ); - ?> -
- - - - -

- ', '' ); - ?> -

-
- name = sanitize_title( $name ); - $this->label = $label; - $this->arguments = $arguments; - } - - /** - * Gets the name. - * - * @return string The name. - */ - public function get_name(): string { - return $this->name; - } - - /** - * Gets the label. - * - * @return string The label. - */ - public function get_label(): string { - return $this->label; - } - - /** - * Gets the path of the view files. - * - * @return string The path. - */ - public function get_view_path(): string { - return (string) $this->get_argument( 'view_path', GTMKIT_PATH . 'src/views/tabs/' ); - } - - /** - * Retrieves whether the tab needs a save button. - * - * @return bool Whether the tabs need a save button. - */ - public function has_save_button(): bool { - return (bool) $this->get_argument( 'save_button', true ); - } - - /** - * Gets the option group. - * - * @return string The option group. - */ - public function get_opt_group(): string { - return $this->get_argument( 'opt_group' ); - } - - /** - * Get tab data. - * - * @return array The tab data. - */ - public function get_tab_data(): array { - return $this->get_argument( 'tab_data', [] ); - } - - /** - * Retrieves the variable from the supplied arguments. - * - * @param string $variable Variable to retrieve. - * @param string|mixed $default_value Default to use when variable not found. - * - * @return mixed|string The retrieved variable. - */ - protected function get_argument( string $variable, $default_value = '' ) { - return array_key_exists( $variable, $this->arguments ) ? $this->arguments[ $variable ] : $default_value; - } -} diff --git a/src/Admin/OptionTabs.php b/src/Admin/OptionTabs.php deleted file mode 100644 index 159b0f8..0000000 --- a/src/Admin/OptionTabs.php +++ /dev/null @@ -1,167 +0,0 @@ -base = sanitize_title( $base ); - - $tab = filter_input( INPUT_GET, 'tab' ); - $this->active_tab = empty( $tab ) ? $active_tab : $tab; - } - - /** - * Get the base. - * - * @return string - */ - public function get_base(): string { - return $this->base; - } - - /** - * Add a tab. - * - * @param OptionTab $tab Tab to add. - * - * @return $this - */ - public function add_tab( OptionTab $tab ): OptionTabs { - $this->tabs[] = $tab; - - return $this; - } - - /** - * Get active tab. - * - * @return OptionTab|null Get the active tab. - */ - public function get_active_tab(): ?OptionTab { - if ( empty( $this->active_tab ) ) { - return null; - } - - $active_tabs = array_filter( $this->tabs, [ $this, 'is_active_tab' ] ); - if ( ! empty( $active_tabs ) ) { - $active_tabs = array_values( $active_tabs ); - if ( count( $active_tabs ) === 1 ) { - return $active_tabs[0]; - } - } - - return null; - } - - /** - * Is the tab the active tab. - * - * @param OptionTab $tab Tab to check for active tab. - * - * @return bool - */ - public function is_active_tab( OptionTab $tab ): bool { - return ( $tab->get_name() === $this->active_tab ); - } - - /** - * Get all tabs. - * - * @return OptionTab[] - */ - public function get_tabs(): array { - return $this->tabs; - } - - /** - * Retrieves the path to the view of the tab. - * - * @param OptionTab $tab Tab to get name from. - * - * @return string - */ - public function get_tab_view( OptionTab $tab ): string { - return $tab->get_view_path() . $this->get_base() . '/' . $tab->get_name() . '.php'; - } - - /** - * Outputs the option tabs. - * - * @param OptionsForm $form Option Tabs to get tabs from. - */ - public function display( OptionsForm $form ): void { // phpcs:ignore - - ?> -
- -
- get_tabs() as $tab ) { - $identifier = $tab->get_name(); - - $class = 'gtmkit-tab ' . ( $tab->has_save_button() ? 'save' : 'nosave' ); - printf( '
', esc_attr( $identifier ), esc_attr( $class ) ); - - $tab_filter_name = sprintf( '%s_%s', $this->get_base(), $tab->get_name() ); - - // Output the settings view for all tabs. - $tab_view = $this->get_tab_view( $tab ); - - if ( is_file( $tab_view ) ) { - $tab_data = $tab->get_tab_data(); - require $tab_view; - } - - echo '
'; - } - } -} diff --git a/src/Admin/OptionsForm.php b/src/Admin/OptionsForm.php deleted file mode 100644 index e8e34ef..0000000 --- a/src/Admin/OptionsForm.php +++ /dev/null @@ -1,541 +0,0 @@ - -
-
-

- GTM Kit - -

-
- '; - - settings_fields( $settings_group ); - } - - $this->option_name = $option_name; - $this->set_option_group( $option_group ); - } - - /** - * Set the option used in output for form elements. - * - * @param string $option_group Option group. - */ - public function set_option_group( string $option_group ) { - $this->option_group = $option_group; - } - - /** - * Add setting row. - * - * @param string $type The option type. - * @param string $variable The option variable. - * @param string $label The option label. - * @param array $field_data Optional setting field data. - * @param string $description Optional description. - */ - public function setting_row( string $type, string $variable, string $label, array $field_data = [], string $description = '' ): void { - ?> -
-
- - - -
-
- setting_field( $type, $variable, $field_data ); ?> - -

- [ 'href' => [] ], - 'br' => [], - ] - ); - ?> -

- -
-
- checkbox_toggle_field( $variable, $field_data ); - break; - case 'text-input': - $this->text_input_field( $variable, $field_data ); - break; - case 'radio': - $this->radio_fieldset( $variable, $field_data ); - break; - case 'select': - $this->select( $variable, $field_data ); - break; - } - } - - /** - * Generates the footer for admin pages. - * - * @param bool $save_button Whether a save button should be shown. - * @param bool $show_sidebar Whether to show the banner sidebar. - */ - public function admin_footer( bool $save_button = true, bool $show_sidebar = true ) { - if ( $save_button ) { - ?> -
- -
- - - - -
- 'checkbox', - 'close' => true, - 'for' => '', - 'aria_label' => '', - ]; - - $attribute = wp_parse_args( $attribute, $defaults ); - $aria_label = ''; - if ( $attribute['aria_label'] !== '' ) { - $aria_label = ' aria-label="' . esc_attr( $attribute['aria_label'] ) . '"'; - } - - echo "'; - } - } - - /** - * Output a legend element. - * - * @param string $text Legend text string. - * @param array $attribute HTML attributes set. - */ - public function legend( string $text, array $attribute ): void { - $defaults = [ - 'id' => '', - 'class' => '', - ]; - $attribute = wp_parse_args( $attribute, $defaults ); - - $id = ( $attribute['id'] === '' ) ? '' : $attribute['id']; - - echo '' . esc_html( $text ) . ''; - } - - /** - * Create a Checkbox input toggle. - * - * @param string $variable The variable within the option to create the checkbox for. - * @param array $field_data Optional field data. - */ - public function checkbox_toggle_field( string $variable, array $field_data = [] ): void { - - $value = $this->get_field_value( $variable ); - - $attributes = $field_data['attributes'] ?? []; - - $defaults = [ - 'disabled' => false, - ]; - $attribute = wp_parse_args( $attributes, $defaults ); - - if ( $value === true ) { - $value = 'on'; - } - - $disabled_attribute = $this->get_disabled_attribute( $variable, $attribute ); - ?> - - '', - 'class' => '', - ]; - $attribute = wp_parse_args( $attributes, $defaults ); - - $value = $this->get_field_value( $variable ); - - $type = 'text'; - if ( isset( $attribute['type'] ) && $attribute['type'] === 'url' ) { - $val = urldecode( $value ); - $type = 'url'; - } - $attributes = isset( $attribute['autocomplete'] ) ? ' autocomplete="' . esc_attr( $attribute['autocomplete'] ) . '"' : ''; - - $disabled_attribute = $this->get_disabled_attribute( $variable, $attribute ); - - ?> - - class="textinput " - placeholder="" - type="" - id="" - name="option_name ) . '[' . esc_attr( $this->option_group ) . '][' . esc_attr( $variable ) . ']'; ?>" - value="" - - />
- $attribute, - ]; - } - - $defaults = [ - 'cols' => '', - 'rows' => '', - 'class' => '', - 'disabled' => false, - ]; - $attribute = wp_parse_args( $attribute, $defaults ); - $val = $this->get_field_value( $variable ); - - $this->label( - $label, - [ - 'for' => $variable, - 'class' => 'textinput', - ] - ); - - $disabled_attribute = $this->get_disabled_attribute( $variable, $attribute ); - - echo '
'; - } - - /** - * Create a hidden input field. - * - * @param string $variable The variable within the option to create the hidden input for. - * @param string $id The ID of the element. - * @param mixed $val Optional. The value to set in the input field. Otherwise, the value from the options will be used. - */ - public function hidden( string $variable, string $id = '', $val = null ): void { - if ( is_null( $val ) ) { - $val = $this->get_field_value( $variable ); - } - - if ( is_bool( $val ) ) { - $val = ( $val === true ) ? 'true' : 'false'; - } - - if ( $id === '' ) { - $id = 'hidden_' . $variable; - } - - echo ''; - } - - /** - * Create a Select Box. - * - * @param string $variable The variable within the option to create the select for. - * @param array $fieldset_data Options fieldset data. - */ - public function select( string $variable, array $fieldset_data = [] ): void { - - if ( ! is_array( $fieldset_data['options'] ) || $fieldset_data['options'] === [] ) { - return; - } - - $defaults = [ - 'disabled' => false, - 'attributes' => [], - ]; - $fieldset_data = wp_parse_args( $fieldset_data, $defaults ); - - if ( $this->is_control_disabled( $variable ) - || ( isset( $fieldset_data['disabled'] ) && $fieldset_data['disabled'] ) ) { - $disabled = true; - } else { - $disabled = false; - } - - $active_option = $this->get_field_value( $variable ); - - printf( - ''; - } - - /** - * Create a Radio input field. - * - * @param string $variable The variable within the option to create the radio button for. - * @param array $fieldset_data Options fieldset data. - */ - public function radio_fieldset( string $variable, array $fieldset_data = [] ): void { - - if ( ! is_array( $fieldset_data['options'] ) || $fieldset_data['options'] === [] ) { - return; - } - - $field_value = $this->get_field_value( $variable ); - - $defaults = [ - 'disabled' => false, - 'legend' => '', - 'legend_attr' => [], - 'line_break' => true, - 'attributes' => [], - ]; - $fieldset_data = wp_parse_args( $fieldset_data, $defaults ); - - echo '
'; - - if ( $fieldset_data['legend'] ) { - - $legend_defaults = [ - 'id' => '', - 'class' => 'radiogroup', - ]; - - $legend_attr = wp_parse_args( $fieldset_data['legend_attr'], $legend_defaults ); - - $this->legend( $fieldset_data['legend'], $legend_attr ); - } - - foreach ( $fieldset_data['options'] as $key => $value ) { - $option_label = $value; - $aria_label = ''; - - if ( is_array( $value ) ) { - $option_label = $value['label'] ?? ''; - $aria_label = $value['aria_label'] ?? ''; - } - ?> - - get_disabled_attribute( $variable, $fieldset_data['attributes'] ) ); ?> - /> - label( - $option_label, - [ - 'for' => esc_attr( $variable ) . '-' . esc_attr( $key ), - 'class' => 'radio', - 'aria_label' => $aria_label, - ] - ); - - if ( $fieldset_data['line_break'] ) { - echo '
'; - } - } - echo '
'; - } - - /** - * Retrieves the value for the form field. - * - * @param string $key The option key. - * - * @return mixed|null The retrieved value. - */ - protected function get_field_value( string $key ) { - - return Options::init()->get( $this->option_group, $key ); - } - - /** - * Checks whether a given control should be disabled. - * - * @param string $variable The variable within the option to check whether its control should be disabled. - * - * @return bool True if control should be disabled, false otherwise. - */ - protected function is_control_disabled( string $variable ): bool { - if ( $this->option_instance === null ) { - return false; - } - - return $this->option_instance->is_disabled( $variable ); - } - - /** - * Returns the disabled attribute HTML. - * - * @param string $variable The variable within the option of the related form element. - * @param array $attribute Extra attributes added to the form element. - * - * @return string The disabled attribute HTML. - */ - protected function get_disabled_attribute( string $variable, array $attribute ): string { - if ( $this->is_control_disabled( $variable ) || ( isset( $attribute['disabled'] ) && $attribute['disabled'] ) ) { - return ' disabled'; - } - - return ''; - } -} diff --git a/src/js/admin.js b/src/js/admin.js deleted file mode 100644 index 83d5676..0000000 --- a/src/js/admin.js +++ /dev/null @@ -1,78 +0,0 @@ -// eslint-disable-next-line no-undef -jQuery( function ( $ ) { - /** - * Set the initial active tab in the settings pages. - * - * @return {void} - */ - function setInitialActiveTab() { - let activeTabId = window.location.hash.replace( '#top#', '' ); - /* In some cases, the second # gets replace by %23, which makes the tab - * switching not work unless we do this. */ - if ( activeTabId.search( '#top' ) !== -1 ) { - activeTabId = window.location.hash.replace( '#top%23', '' ); - } - /* - * WordPress uses fragment identifiers for its own in-page links, e.g. - * `#wpbody-content` and other plugins may do that as well. Also, facebook - * adds a `#_=_` see PR 506. In these cases and when it's empty, default - * to the first tab. - */ - if ( '' === activeTabId || '#' === activeTabId.charAt( 0 ) ) { - /* - * Reminder: jQuery attr() gets the attribute value for only the first - * element in the matched set so this will always be the first tab id. - */ - // eslint-disable-next-line no-undef - activeTabId = jQuery( '.gtmkit-tab' ).attr( 'id' ); - } - - // eslint-disable-next-line no-undef - jQuery( '#' + activeTabId ).addClass( 'active' ); - // eslint-disable-next-line no-undef - jQuery( '#' + activeTabId + '-tab' ) - .addClass( 'active' ) - .trigger( 'click' ); - } - - $( document ).ready( function () { - // Handle the settings pages tabs. - $( '#gtmkit-tabs' ) - .find( 'a' ) - .on( 'click', function () { - $( '#gtmkit-tabs' ).find( 'a' ).removeClass( 'active' ); - $( '.gtmkit-tab' ).removeClass( 'active' ); - - const id = $( this ).attr( 'id' ).replace( '-tab', '' ); - const activeTab = $( '#' + id ); - activeTab.addClass( 'active' ); - $( this ).addClass( 'active' ); - if ( activeTab.hasClass( 'nosave' ) ) { - $( '#gtmkit-submit-container' ).hide(); - } else { - $( '#gtmkit-submit-container' ).show(); - } - } ); - - $( '.gtmkit-items-list' ) - .find( 'a.gtmkit-open-tab' ) - .on( 'click', function () { - $( '#gtmkit-tabs' ).find( 'a' ).removeClass( 'active' ); - $( '.gtmkit-tab' ).removeClass( 'active' ); - - const id = $( this ) - .attr( 'id' ) - .replace( 'gtmkit-open-tab-', '' ); - const activeTab = $( '#' + id ); - const activeNavTab = $( '#' + id + '-tab' ); - activeTab.addClass( 'active' ); - activeNavTab.addClass( 'active' ); - if ( activeTab.hasClass( 'nosave' ) ) { - $( '#gtmkit-submit-container' ).hide(); - } else { - $( '#gtmkit-submit-container' ).show(); - } - } ); - setInitialActiveTab(); - } ); -} ); diff --git a/src/scss/admin.scss b/src/scss/admin.scss deleted file mode 100644 index 233198d..0000000 --- a/src/scss/admin.scss +++ /dev/null @@ -1,856 +0,0 @@ -@import "base"; -@import "tailwind-compiled"; - -.gtmkit-admin-page #wpcontent { - padding-left: 0 !important; - - *, - *::before, - *::after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - } -} - -.gtmkit_header { - padding: 24px var(--gtmkit-space-h); - - h1#gtmkit-title { - margin: 0; - display: flex; - align-items: center; - - font-size: 28px; - font-weight: 500; - - img { - margin-right: 1em; - } - } -} - -.gtmkit-header-navigation { - align-items: center; - background: var(--gtmkit-background-white); - border-color: var(--gtmkit-border-color); - border-style: solid; - border-width: 1px 0; - display: flex; - justify-content: space-between; - min-height: 60px; - padding: 0 var(--gtmkit-space-h); - - .gtmkit-nav-tab-wrapper { - display: flex; - align-items: center; - margin: 0; - - li { - margin-bottom: 0; - margin-right: 2rem; - outline: 0 !important; - border-top: none; - - a { - border-bottom: 4px solid var(--gtmkit-background-white); - color: var(--gtmkit-text-color-grey); - display: block; - font-weight: 600; - padding: 20px 0 18px 0; - text-decoration: none; - transition: border 300ms ease; - box-shadow: none; - - &.active, - &.active:focus, - &.active:focus:active { - border-color: var(--gtmkit-color-primary); - color: var(--gtmkit-text-color-heading); - border-top: none; - } - - &.active:hover, - &:hover { - border-color: var(--gtmkit-text-color-grey); - } - - } - } - - .nav-tab-active, - .nav-tab-active:focus, - .nav-tab-active:focus:active, - .nav-tab-active:hover { - border-color: var(--gtmkit-color-primary); - color: var(--gtmkit-text-color-heading); - } - } -} - -.gtmkit-tab { - padding: 24px var(--gtmkit-space-h); - display: none; - max-width: 1920px; - - &.active { - display: block; - } - - label.select, - label.textinput { - float: left; - width: 200px; - margin: 5px 0; - } - - input.textinput, select, textarea { - width: 400px; - } - - .description { - margin: 5px; - } - - .success { - color: var(--gtmkit-color-success); - } - - .error { - color: var(--gtmkit-color-error); - } - - input[type="radio"] { - margin-bottom: -4px; - } - - .form-table { - margin-top: 20px; - - th, - td { - padding-top: 16px; - padding-bottom: 16px; - } - - td fieldset label { - - font-size: 13px; - - &.radio { - line-height: 1; - } - } - } - - .gtmkit-form-legend { - font-size: 14px; - font-weight: 600; - } -} - -.gtmkit-metabox { - background: var(--gtmkit-background-white); - border: 1px solid var(--gtmkit-border-color); - border-radius: 4px; -} - -.gtmkit-items-list { - padding: calc(var(--gtmkit-space-v) / 2) 12px 0; - width: 100%; - - ul { - align-content: stretch; - display: flex; - flex-wrap: wrap; - justify-content: flex-start; - margin-bottom: 0; - } - - &.single-item { - padding-left: 0; - - ul { - justify-content: space-between; - } - - .gtmkit-list-item { - margin-left: 0; - margin-right: 0; - } - } -} - -.gtmkit-list-item { - background: var(--gtmkit-background-white); - border: 1px solid var(--gtmkit-border-color); - border-radius: 4px; - margin-bottom: 24px; - margin-right: 12px; - margin-left: 12px; - max-width: 100%; - padding: 16px 20px; - position: relative; - width: 100%; - - &.disabled { - opacity: 0.5; - } - - h3 { - font-size: var(--gtmkit-font-size-m); - line-height: 1.2; - margin: 0; - overflow: hidden; - position: relative; - text-overflow: ellipsis; - white-space: nowrap - } - - p { - margin-bottom: 0; - } - - .gtmkit-list-item-pill { - position: absolute; - top: 16px; - right: 16px; - font-size: 12px; - font-weight: 700; - text-transform: uppercase; - line-height: 1; - padding: 4px 8px; - border-radius: 40px; - - &.gtmkit-list-item-pill-green { - background: var(--gtmkit-color-success); - color: #fff - } - - &.gtmkit-list-item-pill-orange { - background: var(--gtmkit-color-warning); - color: #fff - } - - &.gtmkit-list-item-pill-red { - background: var(--gtmkit-color-error); - color: #fff - } - - &.gtmkit-list-item-pill-grey { - background: var(--gtmkit-button-disabled); - color: #fff - } - } - - &.gtmkit-list-item-has-pill h3 { - max-width: calc(100% - 60px) - } - -} - -@media (min-width: $breakpoint-tablet) { - .gtmkit-list-item { - width: calc(50% - 24px) - } -} - -@media (min-width: $breakpoint-desktop-large) { - .gtmkit-list-item { - width: calc(100% / 3 - 24px) - } -} - - -.gtmkit-list-item-actions { - position: relative; - min-height: 40px; -} - - -.gtmkit-list-item:hover .gtmkit-list-item-description, .gtmkit-list-item:focus .gtmkit-list-item-description { - opacity: 0 -} - -.gtmkit-list-item:hover .gtmkit-list-item-buttons, .gtmkit-list-item:focus .gtmkit-list-item-buttons { - opacity: 1 -} - -.gtmkit-list-item-buttons { - display: flex; - justify-content: space-between; - opacity: 0; - position: absolute; - top: 0; - width: 100%; - z-index: 10; - - .gtmkit-button { - flex-grow: 1; - margin-left: 10px; - text-align: center; - background-color: var(--gtmkit-button-primary-bg); - border: 1px solid var(--gtmkit-button-primary-bg); - border-radius: 4px; - color: var(--gtmkit-button-primary-text); - cursor: pointer; - display: inline-block; - font-size: var(--gtmkit-font-size-s); - font-weight: 700; - line-height: 1; - padding: 10px 16px; - text-decoration: none; - - &.gtmkit-button-secondary { - background-color: var(--gtmkit-button-secondary-bg); - border: 1px solid var(--gtmkit-button-secondary-border); - color: var(--gtmkit-button-secondary-text); - - &:hover, - &:focus { - background-color: var(--gtmkit-button-secondary-bg-hover); - border-color: var(--gtmkit-button-secondary-border); - color: var(--gtmkit-button-secondary-text-hover) - } - } - - &:first-child { - margin-left: 0 - } - - &:hover, - &:focus { - background-color: var(--gtmkit-button-primary-bg-hover); - border-color: var(--gtmkit-button-primary-bg-hover); - color: var(--gtmkit-button-primary-text-hover) - } - } - -} - - -#gtmkit-submit-container { - padding: 24px var(--gtmkit-space-h); -} - -#sidebar-container { - width: 300px; - padding-left: 20px; - padding-top: 10px; - - h3 { - padding: 8px 12px; - margin: 0; - line-height: 1.4; - } - - ul { - margin: 1em; - } - - a { - text-decoration: none; - } - - .inside { - background: var(--gtmkit-background-white); - border-left: 0; - border-right: 0; - } - - #credit { - text-align: center; - font-size: 10px; - color: #888; - line-height: 3em; - margin: 3em 0; - min-width: 255px; - } - -} - -.gtmkit-clear { - &:before { - content: " "; - display: table; - } - - &:after { - clear: both; - content: " "; - display: table; - } -} - -.gtmkit-setting-row { - border-bottom: 1px solid #e4e4e4; - padding: 30px 0; - font-size: 14px; - line-height: 1.3; - - &:first-of-type { - padding-top: 10px !important; - } - - &.inactive { - display: none; - } - - .gtmkit-setting-mid-row-sep { - background: #e4e4e4; - height: 1px; - border: 0; - margin: 15px 0; - } - - &.section-heading { - padding: 20px 0; - - &.no-desc { - h2, - h4 { - margin: 0; - } - } - - .gtmkit-setting-field { - margin: 0; - max-width: 1005px; - } - } - - &.gtmkit-setting-row-checkbox { - - input[type=checkbox] { - float: left; - margin: 1px 0 0 0; - } - - input[type=checkbox] + label { - margin: 0 0 0 8px; - vertical-align: baseline; - } - - .desc { - margin: 0 0 0 30px; - } - - input[type=checkbox] + label + .desc { - margin: 8px 0 0 0; - } - } - - &.gtmkit-setting-row-text, - &.gtmkit-setting-row-password, - &.gtmkit-setting-row-number, - &.gtmkit-setting-row-email { - - .gtmkit-setting-label { - padding-top: 8px; - } - } - - &.gtmkit-setting-row-select { - - .gtmkit-setting-label { - padding-top: 8px; - } - } - - &.gtmkit-setting-row-radio { - - .gtmkit-setting-field { - - input[type=radio] { - margin: -3px 10px 0 0; - } - - label { - margin-right: 30px; - display: inline-block; - } - } - - } - - &.gtmkit-setting-row-checkbox-toggle { - - .gtmkit-setting-field { - - label { - vertical-align: middle; - display: inline-block; - } - - input[type=checkbox] { - position: absolute; - top: auto; - overflow: hidden; - clip: rect(1px, 1px, 1px, 1px); - width: 1px; - height: 1px; - white-space: nowrap; - - &:checked + .gtmkit-setting-toggle-switch { - background-color: #00a32a; - - &:before { - -webkit-transform: translateX(16px); - -ms-transform: translateX(16px); - transform: translateX(16px); - } - } - - &:disabled { - &:checked:hover + .gtmkit-setting-toggle-switch, - &:not(:checked):hover + .gtmkit-setting-toggle-switch { - box-shadow: none; - } - - &:not(:checked):hover + .gtmkit-setting-toggle-switch { - background-color: #ddd; - } - - & + .gtmkit-setting-toggle-switch { - background-color: #ddd; - cursor: default; - } - - &:checked + .gtmkit-setting-toggle-switch { - background-color: lighten(#00a32a, 25); - cursor: default; - } - } - - &:checked + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label { - display: inline-block; - } - - &:checked + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label + .gtmkit-setting-toggle-unchecked-label { - display: none; - } - - &:disabled + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-checked-label, - &:disabled + .gtmkit-setting-toggle-switch + .gtmkit-setting-toggle-unchecked-label { - color: lighten(#444, 40); - } - - &:checked:hover, - &:checked:focus { - & + .gtmkit-setting-toggle-switch { - box-shadow: 0 0 0 1px #fff, 0 0 0 3px #00a32a; - } - } - - &:not(:checked):hover, - &:not(:checked):focus { - & + .gtmkit-setting-toggle-switch { - background-color: #999; - box-shadow: 0 0 0 1px #fff, 0 0 0 3px #999; - } - } - } - - .gtmkit-setting-toggle-unchecked-label, - .gtmkit-setting-toggle-checked-label { - text-transform: uppercase; - font-weight: 400; - color: #777; - font-size: 13px; - } - - .gtmkit-setting-toggle-checked-label { - display: none; - } - - .gtmkit-setting-toggle-switch { - position: relative; - cursor: pointer; - background-color: #ccc; - border-radius: 15px; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - vertical-align: middle; - display: inline-block; - margin: 0 5px 0 0; - width: 36px; - height: 20px; - - &:before { - position: absolute; - content: ""; - height: 16px; - width: 16px; - left: 2px; - top: 2px; - background-color: #fff; - border-radius: 50%; - -webkit-transition: all 0.2s ease-in-out; - -moz-transition: all 0.2s ease-in-out; - -ms-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; - } - } - } - } - - h2, h4 { - color: #444; - font-size: 20px; - font-weight: 700; - margin: 0 0 6px 0; - } - - h2 { - margin-bottom: 15px; - } - - h3 { - color: #444; - font-size: 24px; - font-weight: 600; - margin: 0 0 20px 0; - } - - h5 { - color: #444; - font-size: 16px; - font-weight: 600; - margin: 0 0 20px 0; - } - - p { - margin: 12px 0 0; - font-size: 14px; - line-height: 1.5em; - - &:first-of-type { - margin: 8px 0 0; - } - - &.desc { - font-style: italic; - color: #777; - } - - &.buttonned { - margin-top: 30px; - } - - } - - ul { - margin: 8px 0 0; - - &.list { - li { - margin-left: 20px; - list-style-type: disc; - } - } - } - - table { - &.actions-list { - td, th { - padding: 5px 5px 5px 0; - text-align: left; - } - - td { - &.email { - padding-right: 2em; - } - - &.status { - width: 100px; - } - - &.actions { - a { - border-bottom: 1px solid; - display: inline-block; - margin-right: 5px; - text-decoration: none; - - &[class*=delete], - &[class*=error] { - color: #a00; - - &:hover, &:active, &:focus { - color: darken(#a00, 20); - } - } - } - } - } - - } - } - - input[type=text], - input[type=email], - input[type=number], - input[type=password], - select { - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - box-shadow: none; - color: #333; - display: inline-block; - vertical-align: middle; - padding: 7px 12px; - margin: 0 10px 0 0; - width: 400px; - min-height: 35px; - line-height: 1.3; - - - &[readonly] { - background-color: #f9f9f9; - } - - &.small-text { - width: 75px; - } - - &:focus { - border: 1px solid #016AAB; - box-shadow: 0 0 0 1px #016AAB; - outline: none; - } - - &:disabled { - opacity: 0.6; - } - } - - input[type=checkbox], - input[type=radio] { - &:focus { - border: 1px solid #016AAB; - box-shadow: 0 0 0 1px #016AAB; - outline: none; - } - } - - .gtmkit-dashicons-yes-alt-green { - &.gtmkit-animate { - -webkit-animation: gtmkit-fade-in-stop-out 1s linear; - animation: gtmkit-fade-in-stop-out 1s linear; - } - - &.gtmkit-success { - color: #00a32a; - } - } -} - -.gtmkit-setting-label { - display: block; - float: left; - width: 225px; - padding: 0 20px 0 0; - - label { - display: block; - font-weight: 600; - } -} - -.gtmkit-setting-field { - display: block; - margin: 0 0 0 225px; - max-width: 800px; - - hr { - margin: 20px 0; - } - - .gtmkit-setting-field-row { - display: flex; - flex-wrap: wrap; - - & > .gtmkit-btn { - margin-right: 10px; - } - } -} - -.gtmkit_radio_block { - line-height: 20px; -} - -[class^="gtmkit-dashicons"] { - display: inline-block; - width: 20px; - height: 20px; -} - -.gtmkit-dashicons-yes-alt-green { - background-image: url('../images/icons/dashicons/dashicons-yes-alt-green.svg'); -} - -.gtmkit-dashicons-pdf-gray { - background-image: url('../images/icons/dashicons/dashicons-pdf-grey.svg'); -} - -code { - font-style: normal; -} - -.gtmkit_section_message { - &.space-top { - margin-top: 100px; - } - - &.warning { - margin-top: 10px; - width: fit-content; - } - - width: 75%; - - h3 { - padding: 8px 12px; - margin: 0; - line-height: 1.4; - - .version { - color: #777; - font-size: 12px; - margin-left: 8px; - font-weight: 400; - } - } - - .inside { - margin: 1em; - } - - ul { - li { - margin-bottom: 12px; - } - } -} - -.gtm-kit-settings-field-wrap { - //background: $white; - //border:1px solid $borderColor; - //padding: 20px; - //margin-block-start: 30px; - - .components{ - &-base{ - &-control{ - &__label{ - //font-weight: 600; - } - } - } - } -} diff --git a/src/views/admin-sidebar.php b/src/views/admin-sidebar.php deleted file mode 100644 index b2f15cb..0000000 --- a/src/views/admin-sidebar.php +++ /dev/null @@ -1,19 +0,0 @@ - -
- Developed by
- - TLA Media - -
diff --git a/src/views/integrations-metabox.php b/src/views/integrations-metabox.php deleted file mode 100644 index 351d46d..0000000 --- a/src/views/integrations-metabox.php +++ /dev/null @@ -1,97 +0,0 @@ - 'WooCommerce', - 'description' => __( 'The #1 open source eCommerce platform built for WordPress', 'gtm-kit' ), - 'plugin_active' => is_plugin_active( 'woocommerce/woocommerce.php' ), - 'integration_active' => Options::init()->get( 'integrations', 'woocommerce_integration' ), - 'tab_id' => 'woocommerce', - 'plugin_search' => 'woocommerce', - ], - [ - 'name' => 'Contact Form 7', - 'description' => __( 'Just another contact form plugin for WordPress. Simple but flexible', 'gtm-kit' ), - 'plugin_active' => is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ), - 'integration_active' => Options::init()->get( 'integrations', 'cf7_integration' ), - 'tab_id' => 'cf7', - 'plugin_search' => 'Contact Form 7', - ], - [ - 'name' => 'Easy Digital Downloads', - 'description' => __( 'Easy way to sell Digital Products With WordPress', 'gtm-kit' ), - 'plugin_active' => ( is_plugin_active( 'easy-digital-downloads/easy-digital-downloads.php' ) || is_plugin_active( 'easy-digital-downloads-pro/easy-digital-downloads.php' ) ), - 'integration_active' => Options::init()->get( 'integrations', 'edd_integration' ), - 'tab_id' => 'edd', - 'plugin_search' => 'Easy Digital Downloads', - ], -]; -?> -
- -
diff --git a/src/views/tabs/general/container.php b/src/views/tabs/general/container.php deleted file mode 100644 index 27d13f9..0000000 --- a/src/views/tabs/general/container.php +++ /dev/null @@ -1,161 +0,0 @@ - -
-

- -

- - -
- - tag%1$s: opening tag %2$s: closin tag */ - __( 'Find your GTM container ID on %1$sGoogle Tag Manager%2$s.', 'gtm-kit' ), - '', - '' -); -?> - -setting_row( - 'text-input', - 'gtm_id', - __( 'Container ID:', 'gtm-kit' ), - [], - $gtmkit_input_help -); -?> - -setting_row( - 'checkbox-toggle', - 'just_the_container', - __( 'Just the container', 'gtm-kit' ), - [], - __( 'Setting this to On will reduce the functionality to just the GTM container code. No additional data will be pushed to the datalayer regardless of any other settings.', 'gtm-kit' ) -); -?> - -
-

-
- -setting_row( - 'checkbox-toggle', - 'container_active', - __( 'Container Code', 'gtm-kit' ), - [], - __( 'Setting this to Off will remove the Google Tag Manager container code but the data layer will remain.', 'gtm-kit' ) -); -?> - - [ - 'label' => __( 'Standard implementation as recommended by Google (no delay)', 'gtm-kit' ), - ], - 1 => [ - 'label' => __( 'Load container when browser is idle (requestIdleCallback)', 'gtm-kit' ), - ], -]; -$gtmkit_field_data['legend'] = __( 'Container code implementation:', 'gtm-kit' ); -$gtmkit_field_data['legend_attr'] = [ 'class' => 'radiogroup screen-reader-text' ]; - -$form->setting_row( - 'radio', - 'script_implementation', - __( 'Container code implementation:', 'gtm-kit' ), - $gtmkit_field_data, - __( 'Depending on how you use Google Tag Manager you can delay the loading of the container script until the browser is idle.', 'gtm-kit' ) -); -?> - -<noscript> implementation:', 'gtm-kit' ); - -$gtmkit_field_data = []; -$gtmkit_field_data['options'] = [ - 0 => [ - 'label' => __( 'Just after the opening <body> tag', 'gtm-kit' ), - ], - 1 => [ - 'label' => __( 'Footer of the page (not recommended by Google)', 'gtm-kit' ), - ], - 2 => [ - 'label' => __( 'Custom (insert function in your template)', 'gtm-kit' ), - ], - 3 => [ - 'label' => __( 'Disable <noscript> implementation', 'gtm-kit' ), - ], - -]; - -$gtmkit_description = __( 'The preferred method to implement the <noscript> container code is just after the opening <body> tag.', 'gtm-kit' ) . ' '; -$gtmkit_description .= __( 'This requires that your theme uses the "body_open" hook.', 'gtm-kit' ) . ' '; -$gtmkit_description .= __( 'If your theme does not support this the script can be injected in the footer or you can use the function below.', 'gtm-kit' ); -$gtmkit_description .= '

'; -$gtmkit_description .= '<?php if ( function_exists( \'gtmkit_the_noscript_tag\' ) ) { gtmkit_the_noscript_tag(); } ?>'; - -$form->setting_row( - 'radio', - 'noscript_implementation', - $gtmkit_label, - $gtmkit_field_data, - $gtmkit_description -); -?> - -setting_row( - 'text-input', - 'datalayer_name', - __( 'dataLayer variable name:', 'gtm-kit' ), - [], - __( 'The default name of the data layer object is dataLayer. If you prefer to use a different name for your data layer, you may do.', 'gtm-kit' ) -); -?> - - -
-

-
- -setting_row( - 'text-input', - 'sgtm_domain', - __( 'GTM Server Side Domain:', 'gtm-kit' ), - [], - __( 'Enter your custom domain name if you are using a custom server side GTM container for tracking.', 'gtm-kit' ) -); -?> - -setting_row( - 'text-input', - 'sgtm_container_identifier', - __( 'sGTM container identifier:', 'gtm-kit' ), - [], - __( 'Only use if you are using a custom loader', 'gtm-kit' ) -); -?> diff --git a/src/views/tabs/general/dashboard.php b/src/views/tabs/general/dashboard.php deleted file mode 100644 index ac95861..0000000 --- a/src/views/tabs/general/dashboard.php +++ /dev/null @@ -1,109 +0,0 @@ - -
-

-
-
    -
  • -

    Google Tag Manager Container

    - get( 'general', 'gtm_id' ) && Options::init()->get( 'general', 'container_active' ) ) : ?> - - - -
    -
    -

    - - get( 'general', 'gtm_id' ) ); ?> -

    -
    -
    - - - -
    -
    - - - - -
    -
    -

    - -

    -
    -
    - - - -
    -
    - -
  • -
  • -

    - get( 'general', 'gtm_id' ) && Options::init()->get( 'general', 'analytics_active' ) ) : ?> - - - -
    -
    -

    - -

    -
    -
    - - - -
    -
    - - - - -
    -
    -

    - -

    -
    -
    - - - -
    -
    - -
  • -
-
-
- -
-

- -
- -
-

- -
diff --git a/src/views/tabs/general/google_consent_mode.php b/src/views/tabs/general/google_consent_mode.php deleted file mode 100644 index 87f9937..0000000 --- a/src/views/tabs/general/google_consent_mode.php +++ /dev/null @@ -1,94 +0,0 @@ - -

- -

- -
-
-

- -

-
-

-

-

-

- - - -

-
-
-
- -

- -

- - setting_row( - 'checkbox-toggle', - 'gcm_default_settings', - __( 'Activate GCM settings', 'gtm-kit' ), - [], - __( 'Choose this option if you would like to activate the default settings below.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'gcm_ad_storage', - __( 'Ad Storage', 'gtm-kit' ), - [], - __( 'Enables storage, such as cookies, related to advertising', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'gcm_analytics_storage', - __( 'Analytics Storage', 'gtm-kit' ), - [], - __( 'Enables storage, such as cookies, related to analytics (for example, visit duration)', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'gcm_functionality_storage', - __( 'Functionality Storage', 'gtm-kit' ), - [], - __( 'Enables storage that supports the functionality of the website or app such as language settings', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'gcm_personalization_storage', - __( 'Personalization Storage', 'gtm-kit' ), - [], - __( 'Enables storage related to personalization such as video recommendations', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'gcm_security_storage', - __( 'Security Storage', 'gtm-kit' ), - [], - __( 'Enables storage related to security such as authentication functionality, fraud prevention, and other user protection', 'gtm-kit' ) - ); - diff --git a/src/views/tabs/general/misc.php b/src/views/tabs/general/misc.php deleted file mode 100644 index d9554af..0000000 --- a/src/views/tabs/general/misc.php +++ /dev/null @@ -1,115 +0,0 @@ - -
-

- -

-
- -
-
-

-
-

- -

-

- - -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
%s', esc_html__( 'Server type:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['web_server'] ) ); ?>
%s', esc_html__( 'PHP version number:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['php_version'] ) ); ?>
%s', esc_html__( 'WordPress version number:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['wordpress_version'] ) ); ?>
%s', esc_html__( 'WooCommerce version number:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['woocommerce_version'] ) ); ?>
%s', esc_html__( 'Easy Digital Downloads version number:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['edd_version'] ) ); ?>
%s', esc_html__( 'WordPress multisite:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['multisite'] ? 'true' : 'false' ) ); ?>
%s', esc_html__( 'Current theme:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['current_theme'] ) ); ?>
%s', esc_html__( 'Current site language:', 'gtm-kit' ) ); ?>%s', esc_html( $gtmkit_site_data['locale'] ) ); ?>
%s', esc_html__( 'Active plugins:', 'gtm-kit' ) ); ?>%s', esc_html__( 'Plugin names of all active plugins', 'gtm-kit' ) ); ?>
%s', esc_html__( 'Anonymized GTM Kit settings:', 'gtm-kit' ) ); ?>%s', esc_html__( 'Which GTM Kit settings are active', 'gtm-kit' ) ); ?>
- -

- -

- -
-
-
-setting_row( - 'checkbox-toggle', - 'analytics_active', - __( 'Share anonymous data', 'gtm-kit' ), - [], - __( 'I agree to share anonymous data with the development team to help improve GTM Kit.', 'gtm-kit' ) -); -?> - -setting_row( - 'checkbox-toggle', - 'console_log', - __( 'Console log', 'gtm-kit' ), - [], - __( 'Log helpful messages and warnings to the browser log.', 'gtm-kit' ) -); -?> diff --git a/src/views/tabs/general/post_data.php b/src/views/tabs/general/post_data.php deleted file mode 100644 index 299c3bc..0000000 --- a/src/views/tabs/general/post_data.php +++ /dev/null @@ -1,100 +0,0 @@ - -
-

- -

- -
- -setting_row( - 'checkbox-toggle', - 'datalayer_post_type', - __( 'Post type', 'gtm-kit' ), - [], - __( 'include the type of the current post or archive page.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_page_type', - __( 'Page type', 'gtm-kit' ), - [], - __( 'include the defined page type. I.e. post, page, product, category, cart, checkout etc. You may override this on page-level and set you own page type i.e. "campaign".', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_categories', - __( 'Categories', 'gtm-kit' ), - [], - __( 'include the categories of the current post or archive page.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_tags', - __( 'Tags', 'gtm-kit' ), - [], - __( 'include the tags of the current post or archive page.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_post_title', - __( 'Post title', 'gtm-kit' ), - [], - __( 'include the post title of the current post.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_post_id', - __( 'Post ID', 'gtm-kit' ), - [], - __( 'include the Post ID of the current post.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_post_date', - __( 'Post date', 'gtm-kit' ), - [], - __( 'include the post date.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_post_author_name', - __( 'Post author name', 'gtm-kit' ), - [], - __( 'include the post author name.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_post_author_id', - __( 'Post author ID', 'gtm-kit' ), - [], - __( 'include the post author ID.', 'gtm-kit' ) -); - -?> diff --git a/src/views/tabs/general/user_data.php b/src/views/tabs/general/user_data.php deleted file mode 100644 index 9bb863d..0000000 --- a/src/views/tabs/general/user_data.php +++ /dev/null @@ -1,61 +0,0 @@ - -
-

- -

-

-
- -
-
-

-
-
    -
  • -
-
-
-
- -setting_row( - 'checkbox-toggle', - 'datalayer_logged_in', - __( 'Logged in', 'gtm-kit' ), - [], - __( 'include whether the user is logged in.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_user_id', - __( 'User ID', 'gtm-kit' ), - [], - __( 'include the user ID if the user is logged in.', 'gtm-kit' ) -); - -$form->setting_row( - 'checkbox-toggle', - 'datalayer_user_role', - __( 'User role', 'gtm-kit' ), - [], - __( 'include the user role if the user is logged in.', 'gtm-kit' ) -); diff --git a/src/views/tabs/general/whats_new.php b/src/views/tabs/general/whats_new.php deleted file mode 100644 index 3ff5d97..0000000 --- a/src/views/tabs/general/whats_new.php +++ /dev/null @@ -1,111 +0,0 @@ - -

- -

- -
- -
-

- 1.13: -

-
-

-

-

- - - -

-
-
- -
-

- 1.12: -

-
-

-

-

- - - -

-
-
- -
-

- 1.11: -

-
-

-

-

- - - -

-
-
- -
-

- 1.10: -

-
-

-

- - - -

-
-
- -
-

- -

-
-

- - - -

-
-
- -
-

- - ( ) -

-
-

- - -

-
-
- -
diff --git a/src/views/tabs/help/help.php b/src/views/tabs/help/help.php deleted file mode 100644 index 39f8019..0000000 --- a/src/views/tabs/help/help.php +++ /dev/null @@ -1,63 +0,0 @@ - -

- -

- -
- -
-

- -

-
-

- - - - - - -

-

-
    -
  • -
  • -
-
-
- - - -
diff --git a/src/views/tabs/help/support.php b/src/views/tabs/help/support.php deleted file mode 100644 index 53b410d..0000000 --- a/src/views/tabs/help/support.php +++ /dev/null @@ -1,40 +0,0 @@ - -

- -

- -
- -
-

- -

-
-
    -
  • -
  • -
  • (gtmkit.com)
  • -
  • -
-
-
- -
diff --git a/src/views/tabs/integrations/cf7.php b/src/views/tabs/integrations/cf7.php deleted file mode 100644 index 3b5e423..0000000 --- a/src/views/tabs/integrations/cf7.php +++ /dev/null @@ -1,74 +0,0 @@ - -
-

- -

-

Contact Form 7'; ?>

- -

- . - Contact Form 7' - ); - ?> -

- -
- setting_row( - 'checkbox-toggle', - 'cf7_integration', - __( 'Track Contact Form 7', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_cf7_is_inactive, - ], - ], - __( 'Choose this option if you would like to track form submissions.', 'gtm-kit' ) - ); - - $gtmkit_field_data = [ - 'attributes' => [ - 'disabled' => $gtmkit_cf7_is_inactive, - ], - ]; - $gtmkit_field_data['options'] = [ - 1 => [ - 'label' => __( 'Only on pages where where the Contact Form 7 script is registered (recommended).', 'gtm-kit' ), - ], - 2 => [ - 'label' => __( 'On all pages', 'gtm-kit' ), - ], - ]; - $gtmkit_field_data['legend'] = __( 'Where do you want load the JavaScript?', 'gtm-kit' ); - $gtmkit_field_data['legend_attr'] = [ 'class' => 'radiogroup' ]; - - $form->setting_row( - 'radio', - 'cf7_load_js', - __( 'Load JavaScript', 'gtm-kit' ), - $gtmkit_field_data - ); diff --git a/src/views/tabs/integrations/edd.php b/src/views/tabs/integrations/edd.php deleted file mode 100644 index a9ed58c..0000000 --- a/src/views/tabs/integrations/edd.php +++ /dev/null @@ -1,120 +0,0 @@ - -
-

- -

-

Easy Digital Downloads'; ?>

- -

- . - Easy Digital Downloads' - ); - ?> -

- -
- - setting_row( - 'checkbox-toggle', - 'edd_integration', - __( 'Track Easy Digital Downloads', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_edd_is_inactive, - ], - ], - __( 'Choose this option if you would like to track e-commerce data.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'edd_use_sku', - __( 'Use SKU instead of ID', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_edd_is_inactive, - ], - ], - __( 'Use SKU instead of the product ID with fallback to ID if no SKU is set.', 'gtm-kit' ) - ); - - $form->setting_row( - 'select', - 'edd_google_business_vertical', - __( 'Google Business Vertical', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_edd_is_inactive, - ], - 'options' => [ - 'retail' => __( 'Retail', 'gtm-kit' ) . ' - (retail)', - 'education' => __( 'Education', 'gtm-kit' ) . ' - (education)', - 'flights' => __( 'Flights', 'gtm-kit' ) . ' - (flights)', - 'hotel_rental' => __( 'Hotel rental', 'gtm-kit' ) . ' - (hotel_rental)', - 'jobs' => __( 'Jobs', 'gtm-kit' ) . ' (jobs)', - 'local' => __( 'Local deals', 'gtm-kit' ) . ' - (local)', - 'real_estate' => __( 'Real estate', 'gtm-kit' ) . ' - (real_estate)', - 'travel' => __( 'Travel', 'gtm-kit' ) . ' - (travel)', - 'custom' => __( 'Custom', 'gtm-kit' ) . ' - (custom)', - ], - ], - __( 'In order to use Google Ads Remarketing you must select your business type (vertical).', 'gtm-kit' ) - ); - - $form->setting_row( - 'text-input', - 'edd_product_id_prefix', - __( 'Product ID prefix', 'gtm-kit' ), - [], - __( 'If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'edd_exclude_tax', - __( 'Exclude tax', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_edd_is_inactive, - ], - ], - __( 'Exclude tax from prices and revenue', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'edd_dequeue_script', - __( 'Dequeue Default JS', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_edd_is_inactive, - ], - ], - __( 'Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.', 'gtm-kit' ) - ); - diff --git a/src/views/tabs/integrations/integrations.php b/src/views/tabs/integrations/integrations.php deleted file mode 100644 index f1fb145..0000000 --- a/src/views/tabs/integrations/integrations.php +++ /dev/null @@ -1,28 +0,0 @@ - -
-

- -

-
- -
- -
diff --git a/src/views/tabs/integrations/woocommerce.php b/src/views/tabs/integrations/woocommerce.php deleted file mode 100644 index 9f21367..0000000 --- a/src/views/tabs/integrations/woocommerce.php +++ /dev/null @@ -1,269 +0,0 @@ - -
-

- -

-

WooCommerce'; ?>

- -

- . - WooCommerce' - ); - ?> -

- -
- - setting_row( - 'checkbox-toggle', - 'woocommerce_integration', - __( 'Track WooCommerce', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Choose this option if you would like to track e-commerce data.', 'gtm-kit' ) - ); - - $gtmkit_taxonomies = get_taxonomies( - [ - 'show_ui' => true, - 'public' => true, - '_builtin' => false, - ], - 'object' - ); - - $gtmkit_field_data = [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ]; - $gtmkit_field_data['options'] = []; - - foreach ( $gtmkit_taxonomies as $taxonomy ) { // phpcs:ignore - $gtmkit_field_data['options'][ $taxonomy->name ] = $taxonomy->label; - } - - $form->setting_row( - 'select', - 'woocommerce_brand', - __( 'Brand', 'gtm-kit' ), - $gtmkit_field_data - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_use_sku', - __( 'Use SKU instead of ID', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Use SKU instead of the product ID with fallback to ID if no SKU is set.', 'gtm-kit' ) - ); - - $form->setting_row( - 'select', - 'woocommerce_google_business_vertical', - __( 'Google Business Vertical', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - 'options' => [ - 'retail' => __( 'Retail', 'gtm-kit' ) . ' - (retail)', - 'education' => __( 'Education', 'gtm-kit' ) . ' - (education)', - 'flights' => __( 'Flights', 'gtm-kit' ) . ' - (flights)', - 'hotel_rental' => __( 'Hotel rental', 'gtm-kit' ) . ' - (hotel_rental)', - 'jobs' => __( 'Jobs', 'gtm-kit' ) . ' (jobs)', - 'local' => __( 'Local deals', 'gtm-kit' ) . ' - (local)', - 'real_estate' => __( 'Real estate', 'gtm-kit' ) . ' - (real_estate)', - 'travel' => __( 'Travel', 'gtm-kit' ) . ' - (travel)', - 'custom' => __( 'Custom', 'gtm-kit' ) . ' - (custom)', - ], - ], - __( 'In order to use Google Ads Remarketing you must select your business type (vertical).', 'gtm-kit' ) - ); - - $form->setting_row( - 'text-input', - 'woocommerce_product_id_prefix', - __( 'Product ID prefix', 'gtm-kit' ), - [], - __( 'If your product feed generator is adding a prefix to the product IDs, you can add the prefix here to include it in the Data Layer.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_exclude_tax', - __( 'Exclude tax', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Exclude tax from prices and revenue', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_exclude_shipping', - __( 'Exclude shipping from revenue', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Exclude shipping from revenue', 'gtm-kit' ) - ); - - $gtmkit_field_data = [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ]; - $gtmkit_field_data['options'] = [ - 1 => [ - 'label' => __( "When the 'Place order' button is clicked", 'gtm-kit' ), - ], - 2 => [ - 'label' => __( "When a shipment method is selected with fallback to the 'Place order' button.", 'gtm-kit' ), - ], - 0 => [ - 'label' => __( "Disable the 'add_shipment_info' event.", 'gtm-kit' ), - ], - ]; - $gtmkit_field_data['legend'] = __( 'When do you want to fire the "add_shipment_info" event?', 'gtm-kit' ); - $gtmkit_field_data['legend_attr'] = [ 'class' => 'radiogroup' ]; - - $form->setting_row( - 'radio', - 'woocommerce_shipping_info', - __( 'Event: add_shipping_info', 'gtm-kit' ), - $gtmkit_field_data - ); - - $gtmkit_field_data = [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ]; - $gtmkit_field_data['options'] = [ - 1 => [ - 'label' => __( "When the 'Place order' button is clicked", 'gtm-kit' ), - ], - 2 => [ - 'label' => __( "When a payment method is selected with fallback to the 'Place order' button.", 'gtm-kit' ), - ], - 0 => [ - 'label' => __( "Disable the 'add_payment_info' event.", 'gtm-kit' ), - ], - ]; - $gtmkit_field_data['legend'] = __( 'When do you want to fire the "add_payment_info" event?', 'gtm-kit' ); - $gtmkit_field_data['legend_attr'] = [ 'class' => 'radiogroup' ]; - - $form->setting_row( - 'radio', - 'woocommerce_payment_info', - __( 'Event: add_payment_info', 'gtm-kit' ), - $gtmkit_field_data - ); - - - $gtmkit_field_data['options'] = [ - 0 => [ - 'label' => __( 'Only push view_item on the master product', 'gtm-kit' ), - ], - 1 => [ - 'label' => __( 'Push view_item on master and variation products (higher number of views).', 'gtm-kit' ), - ], - 2 => [ - 'label' => __( 'Only push view_item on variation products.', 'gtm-kit' ), - ], - ]; - $gtmkit_field_data['legend'] = __( 'When do you want to fire the "view_item" event on variable products?', 'gtm-kit' ); - $gtmkit_field_data['legend_attr'] = [ 'class' => 'radiogroup' ]; - - $form->setting_row( - 'radio', - 'woocommerce_variable_product_tracking', - __( 'Event: view_item', 'gtm-kit' ), - $gtmkit_field_data - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_include_permalink_structure', - __( 'Include permalink structure', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Enable this option to include the permalink structure of the product base, category base, tag base and attribute base.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_include_pages', - __( 'Include pages', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Enable this option to include the path of cart, checkout, order received adn my account page.', 'gtm-kit' ) - ); - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_include_customer_data', - __( 'Include customer data', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Enable this option to include customer data in the data layer on the "purchase" event.', 'gtm-kit' ) - ); - - - $form->setting_row( - 'checkbox-toggle', - 'woocommerce_dequeue_script', - __( 'Dequeue Default JS', 'gtm-kit' ), - [ - 'attributes' => [ - 'disabled' => $gtmkit_woocommerce_is_inactive, - ], - ], - __( 'Enable this option to dequeue the default JavaScript if you plan to create your own JavaScript.', 'gtm-kit' ) - ); diff --git a/src/views/tutorials-metabox.php b/src/views/tutorials-metabox.php deleted file mode 100644 index 43c8979..0000000 --- a/src/views/tutorials-metabox.php +++ /dev/null @@ -1,54 +0,0 @@ - __( 'Getting started', 'gtm-kit' ), - 'description' => __( 'How to get the most out of Google Tag Manager with GTM Kit', 'gtm-kit' ), - 'url' => 'https://gtmkit.com/documentation/getting-started-with-gtm-kit/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=getting-started&utm_content=dashboard-tutorials', - ], - [ - 'name' => __( 'WooCommerce integration', 'gtm-kit' ), - 'description' => __( 'Integrate WooCommerce with Google Tag Manager and Google Analytics', 'gtm-kit' ), - 'url' => 'https://gtmkit.com/documentation/woocommerce/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=woocommerce&utm_content=dashboard-tutorials', - ], - [ - 'name' => __( 'See all tutorials...', 'gtm-kit' ), - 'description' => __( 'See all our tutorial and get the most out of GTM Kit', 'gtm-kit' ), - 'url' => 'https://gtmkit.com/documentation/#utm_source=gtmkit-plugin&utm_medium=software&utm_term=documentation&utm_content=dashboard-tutorials', - ], -]; -?> -
-
-
    - -
  • -

    -
    -
    -

    -
    -
    - - - -
    -
    -
  • - -
-
-