';
}
function fileorganizer_render_page(){
global $fileorganizer;
echo '
';
fileorganizer_page_header();
echo '
';
fileorganizer_page_footer();
// Editor configurations
$elfinder_config = 'url: fileorganizer_ajaxurl,
customData: {
action: "fileorganizer_file_folder_manager",
fileorganizer_nonce: fileorganizer_ajax_nonce,
},
defaultView: "'.(!empty($fileorganizer->options['default_view']) ? esc_html($fileorganizer->options['default_view']) : 'list').'",
height: 500,
lang: fileorganizer_lang,
soundPath: fileorganizer_url+"/sounds/",
cssAutoLoad : false,
uploadMaxChunkSize: 1048576000000,
baseUrl: fileorganizer_url,
requestType: "post",
commandsOptions: {
edit : {
mimes : [],
editors : [{
info : {
id : "codemirror",
name : "Code Editor",
},
mimes : [
"text/plain",
"text/html",
"text/javascript",
"text/css",
"text/x-php",
"application/x-php",
],
load : function(textarea) {
var mimeType = this.file.mime;
return wp.CodeMirror.fromTextArea(textarea, {
mode: mimeType,
indentUnit: 4,
lineNumbers: true,
viewportMargin: Infinity,
lineWrapping: true,
});
},
close : function(textarea, instance) {
this.myCodeMirror = null;
},
save: function(textarea, editor) {
jQuery(textarea).val(editor.getValue());
}
}]
}
},
ui: ["toolbar", "tree", "path", "stat"],';
$elfinder_uiOptions = 'uiOptions:{
toolbarExtra : {
autoHideUA: [],
displayTextLabel: "none",
preferenceInContextmenu: false,
},
},';
$elfinder_config .= apply_filters('fileorganizer_elfinder_script', $elfinder_uiOptions);
?>