| 1 |
<?php |
| 2 |
/** |
| 3 |
* Merchant - Scroll to Top Button |
| 4 |
*/ |
| 5 |
|
| 6 |
if ( ! defined( 'ABSPATH' ) ) { |
| 7 |
exit; // Exit if accessed directly |
| 8 |
} |
| 9 |
|
| 10 |
/** |
| 11 |
* Settings for Desktop |
| 12 |
*/ |
| 13 |
|
| 14 |
return array( |
| 15 |
array( |
| 16 |
'module' => 'scroll-to-top-button', |
| 17 |
'title' => __( 'Settings for Desktop', 'merchant' ), |
| 18 |
'fields' => array( |
| 19 |
|
| 20 |
array( |
| 21 |
'id' => 'style', |
| 22 |
'type' => 'select', |
| 23 |
'title' => esc_html__( 'Button style', 'merchant' ), |
| 24 |
'options' => array( |
| 25 |
'merchant-style-filled' => 'Filled', |
| 26 |
'merchant-style-outline' => 'Outline', |
| 27 |
), |
| 28 |
'default' => 'merchant-style-filled', |
| 29 |
), |
| 30 |
|
| 31 |
array( |
| 32 |
'id' => 'type', |
| 33 |
'type' => 'select', |
| 34 |
'title' => esc_html__( 'Type', 'merchant' ), |
| 35 |
'options' => array( |
| 36 |
'icon' => esc_html__( 'Icon', 'merchant' ), |
| 37 |
'text-icon' => esc_html__( 'Text + icon', 'merchant' ), |
| 38 |
), |
| 39 |
'default' => 'icon', |
| 40 |
), |
| 41 |
|
| 42 |
array( |
| 43 |
'id' => 'icon', |
| 44 |
'type' => 'choices', |
| 45 |
'title' => esc_html__( 'Icon', 'merchant' ), |
| 46 |
'options' => array( |
| 47 |
'arrow-1' => '%s/arrow-1.svg', |
| 48 |
'arrow-2' => '%s/arrow-2.svg', |
| 49 |
'arrow-3' => '%s/arrow-3.svg', |
| 50 |
'arrow-4' => '%s/arrow-4.svg', |
| 51 |
), |
| 52 |
'default' => 'arrow-1', |
| 53 |
), |
| 54 |
|
| 55 |
array( |
| 56 |
'id' => 'text', |
| 57 |
'type' => 'text', |
| 58 |
'title' => 'Text', |
| 59 |
'default' => esc_html__( 'Back to top', 'merchant' ), |
| 60 |
'condition' => array( 'type', '==', 'text-icon' ), |
| 61 |
), |
| 62 |
|
| 63 |
array( |
| 64 |
'id' => 'position', |
| 65 |
'type' => 'select', |
| 66 |
'title' => esc_html__( 'Position', 'merchant' ), |
| 67 |
'options' => array( |
| 68 |
'merchant-position-left' => 'Left', |
| 69 |
'merchant-position-right' => 'Right', |
| 70 |
), |
| 71 |
'default' => 'merchant-position-right', |
| 72 |
), |
| 73 |
|
| 74 |
array( |
| 75 |
'id' => 'side-offset', |
| 76 |
'type' => 'range', |
| 77 |
'title' => esc_html__( 'Side offset', 'merchant' ), |
| 78 |
'min' => 0, |
| 79 |
'max' => 500, |
| 80 |
'step' => 1, |
| 81 |
'unit' => 'px', |
| 82 |
'default' => 30, |
| 83 |
), |
| 84 |
|
| 85 |
array( |
| 86 |
'id' => 'bottom-offset', |
| 87 |
'type' => 'range', |
| 88 |
'title' => esc_html__( 'Bottom offset', 'merchant' ), |
| 89 |
'min' => 0, |
| 90 |
'max' => 500, |
| 91 |
'step' => 1, |
| 92 |
'unit' => 'px', |
| 93 |
'default' => 30, |
| 94 |
), |
| 95 |
|
| 96 |
array( |
| 97 |
'id' => 'visibility', |
| 98 |
'type' => 'select', |
| 99 |
'title' => esc_html__( 'Visibility', 'merchant' ), |
| 100 |
'options' => array( |
| 101 |
'all' => esc_html__( 'Show on all devices', 'merchant' ), |
| 102 |
'desktop-only' => esc_html__( 'Desktop only', 'merchant' ), |
| 103 |
'mobile-only' => esc_html__( 'Mobile only', 'merchant' ), |
| 104 |
), |
| 105 |
'default' => 'all', |
| 106 |
), |
| 107 |
|
| 108 |
), |
| 109 |
), |
| 110 |
array( |
| 111 |
'module' => 'scroll-to-top-button', |
| 112 |
'title' => 'Settings for Mobile', |
| 113 |
'fields' => array( |
| 114 |
|
| 115 |
array( |
| 116 |
'id' => 'side-offset-mobile', |
| 117 |
'type' => 'range', |
| 118 |
'title' => esc_html__( 'Side offset', 'merchant' ), |
| 119 |
'min' => 0, |
| 120 |
'max' => 150, |
| 121 |
'step' => 1, |
| 122 |
'unit' => 'px', |
| 123 |
'default' => 30, |
| 124 |
), |
| 125 |
|
| 126 |
array( |
| 127 |
'id' => 'bottom-offset-mobile', |
| 128 |
'type' => 'range', |
| 129 |
'title' => esc_html__( 'Bottom offset', 'merchant' ), |
| 130 |
'min' => 0, |
| 131 |
'max' => 150, |
| 132 |
'step' => 1, |
| 133 |
'unit' => 'px', |
| 134 |
'default' => 30, |
| 135 |
), |
| 136 |
|
| 137 |
), |
| 138 |
), |
| 139 |
array( |
| 140 |
'module' => 'scroll-to-top-button', |
| 141 |
'title' => esc_html__( 'Style', 'merchant' ), |
| 142 |
'fields' => array( |
| 143 |
|
| 144 |
array( |
| 145 |
'id' => 'icon-size', |
| 146 |
'type' => 'range', |
| 147 |
'title' => esc_html__( 'Icon size', 'merchant' ), |
| 148 |
'min' => 1, |
| 149 |
'max' => 500, |
| 150 |
'step' => 1, |
| 151 |
'unit' => 'px', |
| 152 |
'default' => 18, |
| 153 |
), |
| 154 |
|
| 155 |
array( |
| 156 |
'id' => 'text-size', |
| 157 |
'type' => 'range', |
| 158 |
'title' => esc_html__( 'Text size', 'merchant' ), |
| 159 |
'min' => 1, |
| 160 |
'max' => 500, |
| 161 |
'step' => 1, |
| 162 |
'unit' => 'px', |
| 163 |
'default' => 18, |
| 164 |
'condition' => array( 'type', '==', 'text-icon' ), |
| 165 |
), |
| 166 |
|
| 167 |
array( |
| 168 |
'id' => 'padding', |
| 169 |
'type' => 'range', |
| 170 |
'title' => esc_html__( 'Padding', 'merchant' ), |
| 171 |
'min' => 0, |
| 172 |
'max' => 500, |
| 173 |
'step' => 1, |
| 174 |
'unit' => 'px', |
| 175 |
'default' => 15, |
| 176 |
), |
| 177 |
|
| 178 |
array( |
| 179 |
'id' => 'border-size', |
| 180 |
'type' => 'range', |
| 181 |
'title' => esc_html__( 'Border size', 'merchant' ), |
| 182 |
'min' => 1, |
| 183 |
'max' => 500, |
| 184 |
'step' => 1, |
| 185 |
'unit' => 'px', |
| 186 |
'default' => 2, |
| 187 |
'condition' => array( 'style', '==', 'merchant-style-outline' ), |
| 188 |
), |
| 189 |
|
| 190 |
array( |
| 191 |
'id' => 'border-radius', |
| 192 |
'type' => 'range', |
| 193 |
'title' => esc_html__( 'Border radius', 'merchant' ), |
| 194 |
'min' => 0, |
| 195 |
'max' => 999, |
| 196 |
'step' => 1, |
| 197 |
'unit' => 'px', |
| 198 |
'default' => 30, |
| 199 |
), |
| 200 |
|
| 201 |
array( |
| 202 |
'id' => 'icon-color', |
| 203 |
'type' => 'color', |
| 204 |
'title' => esc_html__( 'Icon color', 'merchant' ), |
| 205 |
'default' => '#FFFFFF', |
| 206 |
), |
| 207 |
|
| 208 |
array( |
| 209 |
'id' => 'icon-hover-color', |
| 210 |
'type' => 'color', |
| 211 |
'title' => esc_html__( 'Icon color hover', 'merchant' ), |
| 212 |
'default' => '#FFFFFF', |
| 213 |
), |
| 214 |
|
| 215 |
array( |
| 216 |
'id' => 'text-color', |
| 217 |
'type' => 'color', |
| 218 |
'title' => esc_html__( 'Text color', 'merchant' ), |
| 219 |
'default' => '#FFFFFF', |
| 220 |
'condition' => array( 'type', '==', 'text-icon' ), |
| 221 |
), |
| 222 |
|
| 223 |
array( |
| 224 |
'id' => 'text-hover-color', |
| 225 |
'type' => 'color', |
| 226 |
'title' => esc_html__( 'Text color hover', 'merchant' ), |
| 227 |
'default' => '#FFFFFF', |
| 228 |
'condition' => array( 'type', '==', 'text-icon' ), |
| 229 |
), |
| 230 |
|
| 231 |
array( |
| 232 |
'id' => 'border-color', |
| 233 |
'type' => 'color', |
| 234 |
'title' => esc_html__( 'Border color', 'merchant' ), |
| 235 |
'default' => '#212121', |
| 236 |
'condition' => array( 'style', '==', 'merchant-style-outline' ), |
| 237 |
), |
| 238 |
|
| 239 |
array( |
| 240 |
'id' => 'border-hover-color', |
| 241 |
'type' => 'color', |
| 242 |
'title' => esc_html__( 'Border color hover', 'merchant' ), |
| 243 |
'default' => '#757575', |
| 244 |
'condition' => array( 'style', '==', 'merchant-style-outline' ), |
| 245 |
), |
| 246 |
|
| 247 |
array( |
| 248 |
'id' => 'background-color', |
| 249 |
'type' => 'color', |
| 250 |
'title' => esc_html__( 'Background color', 'merchant' ), |
| 251 |
'default' => '#212121', |
| 252 |
'condition' => array( 'style', '==', 'merchant-style-filled' ), |
| 253 |
), |
| 254 |
|
| 255 |
array( |
| 256 |
'id' => 'background-hover-color', |
| 257 |
'type' => 'color', |
| 258 |
'title' => esc_html__( 'Background color hover', 'merchant' ), |
| 259 |
'default' => '#757575', |
| 260 |
'condition' => array( 'style', '==', 'merchant-style-filled' ), |
| 261 |
), |
| 262 |
|
| 263 |
), |
| 264 |
), |
| 265 |
); |
| 266 |
|