| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Frequently Bought Together Options. |
| 5 |
* |
| 6 |
* @package Merchant |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; // Exit if accessed directly |
| 11 |
} |
| 12 |
|
| 13 |
// Settings |
| 14 |
Merchant_Admin_Options::create( array( |
| 15 |
'title' => esc_html__( 'Settings', 'merchant' ), |
| 16 |
'module' => Merchant_Frequently_Bought_Together::MODULE_ID, |
| 17 |
'fields' => array( |
| 18 |
array( |
| 19 |
'id' => 'single_product_placement', |
| 20 |
'type' => 'select', |
| 21 |
'title' => esc_html__( 'Placement on product page', 'merchant' ), |
| 22 |
'options' => array( |
| 23 |
'after-summary' => esc_html__( 'After product summary', 'merchant' ), |
| 24 |
'after-tabs' => esc_html__( 'After product tabs', 'merchant' ), |
| 25 |
'bottom' => esc_html__( 'At the bottom', 'merchant' ), |
| 26 |
), |
| 27 |
'default' => 'after-summary' |
| 28 |
), |
| 29 |
), |
| 30 |
) ); |
| 31 |
|
| 32 |
// Text Formatting Settings |
| 33 |
Merchant_Admin_Options::create( array( |
| 34 |
'title' => esc_html__( 'Text Formatting Settings', 'merchant' ), |
| 35 |
'module' => Merchant_Frequently_Bought_Together::MODULE_ID, |
| 36 |
'fields' => array( |
| 37 |
array( |
| 38 |
'id' => 'title', |
| 39 |
'type' => 'text', |
| 40 |
'title' => esc_html__( 'Title', 'merchant' ), |
| 41 |
'default' => esc_html__( 'Frequently Bought Together', 'merchant' ), |
| 42 |
), |
| 43 |
|
| 44 |
array( |
| 45 |
'id' => 'price_label', |
| 46 |
'type' => 'text', |
| 47 |
'title' => esc_html__( 'Price label', 'merchant' ), |
| 48 |
'default' => esc_html__( 'Bundle price', 'merchant' ), |
| 49 |
), |
| 50 |
|
| 51 |
array( |
| 52 |
'id' => 'save_label', |
| 53 |
'type' => 'text', |
| 54 |
'title' => esc_html__( 'You save label', 'merchant' ), |
| 55 |
'default' => esc_html__( 'You save: {amount}', 'merchant' ), |
| 56 |
), |
| 57 |
|
| 58 |
array( |
| 59 |
'id' => 'button_text', |
| 60 |
'type' => 'text', |
| 61 |
'title' => esc_html__( 'Button text', 'merchant' ), |
| 62 |
'default' => esc_html__( 'Add to cart', 'merchant' ), |
| 63 |
), |
| 64 |
) |
| 65 |
) ); |
| 66 |
|
| 67 |
// Style Settings |
| 68 |
Merchant_Admin_Options::create( array( |
| 69 |
'module' => Merchant_Frequently_Bought_Together::MODULE_ID, |
| 70 |
'title' => esc_html__( 'Style Settings', 'merchant' ), |
| 71 |
'fields' => array( |
| 72 |
|
| 73 |
array( |
| 74 |
'id' => 'plus_bg_color', |
| 75 |
'type' => 'color', |
| 76 |
'title' => esc_html__( 'Plus sign background color', 'merchant' ), |
| 77 |
'default' => '#212121' |
| 78 |
), |
| 79 |
|
| 80 |
array( |
| 81 |
'id' => 'plus_text_color', |
| 82 |
'type' => 'color', |
| 83 |
'title' => esc_html__( 'Plus sign text color', 'merchant' ), |
| 84 |
'default' => '#fff' |
| 85 |
), |
| 86 |
|
| 87 |
array( |
| 88 |
'id' => 'bundle_border_color', |
| 89 |
'type' => 'color', |
| 90 |
'title' => esc_html__( 'Bundle border color', 'merchant' ), |
| 91 |
'default' => '#f9f9f9' |
| 92 |
), |
| 93 |
|
| 94 |
array( |
| 95 |
'id' => 'bundle_border_radius', |
| 96 |
'type' => 'range', |
| 97 |
'title' => esc_html__( 'Bundle border radius', 'merchant' ), |
| 98 |
'min' => 0, |
| 99 |
'max' => 100, |
| 100 |
'step' => 1, |
| 101 |
'unit' => 'px', |
| 102 |
'default' => 5 |
| 103 |
), |
| 104 |
), |
| 105 |
) ); |
| 106 |
|