WordPress Download Manager - Version 3.2.25

Version Description

  • 2021.12.06 =
  • Improved admin ui
Download this release

Release Info

Developer codename065
Plugin Icon 128x128 WordPress Download Manager
Version 3.2.25
Comparing to
See all releases

Code changes from version 3.2.24 to 3.2.25

assets/images/wpdm-logo.png CHANGED
Binary file
download-manager.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://www.wpdownloadmanager.com/purchases/
5
  Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
6
  Author: W3 Eden, Inc.
7
  Author URI: https://www.wpdownloadmanager.com/
8
- Version: 3.2.24
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
@@ -39,7 +39,7 @@ use WPDM\Widgets\WidgetController;
39
 
40
  global $WPDM;
41
 
42
- define('WPDM_VERSION','3.2.24');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
5
  Description: Manage, Protect and Track file downloads, and sell digital products from your WordPress site. A complete digital asset management solution.
6
  Author: W3 Eden, Inc.
7
  Author URI: https://www.wpdownloadmanager.com/
8
+ Version: 3.2.25
9
  Text Domain: download-manager
10
  Domain Path: /languages
11
  */
39
 
40
  global $WPDM;
41
 
42
+ define('WPDM_VERSION','3.2.25');
43
 
44
  define('WPDM_TEXT_DOMAIN','download-manager');
45
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: download manager, document management, file manager, digital store, ecomme
5
  Requires at least: 5.3
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
- Stable tag: 3.2.24
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
@@ -181,6 +181,9 @@ Check download stats and get a push notification when someone downloads, install
181
 
182
  == Changelog ==
183
 
 
 
 
184
  = 3.2.24 - 2021.11.26 =
185
  * Fixed file path issue for `wpdm-admin.js`
186
 
5
  Requires at least: 5.3
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
+ Stable tag: 3.2.25
9
 
10
 
11
  This File Management & Digital Store plugin will help you to control file downloads & sell digital products from your WP site.
181
 
182
  == Changelog ==
183
 
184
+ = 3.2.25 - 2021.12.06 =
185
+ * Improved admin ui
186
+
187
  = 3.2.24 - 2021.11.26 =
188
  * Fixed file path issue for `wpdm-admin.js`
189
 
src/Admin/AdminController.php CHANGED
@@ -33,15 +33,18 @@ class AdminController {
33
  add_action('admin_init', array($this, 'metaBoxes'), 0);
34
  add_action('admin_init', array(new Email(), 'preview'));
35
  add_action('admin_head', array($this, 'adminHead'));
 
36
 
37
  add_action('wp_ajax_updateaddon', array($this, 'updateAddon'));
38
  add_action('wp_ajax_installaddon', array($this, 'installAddon'));
39
 
40
  add_action("admin_notices", [$this, 'notices']);
41
  add_action("wp_ajax_wpdm_remove_admin_notice", [$this, 'removeNotices']);
 
42
 
43
  add_filter("user_row_actions", [$this, 'usersRowAction'], 10, 2);
44
 
 
45
  }
46
 
47
  function filters(){
@@ -234,10 +237,6 @@ class AdminController {
234
  }
235
  }
236
 
237
- function files($post) {
238
- include wpdm_admin_tpl_path("metaboxes/attached-files.php" );
239
- //include(WPDM_BASE_DIR . "admin/tpls/metaboxes/attached-files.php");
240
- }
241
 
242
  function packageSettings($post) {
243
  include wpdm_admin_tpl_path("metaboxes/package-settings.php" );
@@ -247,9 +246,131 @@ class AdminController {
247
  include wpdm_admin_tpl_path("metaboxes/attach-file.php" );
248
  }
249
 
250
- function additionalPreviews($post)
251
- {
252
- include wpdm_admin_tpl_path("metaboxes/additional-preview-images.php" );
253
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
  }
33
  add_action('admin_init', array($this, 'metaBoxes'), 0);
34
  add_action('admin_init', array(new Email(), 'preview'));
35
  add_action('admin_head', array($this, 'adminHead'));
36
+ add_action('admin_footer', array($this, 'adminFooter'));
37
 
38
  add_action('wp_ajax_updateaddon', array($this, 'updateAddon'));
39
  add_action('wp_ajax_installaddon', array($this, 'installAddon'));
40
 
41
  add_action("admin_notices", [$this, 'notices']);
42
  add_action("wp_ajax_wpdm_remove_admin_notice", [$this, 'removeNotices']);
43
+ add_action("wp_ajax_hide_wpdmpro_notice", [$this, 'hideProNotice']);
44
 
45
  add_filter("user_row_actions", [$this, 'usersRowAction'], 10, 2);
46
 
47
+
48
  }
49
 
50
  function filters(){
237
  }
238
  }
239
 
 
 
 
 
240
 
241
  function packageSettings($post) {
242
  include wpdm_admin_tpl_path("metaboxes/package-settings.php" );
246
  include wpdm_admin_tpl_path("metaboxes/attach-file.php" );
247
  }
248
 
249
+ function hideProNotice()
250
+ {
251
+ __::isAuthentic('__wpnnonce', WPDM_PUB_NONCE, WPDM_ADMIN_CAP);
252
+ update_option("__hide_wpdmpro_notice", strtotime('+15 days'));
253
+ die();
254
+ }
255
+
256
+ function adminFooter()
257
+ {
258
+ $noticeresume = (int)get_option('__hide_wpdmpro_notice');
259
+ if ($noticeresume < time()) {
260
+ ?>
261
+ <div id="wpdmpro-intro" style="display: none">
262
+
263
+ <div class="xcard" id="wpdmpro_notice">
264
+ <div class="xcontent">
265
+ <a href="#" id="wnxclose">Dismiss</a>
266
+ <h2>Thanks for choosing WordPress Download Manager</h2>
267
+ You may check the pro version for multi-file package, front-end administration, email lock and 100+ other awesome features
268
+ </div>
269
+ <div class="xbtn">
270
+ <a target="_blank" href="https://www.wpdownloadmanager.com/pricing/"
271
+ class="btx">
272
+ Show Me
273
+ </a>
274
+ </div>
275
+ </div>
276
+ </div>
277
+ <style>
278
+ #wpdmpro_notice {
279
+ padding: 20px;
280
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
281
+ margin: 20px 0;
282
+ width: calc(100% - 40px);
283
+ max-width: calc(100% - 40px);
284
+ border: 0;
285
+ display: flex;
286
+ grid-template-columns: 1fr 150px;
287
+ background: #ffffff;
288
+ }
289
+
290
+ #wpdmpro_notice .xcontent{
291
+ flex: 4;
292
+ position: relative;
293
+ background: url('<?= WPDM_BASE_URL ?>assets/images/wpdm-logo.png') left center no-repeat;
294
+ background-size: contain;
295
+ padding-left: 60px
296
+ }
297
+
298
+ #wpdmpro_notice .xbtn {
299
+ width: 200px;
300
+ min-width: 200px;
301
+ align-content: center;
302
+ display: grid;
303
+ }
304
+
305
+ #wpdmpro_notice h2 {
306
+ margin: 5px 0 5px;
307
+ }
308
+
309
+ #wpdmpro_notice .xbtn .btx {
310
+ padding: 15px 20px;
311
+ color: #ffffff;
312
+ font-weight: 600;
313
+ text-decoration: none;
314
+ display: block;
315
+ text-align: center;
316
+ position: relative;
317
+ border-radius: 5px;
318
+ background: linear-gradient(135deg, #518dff 0%, #22c1ff 100%);
319
+ border: 0;
320
+ transition: all ease-in-out 300ms;
321
+ box-shadow: 0 0 10px rgba(0, 100, 255, 0.57);
322
+ margin: 0 5px;
323
+ text-transform: uppercase;
324
+ letter-spacing: 1px;
325
+ }
326
+
327
+ #wpdmpro_notice .xbtn .btx:hover {
328
+ transition: all ease-in-out 300ms;
329
+ box-shadow: 0 0 15px rgba(0, 100, 255, 0.8);
330
+ opacity: 0.85;
331
+ transform: scale(1.01);
332
+ }
333
+
334
+ #wnxclose {
335
+ position: absolute;
336
+ text-decoration: none;
337
+ color: #fff;
338
+ background: linear-gradient(135deg, #ff7432 19%, #f81c7f 90%);
339
+ font-size: 9px;
340
+ padding: 3px 10px;
341
+ top: 0;
342
+ z-index: 999;
343
+ left: 0;
344
+ text-transform: uppercase;
345
+ letter-spacing: 1px;
346
+ margin-top: -31px;
347
+ opacity: 0;
348
+ border-radius: 500px;
349
+ transition: all ease-in-out 500ms;
350
+ }
351
+
352
+ #wpdmpro_notice:hover #wnxclose {
353
+ opacity: 1;
354
+ transition: all ease-in-out 500ms;
355
+ }
356
+ </style>
357
+ <script>
358
+ jQuery(function ($) {
359
+ if (pagenow === 'dashboard') {
360
+ $('#dashboard-widgets-wrap').before($('#wpdmpro-intro').html());
361
+ }
362
+ if (pagenow === 'edit-wpdmpro') {
363
+ $('.wp-header-end').before($('#wpdmpro-intro').html());
364
+ }
365
+ $('#wnxclose').on('click', function (e) {
366
+ e.preventDefault();
367
+ $('#wpdmpro_notice').fadeOut();
368
+ $.get(ajaxurl, {__wpnnonce: '<?= wp_create_nonce(WPDM_PUB_NONCE)?>', action: 'hide_wpdmpro_notice'});
369
+ });
370
+ });
371
+ </script>
372
+ <?php
373
+ }
374
+ }
375
 
376
  }
src/Admin/Menu/Settings.php CHANGED
@@ -90,7 +90,6 @@ class Settings
90
 
91
  $stabs = apply_filters("add_wpdm_settings_tab", $stabs);
92
 
93
- $stabs['plugin-update'] = array('id' => 'plugin-update','icon'=>'fa fa-sync', 'link' => 'edit.php?post_type=wpdmpro&page=settings&tab=plugin-update', 'title' => 'Updates', 'callback' => array($this, 'pluginUpdate'));
94
  $stabs['privacy'] = array('id' => 'privacy','icon'=>'fas fa-user-shield', 'link' => 'edit.php?post_type=wpdmpro&page=settings&tab=privacy', 'title' => 'Privacy', 'callback' => array($this, 'privacy'));
95
 
96
  }
90
 
91
  $stabs = apply_filters("add_wpdm_settings_tab", $stabs);
92
 
 
93
  $stabs['privacy'] = array('id' => 'privacy','icon'=>'fas fa-user-shield', 'link' => 'edit.php?post_type=wpdmpro&page=settings&tab=privacy', 'title' => 'Privacy', 'callback' => array($this, 'privacy'));
94
 
95
  }
src/Admin/views/settings.php CHANGED
@@ -56,6 +56,15 @@ if (!defined("ABSPATH")) die("Shit happens!");
56
  <?php Settings::renderMenu($tab = wpdm_query_var('tab', ['validate' => 'txt', 'default' => 'basic'])); ?>
57
  </ul>
58
  </div>
 
 
 
 
 
 
 
 
 
59
  </div>
60
  <div id="wpdm-admin-page-body">
61
  <div class="tab-content">
56
  <?php Settings::renderMenu($tab = wpdm_query_var('tab', ['validate' => 'txt', 'default' => 'basic'])); ?>
57
  </ul>
58
  </div>
59
+ <div id="pro">
60
+ <div class="panel panel-primary" style="margin-top: 64px;">
61
+ <div class="panel-body text-center">
62
+ Thanks for using Download Manager. When you get some free moments, please give us a "⭐⭐⭐⭐⭐" at wordpress.org.<br/>It will inspire us a lot.
63
+
64
+ <a target="_blank" href="https://wordpress.org/support/plugin/download-manager/reviews/#new-post" class="btn btn-primary btn-block btn-sm" style="margin-top: 12px">Let's Go 😊</a>
65
+ </div>
66
+ </div>
67
+ </div>
68
  </div>
69
  <div id="wpdm-admin-page-body">
70
  <div class="tab-content">
src/Admin/views/settings/addon-update.php DELETED
@@ -1,156 +0,0 @@
1
- <div class="panel panel-default">
2
- <div class="panel-heading">
3
- <div class="pull-right" style="margin-top: -1px"><a class="btn btn-xs btn-primary" href="edit.php?post_type=wpdmpro&page=settings&tab=plugin-update&newpurchase=1"><i class="fa fa-sync"></i> <?php _e( "Check For Updates" , "download-manager" ); ?></a> <a class="btn btn-warning btn-xs" href="edit.php?post_type=wpdmpro&page=settings&tab=plugin-update&__lononce=<?=wp_create_nonce(NONCE_KEY); ?>"><?php _e( "Logout" , "download-manager" ); ?></a></div>
4
- <i class="fa fa-sync"></i> &nbsp; <?php _e( "Add-on Update" , "download-manager" ) ?></div>
5
- <div class="panel-body-x">
6
-
7
- <?php if(get_option('__wpdm_suname') =='') { ?>
8
- <div class="panel-body">
9
- <div class="log-req" style="width: 350px;margin: 30px auto;padding: 30px 30px 40px;">
10
- <div class="form-group text-center">
11
- <img style="width: 128px;margin-bottom: 20px" src="<?php echo WPDM_BASE_URL.'assets/images/wpdm-icon.png'; ?>" />
12
- </div>
13
- <div class="form-group text-center" style="font-weight: 300;text-transform: capitalize;font-size: 9pt;">
14
- <?php echo sprintf(__( "Enter your %s login info" , "download-manager" ), '<a href="https://www.wpdownloadmanager.com/signup/" target="_blank">WPDownloadManager.com</a>'); ?>
15
- </div>
16
-
17
- <div class="form-group">
18
- <div class="input-group input-group-lg">
19
- <span class="input-group-addon" style="border-radius: 3px 0 0 3px" id="sizing-addon1"><i class="fa fa-user"></i></span>
20
- <input style="border-radius: 0 3px 3px 0" placeholder="Username" name="__wpdm_suname" id="user_login"
21
- class="form-control required text" value="" size="20" tabindex="38" type="text">
22
- </div>
23
- </div>
24
- <div class="form-group">
25
- <div class="input-group input-group-lg">
26
- <span style="border-radius: 3px 0 0 3px" class="input-group-addon" id="sizing-addon1"><i class="fa fa-key"></i></span>
27
- <input style="border-radius: 0 3px 3px 0" placeholder="Password" name="__wpdm_supass" id="user_pass"
28
- class="form-control required password" value="" size="20" tabindex="39" type="password">
29
- </div>
30
- </div>
31
- <div class="form-group">
32
- <div class="well text-center" style="border-radius: 3px;background: #ffffff;padding: 10px;box-shadow:none;color: #999;font-family: Montserrat, serif;font-weight: 300;font-size:10px;letter-spacing:0.6px;">
33
- <?php _e('Click Save Settings Button To Login', 'download-manager'); ?>
34
- </div>
35
- </div>
36
- </div>
37
- </div>
38
- <style>
39
- .well.log-req *:not(.btn){
40
- border-radius: 0 !important;
41
- }
42
- </style>
43
-
44
-
45
- <?php
46
- } else {
47
- //precho($purchased_items);
48
- ?>
49
- <ul id="plugin-updates-nav" class="nav nav-pills nav-justified">
50
- <li class="active"><a href="#pro-add-ons" data-toggle="tab"><?php _e( "Purchased Add-ons" , "download-manager" ); ?></a></li>
51
- <li><a href="#free-add-ons" data-toggle="tab"><?php _e( "Free Add-ons" , "download-manager" ); ?></a></li>
52
- </ul>
53
- <div class="tab-content">
54
- <div class="tab-pane active" id="pro-add-ons">
55
- <table class="table" style="margin: 0;">
56
- <thead>
57
- <tr>
58
- <th><?php _e( "Product Name" , "download-manager" ); ?></th>
59
- <th><?php _e( "Active(v)" , "download-manager" ); ?></th>
60
- <th><?php _e( "Latest(v)" , "download-manager" ); ?></th>
61
- <th><?php _e( "Download" , "download-manager" ); ?></th>
62
- </tr>
63
- </thead>
64
- <tbody>
65
- <?php
66
- $latest = WPDM()->updater->getLatestVersions();
67
-
68
- if(isset($purchased_items) && is_array($purchased_items)){
69
- foreach($purchased_items as $item){
70
- if(isset($item->download_url)){
71
- foreach($item->download_url as $file => $dlu){
72
- $plugin_name = str_replace(".zip", "", basename($file));
73
-
74
- if(!strstr($plugin_name, "download-manager-")){
75
-
76
- $plugin_data = wpdm_plugin_data($plugin_name);
77
- ?>
78
- <tr class="<?php if($item->order_status == 'Expired'){ ?>bg-danger<?php } else { ?><?php echo version_compare(wpdm_valueof($latest, $plugin_name), $plugin_data['Version'], '>')?'bg-warning':(!$plugin_data?'':'bg-success'); ?><?php } ?>">
79
- <td><a href="https://www.wpdownloadmanager.com/?p=<?php echo $item->pid; ?>" target="_blank"><?php echo $item->post_title; ?> ( <?php echo basename($file); ?> )</a></td>
80
- <td><?php echo isset($plugin_data['Version'])?$plugin_data['Version']:'NA'; ?></td>
81
- <td><?php echo isset($latest[$plugin_name])?$latest[$plugin_name]:'NA'; ?></td>
82
- <td style="width: 100px">
83
- <?php if($item->order_status == 'Completed'){ ?>
84
- <?php if(!$plugin_data){ ?>
85
- <a href="#" data-url="<?php echo $dlu; ?>" data-action="installaddon" data-plugin="<?php echo $plugin_name; ?>" class="btn btn-xs btn-success btn-block btn-update"><i class="fa fa-plus"></i> <?php _e( "Install" , "download-manager" ); ?></a>
86
- <?php } else if(isset($latest[$plugin_name]) && version_compare($latest[$plugin_name], $plugin_data['Version'], '>')){ ?>
87
- <a href="#" data-url="<?php echo $dlu; ?>" data-action="updateaddon" data-plugin="<?php echo $plugin_name; ?>" class="btn btn-xs btn-warning btn-block btn-update"><i class="fa fa-sync"></i> <?php _e( "Update" , "download-manager" ); ?></a>
88
- <?php } else echo "<span class='text-success'><i class='fa fa-check-circle'></i> ". __( "Updated" , "download-manager" )."</span>"; ?>
89
- <?php } else { ?>
90
- <a href="https://www.wpdownloadmanager.com/user-dashboard/?udb_page=purchases/order/<?php echo $item->oid; ?>/" target="_blank" class="btn btn-xs btn-danger btn-block"><?php _e( "Expired" , "download-manager" ); ?></a>
91
- <?php } ?>
92
- </td>
93
- </tr>
94
-
95
- <?php }}}}} ?>
96
- </tbody>
97
- </table>
98
- </div>
99
- <div class="tab-pane" id="free-add-ons">
100
- <table class="table" style="margin: 0;">
101
- <thead>
102
- <tr>
103
- <th><?php _e( "Product Name" , "download-manager" ); ?></th>
104
- <th><?php _e( "Active(v)" , "download-manager" ); ?></th>
105
- <th><?php _e( "Latest(v)" , "download-manager" ); ?></th>
106
- <th><?php _e( "Download" , "download-manager" ); ?></th>
107
- </tr>
108
- </thead>
109
- <tbody>
110
- <?php
111
-
112
- foreach($freeaddons as $addon){
113
- $addon->files = (array)$addon->files;
114
- $file = array_shift($addon->files);
115
- $plugin_name = str_replace(".zip", "", basename($file));
116
- $plugin_data = wpdm_plugin_data($plugin_name);
117
- ?>
118
-
119
- <tr class="<?php if(isset($latest[$plugin_name])) { echo version_compare($latest[$plugin_name], $plugin_data['Version'], '>')?'bg-warning':(!$plugin_data?'':'bg-success'); } ?>">
120
- <td><a href="<?php echo $addon->link; ?>" target="_blank"><?php echo $addon->post_title; ?></a></td>
121
- <td><?php echo isset($plugin_data['Version'])?$plugin_data['Version']:'NA'; ?></td>
122
- <td><?php echo isset($latest[$plugin_name])?$latest[$plugin_name]:'NA'; ?></td>
123
- <td style="width: 100px">
124
-
125
- <?php if(!$plugin_data){ ?>
126
- <a href="#" data-url="https://www.wpdownloadmanager.com/?wpdmdl=<?php echo $addon->ID; ?>" data-action="installaddon" data-plugin="<?php echo $plugin_name; ?>" class="btn btn-xs btn-success btn-block btn-update"><i class="fa fa-plus"></i> <?php _e( "Install" , "download-manager" ); ?></a>
127
- <?php } else if(isset($latest[$plugin_name]) && version_compare($latest[$plugin_name], $plugin_data['Version'], '>')){ ?>
128
- <a href="#" data-url="https://www.wpdownloadmanager.com/?wpdmdl=<?php echo $addon->ID; ?>" data-action="updateaddon" data-plugin="<?php echo $plugin_name; ?>" class="btn btn-xs btn-warning btn-block btn-update"><i class="fa fa-sync"></i> <?php _e( "Update" , "download-manager" ); ?></a>
129
- <?php } else echo "<span class='text-success'><i class='fa fa-check-circle'></i> ". __( "Updated" , "download-manager" )."</span>"; ?>
130
-
131
- </td>
132
- </tr>
133
-
134
- <?php }
135
- ?>
136
- </tbody>
137
- </table>
138
- </div>
139
- </div>
140
- <script>
141
- jQuery(function($){
142
- $('.btn-update').on('click', function (res) {
143
- var bhtml = $(this).html(), btn = $(this);
144
- btn.html('<i class="fa fa-sync fa-spin"></i> <?php _e( "Please Wait..." , "download-manager" ); ?>');
145
- $.post('admin-ajax.php?action='+$(this).data('action'), {updateurl: $(this).data('url'), plugin: $(this).data('plugin'), __upanonce: '<?= wp_create_nonce(WPDM_PRI_NONCE) ?>'}, function (res) {
146
- btn.html('<i class="fa fa-check-circle"></i> <?php _e( "Success!" , "download-manager" ); ?>');
147
- });
148
- return false;
149
- })
150
- });
151
- </script>
152
-
153
- <?php } ?>
154
-
155
- </div>
156
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Admin/views/templates/header.php CHANGED
@@ -8,41 +8,17 @@
8
  if(!defined("ABSPATH")) die();
9
 
10
 
11
- $actions = [
12
- ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=page&task=NewTemplate" , "class" => "secondary".((wpdm_query_var('_type') === 'page' && wpdm_query_var('task') === 'NewTemplate') ? ' active' : ''), "name" => '<i class="fa fa-file"></i> ' . __("Create Page Template", "download-manager")],
13
- ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=link&task=NewTemplate" , "class" => "secondary".((wpdm_query_var('_type') === 'link' && wpdm_query_var('task') === 'NewTemplate') ? ' active' : ''), "name" => '<i class="fa fa-link"></i> ' . __("Create Link Template", "download-manager")],
14
- ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=import" , "class" => "primary".((wpdm_query_var('_type') === 'link' && wpdm_query_var('task') === 'NewTemplate') ? ' active' : ''), "name" => '<i class="fa fa-file-import"></i> ' . __("Import Template", "download-manager")]
15
- ];
16
-
17
  $type = wpdm_query_var('_type', 'txt', 'link');
18
  $menus = [
19
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=link", "name" => __("Link Templates", "download-manager"), "active" => ($type === 'link')],
20
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=page", "name" => __("Page Templates", "download-manager"), "active" => ($type === 'page')],
21
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=email", "name" => __("Email Templates", "download-manager"), "active" => ($type === 'email')],
22
- ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=custom-tags", "name" => __("Custom Tags", "download-manager"), "active" => ($type === 'custom-tags')],
23
  ];
24
 
25
- WPDM()->admin->pageHeader(esc_attr__('Templates', WPDM_TEXT_DOMAIN), 'magic color-purple', $menus, $actions);
26
 
27
 
28
  ?>
29
- <!--div class="panel-heading">
30
- <b><i class="fa fa-magic color-purple"></i> &nbsp; <?php echo __( "Templates" , "download-manager" ); ?></b>
31
- <div class="pull-right">
32
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=page&task=NewTemplate" class="btn btn-sm btn-secondary"><i class="fa fa-file"></i> <?php echo __( "Create Page Template" , "download-manager" ); ?></a>
33
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=link&task=NewTemplate" class="btn btn-sm btn-secondary"><i class="fa fa-link"></i> <?php echo __( "Create Link Template" , "download-manager" ); ?></a>
34
- <a href="edit.php?post_type=wpdmpro&page=templates&_type=import" class="btn btn-sm btn-primary"><i class="fa fa-file-import"></i> <?php echo __( "Import Template" , "download-manager" ); ?></a>
35
- </div>
36
- <div style="clear: both"></div>
37
- </div>
38
- <ul id="tabs" class="nav nav-tabs nav-wrapper-tabs" style="padding: 60px 10px 0 10px;background: #f5f5f5">
39
- <li <?php if(!isset($_GET['_type'])||$_GET['_type']=='link'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=link" id="link"><?php _e( "Link Templates" , "download-manager" ); ?></a></li>
40
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='page'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=page" id="page"><?php _e( "Page Templates" , "download-manager" ); ?></a></li>
41
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='email'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=email" id="email"><?php _e( "Email Templates" , "download-manager" ); ?></a></li>
42
- <li <?php if(isset($_GET['_type'])&&$_GET['_type']=='custom-tags'){ ?>class="active"<?php } ?>><a href="edit.php?post_type=wpdmpro&page=templates&_type=custom-tags" id="custom-tags"><?php _e( "Custom Tags" , "download-manager" ); ?></a></li>
43
- <?php if(wpdm_query_var('_type') === 'import'){ ?>
44
- <li class="active"><a href="edit.php?post_type=wpdmpro&page=templates&_type=import" id="import"><?php _e( "Import Template" , "download-manager" ); ?></a></li>
45
- <?php } ?>
46
- </ul -->
47
  <div class="wpdm-admin-page-content">
48
 
8
  if(!defined("ABSPATH")) die();
9
 
10
 
 
 
 
 
 
 
11
  $type = wpdm_query_var('_type', 'txt', 'link');
12
  $menus = [
13
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=link", "name" => __("Link Templates", "download-manager"), "active" => ($type === 'link')],
14
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=page", "name" => __("Page Templates", "download-manager"), "active" => ($type === 'page')],
15
  ['link' => "edit.php?post_type=wpdmpro&page=templates&_type=email", "name" => __("Email Templates", "download-manager"), "active" => ($type === 'email')],
 
16
  ];
17
 
18
+ WPDM()->admin->pageHeader(esc_attr__('Templates', WPDM_TEXT_DOMAIN), 'magic color-purple', $menus);
19
 
20
 
21
  ?>
22
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  <div class="wpdm-admin-page-content">
24
 
src/Admin/views/templates/template-editor.php DELETED
@@ -1,18 +0,0 @@
1
- <div class="wrap w3eden">
2
- <?php
3
- require_once __DIR__.'/header.php';
4
- ?>
5
-
6
- <div class="row">
7
-
8
- <div style="col-md-12">
9
- <?php wpdmpro_required(); ?>
10
-
11
- </div>
12
-
13
-
14
-
15
- </div>
16
-
17
- </div>
18
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Admin/views/templates/templates.php CHANGED
@@ -10,22 +10,14 @@ if(!defined("ABSPATH")) die();
10
 
11
  require_once __DIR__.'/header.php';
12
 
13
- if(wpdm_query_var('_type') === 'custom-tags'){
14
 
15
- require_once __DIR__.'/custom-tags.php';
16
-
17
- } else if(wpdm_query_var('_type') === 'import'){
18
-
19
- require_once __DIR__.'/import-template.php';
20
-
21
- } else {
22
 
23
  //List link, page and emaol templates
24
  require_once __DIR__.'/list-templates.php';
25
 
26
  require_once __DIR__.'/email-template-settings.php';
27
 
28
- } ?>
29
 
30
 
31
  </div>
10
 
11
  require_once __DIR__.'/header.php';
12
 
 
13
 
 
 
 
 
 
 
 
14
 
15
  //List link, page and emaol templates
16
  require_once __DIR__.'/list-templates.php';
17
 
18
  require_once __DIR__.'/email-template-settings.php';
19
 
20
+ ?>
21
 
22
 
23
  </div>
src/AssetManager/views/asset-manager-ui.php CHANGED
@@ -416,22 +416,6 @@ if(is_admin()){
416
  margin: 0 5px !important;
417
  }
418
 
419
- #newcomment{
420
- min-height: 50px;
421
- font-size: 12px !important;
422
- }
423
-
424
- #__asset_comments .asset-comment{
425
- border: 1px solid #e8e8e8;
426
- margin: 5px 0;
427
- border-radius: 3px;
428
- padding: 15px;
429
- }
430
- #__asset_comments .asset-comment .avatar{
431
- width: 32px;
432
- height: auto;
433
- border-radius: 500px;
434
- }
435
 
436
  .w3eden .modal-header .close.pull-right {
437
  height: 16px;
@@ -612,9 +596,7 @@ if(is_admin()){
612
 
613
  <!-- Nav tabs -->
614
  <ul class="nav nav-tabs" id="__file_settings_tabs" role="tablist" style="margin-left: -15px;padding-left: 15px;margin-right: -15px;border-bottom: 1px solid #e8e8e8;">
615
- <!-- li role="presentation" class="active"><a href="#activity" aria-controls="activity" role="tab" data-toggle="tab">Activity</a></li -->
616
  <li role="presentation" class="active"><a href="#share" aria-controls="share" role="tab" data-toggle="tab"><?= esc_attr__( 'Share', WPDM_TEXT_DOMAIN ); ?></a></li>
617
- <li role="presentation"><a href="#comments" aria-controls="comments" role="tab" data-toggle="tab"><?= esc_attr__( 'Comments', WPDM_TEXT_DOMAIN ); ?></a></li>
618
  </ul>
619
 
620
  <!-- Tab panes -->
@@ -631,13 +613,11 @@ if(is_admin()){
631
  </div>
632
  </div>
633
 
634
- <img src="<?= WPDM_BASE_URL ?>assets/images/share-links.png" style="max-width: 100%; margin-top: 10px; opacity: 0.2;" align="Share Links">
635
 
636
 
637
  </div>
638
- <div role="tabpanel" class="tab-pane" id="comments">
639
- <img src="<?= WPDM_BASE_URL ?>assets/images/asset-comments.png" style="max-width: 100%; margin-top: 15px; opacity: 0.5;" align="Comments">
640
- </div>
641
  </div>
642
 
643
  </div>
@@ -885,13 +865,6 @@ if(is_admin()){
885
  </div>
886
 
887
 
888
- <ul id="contextMenu" class="dropdown-menu" role="menu" style="display:none" >
889
- <li><a tabindex="-1" href="#"><?= esc_attr__( 'Action', WPDM_TEXT_DOMAIN ); ?></a></li>
890
- <li><a tabindex="-1" href="#"><?= esc_attr__( 'Another action', WPDM_TEXT_DOMAIN ); ?></a></li>
891
- <li><a tabindex="-1" href="#"><?= esc_attr__( 'Something else here', WPDM_TEXT_DOMAIN ); ?></a></li>
892
- <li class="divider"></li>
893
- <li><a tabindex="-1" href="#"><?= esc_attr__( 'Separated link', WPDM_TEXT_DOMAIN ); ?></a></li>
894
- </ul>
895
 
896
 
897
  </div>
@@ -945,17 +918,6 @@ if(is_admin()){
945
  }
946
  }
947
 
948
- function contentMenu(){
949
- var $ = jQuery;
950
- $("#scandir .file-row").contextMenu({
951
- menuSelector: "#contextMenu",
952
- menuSelected: function (invokedOn, selectedMenu) {
953
- var msg = "You selected the menu item '" + selectedMenu.text() +
954
- "' on the value '" + invokedOn.text() + "'";
955
- alert(msg);
956
- }
957
- });
958
- }
959
 
960
  jQuery(function ($) {
961
 
@@ -1005,7 +967,7 @@ if(is_admin()){
1005
  WPDM.unblockUI('#filewin');
1006
  $('#reload').removeAttr('disabled', 'disabled').html("<i class='fa fa-sync'></i>");
1007
  $('#breadcrumb').html(data.breadcrumb);
1008
- contentMenu();
1009
  } else {
1010
  WPDM.pushNotify("<?=esc_attr__( 'Error', 'download-manager' ); ?>!", data.message, 'https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678080-shield-error-256.png', 'https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678080-shield-error-256.png');
1011
  }
@@ -1183,15 +1145,6 @@ if(is_admin()){
1183
  });
1184
  });
1185
 
1186
- $('body').on('click', '#addcomment', function (e) {
1187
- e.preventDefault();
1188
- WPDM.blockUI('#newcomment_panel');
1189
- var filepath = $(this).data('path');
1190
- $.post(ajaxurl, {__wpdm_addcomment:'<?php echo wp_create_nonce(NONCE_KEY); ?>', action: 'wpdm_addcomment', comment: $('#newcomment').val(), assetid: assetSettings.asset.ID }, function (data) {
1191
- assetSettings.asset.comments = data;
1192
- WPDM.unblockUI('#newcomment_panel');
1193
- });
1194
- });
1195
 
1196
  $('body').on('click', '.btn-open-file', function (e) {
1197
  e.preventDefault();
416
  margin: 0 5px !important;
417
  }
418
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
419
 
420
  .w3eden .modal-header .close.pull-right {
421
  height: 16px;
596
 
597
  <!-- Nav tabs -->
598
  <ul class="nav nav-tabs" id="__file_settings_tabs" role="tablist" style="margin-left: -15px;padding-left: 15px;margin-right: -15px;border-bottom: 1px solid #e8e8e8;">
 
599
  <li role="presentation" class="active"><a href="#share" aria-controls="share" role="tab" data-toggle="tab"><?= esc_attr__( 'Share', WPDM_TEXT_DOMAIN ); ?></a></li>
 
600
  </ul>
601
 
602
  <!-- Tab panes -->
613
  </div>
614
  </div>
615
 
616
+
617
 
618
 
619
  </div>
620
+
 
 
621
  </div>
622
 
623
  </div>
865
  </div>
866
 
867
 
 
 
 
 
 
 
 
868
 
869
 
870
  </div>
918
  }
919
  }
920
 
 
 
 
 
 
 
 
 
 
 
 
921
 
922
  jQuery(function ($) {
923
 
967
  WPDM.unblockUI('#filewin');
968
  $('#reload').removeAttr('disabled', 'disabled').html("<i class='fa fa-sync'></i>");
969
  $('#breadcrumb').html(data.breadcrumb);
970
+
971
  } else {
972
  WPDM.pushNotify("<?=esc_attr__( 'Error', 'download-manager' ); ?>!", data.message, 'https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678080-shield-error-256.png', 'https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678080-shield-error-256.png');
973
  }
1145
  });
1146
  });
1147
 
 
 
 
 
 
 
 
 
 
1148
 
1149
  $('body').on('click', '.btn-open-file', function (e) {
1150
  e.preventDefault();
src/AssetManager/views/file-settings.php DELETED
@@ -1,11 +0,0 @@
1
- <?php
2
- /**
3
- * Base: wpdmpro
4
- * Developer: shahjada
5
- * Team: W3 Eden
6
- * Date: 2019-08-05 16:16
7
- */
8
-
9
- if(!defined("ABSPATH")) die();
10
- ?>
11
- ok