PluginProbe ʕ •ᴥ•ʔ
Download Manager / trunk
Download Manager vtrunk
3.3.62 3.3.61 3.3.60 3.3.59 3.3.58 3.3.57 3.3.56 trunk 2.1.3 2.3.0 2.5.96 2.5.97 2.6.2 2.6.96 2.8.3 2.9.99 3.0.4 3.1.05 3.1.07 3.1.08 3.1.11 3.1.12 3.1.14 3.1.17 3.1.18 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.2.04 3.2.13 3.2.14 3.2.16 3.2.18 3.2.19 3.2.21 3.2.22 3.2.23 3.2.24 3.2.25 3.2.27 3.2.28 3.2.29 3.2.30 3.2.31 3.2.32 3.2.33 3.2.34 3.2.35 3.2.37 3.2.38 3.2.39 3.2.40 3.2.41 3.2.42 3.2.43 3.2.44 3.2.45 3.2.46 3.2.47 3.2.48 3.2.49 3.2.50 3.2.51 3.2.52 3.2.53 3.2.54 3.2.55 3.2.56 3.2.57 3.2.58 3.2.59 3.2.60 3.2.61 3.2.63 3.2.64 3.2.65 3.2.66 3.2.67 3.2.68 3.2.69 3.2.70 3.2.71 3.2.72 3.2.73 3.2.74 3.2.75 3.2.76 3.2.77 3.2.78 3.2.79 3.2.80 3.2.81 3.2.82 3.2.83 3.2.84 3.2.85 3.2.86 3.2.87 3.2.88 3.2.89 3.2.90 3.2.91 3.2.92 3.2.93 3.2.94 3.2.95 3.2.96 3.2.97 3.2.98 3.2.99 3.3.00 3.3.01 3.3.02 3.3.03 3.3.04 3.3.05 3.3.06 3.3.07 3.3.08 3.3.09 3.3.10 3.3.11 3.3.12 3.3.13 3.3.14 3.3.15 3.3.16 3.3.17 3.3.18 3.3.19 3.3.20 3.3.21 3.3.22 3.3.23 3.3.24 3.3.25 3.3.26 3.3.27 3.3.28 3.3.29 3.3.30 3.3.31 3.3.32 3.3.33 3.3.34 3.3.35 3.3.36 3.3.37 3.3.38 3.3.39 3.3.40 3.3.41 3.3.42 3.3.43 3.3.44 3.3.45 3.3.46 3.3.47 3.3.48 3.3.49 3.3.50 3.3.51 3.3.52 3.3.53 3.3.54 3.3.55
download-manager / src / Admin / views / settings.php
download-manager / src / Admin / views Last commit date
asset-manager 5 years ago dashboard-widgets 6 months ago metaboxes 1 week ago settings 4 months ago stats 1 week ago templates 1 week ago addons-list.php 1 week ago admin-footer.php 2 months ago admin-head.php 2 years ago edit-store-profile.php 5 years ago iconfinder.php 2 years ago page-header.php 6 months ago settings.php 6 months ago stats.php 6 months ago welcome.php 6 months ago
settings.php
263 lines
1 <?php
2
3 use WPDM\Admin\Menu\Settings;
4
5 if ( ! defined( "ABSPATH" ) ) {
6 die( "Shit happens!" );
7 }
8 ?>
9 <style>
10 #wpfooter {
11 display: none;
12 }
13 </style>
14 <div class="wrap w3eden <?php echo (int)get_option('__wpdm_left_aligned', 0) === 0 ? 'wpdms-body-centered': '' ?>">
15 <form method="post" id="wdm_settings_form">
16 <?php
17
18 $actions = [
19 [
20 'type' => "submit",
21 "class" => "primary btn-full-height",
22 "name" => '<i class="sinc far fa-hdd"></i> ' . __( "Save Settings", "download-manager" )
23 ]
24 ];
25
26 //WPDM()->admin->pageHeader(esc_attr__('Settings', WPDM_TEXT_DOMAIN), 'cog sinc color-purple', [], $actions, ['class' => 'pr-0']);
27
28 ?>
29
30
31
32 <?php
33 wp_nonce_field( WPDMSET_NONCE_KEY, '__wpdms_nonce' );
34 ?>
35 <div class="panel panel-default" id="wpdm-wrapper-panel">
36
37 <div id="wpdm-admin-page-container">
38 <div id="wpdm-admin-page-sidebar" data-simplebar>
39 <div id="sidebarlogo" class="panel panel-default">
40 <a href="https://www.wpdownloadmanager.com/" target="_blank">
41 <svg style="width: 160px;" xmlns="http://www.w3.org/2000/svg"
42 xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 327.3 327.3">
43 <g id="Layer_2" data-name="Layer 2">
44 <g id="download-manager-logo">
45 <g id="wpdm_logo_v3" data-name="WordPress Download Manage Pro">
46 <path id="arrow" fill="#3c80e4"
47 d="M149.87,180.29l-91.41-91A20,20,0,0,1,58.39,61L64,55.36a20,20,0,0,1,28.29-.07l71.52,71.18,71-71.7a20,20,0,0,1,28.29-.13l5.68,5.62a20,20,0,0,1,.14,28.29l-90.75,91.64A20,20,0,0,1,149.87,180.29Z"></path>
48 <path id="circle"
49 d="M186.66,202.9a32,32,0,0,1-45.29.16L97.58,159.48a78,78,0,1,0,132.49-.41Z"
50 style="fill: #094168;"></path>
51 </g>
52 </g>
53 </g>
54 </svg>
55 </a>
56 </div>
57 <div>
58 <ul id="tabs" class="nav nav-pills nav-stacked settings-tabs">
59 <?php Settings::renderMenu( $tab = wpdm_query_var( 'tab', [
60 'validate' => 'txt',
61 'default' => 'basic'
62 ] ) ); ?>
63 </ul>
64 </div>
65 <div class="panel panel-default sidebar-button">
66 <div class="panel-body">
67 <button type="submit" style="min-width:200px" class="btn btn-admin btn-block btn-lg">
68 <i class="sinc far fa-hdd"></i>
69 &nbsp;<?php _e( "Save Settings", "download-manager" ); ?>
70 </button>
71 </div>
72 </div>
73 </div>
74 <div id="wpdm-admin-page-body">
75 <div class="tab-content">
76 <div class="panel panel-default" id="setting-head">
77 <div class="panel-body" style="padding: 20px 0 !important;">
78 <div class="media">
79 <div class="pull-right">
80 <div id="wpdm_notify"
81 style="position: fixed; cursor: pointer;right: 20px;bottom: 20px"></div>
82 <button type="submit" style="min-width:200px"
83 class="btn btn-admin btn-block btn-lg">
84 <i class="sinc far fa-hdd"></i>
85 &nbsp;<?php _e( "Save Settings", "download-manager" ); ?>
86 </button>
87 </div>
88 <div class="media-body">
89 <h2 class="m-0" id="stitle" style="font-size: 14pt;line-height: 42px">
90 <div class="pull-left text-primary" style="width: 28px">
91 <svg id="leftal" style="width: 24px;margin-top: 11px;margin-right: 6px;"
92 xmlns="http://www.w3.org/2000/svg"
93 xmlns:xlink="http://www.w3.org/1999/xlink"
94 viewBox="0 0 327.3 327.3">
95 <title>wpdm logo v3</title>
96 <g id="Layer_2" data-name="Layer 2">
97 <g id="download-manager-logo">
98 <g id="wpdm_logo_v3" data-name="wpdm logo v3">
99 <path id="arrow" fill="#3c80e4"
100 d="M149.87,180.29l-91.41-91A20,20,0,0,1,58.39,61L64,55.36a20,20,0,0,1,28.29-.07l71.52,71.18,71-71.7a20,20,0,0,1,28.29-.13l5.68,5.62a20,20,0,0,1,.14,28.29l-90.75,91.64A20,20,0,0,1,149.87,180.29Z"/>
101 <path id="circle"
102 d="M186.66,202.9a32,32,0,0,1-45.29.16L97.58,159.48a78,78,0,1,0,132.49-.41Z"
103 style="fill: #094168;"/>
104 </g>
105 </g>
106 </g>
107 </svg>
108 <i :class="icon" id="centeral"></i>
109 </div>
110 <?= __( 'Settings', WPDM_TEXT_DOMAIN ) ?> <i
111 class="fa fa-angle-double-right"></i> <span>{{stitle}}</span>
112 </h2>
113 </div>
114 </div>
115 </div>
116 </div>
117 <div style="height: 55px"></div>
118 <div class="alert alert-success"
119 style="max-width: 300px !important;display: none;position: fixed; right: 15px;top: 80px;background: #ffffff !important;cursor: pointer"
120 id="wpdm_message"></div>
121
122 <input type="hidden" name="task" id="task" value="wdm_save_settings"/>
123 <input type="hidden" name="action" id="action" value="wpdm_settings"/>
124 <input type="hidden" name="section" id="section" value="<?php echo $tab; ?>"/>
125 <div id="fm_settings">
126 <?php
127 global $stabs;
128 if ( isset( $stabs[ $tab ], $stabs[ $tab ]['callback'] ) ) {
129 call_user_func( $stabs[ $tab ]['callback'] );
130 } else {
131 echo "<div class='panel panel-danger'><div class='panel-body color-red'><i class='fa fa-exclamation-triangle'></i> " . __( "Something is wrong!", "download-manager" ) . "</div></div>";
132 }
133 ?>
134 </div>
135
136
137 </div>
138 </div>
139
140 </div>
141
142
143 </div>
144
145 </form>
146 <link rel="stylesheet" href="<?php echo WPDM_BASE_URL ?>assets/simplebar/simplebar.css"/>
147 <script src="<?php echo WPDM_BASE_URL ?>assets/simplebar/simplebar.min.js"></script>
148 <script>
149
150 const { createApp } = Vue;
151
152 var stitle = createApp({
153 data() {
154 return {
155 stitle: '<?= __( 'General', WPDM_TEXT_DOMAIN ); ?>',
156 icon: 'fa-solid fa-sliders'
157 };
158 }
159 }).mount('#stitle');
160
161 jQuery(function ($) {
162 var $body = $('body'), section;
163 $body.on('click', '#wpdm_message.alert-success', function () {
164 $(this).fadeOut();
165 });
166
167 stitle.stitle = $('#tabs li.active a').text();
168 stitle.icon = $('#tabs li.active a').data('icon');
169
170 $('select:not(.system-ui)').select2({minimumResultsForSearch: 6});
171 $("ul#tabs li").click(function () {
172
173 });
174 $('#wpdm_message').removeClass('hide').hide();
175 $("ul#tabs li a").click(function () {
176 stitle.stitle = $(this).text();
177 stitle.icon = $(this).data('icon');
178 ///jQuert("ul#tabs li").removeClass('active')
179 $("ul#tabs li").removeClass("active");
180 $(this).parent('li').addClass('active');
181 WPDM.blockUI('#fm_settings');
182 section = this.id;
183 $.post(ajaxurl, {action: 'wpdm_settings', section: this.id}, function (res) {
184 $('#fm_settings').html(res);
185 $('#section').val(section)
186 $('select:not(.system-ui)').select2({minimumResultsForSearch: 6});
187 window.history.pushState({
188 "html": res,
189 "pageTitle": "response.pageTitle"
190 }, "", "edit.php?post_type=wpdmpro&page=wpdm-settings&tab=" + section);
191 $('#wpdm-lsp').fadeOut(function () {
192 $(this).remove();
193 });
194 WPDM.unblockUI('#fm_settings');
195 $('#ttip').tooltip({placement: 'bottom'});
196 });
197 return false;
198 });
199
200 window.onpopstate = function (e) {
201 if (e.state) {
202 $("#fm_settings").html(e.state.html);
203 //document.title = e.state.pageTitle;
204 }
205 };
206
207
208 $('#wdm_settings_form').submit(function () {
209
210 $('.sinc').removeClass('far fa-hdd').addClass('fas fa-sun fa-spin');
211
212 $(this).ajaxSubmit({
213 url: ajaxurl,
214 beforeSubmit: function (formData, jqForm, options) {
215 $('.wpdm-ssb').addClass('wpdm-spin');
216 $('#wdms_loading').addClass('wpdm-spin');
217 },
218 success: function (response) {
219 var section = $('input#section').val();
220 if (typeof response === 'string')
221 WPDM.notify("<div style='margin-bottom: 5px;text-transform: uppercase'><strong>" + $('#' + section).html() + "</strong></div>" + response, 'success', '#wpdm_notify', 10000);
222 else {
223 if (response.success === true)
224 WPDM.notify("<div style='margin-bottom: 5px;text-transform: uppercase'><strong>" + $('#' + section).html() + ":</strong></div>" + response.msg, 'success', '#wpdm_notify', 10000);
225 if (response.success === false)
226 WPDM.notify("<div style='margin-bottom: 5px;text-transform: uppercase'><strong>" + $('#' + section).html() + ":</strong></div>" + response.msg, 'danger', '#wpdm_notify', 10000);
227 if (response.reload === true) {
228 $('#' + section).trigger('click');
229 }
230 }
231
232 WPDM.doAction("wpdm_save_settings", $('#section').val(), response)
233
234 $('.wpdm-ssb').removeClass('wpdm-spin');
235 $('.sinc').removeClass('fas fa-sun fa-spin').addClass('far fa-hdd');
236 $('#wdms_loading').removeClass('wpdm-spin');
237 }
238 });
239
240 return false;
241 });
242
243 $('body').on("click", '.nav-tabs a', function (e) {
244 e.preventDefault();
245 $(this).tab('show');
246 });
247
248 function adjustSidebarHeight() {
249 var abh = $('#wpadminbar').height();
250 $('#wpdm-admin-page-sidebar').css('height', (window.innerHeight - abh) + 'px');
251 }
252
253 adjustSidebarHeight();
254 $(window).on('resize', function () {
255 adjustSidebarHeight();
256 });
257
258
259 });
260
261 </script>
262
263