| 1 |
<?php |
| 2 |
defined('ABSPATH') || exit; |
| 3 |
|
| 4 |
use const WPIDE\Constants\CONTENT_DIR; |
| 5 |
|
| 6 |
return apply_filters('wpide_config', [ |
| 7 |
'general' => [ |
| 8 |
'dark_mode' => [ |
| 9 |
'type' => 'bool', |
| 10 |
'label' => __('Dark Mode', 'wpide'), |
| 11 |
'default' => false |
| 12 |
], |
| 13 |
'skin' => [ |
| 14 |
'type' => 'swatches', |
| 15 |
'label' => __('Theme', 'wpide'), |
| 16 |
'options' => [ |
| 17 |
'default' => 'Default', |
| 18 |
'blue' => 'Blue', |
| 19 |
'egyptian' => 'Egyptian', |
| 20 |
'green' => 'Green', |
| 21 |
'purple' => 'Purple', |
| 22 |
'red' => 'Red' |
| 23 |
], |
| 24 |
'default' => 'default' |
| 25 |
] |
| 26 |
], |
| 27 |
'file' => [ |
| 28 |
'root' => [ |
| 29 |
'type' => 'folders', |
| 30 |
'label' => __('Root Path', 'wpide'), |
| 31 |
'default' => '/'.basename(CONTENT_DIR) |
| 32 |
], |
| 33 |
'overwrite_on_upload' => [ |
| 34 |
'type' => 'bool', |
| 35 |
'label' => __('Override on upload', 'wpide'), |
| 36 |
'default' => false |
| 37 |
], |
| 38 |
'calc_dir_size' => [ |
| 39 |
'type' => 'select', |
| 40 |
'label' => __('Calculate folder size', 'wpide'), |
| 41 |
'desc' => __('Folder size will be cached for faster load on subsequent requests.', 'wpide'), |
| 42 |
'options' => [ |
| 43 |
'ondemand' => __('On Demand', 'wpide'), |
| 44 |
'onload' => __('On load', 'wpide'), |
| 45 |
'disabled' => __('Disabled', 'wpide'), |
| 46 |
], |
| 47 |
'default' => 'ondemand', |
| 48 |
], |
| 49 |
'backups_max_days' => [ |
| 50 |
'type' => 'number', |
| 51 |
'label' => __('Backups max days', 'wpide'), |
| 52 |
'desc' => __('Remove backup folders older than X days', 'wpide'), |
| 53 |
'default' => 5 |
| 54 |
], |
| 55 |
'upload_max_size' => [ |
| 56 |
'type' => 'number', |
| 57 |
'label' => __('Max upload size (MB)', 'wpide'), |
| 58 |
'default' => 100 * 1024 * 1024, // 100MB |
| 59 |
], |
| 60 |
'upload_chunk_size' => [ |
| 61 |
'type' => 'number', |
| 62 |
'label' => __('Upload chunk size (MB)', 'wpide'), |
| 63 |
'default' => 1 * 1024 * 1024, // 1MB |
| 64 |
], |
| 65 |
'upload_simultaneous' => [ |
| 66 |
'type' => 'number', |
| 67 |
'label' => __('Simultaneous uploads', 'wpide'), |
| 68 |
'default' => 3, |
| 69 |
], |
| 70 |
'default_archive_name' => [ |
| 71 |
'type' => 'text', |
| 72 |
'label' => __('Default archive name', 'wpide'), |
| 73 |
'default' => 'archive.zip', |
| 74 |
], |
| 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 |
'autoplay_media' => [ |
| 99 |
'type' => 'bool', |
| 100 |
'label' => __('Auto play media files, when possible.', 'wpide'), |
| 101 |
'desc' => __('Chromium browsers do not allow autoplay, unless user interaction is detected on the page.', 'wpide'), |
| 102 |
'default' => false |
| 103 |
], |
| 104 |
'search_simultaneous' => [ |
| 105 |
'type' => 'number', |
| 106 |
'label' => __('Simultaneous search', 'wpide'), |
| 107 |
'default' => 5, |
| 108 |
], |
| 109 |
'filter_entries' => [ |
| 110 |
'type' => 'text', |
| 111 |
'repeater' => true, |
| 112 |
'label' => __('Entries filter', 'wpide'), |
| 113 |
'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'), |
| 114 |
'default' => [ |
| 115 |
'.DS_Store', |
| 116 |
'.tmb/', |
| 117 |
'.idea/', |
| 118 |
'.codekit-cache/', |
| 119 |
'.git/', |
| 120 |
'.sass-cache/', |
| 121 |
'Recycle.bin/', |
| 122 |
'@eaDir/', |
| 123 |
'#recycle/', |
| 124 |
'node_modules/' |
| 125 |
] |
| 126 |
] |
| 127 |
], |
| 128 |
'db' => [ |
| 129 |
'per_page' => [ |
| 130 |
'type' => 'select', |
| 131 |
'label' => __('Items per page default', 'wpide'), |
| 132 |
'options' => [ |
| 133 |
'50' => '50', |
| 134 |
'100' => '100', |
| 135 |
'500' => '500', |
| 136 |
'1000' => '1000' |
| 137 |
], |
| 138 |
'default' => '50', |
| 139 |
], |
| 140 |
] |
| 141 |
]); |
| 142 |
|