Version Description
Download this release
Release Info
Developer | aihimel |
Plugin | File Manager |
Version | 4.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 4.0.3
- BootStart/BootStart.php +16 -3
- css/admin-style.css +23 -2
- file-manager.php +88 -21
- img/icon-24x24.png +0 -0
- readme.txt +6 -6
- views/admin/files.php +18 -0
- views/admin/footer.php +24 -13
- views/admin/index.php +1 -1
- views/admin/settings.php +90 -0
- views/admin/sidebar.php +2 -2
BootStart/BootStart.php
CHANGED
@@ -227,9 +227,10 @@ abstract class FM_BootStart{
|
|
227 |
if( empty( $this->menu_data ) ) return;
|
228 |
|
229 |
if($this->menu_data['type'] == 'menu'){
|
230 |
-
|
231 |
-
add_menu_page( $this->name, $this->name, 'manage_options', $this->prefix
|
232 |
-
|
|
|
233 |
}
|
234 |
|
235 |
}
|
@@ -246,7 +247,19 @@ abstract class FM_BootStart{
|
|
246 |
$this->render('', 'admin/index');
|
247 |
|
248 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
|
|
|
|
|
|
|
|
|
250 |
/**
|
251 |
*
|
252 |
* Absolute path finder
|
227 |
if( empty( $this->menu_data ) ) return;
|
228 |
|
229 |
if($this->menu_data['type'] == 'menu'){
|
230 |
+
|
231 |
+
add_menu_page( $this->name, $this->name, 'manage_options', $this->prefix, array(&$this, 'admin_panel'), $this->url('img/icon-24x24.png'), 7 );
|
232 |
+
add_submenu_page( $this->prefix, __( 'File Manager Settings' ), 'Settings', 'manage_options', $this->zip( 'File Manager Settings' ), array( &$this, 'settings' ) );
|
233 |
+
|
234 |
}
|
235 |
|
236 |
}
|
247 |
$this->render('', 'admin/index');
|
248 |
|
249 |
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Adds a settings page
|
253 |
+
*
|
254 |
+
* */
|
255 |
+
public function settings(){
|
256 |
+
|
257 |
+
if(!current_user_can('manage_options')) die( $this->render('', 'access-denied') );
|
258 |
|
259 |
+
$this->render('', 'admin/settings');
|
260 |
+
|
261 |
+
}
|
262 |
+
|
263 |
/**
|
264 |
*
|
265 |
* Absolute path finder
|
css/admin-style.css
CHANGED
@@ -160,7 +160,7 @@ input[type=radio]
|
|
160 |
margin: 0;
|
161 |
position: fixed;
|
162 |
bottom: 0;
|
163 |
-
right: 0;
|
164 |
z-index: 100;
|
165 |
background-color: #B10C0C;
|
166 |
padding: 10px;
|
@@ -170,9 +170,30 @@ input[type=radio]
|
|
170 |
.footer-sticky-button a{
|
171 |
text-decoration: none;
|
172 |
color: white;
|
173 |
-
font-size: 1.
|
174 |
}
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
.bootstart-admin-content{
|
177 |
max-width: 73%;
|
178 |
min-width: 73%;
|
160 |
margin: 0;
|
161 |
position: fixed;
|
162 |
bottom: 0;
|
163 |
+
right: 0;
|
164 |
z-index: 100;
|
165 |
background-color: #B10C0C;
|
166 |
padding: 10px;
|
170 |
.footer-sticky-button a{
|
171 |
text-decoration: none;
|
172 |
color: white;
|
173 |
+
font-size: 1.1em;
|
174 |
}
|
175 |
|
176 |
+
/* Donation Area */
|
177 |
+
.donation{
|
178 |
+
bottom: 0;
|
179 |
+
float: left;
|
180 |
+
z-index: 100;
|
181 |
+
border-radius: 5px;
|
182 |
+
position:fixed;
|
183 |
+
background-color: #B10C0C;
|
184 |
+
}
|
185 |
+
/* End Of Donation Area */
|
186 |
+
|
187 |
+
/*Editor Font Re-fix*/
|
188 |
+
.ui-widget textarea {
|
189 |
+
font-family: Verdana,Arial,sans-serif,Trebuchet MS,Tahoma;
|
190 |
+
font-size: 1.3em;
|
191 |
+
background-color: #f0f0f0;
|
192 |
+
padding:10px;
|
193 |
+
text-align:left;
|
194 |
+
}
|
195 |
+
/*Editor Font Re-fix*/
|
196 |
+
|
197 |
.bootstart-admin-content{
|
198 |
max-width: 73%;
|
199 |
min-width: 73%;
|
file-manager.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
* Plugin Name: File Manager
|
5 |
* Author Name: Aftabul Islam
|
6 |
-
* Version:
|
7 |
* Author Email: toaihimel@gmail.com
|
8 |
* License: GPLv2
|
9 |
-
* Description: Manage your file the way you like. You can upload, delete, copy, move, rename, compress, extract files. You don't need to worry about ftp
|
10 |
*
|
11 |
* */
|
12 |
|
@@ -30,27 +30,69 @@ class FM extends FM_BootStart {
|
|
30 |
$this->add_ajax('valid_directory'); // Checks if the directory is valid or not
|
31 |
|
32 |
parent::__construct($name);
|
33 |
-
|
|
|
|
|
|
|
34 |
}
|
35 |
-
|
36 |
/**
|
37 |
-
*
|
38 |
* File manager connector function
|
39 |
-
*
|
40 |
* */
|
41 |
public function connector(){
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
|
55 |
$opts = array(
|
56 |
'debug' => true,
|
@@ -61,20 +103,45 @@ class FM extends FM_BootStart {
|
|
61 |
'URL' => site_url(), // URL to files (REQUIRED)
|
62 |
'uploadDeny' => $mime_denied, // All Mimetypes not allowed to upload
|
63 |
'uploadAllow' => $mime_allowed, // Mimetype `image` and `text/plain` allowed to upload
|
64 |
-
'uploadOrder' => array('
|
65 |
'accessControl' => 'access',
|
66 |
-
'disabled' => $
|
|
|
67 |
)
|
68 |
)
|
69 |
);
|
70 |
-
|
71 |
$elFinder = new FM_EL_Finder();
|
72 |
$elFinder = $elFinder->connect($opts);
|
73 |
$elFinder->run();
|
74 |
-
|
75 |
die();
|
76 |
}
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
global $FileManager;
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
* Plugin Name: File Manager
|
5 |
* Author Name: Aftabul Islam
|
6 |
+
* Version: 4.0.3
|
7 |
* Author Email: toaihimel@gmail.com
|
8 |
* License: GPLv2
|
9 |
+
* Description: Manage your file the way you like. You can upload, delete, copy, move, rename, compress, extract files. You don't need to worry about ftp. It is realy simple and easy to use.
|
10 |
*
|
11 |
* */
|
12 |
|
30 |
$this->add_ajax('valid_directory'); // Checks if the directory is valid or not
|
31 |
|
32 |
parent::__construct($name);
|
33 |
+
|
34 |
+
// Adding plugins page links
|
35 |
+
add_filter('plugin_action_links', array(&$this, 'plugin_page_links'), 10, 2);
|
36 |
+
|
37 |
}
|
38 |
+
|
39 |
/**
|
40 |
+
*
|
41 |
* File manager connector function
|
42 |
+
*
|
43 |
* */
|
44 |
public function connector(){
|
45 |
|
46 |
+
//~ Holds the list of avilable file operations.
|
47 |
+
$file_operation_list = array(
|
48 |
+
'open', // Open directory
|
49 |
+
'ls', // File list inside a directory
|
50 |
+
'tree', // Subdirectory for required directory
|
51 |
+
'parents', // Parent directory for required directory
|
52 |
+
'tmb', // Newly created thumbnail list
|
53 |
+
'size', // Count total file size
|
54 |
+
'mkdir', // Create directory
|
55 |
+
'mkfile', // Create empty file
|
56 |
+
'rm', // Remove dir/file
|
57 |
+
'rename', // Rename file
|
58 |
+
'duplicate', // Duplicate file - create copy with "copy %d" suffix
|
59 |
+
'paste', // Copy/move files into new destination
|
60 |
+
'upload', // Save uploaded file
|
61 |
+
'get', // Return file content
|
62 |
+
'put', // Save content into text file
|
63 |
+
'archive', // Create archive
|
64 |
+
'extract', // Extract files from archive
|
65 |
+
'search', // Search files
|
66 |
+
'info', // File info
|
67 |
+
'dim', // Image dimmensions
|
68 |
+
'resize', // Resize image
|
69 |
+
'url', // content URL
|
70 |
+
'ban', // Ban a user
|
71 |
+
'copy', // Copy a file/folder to another location
|
72 |
+
'cut', // Cut for file/folder
|
73 |
+
'edit', // Edit for files
|
74 |
+
'upload', // Upload A file
|
75 |
+
'download', // download A file
|
76 |
+
);
|
77 |
|
78 |
+
// Disabled file operations
|
79 |
+
$file_operation_disabled = array( 'url', 'info' );
|
80 |
+
|
81 |
+
// Allowed mime types
|
82 |
+
$mime_allowed = array(
|
83 |
+
'text',
|
84 |
+
'image',
|
85 |
+
'video',
|
86 |
+
'audio',
|
87 |
+
'application',
|
88 |
+
'model',
|
89 |
+
'chemical',
|
90 |
+
'x-conference',
|
91 |
+
'message',
|
92 |
+
|
93 |
+
);
|
94 |
|
95 |
+
$mime_denied = array();
|
96 |
|
97 |
$opts = array(
|
98 |
'debug' => true,
|
103 |
'URL' => site_url(), // URL to files (REQUIRED)
|
104 |
'uploadDeny' => $mime_denied, // All Mimetypes not allowed to upload
|
105 |
'uploadAllow' => $mime_allowed, // Mimetype `image` and `text/plain` allowed to upload
|
106 |
+
'uploadOrder' => array('allow', 'deny'), // allowed Mimetype `image` and `text/plain` only
|
107 |
'accessControl' => 'access',
|
108 |
+
'disabled' => $file_operations_disabled // List of disabled operations
|
109 |
+
//~ 'attributes'
|
110 |
)
|
111 |
)
|
112 |
);
|
113 |
+
|
114 |
$elFinder = new FM_EL_Finder();
|
115 |
$elFinder = $elFinder->connect($opts);
|
116 |
$elFinder->run();
|
117 |
+
|
118 |
die();
|
119 |
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
*
|
123 |
+
* Adds plugin page links,
|
124 |
+
*
|
125 |
+
* */
|
126 |
+
public function plugin_page_links($links, $file){
|
127 |
+
|
128 |
+
static $this_plugin;
|
129 |
+
|
130 |
+
if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
|
131 |
+
|
132 |
+
if ($file == $this_plugin){
|
133 |
+
array_unshift( $links, '<a target=\'blank\' href="http://www.giribaz.com/support/">'.__("Support", "file-manager").'</a>');
|
134 |
+
|
135 |
+
array_unshift( $links, '<a href="admin.php?page=file-manager_settings">'.__("File Manager", "file-manager").'</a>');
|
136 |
+
|
137 |
+
if( !defined('FILE_MANAGER_PREMIUM') && !defined('FILE_MANAGER_BACKEND') )
|
138 |
+
array_unshift( $links, '<a target=\'blank\' class="file-manager-admin-panel-pro" href="http://www.giribaz.com/wordpress-file-manager-plugin/" style="color: white; font-weight: bold; background-color: red; padding-right: 5px; padding-left: 5px; border-radius: 40%;">'.__("Pro", "file-manager").'</a>');
|
139 |
+
|
140 |
+
}
|
141 |
+
|
142 |
+
return $links;
|
143 |
+
}
|
144 |
+
|
145 |
}
|
146 |
|
147 |
global $FileManager;
|
img/icon-24x24.png
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== File Manager ===
|
2 |
-
Contributors: aihimel
|
3 |
Donate link: http://www.giribaz.com/
|
4 |
Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
|
5 |
Requires at least: 4.4.0
|
6 |
-
Tested up to: 4.
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -24,16 +24,16 @@ Just install the plugin following standard wordpress plugin install process and
|
|
24 |
= Key Features =
|
25 |
|
26 |
+ Upload, Download and Delete operations
|
27 |
-
+ All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
|
28 |
+ Light and Elegant client UI
|
29 |
+ Drag & Drop file upload support
|
30 |
+ List and Icons view available
|
31 |
+ Alternative to FTP
|
32 |
-
+ Archives create/extract (zip, rar, 7z, tar, gzip, bzip2)
|
33 |
-
+ Image and File Edit Support
|
34 |
+ Quicklook, preview for common file types
|
35 |
+ Calculate directory sizes
|
36 |
-
+ Video and audio preview/play
|
37 |
+ Support file search and sort
|
38 |
|
39 |
= Extended Features =
|
1 |
=== File Manager ===
|
2 |
+
Contributors: aihimel, shovonchoudhury
|
3 |
Donate link: http://www.giribaz.com/
|
4 |
Tags: file manager, wordpress file manager, wp file manager, FTP, elfinder, file Browser, manage files, upload, delete, rename, copy, move, online file browser, remote file manager, drag and drop, folder upload
|
5 |
Requires at least: 4.4.0
|
6 |
+
Tested up to: 4.6.1
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
24 |
= Key Features =
|
25 |
|
26 |
+ Upload, Download and Delete operations
|
27 |
+
+ All operations with files and folders (copy, move, upload, create folder/file, rename, archive, extract, edit, etc.)
|
28 |
+ Light and Elegant client UI
|
29 |
+ Drag & Drop file upload support
|
30 |
+ List and Icons view available
|
31 |
+ Alternative to FTP
|
32 |
+
+ Archives create/extract (zip, rar, 7z, tar, gzip, bzip2)
|
33 |
+
+ Image and File Edit Support
|
34 |
+ Quicklook, preview for common file types
|
35 |
+ Calculate directory sizes
|
36 |
+
+ Video and audio preview/play
|
37 |
+ Support file search and sort
|
38 |
|
39 |
= Extended Features =
|
views/admin/files.php
CHANGED
@@ -24,3 +24,21 @@ jQuery(document).ready(function(){
|
|
24 |
});
|
25 |
|
26 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
});
|
25 |
|
26 |
</script>
|
27 |
+
|
28 |
+
<?php
|
29 |
+
|
30 |
+
if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path']) && $this->options->options['file_manager_settings']['show_url_path'] == 'hide' ){
|
31 |
+
|
32 |
+
?>
|
33 |
+
<style>
|
34 |
+
.elfinder-info-tb > tbody:nth-child(1) > tr:nth-child(2),
|
35 |
+
.elfinder-info-tb > tbody:nth-child(1) > tr:nth-child(3)
|
36 |
+
{
|
37 |
+
display: none;
|
38 |
+
}
|
39 |
+
</style>
|
40 |
+
<?php
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
?>
|
views/admin/footer.php
CHANGED
@@ -1,40 +1,51 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
-
*
|
6 |
* */
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
?>
|
10 |
|
11 |
<div class='bootstart-admin-footer'>
|
12 |
-
|
13 |
<ul>
|
14 |
-
|
15 |
<li><a href='http://www.giribaz.com/support/' target='blank'>Support</a></li>
|
16 |
<li><a href='https://wordpress.org/support/view/plugin-reviews/file-manager?rate=5#postform' target='blank'>Review</a></li>
|
17 |
-
|
18 |
</ul>
|
19 |
-
|
20 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
21 |
<div class="fm_permission_system_advert">
|
22 |
-
|
23 |
<span>
|
24 |
-
|
25 |
<strong>Extend</strong> File Manager for <strong>frontend</strong>. Enable your <strong>users</strong> to upload files with full <strong>control</strong> of what they can upload and download. And many more features. <a style='color:#31A6CB;' href='http://www.giribaz.com?referral=from_dashboard_link'>Take a look</a>
|
26 |
-
|
27 |
</span>
|
28 |
-
|
29 |
<a target='bland' data-lightbox="image-1" data-title="My caption" href='<?php echo $this->url('/img/permission-system-backend.png'); ?>' ><img data-lightbox="image-1" data-title="My caption" src='<?php echo $this->url('/img/permission-system-backend.png'); ?>' /></a>
|
30 |
-
|
31 |
</div>
|
32 |
<?php endif; ?>
|
33 |
-
|
34 |
</div>
|
35 |
|
36 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
37 |
<div class='footer-sticky-button'>
|
38 |
-
<a href='http://www.giribaz.com/' target='blank'>Get File Manager Pro</a>
|
39 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
<?php endif; ?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
* Security check. No one can access without Wordpress itself
|
5 |
+
*
|
6 |
* */
|
7 |
defined('ABSPATH') or die();
|
8 |
|
9 |
?>
|
10 |
|
11 |
<div class='bootstart-admin-footer'>
|
12 |
+
|
13 |
<ul>
|
14 |
+
|
15 |
<li><a href='http://www.giribaz.com/support/' target='blank'>Support</a></li>
|
16 |
<li><a href='https://wordpress.org/support/view/plugin-reviews/file-manager?rate=5#postform' target='blank'>Review</a></li>
|
17 |
+
|
18 |
</ul>
|
19 |
+
|
20 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
21 |
<div class="fm_permission_system_advert">
|
22 |
+
|
23 |
<span>
|
24 |
+
|
25 |
<strong>Extend</strong> File Manager for <strong>frontend</strong>. Enable your <strong>users</strong> to upload files with full <strong>control</strong> of what they can upload and download. And many more features. <a style='color:#31A6CB;' href='http://www.giribaz.com?referral=from_dashboard_link'>Take a look</a>
|
26 |
+
|
27 |
</span>
|
28 |
+
|
29 |
<a target='bland' data-lightbox="image-1" data-title="My caption" href='<?php echo $this->url('/img/permission-system-backend.png'); ?>' ><img data-lightbox="image-1" data-title="My caption" src='<?php echo $this->url('/img/permission-system-backend.png'); ?>' /></a>
|
30 |
+
|
31 |
</div>
|
32 |
<?php endif; ?>
|
33 |
+
|
34 |
</div>
|
35 |
|
36 |
<?php if(!defined('FILE_MANAGER_PREMIUM')): ?>
|
37 |
<div class='footer-sticky-button'>
|
38 |
+
<a href='http://www.giribaz.com/wordpress-file-manager-plugin/' target='blank'>Get File Manager Pro</a>
|
39 |
</div>
|
40 |
+
|
41 |
+
<!--Donation button-->
|
42 |
+
<div class='donation'>
|
43 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
44 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
45 |
+
<input type="hidden" name="hosted_button_id" value="HB5JJSMB63RRS">
|
46 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" height='32px' width='150px' alt="PayPal - The safer, easier way to pay online!">
|
47 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
48 |
+
</form>
|
49 |
+
</div>
|
50 |
+
|
51 |
<?php endif; ?>
|
views/admin/index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
<?php
|
4 |
|
5 |
-
$admin_page_url = admin_url()."admin.php?page={$this->prefix}
|
6 |
|
7 |
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
8 |
// Escaping data
|
2 |
|
3 |
<?php
|
4 |
|
5 |
+
$admin_page_url = admin_url()."admin.php?page={$this->prefix}";
|
6 |
|
7 |
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
8 |
// Escaping data
|
views/admin/settings.php
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php defined('ABSPATH') or die()?>
|
2 |
+
|
3 |
+
<?php
|
4 |
+
|
5 |
+
// Settings processing
|
6 |
+
if( isset( $_POST ) && !empty( $_POST ) ){
|
7 |
+
|
8 |
+
$this->options->options['file_manager_settings'] = $_POST;
|
9 |
+
|
10 |
+
}
|
11 |
+
|
12 |
+
//~ $this->pr($this->options->options['file_manager_settings']);
|
13 |
+
|
14 |
+
$admin_page_url = admin_url()."admin.php?page={$this->prefix}";
|
15 |
+
|
16 |
+
if( !isset($_GET['sub_page']) || empty($_GET['sub_page']) ) $_GET['sub_page'] = 'files';
|
17 |
+
// Escaping data
|
18 |
+
$_GET['sub_page'] = preg_replace( "/[<>#$%]/", "", $_GET['sub_page']);
|
19 |
+
// Sanitizing data
|
20 |
+
$_GET['sub_page'] = filter_var($_GET['sub_page'], FILTER_SANITIZE_STRING);
|
21 |
+
|
22 |
+
/**
|
23 |
+
*
|
24 |
+
* array(
|
25 |
+
* 'page_slug' => array('page_slug', 'page_path', 'name')
|
26 |
+
* )
|
27 |
+
*
|
28 |
+
* */
|
29 |
+
|
30 |
+
$admin_menu_pages = array(
|
31 |
+
'files' => array( 'files', ABSPATH . 'wp-content/plugins/file-manager/views/admin/files.php', 'Files'),
|
32 |
+
);
|
33 |
+
|
34 |
+
$admin_menu_pages = apply_filters('fm_admin_menu_sub_pages', $admin_menu_pages);
|
35 |
+
|
36 |
+
// Enqueing admin assets
|
37 |
+
$this->admin_assets();
|
38 |
+
?>
|
39 |
+
<div class="bootstart-admin-container">
|
40 |
+
|
41 |
+
<div class='bootstart-admin-header'>
|
42 |
+
<h2><img style="min-heigth:1.3em;" src='<?php echo $this->url('img/icon-24x24.png'); ?>' /> <?php echo $this->name; ?></h2>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<?php if( count($admin_menu_pages) > 1): ?>
|
46 |
+
<div class="bootstart-admin-navigation" >
|
47 |
+
|
48 |
+
|
49 |
+
|
50 |
+
<ul>
|
51 |
+
|
52 |
+
<?php foreach($admin_menu_pages as $page): ?>
|
53 |
+
|
54 |
+
<li class="<?php if($_GET['sub_page']==$page[0]) echo 'bootstart-admin-active-page';?>"><a href="<?php echo $admin_page_url."&&sub_page={$page[0]}"?>"><?php echo $page[2]; ?></a></li>
|
55 |
+
|
56 |
+
<?php endforeach; ?>
|
57 |
+
|
58 |
+
</ul>
|
59 |
+
|
60 |
+
</div>
|
61 |
+
<?php endif; ?>
|
62 |
+
|
63 |
+
<div class='bootstart-admin-content'>
|
64 |
+
|
65 |
+
<form action='' method='post' >
|
66 |
+
|
67 |
+
<h3>URL and Path</h3>
|
68 |
+
|
69 |
+
<label for='show_url_path_id'> Show </label>
|
70 |
+
<input type='radio' name='show_url_path' id='show_url_path_id' value='show' <?php if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path'] ) && $this->options->options['file_manager_settings']['show_url_path'] == 'show' ) echo 'checked'; ?>/>
|
71 |
+
|
72 |
+
<label for='hide_url_path_id'> Hide </label>
|
73 |
+
<input type='radio' name='show_url_path' id='hide_url_path_id' value='hide' <?php if( isset( $this->options->options['file_manager_settings']['show_url_path'] ) && !empty( $this->options->options['file_manager_settings']['show_url_path'] ) && $this->options->options['file_manager_settings']['show_url_path'] == 'hide' ) echo 'checked'; ?>/>
|
74 |
+
|
75 |
+
<br />
|
76 |
+
<br />
|
77 |
+
|
78 |
+
<input type='submit' value='Save' />
|
79 |
+
|
80 |
+
</form>
|
81 |
+
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<div class='bootstart-admin-sidebar'>
|
85 |
+
<?php require_once('sidebar.php'); ?>
|
86 |
+
</div>
|
87 |
+
|
88 |
+
<?php require_once('footer.php'); ?>
|
89 |
+
|
90 |
+
</div>
|
views/admin/sidebar.php
CHANGED
@@ -14,8 +14,8 @@ defined('ABSPATH') or die();
|
|
14 |
</div>
|
15 |
<ul>
|
16 |
<li class='badge-free' data-badge='free'>Upload, Download, Delete</li>
|
17 |
-
<li class='badge-
|
18 |
-
<li class='badge-
|
19 |
<li class='badge-pro' data-badge='pro'>Frontend Support</li>
|
20 |
<li class='badge-pro' data-badge='pro'>File Sharing</li>
|
21 |
<li class='badge-pro' data-badge='pro'>File Type Control</li>
|
14 |
</div>
|
15 |
<ul>
|
16 |
<li class='badge-free' data-badge='free'>Upload, Download, Delete</li>
|
17 |
+
<li class='badge-free' data-badge='free'>Copy, Move, Create, Rename, Archive, Extract, Edit</li>
|
18 |
+
<li class='badge-free' data-badge='free'>Supports all mime types</li>
|
19 |
<li class='badge-pro' data-badge='pro'>Frontend Support</li>
|
20 |
<li class='badge-pro' data-badge='pro'>File Sharing</li>
|
21 |
<li class='badge-pro' data-badge='pro'>File Type Control</li>
|