| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Wishlist Options. |
| 5 |
* |
| 6 |
* @package Merchant |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; // Exit if accessed directly |
| 11 |
} |
| 12 |
|
| 13 |
// General Settings. |
| 14 |
Merchant_Admin_Options::create( array( |
| 15 |
'title' => __( 'General Settings', 'merchant' ), |
| 16 |
'module' => 'wishlist', |
| 17 |
'fields' => array( |
| 18 |
|
| 19 |
// Display on single product pages. |
| 20 |
array( |
| 21 |
'id' => 'display_on_shop_archive', |
| 22 |
'type' => 'switcher', |
| 23 |
'title' => __( 'Display on shop archive', 'merchant' ), |
| 24 |
'desc' => __( 'Display the wishlist button in the products grid from shop catalog pages.', 'merchant' ), |
| 25 |
'default' => 1, |
| 26 |
), |
| 27 |
|
| 28 |
// Display on single product pages. |
| 29 |
array( |
| 30 |
'id' => 'display_on_single_product', |
| 31 |
'type' => 'switcher', |
| 32 |
'title' => __( 'Display on single product', 'merchant' ), |
| 33 |
'desc' => __( 'Display the wishlist button in the single product pages.', 'merchant' ), |
| 34 |
'default' => 1, |
| 35 |
), |
| 36 |
|
| 37 |
), |
| 38 |
) ); |
| 39 |
|
| 40 |
// Add To Wishlist Button Settings |
| 41 |
Merchant_Admin_Options::create( array( |
| 42 |
'title' => __( 'Add To Wishlist Button Settings', 'merchant' ), |
| 43 |
'module' => 'wishlist', |
| 44 |
'fields' => array( |
| 45 |
|
| 46 |
// Button icon. |
| 47 |
array( |
| 48 |
'id' => 'button_icon', |
| 49 |
'type' => 'choices', |
| 50 |
'title' => __( 'Select an icon', 'merchant' ), |
| 51 |
'options' => array( |
| 52 |
'heart1' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart1.svg', |
| 53 |
'heart2' => MERCHANT_URI . 'inc/modules/wishlist/admin/icons/heart2.svg', |
| 54 |
), |
| 55 |
'default' => 'heart1', |
| 56 |
), |
| 57 |
|
| 58 |
// Button position top. |
| 59 |
array( |
| 60 |
'id' => 'button_position_top', |
| 61 |
'type' => 'range', |
| 62 |
'title' => __( 'Button vertical position', 'merchant' ), |
| 63 |
'min' => 1, |
| 64 |
'max' => 80, |
| 65 |
'step' => 1, |
| 66 |
'default' => 20, |
| 67 |
'unit' => 'px', |
| 68 |
), |
| 69 |
|
| 70 |
// Button position left. |
| 71 |
array( |
| 72 |
'id' => 'button_position_left', |
| 73 |
'type' => 'range', |
| 74 |
'title' => __( 'Button horizontal position', 'merchant' ), |
| 75 |
'min' => 1, |
| 76 |
'max' => 80, |
| 77 |
'step' => 1, |
| 78 |
'default' => 20, |
| 79 |
'unit' => 'px', |
| 80 |
), |
| 81 |
|
| 82 |
// Tooltip. |
| 83 |
array( |
| 84 |
'id' => 'tooltip', |
| 85 |
'type' => 'switcher', |
| 86 |
'title' => __( 'Display tooltip', 'merchant' ), |
| 87 |
'default' => 1, |
| 88 |
), |
| 89 |
|
| 90 |
// Tooltip text. |
| 91 |
array( |
| 92 |
'id' => 'tooltip_text', |
| 93 |
'type' => 'text', |
| 94 |
'title' => __( 'Tooltip text', 'merchant' ), |
| 95 |
'default' => __( 'Add to wishlist', 'merchant' ), |
| 96 |
'condition' => array( 'tooltip', '==', true ), |
| 97 |
), |
| 98 |
|
| 99 |
// Tooltip border radius. |
| 100 |
array( |
| 101 |
'id' => 'tooltip_border_radius', |
| 102 |
'type' => 'range', |
| 103 |
'title' => __( 'Tooltip border radius', 'merchant' ), |
| 104 |
'min' => 0, |
| 105 |
'max' => 35, |
| 106 |
'step' => 1, |
| 107 |
'default' => 4, |
| 108 |
'unit' => 'px', |
| 109 |
'condition' => array( 'tooltip', '==', true ), |
| 110 |
), |
| 111 |
|
| 112 |
// Colors. |
| 113 |
|
| 114 |
// Icon stroke color. |
| 115 |
array( |
| 116 |
'id' => 'icon_stroke_color', |
| 117 |
'type' => 'color', |
| 118 |
'title' => __( 'Icon stroke color', 'merchant' ), |
| 119 |
'default' => '#212121', |
| 120 |
), |
| 121 |
|
| 122 |
// Icon stroke color (hover). |
| 123 |
array( |
| 124 |
'id' => 'icon_stroke_color_hover', |
| 125 |
'type' => 'color', |
| 126 |
'title' => __( 'Icon stroke color (hover)', 'merchant' ), |
| 127 |
'default' => '#212121', |
| 128 |
), |
| 129 |
|
| 130 |
// Icon fill color. |
| 131 |
array( |
| 132 |
'id' => 'icon_fill_color', |
| 133 |
'type' => 'color', |
| 134 |
'title' => __( 'Icon fill color', 'merchant' ), |
| 135 |
'default' => 'transparent', |
| 136 |
), |
| 137 |
|
| 138 |
// Icon fill color (hover). |
| 139 |
array( |
| 140 |
'id' => 'icon_fill_color_hover', |
| 141 |
'type' => 'color', |
| 142 |
'title' => __( 'Icon fill color (hover)', 'merchant' ), |
| 143 |
'default' => '#f04c4c', |
| 144 |
), |
| 145 |
|
| 146 |
// Tooltip text color. |
| 147 |
array( |
| 148 |
'id' => 'tooltip_text_color', |
| 149 |
'type' => 'color', |
| 150 |
'title' => __( 'Tooltip text color', 'merchant' ), |
| 151 |
'default' => '#FFF', |
| 152 |
), |
| 153 |
|
| 154 |
// Tooltip background color. |
| 155 |
array( |
| 156 |
'id' => 'tooltip_background_color', |
| 157 |
'type' => 'color', |
| 158 |
'title' => __( 'Tooltip background color', 'merchant' ), |
| 159 |
'default' => '#212121', |
| 160 |
), |
| 161 |
|
| 162 |
), |
| 163 |
) ); |
| 164 |
|
| 165 |
// Wishlist Page Settings |
| 166 |
Merchant_Admin_Options::create( array( |
| 167 |
'module' => 'wishlist', |
| 168 |
'title' => __( 'Wishlist Page Settings', 'merchant' ), |
| 169 |
'fields' => array( |
| 170 |
|
| 171 |
// Create Wishlist Page. |
| 172 |
array( |
| 173 |
'id' => 'create_page', |
| 174 |
'type' => 'create_page', |
| 175 |
'title' => __( 'Wishlist page', 'merchant' ), |
| 176 |
'page_title' => __( 'My Wishlist', 'merchant' ), |
| 177 |
'page_meta_key' => '_wp_page_template', |
| 178 |
'page_meta_value' => 'modules/wishlist/page-template-wishlist.php', |
| 179 |
'option_name' => 'merchant_wishlist_page_id', |
| 180 |
), |
| 181 |
|
| 182 |
// Hide page title. |
| 183 |
array( |
| 184 |
'id' => 'hide_page_title', |
| 185 |
'type' => 'switcher', |
| 186 |
'title' => __( 'Hide page title', 'merchant' ), |
| 187 |
'default' => 0, |
| 188 |
), |
| 189 |
|
| 190 |
// Table heading background color. |
| 191 |
array( |
| 192 |
'id' => 'table_heading_background_color', |
| 193 |
'type' => 'color', |
| 194 |
'title' => __( 'Table heading background color', 'merchant' ), |
| 195 |
'default' => '#FFF', |
| 196 |
), |
| 197 |
|
| 198 |
// Table body background color. |
| 199 |
array( |
| 200 |
'id' => 'table_body_background_color', |
| 201 |
'type' => 'color', |
| 202 |
'title' => __( 'Table body background color', 'merchant' ), |
| 203 |
'default' => '#fdfdfd', |
| 204 |
), |
| 205 |
|
| 206 |
// Table text color. |
| 207 |
array( |
| 208 |
'id' => 'table_text_color', |
| 209 |
'type' => 'color', |
| 210 |
'title' => __( 'Table text color', 'merchant' ), |
| 211 |
'default' => '#777', |
| 212 |
), |
| 213 |
|
| 214 |
// Table links color. |
| 215 |
array( |
| 216 |
'id' => 'table_links_color', |
| 217 |
'type' => 'color', |
| 218 |
'title' => __( 'Table links color', 'merchant' ), |
| 219 |
'default' => '#212121', |
| 220 |
), |
| 221 |
|
| 222 |
// Table links color (hover). |
| 223 |
array( |
| 224 |
'id' => 'table_links_color_hover', |
| 225 |
'type' => 'color', |
| 226 |
'title' => __( 'Table links color (hover)', 'merchant' ), |
| 227 |
'default' => '#757575', |
| 228 |
), |
| 229 |
|
| 230 |
// Buttons color. |
| 231 |
array( |
| 232 |
'id' => 'buttons_color', |
| 233 |
'type' => 'color', |
| 234 |
'title' => __( 'Buttons color', 'merchant' ), |
| 235 |
'default' => '#FFF', |
| 236 |
), |
| 237 |
|
| 238 |
// Buttons color (hover). |
| 239 |
array( |
| 240 |
'id' => 'buttons_color_hover', |
| 241 |
'type' => 'color', |
| 242 |
'title' => __( 'Buttons color (hover)', 'merchant' ), |
| 243 |
'default' => '#FFF', |
| 244 |
), |
| 245 |
|
| 246 |
// Buttons background color. |
| 247 |
array( |
| 248 |
'id' => 'buttons_background_color', |
| 249 |
'type' => 'color', |
| 250 |
'title' => __( 'Buttons background color', 'merchant' ), |
| 251 |
'default' => '#212121', |
| 252 |
), |
| 253 |
|
| 254 |
// Buttons color (hover). |
| 255 |
array( |
| 256 |
'id' => 'buttons_background_color_hover', |
| 257 |
'type' => 'color', |
| 258 |
'title' => __( 'Buttons background color (hover)', 'merchant' ), |
| 259 |
'default' => '#757575', |
| 260 |
), |
| 261 |
|
| 262 |
), |
| 263 |
) ); |
| 264 |
|
| 265 |
// Wishlist Sharing Settings |
| 266 |
Merchant_Admin_Options::create( array( |
| 267 |
'module' => Merchant_Wishlist::MODULE_ID, |
| 268 |
'title' => esc_html__( 'Wishlist Sharing Settings', 'merchant' ), |
| 269 |
'fields' => array( |
| 270 |
|
| 271 |
// Enable. |
| 272 |
array( |
| 273 |
'id' => 'enable_sharing', |
| 274 |
'type' => 'switcher', |
| 275 |
'title' => __( 'Enable', 'merchant' ), |
| 276 |
'desc' => __( 'Allow users to share the wishlist.', 'merchant' ), |
| 277 |
'default' => 1, |
| 278 |
), |
| 279 |
|
| 280 |
// Sharing Links. |
| 281 |
array( |
| 282 |
'id' => 'sharing_links', |
| 283 |
'type' => 'flexible_content', |
| 284 |
'sorting' => true, |
| 285 |
'title' => __( 'Social links', 'merchant' ), |
| 286 |
'desc' => esc_html__( 'Add the available social links to share the wishlist.', 'merchant' ), |
| 287 |
'button_label' => esc_html__( 'Add new', 'merchant' ), |
| 288 |
'layouts' => array( |
| 289 |
'social' => array( |
| 290 |
'title' => esc_html__( 'Social link', 'merchant' ), |
| 291 |
'fields' => array( |
| 292 |
array( |
| 293 |
'id' => 'social_network', |
| 294 |
'title' => esc_html__( 'Social Network', 'merchant' ), |
| 295 |
'type' => 'select', |
| 296 |
'options' => array( |
| 297 |
'facebook' => esc_html__( 'Facebook', 'merchant' ), |
| 298 |
'twitter' => esc_html__( 'Twitter', 'merchant' ), |
| 299 |
'linkedin' => esc_html__( 'Linkedin', 'merchant' ), |
| 300 |
'pinterest' => esc_html__( 'Pinterest', 'merchant' ), |
| 301 |
'whatsapp' => esc_html__( 'Whatsapp', 'merchant' ), |
| 302 |
'telegram' => esc_html__( 'Telegram', 'merchant' ), |
| 303 |
'vk' => esc_html__( 'VK', 'merchant' ), |
| 304 |
'weibo' => esc_html__( 'Weibo', 'merchant' ), |
| 305 |
'reddit' => esc_html__( 'Reddit', 'merchant' ), |
| 306 |
'ok' => esc_html__( 'Ok', 'merchant' ), |
| 307 |
'xing' => esc_html__( 'Xing', 'merchant' ), |
| 308 |
'mail' => esc_html__( 'Mail', 'merchant' ), |
| 309 |
), |
| 310 |
'default' => 'facebook', |
| 311 |
), |
| 312 |
), |
| 313 |
), |
| 314 |
), |
| 315 |
'default' => array( |
| 316 |
array( |
| 317 |
'layout' => 'social', |
| 318 |
'social_network' => 'facebook', |
| 319 |
), |
| 320 |
array( |
| 321 |
'layout' => 'social', |
| 322 |
'social_network' => 'twitter', |
| 323 |
), |
| 324 |
array( |
| 325 |
'layout' => 'social', |
| 326 |
'social_network' => 'linkedin', |
| 327 |
), |
| 328 |
), |
| 329 |
), |
| 330 |
|
| 331 |
// Dislay Copy To Clipboard. |
| 332 |
array( |
| 333 |
'id' => 'display_copy_to_clipboard', |
| 334 |
'type' => 'switcher', |
| 335 |
'title' => __( 'Display copy to clipboard', 'merchant' ), |
| 336 |
'desc' => __( 'Displays a copy to clipboard field after the social links.', 'merchant' ), |
| 337 |
'default' => 1, |
| 338 |
), |
| 339 |
), |
| 340 |
) ); |