| 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' => '#f8f8f8' |
| 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 |
) |
| 231 |
) ); |
| 232 |
|