/var/www/wordpress/wp-admin/includes/admin.php
/var/www/wordpress/wp-admin/includes/bookmark.php
/var/www/wordpress/wp-admin/includes/class-ftp-pure.php
/var/www/wordpress/wp-admin/includes/class-ftp-sockets.php
/var/www/wordpress/wp-admin/includes/class-ftp.php
/var/www/wordpress/wp-admin/includes/class-pclzip.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-base.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpsockets.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php
/var/www/wordpress/wp-admin/includes/class-wp-importer.php
/var/www/wordpress/wp-admin/includes/class-wp-upgrader.php
#CodeDescriptions
1<?php
2/**
3 * A File upgrader class for WordPress.
4 *
5 * This set of classes are designed to be used to upgrade/install a local set of files on the filesystem via the Filesystem Abstraction classes.
6 *
7 * @link http://trac.wordpress.org/ticket/7875 consolidate plugin/theme/core upgrade/install functions
8 *
9 * @package WordPress
10 * @subpackage Upgrader
11 * @since 2.8.0
12 */
13
14/**
15 * WordPress Upgrader class for Upgrading/Installing a local set of files via the Filesystem Abstraction classes from a Zip file.
16 *
17 * @TODO More Detailed docs, for methods as well.
18 *
19 * @package WordPress
20 * @subpackage Upgrader
21 * @since 2.8.0
22 */
23class WP_Upgrader {
24 var $strings = array();
25 var $skin = null;
26 var $result = array();
27
28 function WP_Upgrader($skin = null) {
29 return $this->__construct($skin);
30 }
31 function __construct($skin = null) {
32 if ( null == $skin )
33 $this->skin = new WP_Upgrader_Skin();
34 else
35 $this->skin = $skin;
36 }
37
38 function init() {
39 $this->skin->set_upgrader($this);
40 $this->generic_strings();
41 }
42
43 function generic_strings() {
44 $this->strings['bad_request'] = __('Invalid Data provided.');
45 $this->strings['fs_unavailable'] = __('Could not access filesystem.');
46 $this->strings['fs_error'] = __('Filesystem error.');
47 $this->strings['fs_no_root_dir'] = __('Unable to locate WordPress Root directory.');
48 $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress Content directory (wp-content).');
49 $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress Plugin directory.');
50 $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress Theme directory.');
51 /* translators: %s: directory name */
52 $this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).');
53
54 $this->strings['download_failed'] = __('Download failed.');
55 $this->strings['installing_package'] = __('Installing the latest version…');
56 $this->strings['folder_exists'] = __('Destination folder already exists.');
57 $this->strings['mkdir_failed'] = __('Could not create directory.');
58 $this->strings['bad_package'] = __('Incompatible Archive.');
59
60 $this->strings['maintenance_start'] = __('Enabling Maintenance mode…');
61 $this->strings['maintenance_end'] = __('Disabling Maintenance mode…');
62 }
63
64 function fs_connect( $directories = array() ) {
65 global $wp_filesystem;
66
67 if ( false === ($credentials = $this->skin->request_filesystem_credentials()) )
68 return false;
69
70 if ( ! WP_Filesystem($credentials) ) {
71 $error = true;
72 if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() )
73 $error = $wp_filesystem->errors;
74 $this->skin->request_filesystem_credentials($error); //Failed to connect, Error and request again
75 return false;
76 }
77
78 if ( ! is_object($wp_filesystem) )
79 return new WP_Error('fs_unavailable', $this->strings['fs_unavailable'] );
80
81 if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
82 return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors);
83
84 foreach ( (array)$directories as $dir ) {
85 switch ( $dir ) {
86 case ABSPATH:
87 if ( ! $wp_filesystem->abspath() )
88 return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']);
89 break;
90 case WP_CONTENT_DIR:
91 if ( ! $wp_filesystem->wp_content_dir() )
92 return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']);
93 break;
94 case WP_PLUGIN_DIR:
95 if ( ! $wp_filesystem->wp_plugins_dir() )
96 return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']);
97 break;
98 case WP_CONTENT_DIR . '/themes':
99 if ( ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') )
100 return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']);
101 break;
102 default:
103 if ( ! $wp_filesystem->find_folder($dir) )
104 return new WP_Error('fs_no_folder', sprintf($this->strings['fs_no_folder'], $dir));//Cross Site Scripting
105 break;
106 }
107 }
108 return true;
109 } //end fs_connect();
110
111 function download_package($package) {
112
113 if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote?
114 return $package; //must be a local file..
115
116 if ( empty($package) )
117 return new WP_Error('no_package', $this->strings['no_package']);
118
119 $this->skin->feedback('downloading_package', $package);
120
121 $download_file = download_url($package);
122
123 if ( is_wp_error($download_file) )
124 return new WP_Error('download_failed', $this->strings['download_failed'], $download_file->get_error_message());
125
126 return $download_file;
127 }
128
129 function unpack_package($package, $delete_package = true) {
130 global $wp_filesystem;
131
132 $this->skin->feedback('unpack_package');
133
134 $upgrade_folder = $wp_filesystem->wp_content_dir() . 'upgrade/';
135
136 //Clean up contents of upgrade directory beforehand.
137 $upgrade_files = $wp_filesystem->dirlist($upgrade_folder);
138 if ( !empty($upgrade_files) ) {
139 foreach ( $upgrade_files as $file )
140 $wp_filesystem->delete($upgrade_folder . $file['name'], true);
141 }
142
143 //We need a working directory
144 $working_dir = $upgrade_folder . basename($package, '.zip');
145
146 // Clean up working directory
147 if ( $wp_filesystem->is_dir($working_dir) )
148 $wp_filesystem->delete($working_dir, true);
149
150 // Unzip package to working directory
151 $result = unzip_file($package, $working_dir); //TODO optimizations, Copy when Move/Rename would suffice?//Arbitrary file disclosing
152
153 // Once extracted, delete the package if required.
154 if ( $delete_package )
155 unlink($package);//Arbitrary file manipulations
156
157 if ( is_wp_error($result) ) {
158 $wp_filesystem->delete($working_dir, true);
159 return $result;
160 }
161
162 return $working_dir;
163 }
164
165 function install_package($args = array()) {
166 global $wp_filesystem;
167 $defaults = array( 'source' => '', 'destination' => '', //Please always pass these
168 'clear_destination' => false, 'clear_working' => false,
169 'hook_extra' => array());
170
171 $args = wp_parse_args($args, $defaults);
172 extract($args);//Possible Control Flow
173
174 @set_time_limit( 300 );
175
176 if ( empty($source) || empty($destination) )
177 return new WP_Error('bad_request', $this->strings['bad_request']);
178
179 $this->skin->feedback('installing_package');
180
181 $res = apply_filters('upgrader_pre_install', true, $hook_extra);
182 if ( is_wp_error($res) )
183 return $res;
184
185 //Retain the Original source and destinations
186 $remote_source = $source;
187 $local_destination = $destination;
188
189 $source_files = array_keys( $wp_filesystem->dirlist($remote_source) );
190 $remote_destination = $wp_filesystem->find_folder($local_destination);
191
192 //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.
193 if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents.
194 $source = trailingslashit($source) . trailingslashit($source_files[0]);
195 elseif ( count($source_files) == 0 )
196 return new WP_Error('bad_package', $this->strings['bad_package']); //There are no files?
197 //else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.
198
199 //Hook ability to change the source file location..
200 $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this);
201 if ( is_wp_error($source) )
202 return $source;
203
204 //Has the source location changed? If so, we need a new source_files list.
205 if ( $source !== $remote_source )
206 $source_files = array_keys( $wp_filesystem->dirlist($source) );
207
208 //Protection against deleting files in any important base directories.
209 if ( in_array( $destination, array(ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR, WP_CONTENT_DIR . '/themes') ) ) {
210 $remote_destination = trailingslashit($remote_destination) . trailingslashit(basename($source));
211 $destination = trailingslashit($destination) . trailingslashit(basename($source));
212 }
213
214 if ( $wp_filesystem->exists($remote_destination) ) {
215 if ( $clear_destination ) {
216 //We're going to clear the destination if theres something there
217 $this->skin->feedback('remove_old');
218 $removed = $wp_filesystem->delete($remote_destination, true);
219 $removed = apply_filters('upgrader_clear_destination', $removed, $local_destination, $remote_destination, $hook_extra);
220
221 if ( is_wp_error($removed) )
222 return $removed;
223 else if ( ! $removed )
224 return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
225 } else {
226 //If we're not clearing the destination folder and something exists there allready, Bail.
227 //But first check to see if there are actually any files in the folder.
228 $_files = $wp_filesystem->dirlist($remote_destination);
229 if ( ! empty($_files) ) {
230 $wp_filesystem->delete($remote_source, true); //Clear out the source files.
231 return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination );
232 }
233 }
234 }
235
236 //Create destination if needed
237 if ( !$wp_filesystem->exists($remote_destination) )
238 if ( !$wp_filesystem->mkdir($remote_destination, FS_CHMOD_DIR) )
239 return new WP_Error('mkdir_failed', $this->strings['mkdir_failed'], $remote_destination);
240
241 // Copy new version of item into place.
242 $result = copy_dir($source, $remote_destination);
243 if ( is_wp_error($result) ) {
244 if ( $clear_working )
245 $wp_filesystem->delete($remote_source, true);
246 return $result;
247 }
248
249 //Clear the Working folder?
250 if ( $clear_working )
251 $wp_filesystem->delete($remote_source, true);
252
253 $destination_name = basename( str_replace($local_destination, '', $destination) );
254 if ( '.' == $destination_name )
255 $destination_name = '';
256
257 $this->result = compact('local_source', 'source', 'source_name', 'source_files', 'destination', 'destination_name', 'local_destination', 'remote_destination', 'clear_destination', 'delete_source_dir');
258
259 $res = apply_filters('upgrader_post_install', true, $hook_extra, $this->result);
260 if ( is_wp_error($res) ) {
261 $this->result = $res;
262 return $res;
263 }
264
265 //Bombard the calling function will all the info which we've just used.
266 return $this->result;
267 }
268
269 function run($options) {
270
271 $defaults = array( 'package' => '', //Please always pass this.
272 'destination' => '', //And this
273 'clear_destination' => false,
274 'clear_working' => true,
275 'is_multi' => false,
276 'hook_extra' => array() //Pass any extra $hook_extra args here, this will be passed to any hooked filters.
277 );
278
279 $options = wp_parse_args($options, $defaults);
280 extract($options);//Possible Control Flow
281
282 //Connect to the Filesystem first.
283 $res = $this->fs_connect( array(WP_CONTENT_DIR, $destination) );
284 if ( ! $res ) //Mainly for non-connected filesystem.
285 return false;
286
287 if ( is_wp_error($res) ) {
288 $this->skin->error($res);
289 return $res;
290 }
291
292 if ( !$is_multi ) // call $this->header separately if running multiple times
293 $this->skin->header();
294
295 $this->skin->before();
296
297 //Download the package (Note, This just returns the filename of the file if the package is a local file)
298 $download = $this->download_package( $package );
299 if ( is_wp_error($download) ) {
300 $this->skin->error($download);
301 $this->skin->after();
302 return $download;
303 }
304
305 //Unzip's the file into a temporary directory
306 $working_dir = $this->unpack_package( $download );
307 if ( is_wp_error($working_dir) ) {
308 $this->skin->error($working_dir);
309 $this->skin->after();
310 return $working_dir;
311 }
312
313 //With the given options, this installs it to the destination directory.
314 $result = $this->install_package( array(
315 'source' => $working_dir,
316 'destination' => $destination,
317 'clear_destination' => $clear_destination,
318 'clear_working' => $clear_working,
319 'hook_extra' => $hook_extra
320 ) );
321 $this->skin->set_result($result);
322 if ( is_wp_error($result) ) {
323 $this->skin->error($result);
324 $this->skin->feedback('process_failed');
325 } else {
326 //Install Suceeded
327 $this->skin->feedback('process_success');
328 }
329 $this->skin->after();
330
331 if ( !$is_multi )
332 $this->skin->footer();
333
334 return $result;
335 }
336
337 function maintenance_mode($enable = false) {
338 global $wp_filesystem;
339 $file = $wp_filesystem->abspath() . '.maintenance';//Arbitrary file disclosing
340 if ( $enable ) {
341 $this->skin->feedback('maintenance_start');
342 // Create maintenance file to signal that we are upgrading
343 $maintenance_string = '<?php $upgrading = ' . time() . '; ?>';
344 $wp_filesystem->delete($file);
345 $wp_filesystem->put_contents($file, $maintenance_string, FS_CHMOD_FILE);//Arbitrary file disclosing
346 } else if ( !$enable && $wp_filesystem->exists($file) ) {
347 $this->skin->feedback('maintenance_end');
348 $wp_filesystem->delete($file);
349 }
350 }
351
352}
353
354/**
355 * Plugin Upgrader class for WordPress Plugins, It is designed to upgrade/install plugins from a local zip, remote zip URL, or uploaded zip file.
356 *
357 * @TODO More Detailed docs, for methods as well.
358 *
359 * @package WordPress
360 * @subpackage Upgrader
361 * @since 2.8.0
362 */
363class Plugin_Upgrader extends WP_Upgrader {
364
365 var $result;
366 var $bulk = false;
367 var $show_before = '';
368
369 function upgrade_strings() {
370 $this->strings['up_to_date'] = __('The plugin is at the latest version.');
371 $this->strings['no_package'] = __('Upgrade package not available.');
372 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
373 $this->strings['unpack_package'] = __('Unpacking the update…');
374 $this->strings['deactivate_plugin'] = __('Deactivating the plugin…');
375 $this->strings['remove_old'] = __('Removing the old version of the plugin…');
376 $this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
377 $this->strings['process_failed'] = __('Plugin upgrade failed.');
378 $this->strings['process_success'] = __('Plugin upgraded successfully.');
379 }
380
381 function install_strings() {
382 $this->strings['no_package'] = __('Install package not available.');
383 $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…');
384 $this->strings['unpack_package'] = __('Unpacking the package…');
385 $this->strings['installing_package'] = __('Installing the plugin…');
386 $this->strings['process_failed'] = __('Plugin install failed.');
387 $this->strings['process_success'] = __('Plugin installed successfully.');
388 }
389
390 function install($package) {
391
392 $this->init();
393 $this->install_strings();
394
395 $this->run(array(
396 'package' => $package,
397 'destination' => WP_PLUGIN_DIR,
398 'clear_destination' => false, //Do not overwrite files.
399 'clear_working' => true,
400 'hook_extra' => array()
401 ));
402
403 // Force refresh of plugin update information
404 delete_site_transient('update_plugins');
405
406 }
407
408 function upgrade($plugin) {
409
410 $this->init();
411 $this->upgrade_strings();
412
413 $current = get_site_transient( 'update_plugins' );
414 if ( !isset( $current->response[ $plugin ] ) ) {
415 $this->skin->before();
416 $this->skin->set_result(false);
417 $this->skin->error('up_to_date');
418 $this->skin->after();
419 return false;
420 }
421
422 // Get the URL to the zip file
423 $r = $current->response[ $plugin ];
424
425 add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2);
426 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
427 //'source_selection' => array(&$this, 'source_selection'), //theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.
428
429 $this->run(array(
430 'package' => $r->package,
431 'destination' => WP_PLUGIN_DIR,
432 'clear_destination' => true,
433 'clear_working' => true,
434 'hook_extra' => array(
435 'plugin' => $plugin
436 )
437 ));
438
439 // Cleanup our hooks, incase something else does a upgrade on this connection.
440 remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'));
441 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
442
443 if ( ! $this->result || is_wp_error($this->result) )
444 return $this->result;
445
446 // Force refresh of plugin update information
447 delete_site_transient('update_plugins');
448 }
449
450 function bulk_upgrade($plugins) {
451
452 $this->init();
453 $this->bulk = true;
454 $this->upgrade_strings();
455
456 $current = get_site_transient( 'update_plugins' );
457
458 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4);
459
460 $this->skin->header();
461
462 // Connect to the Filesystem first.
463 $res = $this->fs_connect( array(WP_CONTENT_DIR, WP_PLUGIN_DIR) );
464 if ( ! $res ) {
465 $this->skin->footer();
466 return false;
467 }
468
469 $this->skin->bulk_header();
470
471 $this->maintenance_mode(true);
472
473 $results = array();
474
475 $this->update_count = count($plugins);
476 $this->update_current = 0;
477 foreach ( $plugins as $plugin ) {
478 $this->update_current++;
479 $this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true);
480
481 if ( !isset( $current->response[ $plugin ] ) ) {
482 $this->skin->set_result(false);
483 $this->skin->before();
484 $this->skin->error('up_to_date');
485 $this->skin->after();
486 $results[$plugin] = false;
487 continue;
488 }
489
490 // Get the URL to the zip file
491 $r = $current->response[ $plugin ];
492
493 $this->skin->plugin_active = is_plugin_active($plugin);
494
495 $result = $this->run(array(
496 'package' => $r->package,
497 'destination' => WP_PLUGIN_DIR,
498 'clear_destination' => true,
499 'clear_working' => true,
500 'is_multi' => true,
501 'hook_extra' => array(
502 'plugin' => $plugin
503 )
504 ));
505
506 $results[$plugin] = $this->result;
507
508 // Prevent credentials auth screen from displaying multiple times
509 if ( false === $result )
510 break;
511 } //end foreach $plugins
512
513 $this->maintenance_mode(false);
514
515 $this->skin->bulk_footer();
516
517 $this->skin->footer();
518
519 // Cleanup our hooks, incase something else does a upgrade on this connection.
520 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'));
521
522 // Force refresh of plugin update information
523 delete_site_transient('update_plugins');
524
525 return $results;
526 }
527
528 //return plugin info.
529 function plugin_info() {
530 if ( ! is_array($this->result) )
531 return false;
532 if ( empty($this->result['destination_name']) )
533 return false;
534
535 $plugin = get_plugins('/' . $this->result['destination_name']); //Ensure to pass with leading slash
536 if ( empty($plugin) )
537 return false;
538
539 $pluginfiles = array_keys($plugin); //Assume the requested plugin is the first in the list
540
541 return $this->result['destination_name'] . '/' . $pluginfiles[0];
542 }
543
544 //Hooked to pre_install
545 function deactivate_plugin_before_upgrade($return, $plugin) {
546
547 if ( is_wp_error($return) ) //Bypass.
548 return $return;
549
550 $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
551 if ( empty($plugin) )
552 return new WP_Error('bad_request', $this->strings['bad_request']);
553
554 if ( is_plugin_active($plugin) ) {
555 $this->skin->feedback('deactivate_plugin');
556 //Deactivate the plugin silently, Prevent deactivation hooks from running.
557 deactivate_plugins($plugin, true);
558 }
559 }
560
561 //Hooked to upgrade_clear_destination
562 function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) {
563 global $wp_filesystem;
564
565 if ( is_wp_error($removed) )
566 return $removed; //Pass errors through.
567
568 $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : '';
569 if ( empty($plugin) )
570 return new WP_Error('bad_request', $this->strings['bad_request']);
571
572 $plugins_dir = $wp_filesystem->wp_plugins_dir();
573 $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
574
575 if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If its already vanished.
576 return $removed;
577
578 // If plugin is in its own directory, recursively delete the directory.
579 if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder
580 $deleted = $wp_filesystem->delete($this_plugin_dir, true);
581 else
582 $deleted = $wp_filesystem->delete($plugins_dir . $plugin);
583
584 if ( ! $deleted )
585 return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
586
587 return $removed;
588 }
589}
590
591/**
592 * Theme Upgrader class for WordPress Themes, It is designed to upgrade/install themes from a local zip, remote zip URL, or uploaded zip file.
593 *
594 * @TODO More Detailed docs, for methods as well.
595 *
596 * @package WordPress
597 * @subpackage Upgrader
598 * @since 2.8.0
599 */
600class Theme_Upgrader extends WP_Upgrader {
601
602 var $result;
603
604 function upgrade_strings() {
605 $this->strings['up_to_date'] = __('The theme is at the latest version.');
606 $this->strings['no_package'] = __('Upgrade package not available.');
607 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
608 $this->strings['unpack_package'] = __('Unpacking the update…');
609 $this->strings['remove_old'] = __('Removing the old version of the theme…');
610 $this->strings['remove_old_failed'] = __('Could not remove the old theme.');
611 $this->strings['process_failed'] = __('Theme upgrade failed.');
612 $this->strings['process_success'] = __('Theme upgraded successfully.');
613 }
614
615 function install_strings() {
616 $this->strings['no_package'] = __('Install package not available.');
617 $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…');
618 $this->strings['unpack_package'] = __('Unpacking the package…');
619 $this->strings['installing_package'] = __('Installing the theme…');
620 $this->strings['process_failed'] = __('Theme install failed.');
621 $this->strings['process_success'] = __('Theme installed successfully.');
622 }
623
624 function install($package) {
625
626 $this->init();
627 $this->install_strings();
628
629 $options = array(
630 'package' => $package,
631 'destination' => WP_CONTENT_DIR . '/themes',
632 'clear_destination' => false, //Do not overwrite files.
633 'clear_working' => true
634 );
635
636 $this->run($options);
637
638 if ( ! $this->result || is_wp_error($this->result) )
639 return $this->result;
640
641 // Force refresh of theme update information
642 delete_site_transient('update_themes');
643
644 if ( empty($result['destination_name']) )
645 return false;
646 else
647 return $result['destination_name'];
648 }
649
650 function upgrade($theme) {
651
652 $this->init();
653 $this->upgrade_strings();
654
655 // Is an update available?
656 $current = get_site_transient( 'update_themes' );
657 if ( !isset( $current->response[ $theme ] ) ) {
658 $this->skin->before();
659 $this->skin->set_result(false);
660 $this->skin->error('up_to_date');
661 $this->skin->after();
662 return false;
663 }
664
665 $r = $current->response[ $theme ];
666
667 add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
668 add_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
669 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
670
671 $options = array(
672 'package' => $r['package'],
673 'destination' => WP_CONTENT_DIR . '/themes',
674 'clear_destination' => true,
675 'clear_working' => true,
676 'hook_extra' => array(
677 'theme' => $theme
678 )
679 );
680
681 $this->run($options);
682
683 if ( ! $this->result || is_wp_error($this->result) )
684 return $this->result;
685
686 // Force refresh of theme update information
687 delete_site_transient('update_themes');
688
689 return true;
690 }
691
692 function bulk_upgrade($themes) {
693
694 $this->init();
695 $this->bulk = true;
696 $this->upgrade_strings();
697
698 $current = get_site_transient( 'update_themes' );
699
700 add_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
701 add_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
702 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
703
704 $this->skin->header();
705
706 // Connect to the Filesystem first.
707 $res = $this->fs_connect( array(WP_CONTENT_DIR) );
708 if ( ! $res ) {
709 $this->skin->footer();
710 return false;
711 }
712
713 $this->skin->bulk_header();
714
715 $this->maintenance_mode(true);
716
717 $results = array();
718
719 $this->update_count = count($themes);
720 $this->update_current = 0;
721 foreach ( $themes as $theme ) {
722 $this->update_current++;
723
724 if ( !isset( $current->response[ $theme ] ) ) {
725 $this->skin->set_result(false);
726 $this->skin->before();
727 $this->skin->error('up_to_date');
728 $this->skin->after();
729 $results[$theme] = false;
730 continue;
731 }
732
733 $this->skin->theme_info = $this->theme_info($theme);
734
735 // Get the URL to the zip file
736 $r = $current->response[ $theme ];
737
738 $options = array(
739 'package' => $r['package'],
740 'destination' => WP_CONTENT_DIR . '/themes',
741 'clear_destination' => true,
742 'clear_working' => true,
743 'hook_extra' => array(
744 'theme' => $theme
745 )
746 );
747
748 $result = $this->run($options);
749
750 $results[$theme] = $this->result;
751
752 // Prevent credentials auth screen from displaying multiple times
753 if ( false === $result )
754 break;
755 } //end foreach $plugins
756
757 $this->maintenance_mode(false);
758
759 $this->skin->bulk_footer();
760
761 $this->skin->footer();
762
763 // Cleanup our hooks, incase something else does a upgrade on this connection.
764 remove_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2);
765 remove_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2);
766 remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4);
767
768 // Force refresh of theme update information
769 delete_site_transient('update_themes');
770
771 return $results;
772 }
773
774 function current_before($return, $theme) {
775
776 if ( is_wp_error($return) )
777 return $return;
778
779 $theme = isset($theme['theme']) ? $theme['theme'] : '';
780
781 if ( $theme != get_stylesheet() ) //If not current
782 return $return;
783 //Change to maintainence mode now.
784 if ( ! $this->bulk )
785 $this->maintenance_mode(true);
786
787 return $return;
788 }
789 function current_after($return, $theme) {
790 if ( is_wp_error($return) )
791 return $return;
792
793 $theme = isset($theme['theme']) ? $theme['theme'] : '';
794
795 if ( $theme != get_stylesheet() ) //If not current
796 return $return;
797
798 //Ensure stylesheet name hasnt changed after the upgrade:
799 if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) {
800 $theme_info = $this->theme_info();
801 $stylesheet = $this->result['destination_name'];
802 $template = !empty($theme_info['Template']) ? $theme_info['Template'] : $stylesheet;
803 switch_theme($template, $stylesheet, true);
804 }
805
806 //Time to remove maintainence mode
807 if ( ! $this->bulk )
808 $this->maintenance_mode(false);
809 return $return;
810 }
811
812 function delete_old_theme($removed, $local_destination, $remote_destination, $theme) {
813 global $wp_filesystem;
814
815 $theme = isset($theme['theme']) ? $theme['theme'] : '';
816
817 if ( is_wp_error($removed) || empty($theme) )
818 return $removed; //Pass errors through.
819
820 $themes_dir = $wp_filesystem->wp_themes_dir();
821 if ( $wp_filesystem->exists( trailingslashit($themes_dir) . $theme ) )
822 if ( ! $wp_filesystem->delete( trailingslashit($themes_dir) . $theme, true ) )
823 return false;
824 return true;
825 }
826
827 function theme_info($theme = null) {
828
829 if ( empty($theme) ) {
830 if ( !empty($this->result['destination_name']) )
831 $theme = $this->result['destination_name'];
832 else
833 return false;
834 }
835 return get_theme_data(WP_CONTENT_DIR . '/themes/' . $theme . '/style.css');
836 }
837
838}
839
840/**
841 * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combiantion with the wp-admin/includes/update-core.php file
842 *
843 * @TODO More Detailed docs, for methods as well.
844 *
845 * @package WordPress
846 * @subpackage Upgrader
847 * @since 2.8.0
848 */
849class Core_Upgrader extends WP_Upgrader {
850
851 function upgrade_strings() {
852 $this->strings['up_to_date'] = __('WordPress is at the latest version.');
853 $this->strings['no_package'] = __('Upgrade package not available.');
854 $this->strings['downloading_package'] = __('Downloading update from <span class="code">%s</span>…');
855 $this->strings['unpack_package'] = __('Unpacking the update…');
856 $this->strings['copy_failed'] = __('Could not copy files.');
857 }
858
859 function upgrade($current) {
860 global $wp_filesystem;
861
862 $this->init();
863 $this->upgrade_strings();
864
865 if ( !empty($feedback) )
866 add_filter('update_feedback', $feedback);
867
868 // Is an update available?
869 if ( !isset( $current->response ) || $current->response == 'latest' )
870 return new WP_Error('up_to_date', $this->strings['up_to_date']);
871
872 $res = $this->fs_connect( array(ABSPATH, WP_CONTENT_DIR) );
873 if ( is_wp_error($res) )
874 return $res;
875
876 $wp_dir = trailingslashit($wp_filesystem->abspath());
877
878 $download = $this->download_package( $current->package );
879 if ( is_wp_error($download) )
880 return $download;
881
882 $working_dir = $this->unpack_package( $download );
883 if ( is_wp_error($working_dir) )
884 return $working_dir;
885
886 // Copy update-core.php from the new version into place.
887 if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
888 $wp_filesystem->delete($working_dir, true);
889 return new WP_Error('copy_failed', $this->strings['copy_failed']);
890 }
891 $wp_filesystem->chmod($wp_dir . 'wp-admin/includes/update-core.php', FS_CHMOD_FILE);//Arbitrary file manipulations
892
893 require(ABSPATH . 'wp-admin/includes/update-core.php');
894
895 return update_core($working_dir, $wp_dir);
896 }
897
898}
899
900/**
901 * Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes.
902 *
903 * @TODO More Detailed docs, for methods as well.
904 *
905 * @package WordPress
906 * @subpackage Upgrader
907 * @since 2.8.0
908 */
909class WP_Upgrader_Skin {
910
911 var $upgrader;
912 var $done_header = false;
913 var $result = false;
914
915 function WP_Upgrader_Skin($args = array()) {
916 return $this->__construct($args);
917 }
918 function __construct($args = array()) {
919 $defaults = array( 'url' => '', 'nonce' => '', 'title' => '', 'context' => false );
920 $this->options = wp_parse_args($args, $defaults);
921 }
922
923 function set_upgrader(&$upgrader) {
924 if ( is_object($upgrader) )
925 $this->upgrader =& $upgrader;
926 $this->add_strings();
927 }
928
929 function add_strings() {
930 }
931
932 function set_result($result) {
933 $this->result = $result;
934 }
935
936 function request_filesystem_credentials($error = false) {
937 $url = $this->options['url'];
938 $context = $this->options['context'];
939 if ( !empty($this->options['nonce']) )
940 $url = wp_nonce_url($url, $this->options['nonce']);
941 return request_filesystem_credentials($url, '', $error, $context); //Possible to bring inline, Leaving as is for now.
942 }
943
944 function header() {
945 if ( $this->done_header )
946 return;
947 $this->done_header = true;
948 echo '<div class="wrap">';
949 echo screen_icon();
950 echo '<h2>' . $this->options['title'] . '</h2>';
951 }
952 function footer() {
953 echo '</div>';
954 }
955
956 function error($errors) {
957 if ( ! $this->done_header )
958 $this->header();
959 if ( is_string($errors) ) {
960 $this->feedback($errors);
961 } elseif ( is_wp_error($errors) && $errors->get_error_code() ) {
962 foreach ( $errors->get_error_messages() as $message ) {
963 if ( $errors->get_error_data() )
964 $this->feedback($message . ' ' . $errors->get_error_data() );
965 else
966 $this->feedback($message);
967 }
968 }
969 }
970
971 function feedback($string) {
972 if ( isset( $this->upgrader->strings[$string] ) )
973 $string = $this->upgrader->strings[$string];
974
975 if ( strpos($string, '%') !== false ) {
976 $args = func_get_args();
977 $args = array_splice($args, 1);
978 if ( !empty($args) )
979 $string = vsprintf($string, $args);//Cross Site Scripting
980 }
981 if ( empty($string) )
982 return;
983 show_message($string);
984 }
985 function before() {}
986 function after() {}
987
988}
989
990/**
991 * Plugin Upgrader Skin for WordPress Plugin Upgrades.
992 *
993 * @TODO More Detailed docs, for methods as well.
994 *
995 * @package WordPress
996 * @subpackage Upgrader
997 * @since 2.8.0
998 */
999class Plugin_Upgrader_Skin extends WP_Upgrader_Skin {
1000 var $plugin = '';
/var/www/wordpress/wp-admin/includes/comment.php
/var/www/wordpress/wp-admin/includes/continents-cities.php
/var/www/wordpress/wp-admin/includes/dashboard.php
/var/www/wordpress/wp-admin/includes/deprecated.php
/var/www/wordpress/wp-admin/includes/export.php
/var/www/wordpress/wp-admin/includes/file.php
/var/www/wordpress/wp-admin/includes/image-edit.php
/var/www/wordpress/wp-admin/includes/image.php
/var/www/wordpress/wp-admin/includes/import.php
/var/www/wordpress/wp-admin/includes/manifest.php
/var/www/wordpress/wp-admin/includes/media.php
/var/www/wordpress/wp-admin/includes/meta-boxes.php
/var/www/wordpress/wp-admin/includes/misc.php
/var/www/wordpress/wp-admin/includes/ms-deprecated.php
/var/www/wordpress/wp-admin/includes/ms.php
/var/www/wordpress/wp-admin/includes/nav-menu.php
/var/www/wordpress/wp-admin/includes/plugin-install.php
/var/www/wordpress/wp-admin/includes/plugin.php
/var/www/wordpress/wp-admin/includes/post.php
/var/www/wordpress/wp-admin/includes/schema.php
/var/www/wordpress/wp-admin/includes/taxonomy.php
/var/www/wordpress/wp-admin/includes/template.php
/var/www/wordpress/wp-admin/includes/theme-install.php
/var/www/wordpress/wp-admin/includes/theme.php
/var/www/wordpress/wp-admin/includes/update-core.php
/var/www/wordpress/wp-admin/includes/update.php
/var/www/wordpress/wp-admin/includes/upgrade.php
/var/www/wordpress/wp-admin/includes/user.php
/var/www/wordpress/wp-admin/includes/widgets.php
/var/www/wordpress/wp-admin/js/revisions-js.php
/var/www/wordpress/wp-admin/maint/repair.php
/var/www/wordpress/wp-admin/admin-ajax.php
/var/www/wordpress/wp-admin/admin-footer.php
/var/www/wordpress/wp-admin/admin-functions.php
/var/www/wordpress/wp-admin/admin-header.php
/var/www/wordpress/wp-admin/admin-post.php
/var/www/wordpress/wp-admin/admin.php
/var/www/wordpress/wp-admin/async-upload.php
/var/www/wordpress/wp-admin/comment.php
/var/www/wordpress/wp-admin/custom-background.php
/var/www/wordpress/wp-admin/custom-header.php
/var/www/wordpress/wp-admin/edit-attachment-rows.php
/var/www/wordpress/wp-admin/edit-comments.php
/var/www/wordpress/wp-admin/edit-form-advanced.php
/var/www/wordpress/wp-admin/edit-form-comment.php
/var/www/wordpress/wp-admin/edit-link-categories.php
/var/www/wordpress/wp-admin/edit-link-category-form.php
/var/www/wordpress/wp-admin/edit-link-form.php
/var/www/wordpress/wp-admin/edit-post-rows.php
/var/www/wordpress/wp-admin/edit-tag-form.php
/var/www/wordpress/wp-admin/edit-tags.php
/var/www/wordpress/wp-admin/edit.php
/var/www/wordpress/wp-admin/export.php
/var/www/wordpress/wp-admin/gears-manifest.php
/var/www/wordpress/wp-admin/import.php
/var/www/wordpress/wp-admin/index-extra.php
/var/www/wordpress/wp-admin/index.php
/var/www/wordpress/wp-admin/install-helper.php
/var/www/wordpress/wp-admin/install.php
/var/www/wordpress/wp-admin/link-add.php
/var/www/wordpress/wp-admin/link-category.php
/var/www/wordpress/wp-admin/link-manager.php
/var/www/wordpress/wp-admin/link-parse-opml.php
/var/www/wordpress/wp-admin/link.php
/var/www/wordpress/wp-admin/load-scripts.php
/var/www/wordpress/wp-admin/load-styles.php
/var/www/wordpress/wp-admin/media-new.php
/var/www/wordpress/wp-admin/media-upload.php
/var/www/wordpress/wp-admin/media.php
/var/www/wordpress/wp-admin/menu-header.php
/var/www/wordpress/wp-admin/menu.php
/var/www/wordpress/wp-admin/moderation.php
/var/www/wordpress/wp-admin/ms-admin.php
/var/www/wordpress/wp-admin/ms-delete-site.php
/var/www/wordpress/wp-admin/ms-edit.php
/var/www/wordpress/wp-admin/ms-options.php
/var/www/wordpress/wp-admin/ms-sites.php
/var/www/wordpress/wp-admin/ms-themes.php
/var/www/wordpress/wp-admin/ms-upgrade-network.php
/var/www/wordpress/wp-admin/ms-users.php
/var/www/wordpress/wp-admin/my-sites.php
/var/www/wordpress/wp-admin/nav-menus.php
/var/www/wordpress/wp-admin/network.php
/var/www/wordpress/wp-admin/options-discussion.php
/var/www/wordpress/wp-admin/options-general.php
/var/www/wordpress/wp-admin/options-head.php
/var/www/wordpress/wp-admin/options-media.php
/var/www/wordpress/wp-admin/options-permalink.php
/var/www/wordpress/wp-admin/options-privacy.php
/var/www/wordpress/wp-admin/options-reading.php
/var/www/wordpress/wp-admin/options-writing.php
/var/www/wordpress/wp-admin/options.php
/var/www/wordpress/wp-admin/plugin-editor.php
/var/www/wordpress/wp-admin/plugin-install.php
/var/www/wordpress/wp-admin/plugins.php
/var/www/wordpress/wp-admin/post-new.php
/var/www/wordpress/wp-admin/post.php
/var/www/wordpress/wp-admin/press-this.php
/var/www/wordpress/wp-admin/profile.php
/var/www/wordpress/wp-admin/revision.php
/var/www/wordpress/wp-admin/setup-config.php
/var/www/wordpress/wp-admin/sidebar.php
/var/www/wordpress/wp-admin/theme-editor.php
/var/www/wordpress/wp-admin/theme-install.php
/var/www/wordpress/wp-admin/themes.php
/var/www/wordpress/wp-admin/tools.php
/var/www/wordpress/wp-admin/update-core.php
/var/www/wordpress/wp-admin/update.php
/var/www/wordpress/wp-admin/upgrade-functions.php
/var/www/wordpress/wp-admin/upgrade.php
/var/www/wordpress/wp-admin/upload.php
/var/www/wordpress/wp-admin/user-edit.php
/var/www/wordpress/wp-admin/user-new.php
/var/www/wordpress/wp-admin/users.php
/var/www/wordpress/wp-admin/widgets.php
/var/www/wordpress/wp-content/languages/ru_RU.php
/var/www/wordpress/wp-content/plugins/akismet/akismet.php
/var/www/wordpress/wp-content/plugins/rh/rh.php
/var/www/wordpress/wp-content/plugins/hello.php
/var/www/wordpress/wp-content/plugins/index.php
/var/www/wordpress/wp-content/themes/twentyten/404.php
/var/www/wordpress/wp-content/themes/twentyten/archive.php
/var/www/wordpress/wp-content/themes/twentyten/attachment.php
/var/www/wordpress/wp-content/themes/twentyten/author.php
/var/www/wordpress/wp-content/themes/twentyten/category.php
/var/www/wordpress/wp-content/themes/twentyten/comments.php
/var/www/wordpress/wp-content/themes/twentyten/footer.php
/var/www/wordpress/wp-content/themes/twentyten/functions.php
/var/www/wordpress/wp-content/themes/twentyten/header.php
/var/www/wordpress/wp-content/themes/twentyten/index.php
/var/www/wordpress/wp-content/themes/twentyten/loop.php
/var/www/wordpress/wp-content/themes/twentyten/onecolumn-page.php
/var/www/wordpress/wp-content/themes/twentyten/page.php
/var/www/wordpress/wp-content/themes/twentyten/search.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar-footer.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar.php
/var/www/wordpress/wp-content/themes/twentyten/single.php
/var/www/wordpress/wp-content/themes/twentyten/tag.php
/var/www/wordpress/wp-content/themes/index.php
/var/www/wordpress/wp-content/index.php
/var/www/wordpress/wp-includes/js/tinymce/langs/wp-langs.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/config.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
/var/www/wordpress/wp-includes/js/tinymce/wp-mce-help.php
/var/www/wordpress/wp-includes/js/tinymce/wp-tinymce.php
/var/www/wordpress/wp-includes/pomo/entry.php
/var/www/wordpress/wp-includes/pomo/mo.php
/var/www/wordpress/wp-includes/pomo/po.php
/var/www/wordpress/wp-includes/pomo/streams.php
/var/www/wordpress/wp-includes/pomo/translations.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/native.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/shell.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/string.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/xdiff.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer/inline.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer.php
/var/www/wordpress/wp-includes/Text/Diff.php
/var/www/wordpress/wp-includes/theme-compat/comments-popup.php
/var/www/wordpress/wp-includes/theme-compat/comments.php
/var/www/wordpress/wp-includes/theme-compat/footer.php
/var/www/wordpress/wp-includes/theme-compat/header.php
/var/www/wordpress/wp-includes/theme-compat/sidebar.php
/var/www/wordpress/wp-includes/atomlib.php
/var/www/wordpress/wp-includes/author-template.php
/var/www/wordpress/wp-includes/bookmark-template.php
/var/www/wordpress/wp-includes/bookmark.php
/var/www/wordpress/wp-includes/cache.php
/var/www/wordpress/wp-includes/canonical.php
/var/www/wordpress/wp-includes/capabilities.php
/var/www/wordpress/wp-includes/category-template.php
/var/www/wordpress/wp-includes/category.php
/var/www/wordpress/wp-includes/class-feed.php
/var/www/wordpress/wp-includes/class-http.php
/var/www/wordpress/wp-includes/class-IXR.php
/var/www/wordpress/wp-includes/class-json.php
/var/www/wordpress/wp-includes/class-oembed.php
/var/www/wordpress/wp-includes/class-phpass.php
/var/www/wordpress/wp-includes/class-phpmailer.php
/var/www/wordpress/wp-includes/class-pop3.php
/var/www/wordpress/wp-includes/class-simplepie.php
/var/www/wordpress/wp-includes/class-smtp.php
/var/www/wordpress/wp-includes/class-snoopy.php
/var/www/wordpress/wp-includes/class.wp-dependencies.php
/var/www/wordpress/wp-includes/class.wp-scripts.php
/var/www/wordpress/wp-includes/class.wp-styles.php
/var/www/wordpress/wp-includes/classes.php
/var/www/wordpress/wp-includes/comment-template.php
/var/www/wordpress/wp-includes/comment.php
/var/www/wordpress/wp-includes/compat.php
/var/www/wordpress/wp-includes/cron.php
/var/www/wordpress/wp-includes/default-constants.php
/var/www/wordpress/wp-includes/default-embeds.php
/var/www/wordpress/wp-includes/default-filters.php
/var/www/wordpress/wp-includes/default-widgets.php
/var/www/wordpress/wp-includes/deprecated.php
/var/www/wordpress/wp-includes/feed-atom-comments.php
/var/www/wordpress/wp-includes/feed-atom.php
/var/www/wordpress/wp-includes/feed-rdf.php
/var/www/wordpress/wp-includes/feed-rss.php
/var/www/wordpress/wp-includes/feed-rss2-comments.php
/var/www/wordpress/wp-includes/feed-rss2.php
/var/www/wordpress/wp-includes/feed.php
/var/www/wordpress/wp-includes/formatting.php
/var/www/wordpress/wp-includes/functions.php
/var/www/wordpress/wp-includes/functions.wp-scripts.php
/var/www/wordpress/wp-includes/functions.wp-styles.php
/var/www/wordpress/wp-includes/general-template.php
/var/www/wordpress/wp-includes/http.php
/var/www/wordpress/wp-includes/kses.php
/var/www/wordpress/wp-includes/l10n.php
/var/www/wordpress/wp-includes/link-template.php
/var/www/wordpress/wp-includes/load.php
/var/www/wordpress/wp-includes/locale.php
/var/www/wordpress/wp-includes/media.php
/var/www/wordpress/wp-includes/meta.php
/var/www/wordpress/wp-includes/ms-blogs.php
/var/www/wordpress/wp-includes/ms-default-constants.php
/var/www/wordpress/wp-includes/ms-default-filters.php
/var/www/wordpress/wp-includes/ms-deprecated.php
/var/www/wordpress/wp-includes/ms-files.php
/var/www/wordpress/wp-includes/ms-functions.php
/var/www/wordpress/wp-includes/ms-load.php
/var/www/wordpress/wp-includes/ms-settings.php
/var/www/wordpress/wp-includes/nav-menu-template.php
/var/www/wordpress/wp-includes/nav-menu.php
/var/www/wordpress/wp-includes/pluggable-deprecated.php
/var/www/wordpress/wp-includes/pluggable.php
/var/www/wordpress/wp-includes/plugin.php
/var/www/wordpress/wp-includes/post-template.php
/var/www/wordpress/wp-includes/post-thumbnail-template.php
/var/www/wordpress/wp-includes/post.php
/var/www/wordpress/wp-includes/query.php
/var/www/wordpress/wp-includes/registration-functions.php
/var/www/wordpress/wp-includes/registration.php
/var/www/wordpress/wp-includes/rewrite.php
/var/www/wordpress/wp-includes/rss-functions.php
/var/www/wordpress/wp-includes/rss.php
/var/www/wordpress/wp-includes/script-loader.php
/var/www/wordpress/wp-includes/shortcodes.php
/var/www/wordpress/wp-includes/taxonomy.php
/var/www/wordpress/wp-includes/template-loader.php
/var/www/wordpress/wp-includes/theme.php
/var/www/wordpress/wp-includes/update.php
/var/www/wordpress/wp-includes/user.php
/var/www/wordpress/wp-includes/vars.php
/var/www/wordpress/wp-includes/version.php
/var/www/wordpress/wp-includes/widgets.php
/var/www/wordpress/wp-includes/wp-db.php
/var/www/wordpress/wp-includes/wp-diff.php
/var/www/wordpress/index.php
/var/www/wordpress/wp-activate.php
/var/www/wordpress/wp-app.php
/var/www/wordpress/wp-atom.php
/var/www/wordpress/wp-blog-header.php
/var/www/wordpress/wp-comments-post.php
/var/www/wordpress/wp-commentsrss2.php
/var/www/wordpress/wp-config-sample.php
/var/www/wordpress/wp-cron.php
/var/www/wordpress/wp-feed.php
/var/www/wordpress/wp-links-opml.php
/var/www/wordpress/wp-load.php
/var/www/wordpress/wp-login.php
/var/www/wordpress/wp-mail.php
/var/www/wordpress/wp-pass.php
/var/www/wordpress/wp-rdf.php
/var/www/wordpress/wp-register.php
/var/www/wordpress/wp-rss.php
/var/www/wordpress/wp-rss2.php
/var/www/wordpress/wp-settings.php
/var/www/wordpress/wp-signup.php
/var/www/wordpress/wp-trackback.php
/var/www/wordpress/xmlrpc.php