PluginProbe
WPIDE – File Manager & Code Editor / 3.5.5
WPIDE – File Manager & Code Editor v3.5.5
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
← All changes | _configuration.php +107 -27 3.13.5.5 View file →
@@ -1,9 +1,10 @@
1 1 <?php
2 -defined('ABSPATH') || exit;
3 2
4 3 use const WPIDE\Constants\CONTENT_DIR;
5 4
5 +defined('ABSPATH') || exit;
6 +
6 7 return apply_filters('wpide_config', [
7 8 'general' => [
8 9 'dark_mode' => [
9 10 'type' => 'bool',
@@ -21,15 +22,22 @@
21 22 'purple' => 'Purple',
22 23 'red' => 'Red'
23 24 ],
24 25 'default' => 'default'
25 - ]
26 + ],
26 27 ],
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 + ],
28 36 'root' => [
29 37 'type' => 'folders',
30 38 'label' => __('Root Path', 'wpide'),
31 - 'default' => '/'
39 + 'default' => '/'.basename(CONTENT_DIR)
32 40 ],
33 41 'overwrite_on_upload' => [
34 42 'type' => 'bool',
35 43 'label' => __('Override on upload', 'wpide'),
@@ -71,31 +79,8 @@
71 79 'type' => 'text',
72 80 'label' => __('Default archive name', 'wpide'),
73 81 'default' => 'archive.zip',
74 82 ],
75 - 'editable' => [
76 -
77 - 'type' => 'select',
78 - 'multiple' => true,
79 - 'label' => __('Editable files', 'wpide'),
80 - 'options' => [
81 - '.' => 'File without extension',
82 - 'txt' => '.txt',
83 - 'css' => '.css',
84 - 'scss' => '.scss',
85 - 'less' => '.less',
86 - 'js' => '.js',
87 - 'html' => '.html',
88 - 'php' => '.php',
89 - 'json' => '.json',
90 - 'xml' => '.xml',
91 - 'yml' => '.yml',
92 - 'md' => '.md',
93 - 'log' => '.log',
94 - 'htaccess' => '.htaccess'
95 - ],
96 - 'default' => ['.', 'txt', 'css', 'scss', 'less', 'js', 'html', 'php', 'json', 'yml', 'xml', 'md', 'log', 'htaccess']
97 - ],
98 83 'autoplay_media' => [
99 84 'type' => 'bool',
100 85 'label' => __('Auto play media files, when possible.', 'wpide'),
101 86 'desc' => __('Chromium browsers do not allow autoplay, unless user interaction is detected on the page.', 'wpide'),
@@ -124,8 +109,103 @@
124 109 'node_modules/'
125 110 ]
126 111 ]
127 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 + ],
128 208 'db' => [
129 209 'per_page' => [
130 210 'type' => 'select',
131 211 'label' => __('Items per page default', 'wpide'),
@@ -135,7 +215,7 @@
135 215 '500' => '500',
136 216 '1000' => '1000'
137 217 ],
138 218 'default' => '50',
139 - ],
219 + ]
140 220 ]
141 221 ]);