| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Floating Mini Cart Options. |
| 5 |
* |
| 6 |
* @package Merchant |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; // Exit if accessed directly |
| 11 |
} |
| 12 |
|
| 13 |
// Icon Settings |
| 14 |
Merchant_Admin_Options::create( array( |
| 15 |
'title' => esc_html__( 'Icon Settings', 'merchant' ), |
| 16 |
'module' => 'floating-mini-cart', |
| 17 |
'fields' => array( |
| 18 |
|
| 19 |
array( |
| 20 |
'id' => 'display', |
| 21 |
'type' => 'select', |
| 22 |
'title' => esc_html__( 'Display', 'merchant' ), |
| 23 |
'options' => array( |
| 24 |
'cart-not-empty' => esc_html__( 'When cart is not empty', 'merchant' ), |
| 25 |
'always' => esc_html__( 'Always', 'merchant' ) |
| 26 |
), |
| 27 |
'default' => 'always', |
| 28 |
), |
| 29 |
|
| 30 |
array( |
| 31 |
'id' => 'icon', |
| 32 |
'type' => 'choices', |
| 33 |
'title' => esc_html__( 'Icon', 'merchant' ), |
| 34 |
'options' => array( |
| 35 |
'cart-icon-1' => MERCHANT_URI . 'assets/images/icons/floating-mini-cart/admin/cart-icon-1.svg', |
| 36 |
'cart-icon-2' => MERCHANT_URI . 'assets/images/icons/floating-mini-cart/admin/cart-icon-2.svg', |
| 37 |
'cart-icon-3' => MERCHANT_URI . 'assets/images/icons/floating-mini-cart/admin/cart-icon-3.svg', |
| 38 |
'cart-icon-4' => MERCHANT_URI . 'assets/images/icons/floating-mini-cart/admin/cart-icon-4.svg', |
| 39 |
'cart-icon-5' => MERCHANT_URI . 'assets/images/icons/floating-mini-cart/admin/cart-icon-5.svg', |
| 40 |
), |
| 41 |
'default' => 'cart-icon-1', |
| 42 |
), |
| 43 |
|
| 44 |
array( |
| 45 |
'id' => 'icon-position', |
| 46 |
'type' => 'radio', |
| 47 |
'title' => esc_html__( 'Position', 'merchant' ), |
| 48 |
'options' => array( |
| 49 |
'left' => esc_html__( 'Left', 'merchant' ), |
| 50 |
'right' => esc_html__( 'Right', 'merchant' ), |
| 51 |
), |
| 52 |
'default' => 'right', |
| 53 |
), |
| 54 |
|
| 55 |
array( |
| 56 |
'id' => 'icon-size', |
| 57 |
'type' => 'range', |
| 58 |
'title' => esc_html__( 'Icon size', 'merchant' ), |
| 59 |
'min' => 0, |
| 60 |
'max' => 250, |
| 61 |
'step' => 1, |
| 62 |
'default' => 25, |
| 63 |
'unit' => 'px', |
| 64 |
), |
| 65 |
|
| 66 |
array( |
| 67 |
'id' => 'corner-offset', |
| 68 |
'type' => 'range', |
| 69 |
'title' => esc_html__( 'Corner offset', 'merchant' ), |
| 70 |
'min' => 0, |
| 71 |
'max' => 250, |
| 72 |
'step' => 1, |
| 73 |
'default' => 30, |
| 74 |
'unit' => 'px', |
| 75 |
), |
| 76 |
|
| 77 |
array( |
| 78 |
'id' => 'border-radius', |
| 79 |
'type' => 'range', |
| 80 |
'title' => esc_html__( 'Border radius', 'merchant' ), |
| 81 |
'min' => 0, |
| 82 |
'max' => 35, |
| 83 |
'step' => 1, |
| 84 |
'default' => 35, |
| 85 |
'unit' => 'px', |
| 86 |
), |
| 87 |
|
| 88 |
array( |
| 89 |
'id' => 'icon-color', |
| 90 |
'type' => 'color', |
| 91 |
'title' => esc_html__( 'Icon color', 'merchant' ), |
| 92 |
'default' => '#ffffff', |
| 93 |
), |
| 94 |
|
| 95 |
array( |
| 96 |
'id' => 'background-color', |
| 97 |
'type' => 'color', |
| 98 |
'title' => esc_html__( 'Background color', 'merchant' ), |
| 99 |
'default' => '#212121', |
| 100 |
), |
| 101 |
|
| 102 |
array( |
| 103 |
'id' => 'counter-color', |
| 104 |
'type' => 'color', |
| 105 |
'title' => esc_html__( 'Counter color', 'merchant' ), |
| 106 |
'default' => '#ffffff', |
| 107 |
), |
| 108 |
|
| 109 |
array( |
| 110 |
'id' => 'counter-background-color', |
| 111 |
'type' => 'color', |
| 112 |
'title' => esc_html__( 'Counter background color', 'merchant' ), |
| 113 |
'default' => '#757575', |
| 114 |
), |
| 115 |
|
| 116 |
) |
| 117 |
) ); |
| 118 |
|
| 119 |
// Side Cart Settings |
| 120 |
Merchant_Admin_Options::create( array( |
| 121 |
'title' => esc_html__( 'Side Cart Settings', 'merchant' ), |
| 122 |
'module' => 'floating-mini-cart', |
| 123 |
'fields' => array( |
| 124 |
|
| 125 |
array( |
| 126 |
'id' => 'side-cart-width', |
| 127 |
'type' => 'range', |
| 128 |
'title' => esc_html__( 'Side cart width', 'merchant' ), |
| 129 |
'min' => 0, |
| 130 |
'max' => 2000, |
| 131 |
'step' => 1, |
| 132 |
'default' => 380, |
| 133 |
'unit' => 'px', |
| 134 |
), |
| 135 |
|
| 136 |
array( |
| 137 |
'id' => 'side-cart-title-color', |
| 138 |
'type' => 'color', |
| 139 |
'title' => esc_html__( 'Title color', 'merchant' ), |
| 140 |
'default' => '#212121', |
| 141 |
), |
| 142 |
|
| 143 |
array( |
| 144 |
'id' => 'side-cart-title-icon-color', |
| 145 |
'type' => 'color', |
| 146 |
'title' => esc_html__( 'Title icon color', 'merchant' ), |
| 147 |
'default' => '#212121', |
| 148 |
), |
| 149 |
|
| 150 |
array( |
| 151 |
'id' => 'side-cart-title-background-color', |
| 152 |
'type' => 'color', |
| 153 |
'title' => esc_html__( 'Title background color', 'merchant' ), |
| 154 |
'default' => '#cccccc', |
| 155 |
), |
| 156 |
|
| 157 |
array( |
| 158 |
'id' => 'side-cart-content-text-color', |
| 159 |
'type' => 'color', |
| 160 |
'title' => esc_html__( 'Content text color', 'merchant' ), |
| 161 |
'default' => '#212121', |
| 162 |
), |
| 163 |
|
| 164 |
array( |
| 165 |
'id' => 'side-cart-content-background-color', |
| 166 |
'type' => 'color', |
| 167 |
'title' => esc_html__( 'Content background color', 'merchant' ), |
| 168 |
'default' => '#ffffff', |
| 169 |
), |
| 170 |
|
| 171 |
array( |
| 172 |
'id' => 'side-cart-content-remove-color', |
| 173 |
'type' => 'color', |
| 174 |
'title' => esc_html__( 'Content (x) color', 'merchant' ), |
| 175 |
'default' => '#ffffff', |
| 176 |
), |
| 177 |
|
| 178 |
array( |
| 179 |
'id' => 'side-cart-content-remove-background-color', |
| 180 |
'type' => 'color', |
| 181 |
'title' => esc_html__( 'Content (x) background color', 'merchant' ), |
| 182 |
'default' => '#212121', |
| 183 |
), |
| 184 |
|
| 185 |
array( |
| 186 |
'id' => 'side-cart-total-text-color', |
| 187 |
'type' => 'color', |
| 188 |
'title' => esc_html__( 'Total text color', 'merchant' ), |
| 189 |
'default' => '#212121', |
| 190 |
), |
| 191 |
|
| 192 |
array( |
| 193 |
'id' => 'side-cart-total-background-color', |
| 194 |
'type' => 'color', |
| 195 |
'title' => esc_html__( 'Total background color', 'merchant' ), |
| 196 |
'default' => '#f5f5f5', |
| 197 |
), |
| 198 |
|
| 199 |
array( |
| 200 |
'id' => 'side-cart-button-color', |
| 201 |
'type' => 'color', |
| 202 |
'title' => esc_html__( 'Button color', 'merchant' ), |
| 203 |
'default' => '#ffffff', |
| 204 |
), |
| 205 |
|
| 206 |
array( |
| 207 |
'id' => 'side-cart-button-color-hover', |
| 208 |
'type' => 'color', |
| 209 |
'title' => esc_html__( 'Button color hover', 'merchant' ), |
| 210 |
'default' => '#ffffff', |
| 211 |
), |
| 212 |
|
| 213 |
array( |
| 214 |
'id' => 'side-cart-button-border-color', |
| 215 |
'type' => 'color', |
| 216 |
'title' => esc_html__( 'Button border color', 'merchant' ), |
| 217 |
'default' => '#212121', |
| 218 |
), |
| 219 |
|
| 220 |
array( |
| 221 |
'id' => 'side-cart-button-border-color-hover', |
| 222 |
'type' => 'color', |
| 223 |
'title' => esc_html__( 'Button border color hover', 'merchant' ), |
| 224 |
'default' => '#313131', |
| 225 |
), |
| 226 |
|
| 227 |
array( |
| 228 |
'id' => 'side-cart-button-background-color', |
| 229 |
'type' => 'color', |
| 230 |
'title' => esc_html__( 'Button background color', 'merchant' ), |
| 231 |
'default' => '#212121', |
| 232 |
), |
| 233 |
|
| 234 |
array( |
| 235 |
'id' => 'side-cart-button-background-color-hover', |
| 236 |
'type' => 'color', |
| 237 |
'title' => esc_html__( 'Button background color hover', 'merchant' ), |
| 238 |
'default' => '#313131', |
| 239 |
), |
| 240 |
|
| 241 |
) |
| 242 |
) ); |
| 243 |
|