| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Product Brand Image 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' => 'product-brand-image', |
| 17 |
'fields' => array( |
| 18 |
|
| 19 |
array( |
| 20 |
'id' => 'global-brand-image', |
| 21 |
'type' => 'upload', |
| 22 |
'title' => esc_html__( 'Upload brand image', 'merchant' ), |
| 23 |
/* Translators: 1. Link open tag 2. Link close tag */ |
| 24 |
'desc' => sprintf( esc_html__( 'Note: If you want to add a different brand image for each product, go to %1$sProducts%2$s, edit the desired product and upload a different image.', 'merchant' ), '<a href="'. esc_url( admin_url( 'edit.php?post_type=product' ) ).'">', '</a>' ), |
| 25 |
), |
| 26 |
|
| 27 |
array( |
| 28 |
'type' => 'divider', |
| 29 |
), |
| 30 |
|
| 31 |
array( |
| 32 |
'id' => 'margin-top', |
| 33 |
'type' => 'range', |
| 34 |
'title' => esc_html__( 'Margin top', 'merchant' ), |
| 35 |
'min' => 0, |
| 36 |
'max' => 250, |
| 37 |
'step' => 1, |
| 38 |
'default' => 15, |
| 39 |
'unit' => 'px', |
| 40 |
), |
| 41 |
|
| 42 |
array( |
| 43 |
'id' => 'margin-bottom', |
| 44 |
'type' => 'range', |
| 45 |
'title' => esc_html__( 'Margin bottom', 'merchant' ), |
| 46 |
'min' => 0, |
| 47 |
'max' => 250, |
| 48 |
'step' => 1, |
| 49 |
'default' => 15, |
| 50 |
'unit' => 'px', |
| 51 |
), |
| 52 |
|
| 53 |
array( |
| 54 |
'id' => 'image-max-width', |
| 55 |
'type' => 'range', |
| 56 |
'title' => esc_html__( 'Image max width', 'merchant' ), |
| 57 |
'min' => 1, |
| 58 |
'max' => 500, |
| 59 |
'step' => 1, |
| 60 |
'default' => 250, |
| 61 |
'unit' => 'px', |
| 62 |
), |
| 63 |
|
| 64 |
array( |
| 65 |
'id' => 'image-max-height', |
| 66 |
'type' => 'range', |
| 67 |
'title' => esc_html__( 'Image max height', 'merchant' ), |
| 68 |
'min' => 1, |
| 69 |
'max' => 500, |
| 70 |
'step' => 1, |
| 71 |
'default' => 250, |
| 72 |
'unit' => 'px', |
| 73 |
), |
| 74 |
|
| 75 |
) |
| 76 |
) ); |
| 77 |
|