PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 1.10.3
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v1.10.3
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 / payment-logos / admin / options.php

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

146 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Payment Logos
4 *
5 * @package Merchant
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly
10 }
11
12 /**
13 * Payment Logos
14 */
15 Merchant_Admin_Options::create( array(
16 'title' => esc_html__( 'Payment Logos', 'merchant' ),
17 'module' => Merchant_Payment_Logos::MODULE_ID,
18 'fields' => array(
19
20 array(
21 'id' => 'logos',
22 'type' => 'gallery',
23 'label' => esc_html__( 'Select logos', 'merchant' ),
24 ),
25
26 ),
27 ) );
28
29 /**
30 * Settings
31 */
32 Merchant_Admin_Options::create( array(
33 'title' => esc_html__( 'Settings', 'merchant' ),
34 'module' => Merchant_Payment_Logos::MODULE_ID,
35 'fields' => array(
36
37 array(
38 'id' => 'align',
39 'type' => 'select',
40 'title' => esc_html__( 'Align logos', 'merchant' ),
41 'options' => array(
42 'flex-start' => esc_html__( 'Left', 'merchant' ),
43 'center' => esc_html__( 'Center', 'merchant' ),
44 'flex-end' => esc_html__( 'Right', 'merchant' ),
45 ),
46 'default' => 'flex-start',
47 ),
48
49 array(
50 'id' => 'title',
51 'type' => 'text',
52 'title' => esc_html__( 'Text above the logos', 'merchant' ),
53 'default' => esc_html__( '🔒 Safe & Secure Checkout', 'merchant' ),
54 ),
55
56 array(
57 'id' => 'font-size',
58 'type' => 'range',
59 'title' => esc_html__( 'Font size', 'merchant' ),
60 'min' => 1,
61 'max' => 250,
62 'step' => 1,
63 'default' => 18,
64 'unit' => 'px',
65 ),
66
67 array(
68 'id' => 'text-color',
69 'type' => 'color',
70 'title' => esc_html__( 'Text color', 'merchant' ),
71 'default' => '#212121',
72 ),
73
74 array(
75 'id' => 'margin-top',
76 'type' => 'range',
77 'title' => esc_html__( 'Margin top', 'merchant' ),
78 'min' => 1,
79 'max' => 250,
80 'step' => 1,
81 'default' => 20,
82 'unit' => 'px',
83 ),
84
85 array(
86 'id' => 'margin-bottom',
87 'type' => 'range',
88 'title' => esc_html__( 'Margin bottom', 'merchant' ),
89 'min' => 1,
90 'max' => 250,
91 'step' => 1,
92 'default' => 20,
93 'unit' => 'px',
94 ),
95
96 array(
97 'id' => 'image-max-width',
98 'type' => 'range',
99 'title' => esc_html__( 'Image max width', 'merchant' ),
100 'min' => 1,
101 'max' => 250,
102 'step' => 1,
103 'default' => 80,
104 'unit' => 'px',
105 ),
106
107 array(
108 'id' => 'image-max-height',
109 'type' => 'range',
110 'title' => esc_html__( 'Image max height', 'merchant' ),
111 'min' => 1,
112 'max' => 250,
113 'step' => 1,
114 'default' => 100,
115 'unit' => 'px',
116 ),
117
118 ),
119 ) );
120
121 // Shortcode
122 $merchant_module_id = Merchant_Payment_Logos::MODULE_ID;
123 Merchant_Admin_Options::create( array(
124 'module' => $merchant_module_id,
125 'title' => esc_html__( 'Use shortcode', 'merchant' ),
126 'fields' => array(
127 array(
128 'id' => 'use_shortcode',
129 'type' => 'switcher',
130 'title' => __( 'Use shortcode', 'merchant' ),
131 'default' => 0,
132 ),
133 array(
134 'type' => 'info',
135 'id' => 'shortcode_info',
136 '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' ),
137 ),
138 array(
139 'id' => 'shortcode_text',
140 'type' => 'text_readonly',
141 'title' => esc_html__( 'Shortcode text', 'merchant' ),
142 'default' => '[merchant_module_' . str_replace( '-', '_', $merchant_module_id ) . ']',
143 'condition' => array( 'use_shortcode', '==', '1' ),
144 ),
145 ),
146 ) );