PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
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 / recently-viewed-products / admin / options.php

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

243 lines 7.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Recently Viewed Products Options.
5 *
6 * @package Merchant
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly
11 }
12
13 // Settings
14
15 return array(
16 array(
17 'title' => __( 'Settings', 'merchant' ),
18 'module' => Merchant_Recently_Viewed_Products::MODULE_ID,
19 'fields' => array(
20
21 // Title.
22 array(
23 'id' => 'title',
24 'type' => 'text',
25 'title' => __( 'Title', 'merchant' ),
26 'default' => __( 'Recently Viewed', 'merchant' ),
27 ),
28
29 // Title HTML Tag.
30 array(
31 'id' => 'title_tag',
32 'type' => 'select',
33 'title' => __( 'Title HTML tag', 'merchant' ),
34 'options' => array(
35 'h1' => __( 'H1', 'merchant' ),
36 'h2' => __( 'H2', 'merchant' ),
37 'h3' => __( 'H3', 'merchant' ),
38 'h4' => __( 'H4', 'merchant' ),
39 'h5' => __( 'H5', 'merchant' ),
40 'h6' => __( 'H6', 'merchant' ),
41 'div' => __( 'div', 'merchant' ),
42 ),
43 'default' => 'h2',
44 ),
45
46 // Hide Title.
47 array(
48 'id' => 'hide_title',
49 'type' => 'switcher',
50 'title' => __( 'Hide title', 'merchant' ),
51 'desc' => __( 'Hide the title visually only. The title will continue being rendered in the HTML source code.', 'merchant' ),
52 'default' => 0,
53 ),
54
55 // Slider Style.
56 array(
57 'id' => 'slider',
58 'type' => 'switcher',
59 'title' => __( 'Slider style', 'merchant' ),
60 'desc' => __( 'Display the products grid as a slider.' , 'merchant' ),
61 'default' => 0,
62 ),
63
64 // Slider Navigation.
65 array(
66 'id' => 'slider_nav',
67 'type' => 'radio',
68 'title' => __( 'Slider navigation', 'merchant' ),
69 'options' => array(
70 'always-show' => __( 'Always Show', 'merchant' ),
71 'on-hover' => __( 'Show On Hover', 'merchant' ),
72 ),
73 'default' => 'on-hover',
74 'condition' => array( 'slider', '==', '1' ),
75 ),
76
77 // Number of Products.
78 array(
79 'id' => 'posts_per_page',
80 'type' => 'range',
81 'title' => __( 'Products', 'merchant' ),
82 'desc' => __( 'Controls the number of products to display in the products grid.', 'merchant' ),
83 'min' => 1,
84 'max' => 30,
85 'step' => 1,
86 'unit' => '',
87 'default' => 6,
88 ),
89
90 // Number of Columns.
91 array(
92 'id' => 'columns',
93 'type' => 'range',
94 'title' => __( 'Columns', 'merchant' ),
95 'desc' => __( 'Controls the number of columns to display in the products grid.', 'merchant' ),
96 'min' => 1,
97 'max' => 6,
98 'step' => 1,
99 'unit' => '',
100 'default' => 3,
101 ),
102
103 // Columns Gap.
104 array(
105 'id' => 'columns_gap',
106 'type' => 'range',
107 'title' => __( 'Columns gap', 'merchant' ),
108 'desc' => __( 'Controls gap between each column in the products grid.', 'merchant' ),
109 'min' => 0,
110 'max' => 100,
111 'step' => 1,
112 'unit' => 'px',
113 'default' => 15,
114 ),
115
116 // Order by.
117 array(
118 'id' => 'orderby',
119 'type' => 'select',
120 'title' => __( 'Order by', 'merchant' ),
121 'options' => array(
122 'none' => __( 'Last viewed', 'merchant' ),
123 'id' => __( 'ID', 'merchant' ),
124 'rand' => __( 'Random', 'merchant' ),
125 'title' => __( 'Title', 'merchant' ),
126 'date' => __( 'Date', 'merchant' ),
127 'modified' => __( 'Modified date', 'merchant' ),
128 ),
129 'default' => 'none',
130 ),
131
132 // Order.
133 array(
134 'id' => 'order',
135 'type' => 'select',
136 'title' => __( 'Order', 'merchant' ),
137 'options' => array(
138 'asc' => __( 'Asc', 'merchant' ),
139 'desc' => __( 'Desc', 'merchant' ),
140 ),
141 'default' => 'desc',
142 'condition' => array( 'orderby', 'any', 'id|rand|title|date|modified' ),
143 ),
144
145 // Hook Order.
146 array(
147 'id' => 'hook_order',
148 'type' => 'range',
149 'title' => __( 'Loading priority', 'merchant' ),
150 'min' => 1,
151 'max' => 100,
152 'step' => 1,
153 'unit' => '',
154 'default' => 20,
155 'ai_meta' => array(
156 'usage_hint' => 'WordPress hook priority for the widget output. Lower number = higher priority (renders first). Adjust when theme or other plugins output to the same hook location.',
157 ),
158 ),
159 array(
160 'id' => 'hook_order_info',
161 'type' => 'info',
162 'content' => esc_html__( 'This is a developer level feature. The recently viewed product module is "hooked" into a specific location on the page. Themes and other plugins might also add additional elements to the same location. By modifying the hook priority, you have the ability to customize the placement of this element on that particular location. A lower number = a higher priority, so the module will appear higher on the page.', 'merchant' ),
163 ),
164
165 // colors.
166
167 // Title color.
168 array(
169 'id' => 'title_color',
170 'type' => 'color',
171 'title' => __( 'Title color', 'merchant' ),
172 'default' => '#212121',
173 ),
174
175 // Navigation Icon color.
176 array(
177 'id' => 'navigation_icon_color',
178 'type' => 'color',
179 'title' => __( 'Navigation icon color', 'merchant' ),
180 'default' => '#FFF',
181 'condition' => array( 'slider', '==', '1' ),
182 ),
183
184 // Naviation color.
185 array(
186 'id' => 'navigation_color',
187 'type' => 'color',
188 'title' => __( 'Navigation color', 'merchant' ),
189 'default' => '#212121',
190 'condition' => array( 'slider', '==', '1' ),
191 ),
192
193 // Naviation color (hover).
194 array(
195 'id' => 'navigation_color_hover',
196 'type' => 'color',
197 'title' => __( 'Navigation color (hover)', 'merchant' ),
198 'default' => '#757575',
199 'condition' => array( 'slider', '==', '1' ),
200 ),
201
202 array(
203 'id' => 'show_pages',
204 'type' => 'checkbox_multiple',
205 'title' => esc_html__( 'Show on pages', 'merchant' ),
206 'options' => array(
207 'product_single' => esc_html__( 'Product Single', 'merchant' ),
208 'cart' => esc_html__( 'Cart', 'merchant' ),
209 'checkout' => esc_html__( 'Checkout', 'merchant' ),
210 ),
211 'default' => array( 'product_single' ),
212 'ai_meta' => array(
213 'usage_hint' => 'Controls which page types display the recently-viewed products widget. Select all page types where it should appear.',
214 ),
215 ),
216 ),
217 ),
218 array(
219 'module' => Merchant_Recently_Viewed_Products::MODULE_ID,
220 'title' => esc_html__( 'Use shortcode', 'merchant' ),
221 'fields' => array(
222 array(
223 'id' => 'use_shortcode',
224 'type' => 'switcher',
225 'title' => __( 'Use shortcode', 'merchant' ),
226 'default' => 0,
227 ),
228 array(
229 'type' => 'info',
230 'id' => 'shortcode_info',
231 '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' ),
232 ),
233 array(
234 'id' => 'shortcode_text',
235 'type' => 'text_readonly',
236 'title' => esc_html__( 'Shortcode text', 'merchant' ),
237 'default' => '[merchant_module_' . str_replace( '-', '_', Merchant_Recently_Viewed_Products::MODULE_ID ) . ']',
238 'condition' => array( 'use_shortcode', '==', '1' ),
239 ),
240 ),
241 ),
242 );
243