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 / admin / pages / page-settings.php

page-settings.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.2.8, at admin/pages/page-settings.php

154 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 ?>
8
9 <div class="merchant-module-page">
10
11 <div class="merchant-module-page-content mrc-w-100">
12
13 <form method="post" action="" class="merchant-module-page-ajax-form">
14
15 <input type="hidden" name="merchant_nonce" value="<?php echo esc_attr( wp_create_nonce( 'merchant_nonce' ) ); ?>" />
16
17 <div class="merchant-module-page-ajax-header">
18 <div class="merchant-module-page-ajax-notice"><?php esc_html_e( 'Your settings have been modified. Save?', 'merchant' ); ?></div>
19 <div class="merchant-module-page-ajax-buttons">
20 <a href="<?php echo esc_url( add_query_arg( array( 'page' => 'merchant' ) ) ); ?>" class="merchant-module-discard-button"><?php esc_html_e( 'Discard', 'merchant' ); ?></a>
21 <button type="submit" name="merchant_save" value="save" class="merchant-module-save-button"><span class="merchant-module-save-button-label"><?php esc_html_e( 'Save', 'merchant' ); ?></span><i class="dashicons dashicons-update-alt"></i></button>
22 </div>
23 </div>
24
25 <div class="merchant-module-page-header">
26
27 <div class="merchant-module-page-header-content">
28
29 <div class="merchant-module-page-back">
30 <a href="<?php echo esc_url( add_query_arg( array( 'page' => 'merchant' ), 'admin.php' ) ); ?>">
31 <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
32 <path d="M13.3329 7.20013H4.46628L7.19961 4.20013L6.46628 3.4668L2.59961 7.6668L6.46628 11.5335L7.19961 10.8001L4.53294 8.20013H13.3329V7.20013Z" fill="#1D2327"/>
33 </svg>
34 <span><?php esc_html_e( 'Go Back', 'merchant' ); ?></span>
35 </a>
36 </div>
37
38 <div class="merchant-module-page-heading">
39 <div class="merchant-module-page-info">
40 <div class="merchant-module-page-title">
41 <?php esc_html_e( 'Global Settings', 'merchant' ); ?>
42 </div>
43 <div class="merchant-module-page-desc">
44 <?php
45 $page_desc = defined( 'MERCHANT_PRO_VERSION' ) ? __( 'License activation, operating mode selection and custom code.', 'merchant' ) : __( 'Operating mode selection and custom code.', 'merchant' );
46 echo esc_html( $page_desc );
47 ?>
48 </div>
49 </div>
50 </div>
51
52 </div>
53
54 </div>
55
56 <div class="merchant-module-page-content mrc-w-100">
57
58 <?php
59
60 /**
61 * Hook: 'merchant_admin_settings_before_options'
62 *
63 * @since 1.0
64 */
65 do_action( 'merchant_admin_settings_before_options' );
66
67 Merchant_Admin_Options::create( array(
68 'module' => 'global-settings',
69 'title' => esc_html__( 'Merchant Analytics', 'merchant' ),
70 'fields' => array(
71 // Analytics toggle
72 array(
73 'id' => 'analytics_toggle',
74 'type' => 'switcher',
75 'title' => __( 'Enable analytics', 'merchant' ),
76 'desc' => __( 'Track revenue and performance insights from our modules. No personal data is collected. Disable this if you prefer not to track analytics.', 'merchant' ),
77 'default' => true,
78 ),
79 array(
80 'id' => 'usage_statistics_tracking',
81 'type' => 'switcher',
82 'title' => __( 'Enable modules usage tracking', 'merchant' ),
83 'desc' => __( 'Track which modules are used on your site. This helps us improve our products and services. No personal data is collected.', 'merchant' ),
84 'default' => false,
85 ),
86 ),
87 ) );
88
89 Merchant_Admin_Options::create( array(
90 'module' => 'global-settings',
91 'title' => esc_html__( 'Merchant Operating Mode', 'merchant' ),
92 'fields' => array(
93 array(
94 'id' => 'operating_mode',
95 'type' => 'radio_alt',
96 'options' => array(
97 'active' => array(
98 'title' => esc_html__( 'Active', 'merchant' ),
99 'desc' => esc_html__( 'Merchant is active and visible for all customers. This is the standard operating mode.', 'merchant' ),
100 ),
101 'preview' => array(
102 'title' => esc_html__( 'Preview', 'merchant' ),
103 'desc' => esc_html__( 'All Merchant modules are active and visible only to admins. Use this mode to test Merchant modules before going live.', 'merchant' ),
104 ),
105 'inactive' => array(
106 'title' => esc_html__( 'Inactive', 'merchant' ),
107 'desc' => esc_html__( 'Merchant is inactive for everyone, including you. While in this mode, your store operates like Merchant is not installed.', 'merchant' ),
108 ),
109 ),
110 'default' => 'active',
111 ),
112 ),
113 ) );
114
115 Merchant_Admin_Options::create( array(
116 'module' => 'global-settings',
117 'title' => esc_html__( 'Global Customizations', 'merchant' ),
118 'fields' => array(
119 array(
120 'type' => 'warning',
121 'content' => esc_html__( 'These settings allow you to add custom code, and are recommended for developers or advanced users only', 'merchant' ),
122 ),
123
124 array(
125 'type' => 'divider',
126 ),
127
128 array(
129 'id' => 'custom_css',
130 'type' => 'textarea_code',
131 'title' => esc_html__( 'Custom CSS', 'merchant' ),
132 ),
133
134 array(
135 'id' => 'custom_js',
136 'type' => 'textarea_code',
137 'title' => esc_html__( 'Custom JS', 'merchant' ),
138 ),
139
140 ),
141 ) );
142
143 /**
144 * Hook: 'merchant_admin_settings_after_options'
145 *
146 * @since 1.0
147 */
148 do_action( 'merchant_admin_settings_after_options' );
149 ?>
150 </div>
151 </form>
152 </div>
153 </div>
154