PluginProbe
WPIDE – File Manager & Code Editor / 3.4.6
WPIDE – File Manager & Code Editor v3.4.6
3.5.8 3.5.7 2.0.14 2.0.15 2.0.16 2.0.2 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1 2.2 2.3 2.3.1 2.3.2 2.4.0 2.5 2.6 3.0 3.1 3.2 3.3 3.4 All 54 releases
wpide / _configuration.php

_configuration.php in WPIDE – File Manager & Code Editor 3.4.6, at _configuration.php

222 lines 8.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use const WPIDE\Constants\CONTENT_DIR;
4
5 defined('ABSPATH') || exit;
6
7 return apply_filters('wpide_config', [
8 'general' => [
9 'dark_mode' => [
10 'type' => 'bool',
11 'label' => __('Dark Mode', 'wpide'),
12 'default' => false
13 ],
14 'skin' => [
15 'type' => 'swatches',
16 'label' => __('Theme', 'wpide'),
17 'options' => [
18 'default' => 'Default',
19 'blue' => 'Blue',
20 'egyptian' => 'Egyptian',
21 'green' => 'Green',
22 'purple' => 'Purple',
23 'red' => 'Red'
24 ],
25 'default' => 'default'
26 ],
27 ],
28 'file' => [
29 'advanced_mode' => [
30 'type' => 'bool',
31 'label' => __('Advanced Mode', 'wpide'),
32 'desc_long' => sprintf(__('When enabled, all files and folders will be available for editing including core wordpress files and the wp-config.php unless they are filtered out manually within the settings. %1$sEnable Advanced Mode at your own risk!%2$s Please note that the %1$sFile Recovery Wizard might not work properly%2$s if you ever save core PHP file that contains errors and break the site. However, backups will still be available, so you can recover corrupted files manually via FTP.', 'wpide'), '<strong class="text-danger">', '</strong>'),
33 'default' => false,
34 'premium' => true
35 ],
36 'root' => [
37 'type' => 'folders',
38 'label' => __('Root Path', 'wpide'),
39 'default' => '/'.basename(CONTENT_DIR)
40 ],
41 'overwrite_on_upload' => [
42 'type' => 'bool',
43 'label' => __('Override on upload', 'wpide'),
44 'default' => false
45 ],
46 'calc_dir_size' => [
47 'type' => 'select',
48 'label' => __('Calculate folder size', 'wpide'),
49 'desc' => __('Folder size will be cached for faster load on subsequent requests.', 'wpide'),
50 'options' => [
51 'ondemand' => __('On Demand', 'wpide'),
52 'onload' => __('On load', 'wpide'),
53 'disabled' => __('Disabled', 'wpide'),
54 ],
55 'default' => 'ondemand',
56 ],
57 'backups_max_days' => [
58 'type' => 'number',
59 'label' => __('Backups max days', 'wpide'),
60 'desc' => __('Remove backup folders older than X days', 'wpide'),
61 'default' => 5
62 ],
63 'upload_max_size' => [
64 'type' => 'number',
65 'label' => __('Max upload size (MB)', 'wpide'),
66 'default' => 100 * 1024 * 1024, // 100MB
67 ],
68 'upload_chunk_size' => [
69 'type' => 'number',
70 'label' => __('Upload chunk size (MB)', 'wpide'),
71 'default' => 1 * 1024 * 1024, // 1MB
72 ],
73 'upload_simultaneous' => [
74 'type' => 'number',
75 'label' => __('Simultaneous uploads', 'wpide'),
76 'default' => 3,
77 ],
78 'default_archive_name' => [
79 'type' => 'text',
80 'label' => __('Default archive name', 'wpide'),
81 'default' => 'archive.zip',
82 ],
83 'autoplay_media' => [
84 'type' => 'bool',
85 'label' => __('Auto play media files, when possible.', 'wpide'),
86 'desc' => __('Chromium browsers do not allow autoplay, unless user interaction is detected on the page.', 'wpide'),
87 'default' => false
88 ],
89 'search_simultaneous' => [
90 'type' => 'number',
91 'label' => __('Simultaneous search', 'wpide'),
92 'default' => 5,
93 ],
94 'filter_entries' => [
95 'type' => 'text',
96 'repeater' => true,
97 'label' => __('Entries filter', 'wpide'),
98 'desc' => __('Enter partial or full path. To exclude folders, add a trailing slash. Note: WordPress core files as well as important WPide folders and files are hidden automatically.', 'wpide'),
99 'default' => [
100 '.DS_Store',
101 '.tmb/',
102 '.idea/',
103 '.codekit-cache/',
104 '.git/',
105 '.sass-cache/',
106 'Recycle.bin/',
107 '@eaDir/',
108 '#recycle/',
109 'node_modules/'
110 ]
111 ]
112 ],
113 'editor' => [
114 'autosave' => [
115 'type' => 'bool',
116 'label' => __('Auto save draft', 'wpide'),
117 'desc_long' => sprintf(__('While editing, files will automatically be saved every X seconds to a temporary draft file. Original files are not affected. If you ever close or refresh the page by mistake without manually saving a file, the next time you open it, a %1$sFile Recovery%2$s modal will display allowing you to restore from the auto saved file. You can also view and compare both files differences using the %1$sQuick Diff Viewer%2$s.', 'wpide'), '<span class="text-primary">', '</span>'),
118 'default' => false,
119 'premium' => true
120 ],
121 'autosave_interval' => [
122 'type' => 'range',
123 'label' => __('Auto save interval (sec)', 'wpide'),
124 'attr' => [
125 'min' => 5,
126 'max' => 120,
127 'step' => 5
128 ],
129 'default' => 10,
130 'conditions'=> [
131 [
132 'id'=> 'editor.autosave',
133 'value'=> true
134 ]
135 ],
136 'premium' => true
137 ],
138 'editable' => [
139 'type' => 'select',
140 'multiple' => true,
141 'label' => __('Editable files', 'wpide'),
142 'desc' => __('Select one of multiple extensions by pressing the shift button.', 'wpide'),
143 'options' => apply_filters('wpide_editable_ext_options', [
144 '.' => 'File without extension',
145 'txt' => '.txt',
146 'css' => '.css',
147 'scss' => '.scss',
148 'less' => '.less',
149 'js' => '.js',
150 'html' => '.html',
151 'php' => '.php',
152 'json' => '.json',
153 'yml' => '.yml',
154 'yaml' => '.yaml',
155 'xml' => '.xml',
156 'svg' => '.svg',
157 'md' => '.md',
158 'log' => '.log',
159 'htaccess' => '.htaccess'
160 ]),
161 'default' => ['.', 'txt', 'css', 'scss', 'less', 'js', 'html', 'php', 'json', 'yml', 'yaml', 'xml', 'svg', 'md', 'log', 'htaccess']
162 ],
163 'font_size' => [
164 'type' => 'range',
165 'label' => __('Font Size (px)', 'wpide'),
166 'attr' => [
167 'min' => 10,
168 'max' => 20
169 ],
170 'default' => 12,
171 ],
172 'scroll_speed' => [
173 'type' => 'range',
174 'label' => __('Scroll Speed', 'wpide'),
175 'attr' => [
176 'min' => 1,
177 'max' => 20
178 ],
179 'default' => 3,
180 ],
181 'hightlight_active_line' => [
182 'type' => 'bool',
183 'label' => __('Highlight Active Line', 'wpide'),
184 'default' => false
185 ],
186 'behaviours_enabled' => [
187 'type' => 'bool',
188 'label' => __('Enable Behaviours', 'wpide'),
189 'desc' => __('When enabled, the editor will auto close tags and brackets', 'wpide'),
190 'default' => true
191 ],
192 'use_soft_tabs' => [
193 'type' => 'bool',
194 'label' => __('Use Soft Tabs', 'wpide'),
195 'desc' => __('When enabled, a tab key press will insert spaces instead of the tab character', 'wpide'),
196 'default' => false
197 ],
198 'tab_size' => [
199 'type' => 'range',
200 'label' => __('Tab Size', 'wpide'),
201 'attr' => [
202 'min' => 1,
203 'max' => 8
204 ],
205 'default' => 4
206 ]
207 ],
208 'db' => [
209 'per_page' => [
210 'type' => 'select',
211 'label' => __('Items per page default', 'wpide'),
212 'options' => [
213 '50' => '50',
214 '100' => '100',
215 '500' => '500',
216 '1000' => '1000'
217 ],
218 'default' => '50',
219 ]
220 ]
221 ]);
222