PluginProbe
WPIDE – File Manager & Code Editor / 2.0.4
WPIDE – File Manager & Code Editor v2.0.4
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 / WPide.php

WPide.php in WPIDE – File Manager & Code Editor 2.0.4, at WPide.php

627 lines 23.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 Plugin Name: WPide
4 Plugin URI: https://github.com/WPsites/WPide
5 Description: WordPress code editor with auto completion of both WordPress and PHP functions with reference, syntax highlighting, line numbers, tabbed editing, automatic backup.
6 Version: 2.0.4
7 Author: Simon Dunton
8 Author URI: http://www.wpsites.co.uk
9 */
10
11
12
13 class WPide2
14
15 {
16
17 public $site_url, $plugin_url;
18
19 function __construct() {
20
21 //add WPide to the menu
22 add_action( 'admin_menu', array( &$this, 'add_my_menu_page' ) );
23
24 //hook for processing incoming image saves
25 if ( isset($_GET['wpide_save_image']) ){
26
27 //force local file method for testing - you could force other methods 'direct', 'ssh', 'ftpext' or 'ftpsockets'
28 define('FS_METHOD', 'direct');
29
30 add_action('admin_init', array($this, 'wpide_save_image'));
31
32 }
33
34 //only include this plugin if on theme editor, plugin editor or an ajax call
35 if ( $_SERVER['PHP_SELF'] === '/wp-admin/admin-ajax.php' ||
36 $_GET['page'] === 'wpide' ){
37
38
39 //force local file method for testing - you could force other methods 'direct', 'ssh', 'ftpext' or 'ftpsockets'
40 define('FS_METHOD', 'direct');
41
42 // Uncomment any of these calls to add the functionality that you need.
43 //add_action('admin_head', 'WPide2::add_admin_head');
44 add_action('admin_init', 'WPide2::add_admin_js');
45 add_action('admin_init', 'WPide2::add_admin_styles');
46
47 //setup jqueryFiletree list callback
48 add_action('wp_ajax_jqueryFileTree', 'WPide2::jqueryFileTree_get_list');
49 //setup ajax function to get file contents for editing
50 add_action('wp_ajax_wpide_get_file', 'WPide2::wpide_get_file' );
51 //setup ajax function to save file contents and do automatic backup if needed
52 add_action('wp_ajax_wpide_save_file', 'WPide2::wpide_save_file' );
53 //setup ajax function to create new item (folder, file etc)
54 add_action('wp_ajax_wpide_create_new', 'WPide2::wpide_create_new' );
55
56 //setup ajax function to create new item (folder, file etc)
57 add_action('wp_ajax_wpide_image_edit_key', 'WPide2::wpide_image_edit_key' );
58
59 //setup ajax function for startup to get some debug info, checking permissions etc
60 add_action('wp_ajax_wpide_startup_check', 'WPide2::wpide_startup_check' );
61
62
63 }
64
65
66
67
68
69 $WPide->site_url = get_bloginfo('url');
70
71
72 }
73
74
75
76 public static function add_admin_head()
77 {
78
79 }
80
81
82
83
84
85
86 public static function add_admin_js(){
87
88 $plugin_path = plugin_dir_url( __FILE__ );
89 //include file tree
90 wp_enqueue_script('jquery-file-tree', plugins_url("jqueryFileTree.js", __FILE__ ) );
91 //include ace
92 wp_enqueue_script('ace', plugins_url("ace-0.2.0/src/ace.js", __FILE__ ) );
93 //include ace modes for css, javascript & php
94 wp_enqueue_script('ace-mode-css', $plugin_path . 'ace-0.2.0/src/mode-css.js');
95 wp_enqueue_script('ace-mode-javascript', $plugin_path . 'ace-0.2.0/src/mode-javascript.js');
96 wp_enqueue_script('ace-mode-php', $plugin_path . 'ace-0.2.0/src/mode-php.js');
97 //include ace theme
98 wp_enqueue_script('ace-theme', plugins_url("ace-0.2.0/src/theme-dawn.js", __FILE__ ) );//monokai is nice
99 // wordpress-completion tags
100 wp_enqueue_script('wpide-wordpress-completion', plugins_url("js/autocomplete.wordpress.js", __FILE__ ) );
101 // php-completion tags
102 wp_enqueue_script('wpide-php-completion', plugins_url("js/autocomplete.php.js", __FILE__ ) );
103 // load editor
104 wp_enqueue_script('wpide-load-editor', plugins_url("js/load-editor.js", __FILE__ ) );
105 // load autocomplete dropdown
106 wp_enqueue_script('wpide-dd', plugins_url("js/jquery.dd.js", __FILE__ ) );
107
108 // load jquery ui
109 wp_enqueue_script('jquery-ui', plugins_url("js/jquery-ui-1.8.20.custom.min.js", __FILE__ ), array('jquery'), '1.8.20');
110
111
112
113
114 }
115
116 public static function add_admin_styles(){
117
118 //main wpide styles
119 wp_register_style( 'wpide_style', plugins_url('wpide.css', __FILE__) );
120 wp_enqueue_style( 'wpide_style' );
121 //filetree styles
122 wp_register_style( 'wpide_filetree_style', plugins_url('jqueryFileTree.css', __FILE__) );
123 wp_enqueue_style( 'wpide_filetree_style' );
124 //autocomplete dropdown styles
125 wp_register_style( 'wpide_dd_style', plugins_url('dd.css', __FILE__) );
126 wp_enqueue_style( 'wpide_dd_style' );
127
128 //jquery ui styles
129 wp_register_style( 'wpide_jqueryui_style', plugins_url('css/flick/jquery-ui-1.8.20.custom.css', __FILE__) );
130 wp_enqueue_style( 'wpide_jqueryui_style' );
131
132
133 }
134
135
136
137 public static function jqueryFileTree_get_list() {
138 //check the user has the permissions
139 check_admin_referer('plugin-name-action_wpidenonce');
140 if ( !current_user_can('edit_themes') )
141 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
142
143 //setup wp_filesystem api
144 global $wp_filesystem;
145 if ( ! WP_Filesystem($creds) )
146 return false;
147
148 $_POST['dir'] = urldecode($_POST['dir']);
149 $root = WP_CONTENT_DIR;
150
151 if( $wp_filesystem->exists($root . $_POST['dir']) ) {
152 //$files = scandir($root . $_POST['dir']);
153 //print_r($files);
154 $files = $wp_filesystem->dirlist($root . $_POST['dir']);
155 //print_r($files);
156
157 echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
158 if( count($files) > 0 ) {
159
160 // All dirs
161 foreach( $files as $file => $file_info ) {
162 if( $file != '.' && $file != '..' && $file_info['type']=='d' ) {
163 echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
164 }
165 }
166 // All files
167 foreach( $files as $file => $file_info ) {
168 if( $file != '.' && $file != '..' && $file_info['type']!='d') {
169 $ext = preg_replace('/^.*\./', '', $file);
170 echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
171 }
172 }
173 }
174 //output toolbar for creating new file, folder etc
175 echo "<li class=\"create_new\"><a class='new_directory' title='Create a new directory here.' href=\"#\" rel=\"{type: 'directory', path: '" . htmlentities($_POST['dir']) . "'}\"></a> <a class='new_file' title='Create a new file here.' href=\"#\" rel=\"{type: 'file', path: '" . htmlentities($_POST['dir']) . "'}\"></a><br style='clear:both;' /></li>";
176 echo "</ul>";
177 }
178
179 die(); // this is required to return a proper result
180 }
181
182
183 public static function wpide_get_file() {
184 //check the user has the permissions
185 check_admin_referer('plugin-name-action_wpidenonce');
186 if ( !current_user_can('edit_themes') )
187 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
188
189 //setup wp_filesystem api
190 global $wp_filesystem;
191 if ( ! WP_Filesystem($creds) )
192 return false;
193
194
195 $root = WP_CONTENT_DIR;
196 $file_name = $root . stripslashes($_POST['filename']);
197 echo $wp_filesystem->get_contents($file_name);
198 die(); // this is required to return a proper result
199 }
200
201
202
203 public static function wpide_image_edit_key() {
204
205 //check the user has the permissions
206 check_admin_referer('plugin-name-action_wpidenonce');
207 if ( !current_user_can('edit_themes') )
208 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
209
210 //create a nonce based on the image path
211 echo wp_create_nonce( 'wpide_image_edit' . $_POST['file'] );
212
213 }
214
215 public static function wpide_create_new() {
216 //check the user has the permissions
217 check_admin_referer('plugin-name-action_wpidenonce');
218 if ( !current_user_can('edit_themes') )
219 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
220
221 //setup wp_filesystem api
222 global $wp_filesystem;
223 if ( ! WP_Filesystem($creds) )
224 return false;
225
226 $root = WP_CONTENT_DIR;
227
228 //check all required vars are passed
229 if (strlen($_POST['path'])>0 && strlen($_POST['type'])>0 && strlen($_POST['file'])>0){
230
231
232 $filename = sanitize_file_name( $_POST['file'] );
233 $path = $_POST['path'];
234
235 if ($_POST['type'] == "directory"){
236
237 $write_result = $wp_filesystem->mkdir($root . $path . $filename, FS_CHMOD_DIR);
238
239 if ($write_result){
240 die("1"); //created
241 }else{
242 echo "Problem creating directory" . $root . $path . $filename;
243 }
244
245 }else if ($_POST['type'] == "file"){
246
247 $write_result = $wp_filesystem->put_contents(
248 $root . $path . $filename,
249 ' ',
250 FS_CHMOD_FILE // predefined mode settings for WP files
251 );
252
253 if ($write_result){
254 die("1"); //created
255 }else{
256 echo "Problem creating file " . $root . $path . $filename;
257 }
258
259 }
260
261
262 //print_r($_POST);
263
264
265 }
266 echo "0";
267 die(); // this is required to return a proper result
268 }
269
270 public static function wpide_save_file() {
271 //check the user has the permissions
272 check_admin_referer('plugin-name-action_wpidenonce');
273 if ( !current_user_can('edit_themes') )
274 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
275
276 //setup wp_filesystem api
277 global $wp_filesystem;
278 if ( ! WP_Filesystem($creds) )
279 echo "Cannot initialise the WP file system API";
280
281 //save a copy of the file and create a backup just in case
282 $root = WP_CONTENT_DIR;
283 $file_name = $root . stripslashes($_POST['filename']);
284
285 //set backup filename
286 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
287 //create backup directory if not there
288 $new_file_info = pathinfo($backup_path);
289 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
290
291 //do backup
292 $wp_filesystem->copy( $file_name, $backup_path );
293
294 //save file
295 if( $wp_filesystem->put_contents( $file_name, stripslashes($_POST['content'])) ) {
296 $result = "success";
297 }
298
299 die($result); // this is required to return a proper result
300 }
301
302 public static function wpide_save_image() {
303
304 $filennonce = split("::", $_POST["opt"]); //file::nonce
305
306 //check the user has a valid nonce
307 //we are checking two variations of the nonce, one as-is and another that we have removed a trailing zero from
308 //this is to get around some sort of bug where a nonce generated on another page has a trailing zero and a nonce generated/checked here doesn't have the zero
309 if (! wp_verify_nonce( $filennonce[1], 'wpide_image_edit' . $filennonce[0]) &&
310 ! wp_verify_nonce( rtrim($filennonce[1], "0") , 'wpide_image_edit' . $filennonce[0])) {
311 die('Security check'); //die because both checks failed
312 }
313 //check the user has the permissions
314 if ( !current_user_can('edit_themes') )
315 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
316
317
318 $_POST['content'] = base64_decode($_POST["data"]); //image content
319 $_POST['filename'] = $filennonce[0]; //filename
320
321 //setup wp_filesystem api
322 global $wp_filesystem;
323
324 if ( ! WP_Filesystem($creds) )
325 echo "Cannot initialise the WP file system API";
326
327 //save a copy of the file and create a backup just in case
328 $root = WP_CONTENT_DIR;
329 $file_name = $root . stripslashes($_POST['filename']);
330
331 //set backup filename
332 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
333 //create backup directory if not there
334 $new_file_info = pathinfo($backup_path);
335 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
336
337 //do backup
338 $wp_filesystem->move( $file_name, $backup_path );
339
340
341 //save file
342 if( $wp_filesystem->put_contents( $file_name, $_POST['content']) ) {
343 $result = "success";
344 }
345
346 if ($result == "success"){
347 wp_die('<p>'.__('<strong>Image saved.</strong> <br />You may <a href="JavaScript:window.close();">close this window / tab</a>.').'</p>');
348 }else{
349 wp_die('<p>'.__('<strong>Problem saving image.</strong> <br /><a href="JavaScript:window.close();">Close this window / tab</a> and try editing the image again.').'</p>');
350 }
351 //print_r($_POST);
352
353
354 //return;
355 }
356
357
358 public static function wpide_startup_check() {
359
360 //check the user has the permissions
361 check_admin_referer('plugin-name-action_wpidenonce');
362 if ( !current_user_can('edit_themes') )
363 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
364
365 //setup wp_filesystem api
366 global $wp_filesystem, $wp_version;
367 if ( ! WP_Filesystem($creds) )
368 return false;
369
370 $root = WP_CONTENT_DIR;
371
372 echo "\n\n\n\nWPIDE STARUP CHECKS \n";
373 echo "___________________ \n\n";
374
375 //WordPress version
376 if ($wp_version > 3){
377 echo "WordPress version = " . $wp_version . "\n\n";
378 }else{
379 echo "WordPress version = " . $wp_version . " (which is too old to run WPide) \n\n";
380 }
381
382 //Running webservers user and group
383 echo "Web server user/group = " . getenv('APACHE_RUN_USER') . ":" . getenv('APACHE_RUN_GROUP') . "\n";
384 //wp-content user and group
385 echo "wp-content owner/group = " . $wp_filesystem->owner( $root ) . ":" . $wp_filesystem->group( $root ) . "\n\n";
386
387
388 //check we can list wp-content files
389 if( $wp_filesystem->exists( $root ) ){
390
391 $files = $wp_filesystem->dirlist( $root );
392 if ( count($files) > 0){
393 echo "wp-content folder exists and contains ". count($files) ." files \n";
394 }else{
395 echo "wp-content folder exists but we cannot read it's contents \n";
396 }
397 }
398
399 // $wp_filesystem->owner() $wp_filesystem->group() $wp_filesystem->is_writable() $wp_filesystem->is_readable()
400 echo "\nUsing the ".$wp_filesystem->method." method of the WP filesystem API\n";
401
402 //wp-content editable?
403 echo "The wp-content folder ". ( $wp_filesystem->is_readable( $root )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
404
405
406 //plugins folder editable
407 echo "The wp-content/plugins folder ". ( $wp_filesystem->is_readable( $root."/plugins" )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root."/plugins" )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
408
409
410 //themes folder editable
411 echo "The wp-content/themes folder ". ( $wp_filesystem->is_readable( $root."/themes" )==1 ? "IS":"IS NOT" ) ." readable and ". ( $wp_filesystem->is_writable( $root."/themes" )==1 ? "IS":"IS NOT" ) ." writable by this method \n";
412
413
414
415 echo "___________________ \n\n\n\n";
416
417 echo " If the file tree to the right is empty there is a possibility that your server permissions are not compatible with this plugin. \n The startup information above may shed some light on things. \n Paste that information into the support forum for further assistance.";
418
419
420 die();
421
422 //set backup filename
423 $backup_path = ABSPATH .'wp-content/plugins/' . basename(dirname(__FILE__)) .'/backups/' . str_replace( str_replace('\\', "/", ABSPATH), '', $file_name) .'.'.date("YmdH");
424 //create backup directory if not there
425 $new_file_info = pathinfo($backup_path);
426 if (!$wp_filesystem->is_dir($new_file_info['dirname'])) wp_mkdir_p( $new_file_info['dirname'] ); //should use the filesytem api here but there isn't a comparable command right now
427
428 //do backup
429 $wp_filesystem->move( $file_name, $backup_path );
430
431
432 //save file
433 if( $wp_filesystem->put_contents( $file_name, $_POST['content']) ) {
434 $result = "success";
435 }
436
437 if ($result == "success"){
438 wp_die('<p>'.__('<strong>Image saved.</strong> <br />You may <a href="JavaScript:window.close();">close this window / tab</a>.').'</p>');
439 }else{
440 wp_die('<p>'.__('<strong>Problem saving image.</strong> <br /><a href="JavaScript:window.close();">Close this window / tab</a> and try editing the image again.').'</p>');
441 }
442
443
444 //return;
445 }
446
447
448
449
450 public function add_my_menu_page() {
451 //add_menu_page("wpide", "wpide","edit_themes", "wpidesettings", array( &$this, 'my_menu_page') );
452 add_menu_page('WPide', 'WPide', 'edit_themes', "wpide", array( &$this, 'my_menu_page' ));
453 }
454
455 public function my_menu_page() {
456 if ( !current_user_can('edit_themes') )
457 wp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');
458
459 $app_url = get_bloginfo('url'); //need to make this https if we are currently looking on the site using https (even though https for admin might not be forced it can still cause issues)
460 if (is_ssl()) $app_url = str_replace("http:", "https:", $app_url);
461
462 ?>
463 <script>
464
465 var wpide_app_path = "<?php echo plugin_dir_url( __FILE__ ); ?>";
466
467 function the_filetree() {
468 jQuery('#wpide_file_browser').fileTree({ script: ajaxurl }, function(parent, file) {
469
470 if ( jQuery(parent).hasClass("create_new") ){ //create new file/folder
471 //to create a new item we need to know the name of it so show input
472
473 var item = eval('('+file+')');
474
475 //hide all inputs just incase one is selected
476 jQuery(".new_item_inputs").hide();
477 //show the input form for this
478 jQuery("div.new_" + item.type).show();
479 jQuery("div.new_" + item.type + " input[name='new_" + item.type + "']").focus();
480 jQuery("div.new_" + item.type + " input[name='new_" + item.type + "']").attr("rel", file);
481
482
483 }else if ( jQuery(".wpide_tab[rel='"+file+"']").length > 0) { //focus existing tab
484 jQuery(".wpide_tab[sessionrel='"+ jQuery(".wpide_tab[rel='"+file+"']").attr("sessionrel") +"']").click();//focus the already open tab
485 }else{ //open file
486
487 var image_patern =new RegExp("(\.jpg|\.gif|\.png|\.bmp)");
488 if ( image_patern.test(file) ){
489 //it's an image so open it for editing
490
491 //using modal+iframe
492 if ("lets not" == "use the modal for now"){
493
494 var NewDialog = jQuery('<div id="MenuDialog">\
495 <iframe src="http://www.sumopaint.com/app/?key=ebcdaezjeojbfgih&target=<?php echo get_bloginfo('url') . "?action=wpide_image_save";?>&url=<?php echo get_bloginfo('url') . "/wp-content";?>' + file + '&title=Edit image&service=Save back to WPide" width="100%" height="600px"> </iframe>\
496 </div>');
497 NewDialog.dialog({
498 modal: true,
499 title: "title",
500 show: 'clip',
501 hide: 'clip',
502 width:'800',
503 height:'600'
504 });
505
506 }else{ //open in new tab/window
507
508 var data = { action: 'wpide_image_edit_key', file: file, _wpnonce: jQuery('#_wpnonce').val(), _wp_http_referer: jQuery('#_wp_http_referer').val() };
509 var image_data = '';
510 jQuery.ajaxSetup({async:false}); //we need to wait until we get the response before opening the window
511 jQuery.post(ajaxurl, data, function(response) {
512
513 //with the response (which is a nonce), build the json data to pass to the image editor. The edit key (nonce) is only valid to edit this image
514 image_data = file+'::'+response;
515
516 });
517
518
519 window.open('http://www.sumopaint.com/app/?key=ebcdaezjeojbfgih&url=<?php echo $app_url. "/wp-content";?>' + file + '&opt=' + image_data + '&title=Edit image&service=Save back to WPide&target=<?php echo urlencode( $app_url . "/wp-admin/admin.php?wpide_save_image=yes" ) ;?>');
520
521 }
522
523 }else{
524 jQuery(parent).addClass('wait');
525
526 wpide_set_file_contents(file, function(){
527
528 //once file loaded remove the wait class/indicator
529 jQuery(parent).removeClass('wait');
530
531 });
532
533 jQuery('#filename').val(file);
534 }
535
536 }
537
538 });
539 }
540
541 jQuery(document).ready(function($) {
542 // Handler for .ready() called.
543 the_filetree() ;
544
545
546
547
548
549
550 });
551 </script>
552
553 <?php
554 $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');
555 if ( ! WP_Filesystem($creds) ) {
556 request_filesystem_credentials($url, '', true, false, null);
557 return;
558 }
559 ?>
560
561 <div id="poststuff" class="metabox-holder has-right-sidebar">
562
563 <div id="side-info-column" class="inner-sidebar">
564
565 <div id="wpide_info"><div id="wpide_info_content"></div> </div>
566
567 <div id="submitdiv" class="postbox ">
568 <h3 class="hndle"><span>Files</span></h3>
569 <div class="inside">
570 <div class="submitbox" id="submitpost">
571 <div id="minor-publishing">
572 </div>
573 <div id="major-publishing-actions">
574 <div id="wpide_file_browser"></div>
575 <br style="clear:both;" />
576 <div class="new_file new_item_inputs">
577 <label for="new_folder">File name</label><input class="has_data" name="new_file" type="text" rel="" value="" placeholder="Filename.ext" />
578 <a href="#" id="wpide_create_new_file" class="button-primary">CREATE</a>
579 </div>
580 <div class="new_directory new_item_inputs">
581 <label for="new_directory">Directory name</label><input class="has_data" name="new_directory" type="text" rel="" value="" placeholder="Filename.ext" />
582 <a href="#" id="wpide_create_new_directory" class="button-primary">CREATE</a>
583 </div>
584 <div class="clear"></div>
585 </div>
586 </div>
587 </div>
588 </div>
589
590
591 </div>
592
593 <div id="post-body">
594 <div id="wpide_toolbar" class="quicktags-toolbar">
595 <div id="wpide_toolbar_tabs"> </div>
596 <div id="dialog_window_minimized_container"></div>
597 </div>
598
599 <div id="wpide_toolbar_buttons">
600 <div id="wpide_message" class="error highlight"></div>
601 <a href="#"></a> <a href="#"></a> </div>
602
603
604 <div id='fancyeditordiv'></div>
605
606 <form id="wpide_save_container" action="" method="get">
607 <a href="#" id="wpide_save" class="button-primary">SAVE
608 FILE</a>
609 <input type="hidden" id="filename" name="filename" value="" />
610 <?php
611 if ( function_exists('wp_nonce_field') )
612 wp_nonce_field('plugin-name-action_wpidenonce');
613 ?>
614 </form>
615 </div>
616
617
618
619 </div>
620
621 <?php
622 }
623
624 }
625 add_action("init", create_function('', 'new WPide2();'));
626 ?>
627