PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.5
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.5
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 1.10.5, at inc/modules/product-navigation-links/admin/options.php

153 lines 4.6 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' => 'placement',
31 'type' => 'select',
32 'title' => esc_html__( 'Placement', 'merchant' ),
33 'options' => array(
34 'bottom' => esc_html__( 'Bottom of the page', 'merchant' ),
35 'top' => esc_html__( 'Top of the page', 'merchant' ),
36 'bottom-product-summary' => esc_html__( 'After product summary', 'merchant' ),
37 ),
38 'default' => 'bottom',
39 ),
40
41 array(
42 'id' => 'priority',
43 'type' => 'number',
44 'title' => esc_html__( 'Loading priority', 'merchant' ),
45 'default' => 30,
46 ),
47 array(
48 'id' => 'priority_info',
49 'type' => 'info',
50 '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' ),
51 ),
52
53 ),
54 ) );
55
56
57 // Settings
58 Merchant_Admin_Options::create( array(
59 'module' => Merchant_Product_Navigation_Links::MODULE_ID,
60 'title' => esc_html__( 'Style Settings', 'merchant' ),
61 'fields' => array(
62
63 array(
64 'id' => 'text_decoration',
65 'type' => 'buttons',
66 'title' => esc_html__( 'Text decoration', 'merchant' ),
67 'options' => array(
68 'none' => esc_html__( 'None', 'merchant' ),
69 'underline' => esc_html__( 'Underline', 'merchant' ),
70 'line-through' => esc_html__( 'Line-through', 'merchant' ),
71 'overline' => esc_html__( 'Overline', 'merchant' ),
72 ),
73 'default' => 'none',
74 ),
75
76
77 array(
78 'id' => 'text_color',
79 'type' => 'color',
80 'title' => esc_html__( 'Text color', 'merchant' ),
81 'default' => '#212121',
82 ),
83
84 array(
85 'id' => 'text_hover_color',
86 'type' => 'color',
87 'title' => esc_html__( 'Text hover color', 'merchant' ),
88 'default' => '#757575',
89 ),
90
91 array(
92 'id' => 'justify_content',
93 'type' => 'buttons',
94 'title' => esc_html__( 'Justify content', 'merchant' ),
95 'options' => array(
96 'space-between' => esc_html__( 'Space between', 'merchant' ),
97 'space-around' => esc_html__( 'Space around', 'merchant' ),
98 'space-evenly' => esc_html__( 'Space evenly', 'merchant' ),
99 ),
100 'default' => 'space-between',
101 ),
102
103 array(
104 'id' => 'margin_top',
105 'type' => 'range',
106 'title' => esc_html__( 'Margin top', 'merchant' ),
107 'min' => 0,
108 'max' => 250,
109 'step' => 1,
110 'default' => 20,
111 'unit' => 'px',
112 ),
113
114 array(
115 'id' => 'margin_bottom',
116 'type' => 'range',
117 'title' => esc_html__( 'Margin bottom', 'merchant' ),
118 'min' => 0,
119 'max' => 250,
120 'step' => 1,
121 'default' => 20,
122 'unit' => 'px',
123 ),
124 ),
125 ) );
126
127 // Shortcode
128 $merchant_module_id = Merchant_Product_Navigation_Links::MODULE_ID;
129 Merchant_Admin_Options::create( array(
130 'module' => $merchant_module_id,
131 'title' => esc_html__( 'Use shortcode', 'merchant' ),
132 'fields' => array(
133 array(
134 'id' => 'use_shortcode',
135 'type' => 'switcher',
136 'title' => __( 'Use shortcode', 'merchant' ),
137 'default' => 0,
138 ),
139 array(
140 'type' => 'info',
141 'id' => 'shortcode_info',
142 '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' ),
143 ),
144 array(
145 'id' => 'shortcode_text',
146 'type' => 'text_readonly',
147 'title' => esc_html__( 'Shortcode text', 'merchant' ),
148 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
149 'condition' => array( 'use_shortcode', '==', '1' ),
150 ),
151 ),
152 ) );
153