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

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

152 lines 4.8 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 Operating Mode', 'merchant' ),
70 'fields' => array(
71
72 array(
73 'id' => 'operating_mode',
74 'type' => 'radio_alt',
75 'options' => array(
76 'active' => array(
77 'title' => esc_html__( 'Active', 'merchant' ),
78 'desc' => esc_html__( 'Merchant is active and visible for all customers. This is the standard operating mode.', 'merchant' ),
79 ),
80 'preview' => array(
81 'title' => esc_html__( 'Preview', 'merchant' ),
82 'desc' => esc_html__( 'All Merchant modules are active and visible only to admins. Use this mode to test Merchant modules before going live.', 'merchant' ),
83 ),
84 'inactive' => array(
85 'title' => esc_html__( 'Inactive', 'merchant' ),
86 'desc' => esc_html__( 'Merchant is inactive for everyone, including you. While in this mode, your store operates like Merchant is not installed.', 'merchant' ),
87 ),
88 ),
89 'default' => 'active',
90 ),
91
92 ),
93 ) );
94
95 Merchant_Admin_Options::create( array(
96 'module' => 'global-settings',
97 'title' => esc_html__( 'Global Customizations', 'merchant' ),
98 'fields' => array(
99
100 array(
101 'type' => 'warning',
102 'content' => esc_html__( 'These settings allow you to add custom code, and are recommended for developers or advanced users only', 'merchant' ),
103 ),
104
105 array(
106 'type' => 'divider',
107 ),
108
109 array(
110 'id' => 'custom_css',
111 'type' => 'textarea',
112 'title' => esc_html__( 'Custom CSS', 'merchant' ),
113 ),
114
115 array(
116 'id' => 'custom_js_first',
117 'type' => 'textarea',
118 'title' => esc_html__( 'Custom JS First - runs at the beginning of Merchant', 'merchant' ),
119 ),
120
121 array(
122 'id' => 'custom_js_last',
123 'type' => 'textarea',
124 'title' => esc_html__( 'Custom JS Last - runs at the end of Merchant', 'merchant' ),
125 ),
126
127 array(
128 'id' => 'custom_js',
129 'type' => 'textarea',
130 'title' => esc_html__( 'Custom JS', 'merchant' ),
131 ),
132
133 ),
134 ) );
135
136 /**
137 * Hook: 'merchant_admin_settings_after_options'
138 *
139 * @since 1.0
140 */
141 do_action( 'merchant_admin_settings_after_options' );
142
143 ?>
144
145 </div>
146
147 </form>
148
149 </div>
150
151 </div>
152