PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.2.8
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.2.8
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / inc / modules / trust-badges / admin / options.php

options.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.2.8, at inc/modules/trust-badges/admin/options.php

165 lines 4.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Trust Badges
4 *
5 * @package Merchant
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 /**
13 * Trust Trust
14 */
15 Merchant_Admin_Options::create( array(
16 'title' => esc_html__( 'Trust Badges', 'merchant' ),
17 'module' => Merchant_Trust_Badges::MODULE_ID,
18 'fields' => array(
19
20 array(
21 'id' => 'default_badges',
22 'type' => 'choices',
23 'multiple' => true,
24 'title' => esc_html__( 'Default badges', 'merchant' ),
25 'options' => array(
26 'badge1' => MERCHANT_URI . 'inc/modules/' . Merchant_Trust_Badges::MODULE_ID . '/admin/images/badge1.svg',
27 'badge2' => MERCHANT_URI . 'inc/modules/' . Merchant_Trust_Badges::MODULE_ID . '/admin/images/badge2.svg',
28 'badge3' => MERCHANT_URI . 'inc/modules/' . Merchant_Trust_Badges::MODULE_ID . '/admin/images/badge3.svg',
29 ),
30 ),
31
32 array(
33 'id' => 'badges',
34 'type' => 'gallery',
35 'label' => esc_html__( 'Select badges', 'merchant' ),
36 ),
37
38 ),
39 ) );
40
41 /**
42 * Settings
43 */
44 Merchant_Admin_Options::create( array(
45 'title' => esc_html__( 'Settings', 'merchant' ),
46 'module' => Merchant_Trust_Badges::MODULE_ID,
47 'fields' => array(
48
49 array(
50 'id' => 'align',
51 'type' => 'select',
52 'title' => esc_html__( 'Align logos', 'merchant' ),
53 'options' => array(
54 'flex-start' => esc_html__( 'Left', 'merchant' ),
55 'center' => esc_html__( 'Center', 'merchant' ),
56 'flex-end' => esc_html__( 'Right', 'merchant' ),
57 ),
58 'default' => 'center',
59 ),
60
61 array(
62 'id' => 'title',
63 'type' => 'text',
64 'title' => esc_html__( 'Text above the logos', 'merchant' ),
65 'default' => esc_html__( 'Product Quality Guaranteed!', 'merchant' ),
66 ),
67
68 array(
69 'id' => 'font-size',
70 'type' => 'range',
71 'title' => esc_html__( 'Font size', 'merchant' ),
72 'min' => 1,
73 'max' => 250,
74 'step' => 1,
75 'default' => 15,
76 'unit' => 'px',
77 ),
78
79 array(
80 'id' => 'text-color',
81 'type' => 'color',
82 'title' => esc_html__( 'Text color', 'merchant' ),
83 'default' => '#212121',
84 ),
85
86 array(
87 'id' => 'border-color',
88 'type' => 'color',
89 'title' => esc_html__( 'Border color', 'merchant' ),
90 'default' => '#e5e5e5',
91 ),
92
93 array(
94 'id' => 'margin-top',
95 'type' => 'range',
96 'title' => esc_html__( 'Margin top', 'merchant' ),
97 'min' => 1,
98 'max' => 250,
99 'step' => 1,
100 'default' => 20,
101 'unit' => 'px',
102 ),
103
104 array(
105 'id' => 'margin-bottom',
106 'type' => 'range',
107 'title' => esc_html__( 'Margin bottom', 'merchant' ),
108 'min' => 1,
109 'max' => 250,
110 'step' => 1,
111 'default' => 20,
112 'unit' => 'px',
113 ),
114
115 array(
116 'id' => 'image-max-width',
117 'type' => 'range',
118 'title' => esc_html__( 'Image max width', 'merchant' ),
119 'min' => 1,
120 'max' => 250,
121 'step' => 1,
122 'default' => 70,
123 'unit' => 'px',
124 ),
125
126 array(
127 'id' => 'image-max-height',
128 'type' => 'range',
129 'title' => esc_html__( 'Image max height', 'merchant' ),
130 'min' => 1,
131 'max' => 250,
132 'step' => 1,
133 'default' => 70,
134 'unit' => 'px',
135 ),
136
137 ),
138 ) );
139
140 // Shortcode
141 $merchant_module_id = Merchant_Trust_Badges::MODULE_ID;
142 Merchant_Admin_Options::create( array(
143 'module' => $merchant_module_id,
144 'title' => esc_html__( 'Use shortcode', 'merchant' ),
145 'fields' => array(
146 array(
147 'id' => 'use_shortcode',
148 'type' => 'switcher',
149 'title' => __( 'Use shortcode', 'merchant' ),
150 'default' => 0,
151 ),
152 array(
153 'type' => 'info',
154 'id' => 'shortcode_info',
155 'content' => esc_html__( 'If you are using a page builder or a theme that supports shortcodes, then you can output the module using the shortcode above. This might be useful if, for example, you find that you want to control the position of the module output more precisely than with the module settings. Note that the shortcodes can only be used on single product pages.', 'merchant' ),
156 ),
157 array(
158 'id' => 'shortcode_text',
159 'type' => 'text_readonly',
160 'title' => esc_html__( 'Shortcode text', 'merchant' ),
161 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
162 'condition' => array( 'use_shortcode', '==', '1' ),
163 ),
164 ),
165 ) );