'.__('You do not have sufficient permissions to edit templates for this blog.').'
'); $newcontent = stripslashes($_POST['newcontent']); if (is_writeable($real_file)) { $f = fopen($real_file, 'w+'); fwrite($f, $newcontent); fclose($f); // Deactivate so we can test it. $current = get_option('active_plugins'); if ( in_array($file, $current) || isset($_POST['phperror']) ) { if ( in_array($file, $current) ) { array_splice($current, array_search( $file, $current), 1 ); // Array-fu! update_option('active_plugins', $current); } wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1")); exit(); } wp_redirect("plugin-editor.php?file=$file&a=te"); } else { wp_redirect("plugin-editor.php?file=$file"); } exit(); break; default: if ( !current_user_can('edit_plugins') ) wp_die(''.__('You do not have sufficient permissions to edit plugins for this blog.').'
'); if ( $_GET['liveupdate'] ) { check_admin_referer('edit-plugin-test_' . $file); $current = get_option('active_plugins'); $plugin = $file; if ( validate_file($plugin) ) wp_die(__('Invalid plugin.')); if ( ! file_exists(ABSPATH . PLUGINDIR . '/' . $plugin) ) wp_die(__('Plugin file does not exist.')); if (!in_array($plugin, $current)) { wp_redirect("plugin-editor.php?file=$file&phperror=1"); // we'll override this later if the plugin can be included without fatal error @include(ABSPATH . PLUGINDIR . '/' . $plugin); $current[] = $plugin; sort($current); update_option('active_plugins', $current); } wp_redirect("plugin-editor.php?file=$file&a=te"); } require_once('admin-header.php'); update_recently_edited(PLUGINDIR . "/$file"); if (!is_file($real_file)) $error = 1; if (!$error) { $f = fopen($real_file, 'r'); $content = fread($f, filesize($real_file)); $content = htmlspecialchars($content); } ?>fatal error.') ?>
' . __('Oops, no such file exists! Double check the name and try again, merci.') . '