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 / product-navigation-links / 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/product-navigation-links/admin/options.php

166 lines 5.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Product Navigation Links 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 'module' => Merchant_Product_Navigation_Links::MODULE_ID,
16 'title' => esc_html__( 'Settings', 'merchant' ),
17 'fields' => array(
18 array(
19 'id' => 'text',
20 'type' => 'select',
21 'title' => esc_html__( 'Navigation text', 'merchant' ),
22 'options' => array(
23 'titles' => esc_html__( 'Show product titles', 'merchant' ),
24 'navigational' => esc_html__( 'Show \'Previous\' and \'Next\' ', 'merchant' ),
25 ),
26 'default' => 'titles',
27 ),
28
29 array(
30 'id' => 'product_navigation_mode',
31 'type' => 'select',
32 'title' => esc_html__( 'Navigation Mode', 'merchant' ),
33 'desc' => esc_html__( 'Choose to show navigation links in the default order (following Products > All Products) or within the same category or tag.', 'merchant' ),
34 'options' => array(
35 'default' => esc_html__( 'Default', 'merchant' ),
36 'category' => esc_html__( 'Category', 'merchant' ),
37 'tag' => esc_html__( 'Tag', 'merchant' ),
38 ),
39 'default' => 'default',
40 ),
41
42 array(
43 'id' => 'placement',
44 'type' => 'select',
45 'title' => esc_html__( 'Placement', 'merchant' ),
46 'options' => array(
47 'bottom' => esc_html__( 'Bottom of the page', 'merchant' ),
48 'top' => esc_html__( 'Top of the page', 'merchant' ),
49 'bottom-product-summary' => esc_html__( 'After product summary', 'merchant' ),
50 ),
51 'default' => 'bottom',
52 ),
53
54 array(
55 'id' => 'priority',
56 'type' => 'number',
57 'title' => esc_html__( 'Loading priority', 'merchant' ),
58 'default' => 30,
59 ),
60 array(
61 'id' => 'priority_info',
62 'type' => 'info',
63 'content' => esc_html__( 'This is a developer level feature. The product navigation links 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' ),
64 ),
65
66 ),
67 ) );
68
69
70 // Settings
71 Merchant_Admin_Options::create( array(
72 'module' => Merchant_Product_Navigation_Links::MODULE_ID,
73 'title' => esc_html__( 'Style Settings', 'merchant' ),
74 'fields' => array(
75
76 array(
77 'id' => 'text_decoration',
78 'type' => 'buttons',
79 'title' => esc_html__( 'Text decoration', 'merchant' ),
80 'options' => array(
81 'none' => esc_html__( 'None', 'merchant' ),
82 'underline' => esc_html__( 'Underline', 'merchant' ),
83 'line-through' => esc_html__( 'Line-through', 'merchant' ),
84 'overline' => esc_html__( 'Overline', 'merchant' ),
85 ),
86 'default' => 'none',
87 ),
88
89
90 array(
91 'id' => 'text_color',
92 'type' => 'color',
93 'title' => esc_html__( 'Text color', 'merchant' ),
94 'default' => '#212121',
95 ),
96
97 array(
98 'id' => 'text_hover_color',
99 'type' => 'color',
100 'title' => esc_html__( 'Text hover color', 'merchant' ),
101 'default' => '#757575',
102 ),
103
104 array(
105 'id' => 'justify_content',
106 'type' => 'buttons',
107 'title' => esc_html__( 'Justify content', 'merchant' ),
108 'options' => array(
109 'space-between' => esc_html__( 'Space between', 'merchant' ),
110 'space-around' => esc_html__( 'Space around', 'merchant' ),
111 'space-evenly' => esc_html__( 'Space evenly', 'merchant' ),
112 ),
113 'default' => 'space-between',
114 ),
115
116 array(
117 'id' => 'margin_top',
118 'type' => 'range',
119 'title' => esc_html__( 'Margin top', 'merchant' ),
120 'min' => 0,
121 'max' => 250,
122 'step' => 1,
123 'default' => 20,
124 'unit' => 'px',
125 ),
126
127 array(
128 'id' => 'margin_bottom',
129 'type' => 'range',
130 'title' => esc_html__( 'Margin bottom', 'merchant' ),
131 'min' => 0,
132 'max' => 250,
133 'step' => 1,
134 'default' => 20,
135 'unit' => 'px',
136 ),
137 ),
138 ) );
139
140 // Shortcode
141 $merchant_module_id = Merchant_Product_Navigation_Links::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 ) );
166