This commit is contained in:
2026-07-02 15:54:39 -06:00
commit 9883323161
17470 changed files with 4470592 additions and 0 deletions
@@ -0,0 +1,223 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<div class="wrap fma" style="background:#fff; padding: 20px; border:1px solid #ccc;">
<h3><?php _e('Blocks','file-manager-advanced')?> <a href="https://advancedfilemanager.com/documentation/" class="button" target="_blank">
<?php _e('Documentation','file-manager-advanced')?></a>
</h3>
<?php echo class_fma_admin_menus::shortcodeUpdateNotice();?>
<?php if(class_exists('file_manager_advanced_shortcode')) { ?>
<div id="setting-error-settings_updated" class="updated settings-error notice">
<p><strong><?php _e('Congratulations,','file-manager-advanced')?> </strong><?php _e('You have Installed Advanced File Manager Shortcode Successfully. Start working with shortcode.','file-manager-advanced')?></p>
</div>
<?php } else { ?>
<div id="setting-error-settings_updated" class="error settings-error notice">
<p style="color:red">
<strong>
<?php
_e( 'This is Pro Feature of Advanced File Manager, Please Buy <a href="https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=shortcodes_screen_top_button&utm_campaign=plugin" target="_blank">Advanced File Manager Pro</a> Addon to make shortcode work for frontend. <a href="https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=shortcodes_screen_top_button&utm_campaign=plugin" target="_blank" class="button button-primary">Get AFM Pro</a>', 'file-manager-advanced' );
?>
</strong>
</p>
</div>
<h3><?php _e('Block Generator Demo:', 'file-manager-advanced'); ?></h3>
<p><?php _e('If you want to check the demo of shortcode addon then click on link given below.', 'file-manager-advanced');?></p>
<a href="https://advancedfilemanager.com/shortcode-demo/" target="_blank" class="">Click here for demo</a>
<h3><?php _e('Block for Logged In Users:', 'file-manager-advanced'); ?></h3>
<p><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" hide="plugins" operations="upload,download" block_users="5" view="grid" theme="light" lang ="en" upload_allow="all" upload_max_size="2G"]</code></p>
<h3><?php _e('Block for Non Logged In Users (visitors):', 'file-manager-advanced'); ?></h3>
<p><code>[file_manager_advanced login="no" path="wp-content" hide="plugins" operations="upload,download" view="grid" theme="light" lang ="en" upload_allow="all" upload_max_size="2G"]</code></p>
<h3><?php _e('Conditions for User Roles:', 'file-manager-advanced'); ?></h3>
<p><code>[fma_user_role role="subscriber,editor"]<br/>
[file_manager_advanced login="yes" roles="subscriber,editor" path="wp-content" hide="plugins" operations="upload" view="list" theme="light" lang ="en"]<br/>
[/fma_user_role]<br/>
[fma_user_role role="administrator"]<br/>
[file_manager_advanced login="yes" roles="administrator" path="wp-content/plugins" operations="upload" view="list" theme="light" lang ="en"]<br/>[/fma_user_role]</code><br/> <strong>and many more conditions.</strong></p>
<h3><?php _e('Conditions for Users:', 'file-manager-advanced'); ?></h3>
<p><code>[fma_user user="1,2"]<br/>
[file_manager_advanced login="yes" roles="subscriber,editor" path="wp-content" hide="plugins" operations="upload" view="list" theme="light" lang ="en"]<br/>
[/fma_user]<br/>
[fma_user user="3"]<br/>
[file_manager_advanced login="yes" roles="administrator" path="wp-content/plugins" operations="upload" view="list" theme="light" lang ="en"]<br/>[/fma_user]</code><br/> <strong>and many more conditions.</strong> <p style="color:red">Note: user="1,2" here 1,2 are user ids.</p></p>
<h3><?php _e('Parameters:', 'file-manager-advanced'); ?> </h3>
<table class="form-table" border="1" style="text-align:center">
<tr>
<td><strong>Parameter</strong></td>
<td><strong>Value</strong></td>
<td><strong>Description</strong></td>
<td><strong>Usage</strong></td>
</tr>
<tr>
<td>login</td>
<td>yes/no</td>
<td>yes -> For Logged In users, no -> For Non Logged In users</td>
<td><code>[file_manager_advanced login="yes"]</code> - logged in users<br><br>
<code>[file_manager_advanced login="no"]</code> - non logged in users or visitors<br><br>
<strong>You can use given parameters for both shortcodes.</strong></td>
</tr>
<tr>
<td>roles</td>
<td>all / administrator, author</td>
<td>all -> Allow all user roles , use: roles="all"</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator"]</code></td>
</tr>
<tr>
<td>path</td>
<td><p>(1)Any Valid Folder Path. Eg. wp-content/uploads</p>
<p>(2) <strong>%</strong> - Root Directory</p>
<p>(3) <strong>$</strong> - Will generate logged in users personal folder of their username (unique) under location <strong>"wp-content/uploads/file-manager-advanced/users"</strong>, use path="$" in shortcode.</p>
<p>(4) <strong>wp-content/uploads/file-manager-advanced/users</strong> - you can view and access all user's personal folders under this path.</p>
</td>
<td>Any valid folder path or suggested symbols like % and $.</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content/uploads"]</code><div> <strong>Use given shortcode to auto assign their autogenerated folders to users.<strong> <code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="$"]</code></div></td>
</tr>
<tr>
<td>path_type</td>
<td>inside/outside</td>
<td>use "outside", if you want to use any directory (Folder) outside wordpress root directory, default: inside</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content/uploads" path_type="inside"]</code><div><strong>Use "url" parameter with outside as url = "https://anyoutsidewebsite.com"</strong></div></td>
</tr>
<tr>
<td>hide</td>
<td>plugins</td>
<td>will hide plugins folder</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins"]</code></td>
</tr>
<tr>
<td>operations</td>
<td>all / mkdir, mkfile, rename, duplicate, paste, ban, archive, extract, copy, cut, edit, rm, download, upload, resize, search, info, help, empty</td>
<td>all -> allow all operations, you can select according to your use </td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download"]</code></td>
</tr>
<tr>
<td>block_users</td>
<td>Any User ID like 1,5</td>
<td>Restrict any user to access file manager by assigning User's ID, Like block_users="1,5". Here 1 and 5 are the user's ids.</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5"]</code></td>
</tr>
<tr>
<td>view</td>
<td>list / grid</td>
<td>The option 'list' will return the file manager files layout in list format and the option 'grid' will return the file manager files layout in grid format.</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid"]</code></td>
</tr>
<tr>
<td>theme</td>
<td>light / dark / grey / windows10 / bootstrap</td>
<td>With this option you can assign any theme to file manager to change file manager user experience (UX).</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light"]</code></td>
</tr>
<tr>
<td>lang</td>
<td>en or any other language code.</td>
<td>At the bottom of this page, there is a list of all languages with codes. You can copy the code and use like lang ="en".</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" lang ="en"]</code></td>
</tr>
<tr>
<td>dateformat</td>
<td>M d, Y h:i A</td>
<td>Files creation or modification date format. You can change this formar as per your requirement. Example: dateformat : 'M d, Y h:i A' will return Mar 13, 2012 05:27 PM</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A"]</code></td>
</tr>
<tr>
<td>hide_path</td>
<td>yes/no</td>
<td>The option 'yes' will hide the real file path on preview. Default: no</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no"]</code></td>
</tr>
<tr>
<td>enable_trash</td>
<td>yes/no</td>
<td>The option 'yes' will display trash in file manager on front shortcode page and all the deleted files will go to the trash folder. You can restore the deleted files from Trash. Default: no</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no"]</code></td>
</tr>
<tr>
<td>height</td>
<td>500</td>
<td>This option is used to adjust in file manager height on front shortcode page. Default: blank (auto)</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no" height=""]</code></td>
</tr>
<tr>
<td>width</td>
<td>800</td>
<td>This option is used to adjust in file manager width on front shortcode page. Default: blank (auto)</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no" height="" width=""]</code></td>
</tr>
<tr>
<td>ui</td>
<td>
With this option to can control the UI of the file manager. There are some options given.<br>
1) files<br>2) toolbar<br>3) tree<br>4) path<br>5) stat
</td>
<td> 1) files -> This option will display only files (no toolbar, no left side bar) (use ui="files" in shortcode)<br>
2) toolbar,tree,path,stat -> These options will display whole file manager ui like toolbar etc. Use: ui="toolbar,tree,path,stat". Also you can remove any option from the list as per your requirements. Default: blank (all)</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no" height="" width="" ui="toolbar,tree,path,stat"]</code></td>
</tr>
<tr>
<td>allowed_upload</td>
<td>1) If you want to upload all file formats then use upload_allow="all" option.<br>
2) If you want to upload specific mime types like "image/png" then upload_allow= "image/vnd.adobe.photoshop,image/png". You can add more mime type separated by comma(,). <a href="https://advancedfilemanager.com/advanced-file-manager-mime-types/" target="_blank">Click here</a> for more mime types. </td>
<td>By using this option you can allow and restrict specific file mime types to upload. Default: all</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no" height="" width="" ui="toolbar,tree,path,stat" upload_allow= "image/vnd.adobe.photoshop,image/png"]</code></td>
</tr>
<tr>
<td>upload_max_size</td>
<td>If you want to restrict users to upload heavy files then use upload_allow="10M" option. Default: 0 (No Limit)</td>
<td>Maximum upload file size. This size is per files. Can be set as number with unit like 10M, 500K, 1G. 0 means unlimited upload. By using this option you can restrict users to upload a specific size file.</td>
<td><code>[file_manager_advanced login="yes" roles="author,editor,administrator" path="wp-content" path_type="inside" hide="plugins" operations="mkdir,download" block_users="1,5" view="grid" theme="light" dateformat="M d, Y h:i A" hide_path="no" enable_trash="no" height="" width="" ui="toolbar,tree,path,stat" upload_allow= "image/vnd.adobe.photoshop,image/png" upload_max_size="2G"]</code></td>
</tr>
</table>
<h3><?php _e('File Commands Supported', 'file-manager-advanced');?></h3>
<?php $commands = array(
'mkdir' => 'Create new directory or folder',
'mkfile' => 'Create new file',
'rename' => 'Rename a file or folder',
'duplicate' => 'Duplicate or clone a folder or file',
'paste' => 'Paste a file or folder',
'archive' => 'Create a archive or zip',
'extract' => 'Extract archive or zipped file',
'copy' => 'Copy files or folders',
'cut' => 'Simple cut a file or folder',
'edit' => 'Edit a file like php, js, html, text etc',
'rm' => 'Remove or delete files and folders',
'download' => 'Download files and folders',
'upload' => 'Upload files',
'search' => 'Search files and folders',
'info' => 'Info of files and folders',
); ?>
<table class="form-table" border="1" style="text-align:center">
<tr>
<td><strong><?php _e('Command', 'file-manager-advanced');?></strong></td>
<td><strong><?php _e('Description', 'file-manager-advanced');?></strong></td>
</tr>
<?php
foreach($commands as $c => $d){ ?>
<tr>
<td><?php echo esc_attr($c);?></td>
<td><?php echo esc_attr($d);?></td>
</tr>
<?php } ?>
</table>
<h3><?php _e('Languages Supported', 'file-manager-advanced');?></h3>
<?php $locales = $this->langs->locales(); ?>
<table class="form-table" border="1" style="text-align:center">
<tr>
<td><strong><?php _e('Code', 'file-manager-advanced');?></strong></td>
<td><strong><?php _e('Language', 'file-manager-advanced');?></strong></td>
</tr>
<?php foreach($locales as $lang => $code) {?>
<tr>
<td><?php echo esc_attr($code);?></td>
<td><?php echo esc_attr($lang);?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
</div>
@@ -0,0 +1,389 @@
<?php
if (!defined('ABSPATH'))
exit;
$settings = $this->get();
$locales = $this->langs->locales();
$path = str_replace('\\', '/', ABSPATH);
$url = site_url();
$type = (isset($_GET['status']) && !empty($_GET['status']) ? intval($_GET['status']) : '');
$message = ($type == '2') ? 'Unable to save settings.' : 'Settings updated successfully.';
$roles = $this->wpUserRoles();
$cm_themes = class_fma_main::cm_themes();
?>
<div class="wrap fma">
<h1 class="wp-heading-inline"><?php _e('Settings', 'file-manager-advanced'); ?></h1>
<?php if (!class_exists('file_manager_advanced_shortcode')) { ?>
<a href="https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=settings_screen_top_button&utm_campaign=plugin"
class="page-title-action" target="_blank">
<?php _e('Get Advanced File Manager Pro', 'file-manager-advanced') ?>
</a>
<?php } ?>
<a href="https://advancedfilemanager.com/documentation/" class="page-title-action" target="_blank">
<?php _e('Documentation', 'file-manager-advanced'); ?>
</a>
<hr class="wp-header-end">
<?php
echo class_fma_admin_menus::shortcodeUpdateNotice();
settings_errors();
if (isset($type) && !empty($type)) {
if ($type == '1') { ?>
<div class="updated notice is-dismissible">
<p><?php echo esc_attr($message) ?></p>
</div>
<?php } else if ($type == '2') { ?>
<div class="error notice is-dismissible">
<p><?php echo esc_attr($message) ?></p>
</div>
<?php }
}
?>
<div style="background:#fff; padding: 20px; border:1px solid #ccc; margin-top:20px;">
<?php
$tabs_setup = array(
'general' => array(
'title' => __('General', 'file-manager-advanced'),
'slug' => 'general',
'icon' => '<i class="dashicons dashicons-admin-generic"></i>',
),
'notifications' => array(
'title' => __('Notifications', 'file-manager-advanced'),
'slug' => 'notifications',
'icon' => '<i class="dashicons dashicons-megaphone"></i>',
),
);
if (!class_exists('AFMP\Modules\AFMP_AI_Integration')) {
$tabs_setup['ai'] = array(
'title' => __('AI Integration', 'file-manager-advanced'),
'slug' => 'ai',
'icon' => '<img src="' . plugins_url('../assets/images/codepilot.png', __FILE__) . '" style="height:16px;vertical-align:middle;border-radius:50%;" alt="Code Pilot" />',
);
}
$settings_tabs = apply_filters('fma__settings_tabs', $tabs_setup);
$active_tab = isset($_GET['tab']) ? sanitize_text_field(wp_unslash($_GET['tab'])) : 'general';
if (!empty($settings_tabs)) {
echo '<h2 class="afmp-nav-tabs nav-tab-wrapper">';
foreach ($settings_tabs as $tab_id => $tab_title) {
$active = ($active_tab === $tab_id) ? ' nav-tab-active' : '';
printf(
'<a href="%s" class="nav-tab%s">%s %s</a>',
esc_url(
add_query_arg(
array(
'page' => 'file_manager_advanced_controls',
'tab' => $tab_id,
),
admin_url('admin.php')
)
),
esc_attr($active),
$tab_title['icon'],
$tab_title['title']
);
}
echo '</h2>';
}
$this->save();
if (isset($_GET['page']) && 'file_manager_advanced_controls' === sanitize_text_field(wp_unslash($_GET['page']))) {
if ('general' !== $active_tab && isset($settings_tabs[$active_tab])) {
do_action('fma__settings_tab_' . $active_tab . '_content');
} else {
?>
<p style="width:100%; text-align:right;" class="description">
<span
id="thankyou"><?php _e('Thank you for using <a href="https://wordpress.org/plugins/file-manager-advanced/">File Manager Advanced</a>. If happy then ', 'file-manager-advanced') ?>
<a href="https://wordpress.org/support/plugin/file-manager-advanced/reviews/?filter=5"><?php _e('Rate Us', 'file-manager-advanced') ?>
<img src="<?php echo plugins_url('images/5stars.png', __FILE__); ?>"
style="width:100px; top: 11px; position: relative;"></a></span>
</p>
<form action="<?php echo admin_url('admin.php?page=file_manager_advanced_controls'); ?>" method="post">
<?php wp_nonce_field('fmaform', '_fmaform'); ?>
<table class="form-table">
<tbody>
<tr>
<th>
<?php _e('Who can access File Manager?', 'file-manager-advanced'); ?>
</th>
<td>
<?php
unset($roles['administrator']); ?>
<?php if (is_multisite()):
$checked = '';
if (isset($settings['fma_user_roles'])):
if (in_array('administrator', $settings['fma_user_roles'])) {
$checked = 'checked=checked';
}
endif;
?>
<input type="checkbox" value="superadmin" name="fma_user_role[]" checked="checked"
disabled="disabled" /> <?php _e('Super Admin (Default)', 'file-manager-advanced'); ?>
<br />
<input type="checkbox" value="administrator" name="fma_user_role[]" <?php echo esc_attr($checked); ?> /> <?php _e('Administrator', 'file-manager-advanced'); ?> <br />
<?php else: ?>
<input type="checkbox" value="administrator" name="fma_user_role[]" checked="checked"
disabled="disabled" /> <?php _e('Administrator (Default)', 'file-manager-advanced'); ?>
<br />
<?php endif; ?>
<?php
foreach ($roles as $key => $role) {
$checked = '';
if (isset($settings['fma_user_roles'])):
if (in_array($key, $settings['fma_user_roles'])) {
$checked = 'checked=checked';
}
endif;
?>
<input type="checkbox" value="<?php echo esc_attr($key); ?>" name="fma_user_role[]" <?php echo esc_attr($checked); ?> /> <?php echo esc_attr($role['name']); ?> <br />
<?php } ?>
</td>
</tr>
<tr>
<th>
<label for="fma_theme">
<?php _e('Theme', 'file-manager-advanced') ?>
</label>
</th>
<td>
<?php
$themes = array(
'light' => array(
'title' => __('Default', 'file-manager-advanced'),
'pro' => false,
),
'mono' => array(
'title' => __('Mono', 'file-manager-advanced'),
'pro' => false,
),
'dark' => array(
'title' => __('Material Dark', 'file-manager-advanced'),
'pro' => true,
),
'm-light' => array(
'title' => __('Material Light', 'file-manager-advanced'),
'pro' => true,
),
'grey' => array(
'title' => __('Material Grey', 'file-manager-advanced'),
'pro' => true,
),
'windows10' => array(
'title' => __('Windows 10', 'file-manager-advanced'),
'pro' => true,
),
'bootstrap' => array(
'title' => __('Bootstrap', 'file-manager-advanced'),
'pro' => true,
),
);
?>
<select class="file-manager-advanced-select2 fma-theme regular-text" name="fma_theme"
id="fma_theme">
<?php foreach ($themes as $value => $theme): ?>
<?php $disabled = $theme['pro'] && !class_fma_main::has_pro() ? 'disabled="disabled"' : ''; ?>
<?php $selected = isset($settings['fma_theme']) && $settings['fma_theme'] === $value ? 'selected="selected"' : ''; ?>
<?php printf('<option value="%s" %s %s>%s</option>', $value, $disabled, $selected, $theme['title']); ?>
<?php endforeach; ?>
</select>
<p class="description">
<?php _e('Select file manager advanced theme. Default: Light', 'file-manager-advanced') ?>
</p>
</td>
</tr>
<tr>
<th><?php _e('Language', 'file-manager-advanced') ?></th>
<td>
<select name="fma_locale" id="fma_locale">
<?php foreach ($locales as $key => $locale) { ?>
<option value="<?php echo esc_attr($locale); ?>" <?php echo (isset($settings['fma_locale']) && $settings['fma_locale'] == $locale) ? 'selected="selected"' : ''; ?>>
<?php echo esc_attr($key); ?>
</option>
<?php } ?>
</select>
<p class="description">
<?php _e('Select file manager advanced language. Default: en (English)', 'file-manager-advanced'); ?>
</p>
</td>
</tr>
<tr>
<th><?php _e('Public Root Path', 'file-manager-advanced') ?></th>
<td>
<input name="public_path" type="text" id="public_path"
value="<?php echo isset($settings['public_path']) && !empty($settings['public_path']) ? esc_attr($settings['public_path']) : esc_attr($path); ?>"
class="regular-text">
<p class="description">
<?php _e('File Manager Advanced Root Path, you can change according to your choice.', 'file-manager-advanced'); ?>
</p>
<p>Default: <code><?php echo esc_attr($path); ?></code></p>
</td>
</tr>
<tr>
<th><?php _e('Files URL', 'file-manager-advanced') ?></th>
<td>
<input name="public_url" type="text" id="public_url"
value="<?php echo isset($settings['public_url']) && !empty($settings['public_url']) ? esc_url($settings['public_url']) : esc_url($url); ?>"
class="regular-text">
<p class="description">
<?php _e('File Manager Advanced Files URL, you can change according to your choice.', 'file-manager-advanced'); ?>
</p>
<p>Default: <code><?php echo esc_url($url); ?></code></p>
</td>
</tr>
<tr>
<th><?php _e('Maximum Upload Size', 'file-manager-advanced') ?></th>
<td>
<input type="text" name="upload_max_size" id="upload_max_size" class="regular-text"
value="<?php echo isset($settings['upload_max_size']) && !empty($settings['upload_max_size']) ? esc_attr($settings['upload_max_size']) : 0; ?>">
<div>
<p>
<?php _e('Maximum upload file size. This size is per files. Can be set as number with unit like 10M, 500K, 1G. 0 means unlimited upload.', 'file-manager-advanced'); ?>
</p>
</div>
</td>
</tr>
<tr>
<th><?php _e('Default View Type', 'file-manager-advanced') ?></th>
<td>
<?php
foreach (FMA_UI as $ui) {
$checked = '';
if (isset($settings['display_ui_options'])) {
if (in_array($ui, $settings['display_ui_options'])) {
$checked = 'checked=checked';
}
} else {
$checked = 'checked=checked';
}
?>
<input type="checkbox" value="<?php echo esc_attr($ui); ?>" name="display_ui_options[]"
<?php echo esc_attr($checked); ?> /> <?php echo esc_attr($ui); ?> <br />
<?php } ?>
<p><?php _e('You can control the view of file manager. By default, all options are checked.', 'file-manager-advanced'); ?>
</p>
</td>
</tr>
<tr>
<th><?php _e('Hide File Path on Preview ?', 'file-manager-advanced');
?></th>
<td>
<input name="hide_path" type="checkbox" id="hide_path" value="1" <?php echo isset($settings['hide_path']) && ($settings['hide_path'] == '1') ? 'checked="checked"' : ''; ?>>
<p class="description">
<?php _e('Hide real path of file on preview.', 'file-manager-advanced') ?>
</p>
<p>Default: <code><?php _e('Disabled', 'file-manager-advanced') ?></code></p>
</td>
</tr>
<tr>
<th><?php _e('Enable Trash?', 'file-manager-advanced');
?></th>
<td>
<input name="enable_trash" type="checkbox" id="enable_trash" value="1" <?php echo isset($settings['enable_trash']) && ($settings['enable_trash'] == '1') ? 'checked="checked"' : ''; ?>>
<p class="description">
<?php _e('Deleted files will go to trash folder, you can restore later.', 'file-manager-advanced') ?>
</p>
<p>Default: <code><?php _e('Disabled', 'file-manager-advanced') ?></code></p>
</td>
</tr>
<tr>
<th><?php _e('Display .htaccess?', 'file-manager-advanced');
?></th>
<td>
<input name="enable_htaccess" type="checkbox" id="enable_htaccess" value="1" <?php echo isset($settings['enable_htaccess']) && ($settings['enable_htaccess'] == '1') ? 'checked="checked"' : ''; ?>>
<p class="description">
<?php _e('Will Display .htaccess file (if exists) in file manager.', 'file-manager-advanced') ?>
</p>
<p>Default: <code><?php _e('Disabled', 'file-manager-advanced') ?></code></p>
</td>
</tr>
<tr>
<th><?php _e('Mimetypes allowed to upload', 'file-manager-advanced') ?></th>
<td>
<textarea name="fma_upload_allow" id="fma_upload_allow" class="large-text" rows="3"
cols="30"><?php echo isset($settings['fma_upload_allow']) && !empty($settings['fma_upload_allow']) ? esc_attr($settings['fma_upload_allow']) : 'all'; ?></textarea>
<p class="description">
<?php _e('Enter Mimetypes allowed to upload, multiple comma(,) separated. Example: <code>image/vnd.adobe.photoshop,image/png</code>', 'file-manager-advanced') ?>
</p>
<p>Default: <code><?php _e('all', 'file-manager-advanced') ?></code> <a
href="https://advancedfilemanager.com/advanced-file-manager-mime-types/"
target="_blank"><?php _e('MIME Types Help', 'file-manager-advanced'); ?></a></p>
</td>
</tr>
<tr>
<th>
<label for="fma_cm_theme">
<?php _e('Code Editor Theme <sup style="color:red;">New</sup>', 'file-manager-advanced') ?>
</label>
</th>
<td>
<select class="file-manager-advanced-select2 regular-text fma-code-editor-theme"
name="fma_cm_theme" id="fma_cm_theme">
<?php foreach ($cm_themes as $theme): ?>
<?php $selected = isset($settings['fma_cm_theme']) && $settings['fma_cm_theme'] === $theme['title'] ? 'selected="selected"' : ''; ?>
<?php $disabled = $theme['pro'] && !class_fma_main::has_pro() ? 'disabled="disabled"' : ''; ?>
<?php printf('<option value="%s" %s %s>%s</option>', $theme['title'], $selected, $disabled, $theme['title']); ?>
<?php endforeach; ?>
</select>
<p class="description">
<?php _e('Select code editor theme. Default: default', 'file-manager-advanced') ?>
</p>
</td>
</tr>
<tr>
<th>
<label for="fma_debug_enabled">
<?php _e('PHP Debug Feature <sup style="color:red;">New</sup>', 'file-manager-advanced') ?>
</label>
</th>
<td>
<input name="fma_debug_enabled" type="checkbox" id="fma_debug_enabled" value="1" <?php echo isset($settings['fma_debug_enabled']) && ($settings['fma_debug_enabled'] == '1') ? 'checked="checked"' : ''; ?>>
<p class="description">
<?php _e('Enable real-time PHP syntax error detection, highlighting, and debugging features in the code editor.', 'file-manager-advanced') ?>
</p>
<p>Default: <code><?php _e('Disabled', 'file-manager-advanced') ?></code></p>
</td>
</tr>
<tr>
<th>
<label for="fma_delete_data_on_uninstall">
<?php _e('Uninstall Advanced File Manager', 'file-manager-advanced') ?>
</label>
</th>
<td>
<label>
<input name="fma_delete_data_on_uninstall" type="checkbox"
id="fma_delete_data_on_uninstall" value="1" <?php echo isset($settings['fma_delete_data_on_uninstall']) && ($settings['fma_delete_data_on_uninstall'] == '1') ? 'checked="checked"' : ''; ?>>
<?php echo __('Remove ALL Advanced File Manager data when the plugin is deleted. ', 'file-manager-advanced'); ?>
</label>
<p class="description"><span style="color: red; font-weight: bold;"><?php _e('All Blocks, File logs, and created data will be permanently removed and cannot be recovered.', 'file-manager-advanced') ?></span></p>
<p>Default: <code><?php _e('Disabled', 'file-manager-advanced') ?></code></p>
</td>
</tr>
</tbody>
</table>
<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary"
value="Save Changes"></p>
</form>
<?php
}
}
?>
</div>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,246 @@
<?php
if (!defined('ABSPATH'))
exit;
$settings = get_option('fmaoptions');
$path = str_replace('\\', '/', ABSPATH);
$review_done = get_option('fma_hide_review_section');
$hide_banner = get_option('_fma_banner_hide', 'no');
$minimize_banner = get_option('_fma_banner_minimize', 'maximize');
if (class_fma_main::has_pro()) {
$hide_banner = 'yes';
}
?>
<div class="wrap fma afm__clearfix">
<h1 class="wp-heading-inline"><?php _e('Advanced File Manager', 'file-manager-advanced'); ?></h1>
<?php if (!class_exists('file_manager_advanced_shortcode')) { ?>
<a href="https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=file_manager_screen_top_button&utm_campaign=plugin"
class="page-title-action"
target="_blank"><?php _e('Get Advanced File Manager Pro', 'file-manager-advanced'); ?></a>
<?php } ?>
<hr class="wp-header-end">
<?php
echo class_fma_admin_menus::shortcodeUpdateNotice();
settings_errors();
?>
<div <?php echo 'yes' !== $hide_banner ? '' : 'style="width: 100%;max-width: 100%;"' ?> class="afm__left-side">
<?php if ('done' != $review_done) { ?>
<div class="gb-fm-row review-block" id="fma_rate_us">
<div class="message">
<img src="<?php echo plugins_url('images/rateme.png', __FILE__); ?>" class="fma_img_rate_me">
<?php _e('<strong>Advanced File Manager</strong>, we always support you and provide better features for you, please spend some seconds to review our plugin.', 'file-manager-advanced') ?>
</div>
<div class="actions">
<a target="_blank" href="https://wordpress.org/support/plugin/file-manager-advanced/reviews/?filter=5"
class="btn btn-review fma_review_link" title="Leave us a review"
data-task="done"><?php _e('I love your plugin!', 'file-manager-advanced'); ?></a>
<a href="javascript:void(0)" class="btn fma_review_link" title="Remind me later"
data-task="done"><?php _e('Not Now', 'file-manager-advanced'); ?></a>
</div>
</div>
<hr>
<?php } ?>
<div id="file_manager_advanced">
<center>
<img src="<?php echo plugins_url('images/wait.gif', __FILE__); ?>">
</center>
</div>
<div style="width:100%; text-align:center;" class="description">
<span>
<a href="https://advancedfilemanager.com/documentation/"
target="_blank"><?php _e('Documentation', 'file-manager-advanced') ?></a> | <a
href="https://advancedfilemanager.com/contact/"
target="_blank"><?php _e('Support', 'file-manager-advanced') ?></a> | <a
href="https://advancedfilemanager.com/shortcodes/"
target="_blank"><?php _e('Shortcodes', 'file-manager-advanced') ?></a>
</span>
<span id="thankyou">
<?php _e('Thank you for using <a href="https://wordpress.org/plugins/file-manager-advanced/">Advanced File Manager</a>. If you are happy then please ', 'file-manager-advanced'); ?>
<a href="https://wordpress.org/support/plugin/file-manager-advanced/reviews/?filter=5"><?php _e('Rate Us', 'file-manager-advanced') ?>
<img src="<?php echo plugins_url('images/5stars.png', __FILE__); ?>"
style="width:100px; top: 11px; position: relative;"></a>
</span>
</div>
</div>
<?php if ('yes' !== $hide_banner): ?>
<div class="afm__right-side">
<div class="afm__container">
<div class="fma__header">
<h2 class="afmp__title">
Simplify file management with more
<span>advanced features!</span>
</h2>
</div>
<div id="remove-on-minimize" <?php echo 'maximize' === $minimize_banner ? 'style="display: block;"' : 'style="display: none;"'; ?>>
<ul class="fma__pro-features">
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Multiple Cloud Integrations.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Frontend access.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Built-in database access.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Block & shortcode support.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Role-based access control.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Private folder access.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Hide sensitive files & folders.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Advanced themes selection.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Multilingual support.
</li>
<li>
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/crown.svg' ?>" alt="crown">
</span>
Operation controls for users.
</li>
</ul>
</div>
<div class="fma_cta">
<a target="_blank"
href="https://advancedfilemanager.com/pricing/?utm_source=plugin&utm_medium=file_manager_screen_side_banner&utm_campaign=plugin">
Get Pro Now
<span>
<img src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/arrow.svg' ?>"
alt="arrow-right">
</span>
</a>
</div>
<div class="fma__footer" <?php echo 'maximize' === $minimize_banner ? 'style="display: block;"' : 'style="display: none;"'; ?>>
<a id="fma__hide-banner" href="#">Hide Banner</a>
</div>
</div>
<div class="fma__status-mini-max">
<a fma-maximized="<?php echo 'maximize' === $minimize_banner ? 'true' : 'false'; ?>"
id="fma__minimize-maximize" href="#">
<img class="fma__status <?php echo 'maximize' === $minimize_banner ? '' : 'fma__minimized'; ?>"
src="<?php echo FMA_PLUGIN_URL . 'application/assets/images/mini-max.svg'; ?>"
alt="minimize-maximize">
</a>
</div>
</div>
<?php endif; ?>
</div>
<?php if ('done' != $review_done) { ?>
<style>
.fma .review-block {
background-color: #fff;
min-height: 100px;
margin: 5px 5px 20px;
padding-top: 24px;
padding-bottom: 24px;
text-align: center;
font-size: 1.2em;
border: 1px dashed #0d5ed9;
border-radius: 10px;
display: none;
}
.fma .review-block .message {
margin-top: 16px;
}
.fma .review-block .actions {
margin-top: 24px;
}
.fma .review-block .actions .btn-review {
background-color: #0d5ed9;
color: #fff;
font-weight: 700;
border-radius: 5px;
-webkit-transition-duration: .6s;
transition-duration: .6s;
}
.fma .review-block .actions a {
padding: 5px 10px;
text-decoration: none;
border: 1px solid #0d5ed9;
}
.fma .fma_img_rate_me {
width: 20px;
}
</style>
<script>
jQuery(document).ready(function (e) {
setTimeout(function () {
jQuery('#fma_rate_us').slideDown('slow');
}, 5000);
jQuery('.fma_review_link').click(function () {
var fmaajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
var task = jQuery(this).data('task');
var nonce = "<?php echo wp_create_nonce('afm_review'); ?>";
jQuery.ajax({
type: "post",
url: fmaajaxurl,
data: { action: "fma_review_ajax", 'task': task, 'nonce': nonce },
success: function (response) {
jQuery('#fma_rate_us').slideUp('slow');
}
});
});
});
</script>
<?php } ?>