changeset 21 | 48c4eec2b7e6 |
parent 19 | 3d72ae0968f4 |
child 22 | 8c2e4d02f4ef |
20:7b1b88e27a20 | 21:48c4eec2b7e6 |
---|---|
7 * @since 2.7.0 |
7 * @since 2.7.0 |
8 */ |
8 */ |
9 |
9 |
10 /** |
10 /** |
11 * Stores files to be deleted. |
11 * Stores files to be deleted. |
12 * |
|
13 * Bundled theme files should not be included in this list. |
|
12 * |
14 * |
13 * @since 2.7.0 |
15 * @since 2.7.0 |
14 * |
16 * |
15 * @global array $_old_files |
17 * @global array $_old_files |
16 * @var array |
18 * @var array |
33 'wp-images/header-shadow.png', |
35 'wp-images/header-shadow.png', |
34 'wp-images/smilies', |
36 'wp-images/smilies', |
35 'wp-images/wp-small.png', |
37 'wp-images/wp-small.png', |
36 'wp-images/wpminilogo.png', |
38 'wp-images/wpminilogo.png', |
37 'wp.php', |
39 'wp.php', |
38 // 2.0.8 |
|
39 'wp-includes/js/tinymce/plugins/inlinepopups/readme.txt', |
|
40 // 2.1 |
40 // 2.1 |
41 'wp-admin/edit-form-ajax-cat.php', |
41 'wp-admin/edit-form-ajax-cat.php', |
42 'wp-admin/execute-pings.php', |
42 'wp-admin/execute-pings.php', |
43 'wp-admin/inline-uploading.php', |
43 'wp-admin/inline-uploading.php', |
44 'wp-admin/link-categories.php', |
44 'wp-admin/link-categories.php', |
48 'wp-includes/feed-functions.php', |
48 'wp-includes/feed-functions.php', |
49 'wp-includes/functions-compat.php', |
49 'wp-includes/functions-compat.php', |
50 'wp-includes/functions-formatting.php', |
50 'wp-includes/functions-formatting.php', |
51 'wp-includes/functions-post.php', |
51 'wp-includes/functions-post.php', |
52 'wp-includes/js/dbx-key.js', |
52 'wp-includes/js/dbx-key.js', |
53 'wp-includes/js/tinymce/plugins/autosave/langs/cs.js', |
|
54 'wp-includes/js/tinymce/plugins/autosave/langs/sv.js', |
|
55 'wp-includes/links.php', |
53 'wp-includes/links.php', |
56 'wp-includes/pluggable-functions.php', |
54 'wp-includes/pluggable-functions.php', |
57 'wp-includes/template-functions-author.php', |
55 'wp-includes/template-functions-author.php', |
58 'wp-includes/template-functions-category.php', |
56 'wp-includes/template-functions-category.php', |
59 'wp-includes/template-functions-general.php', |
57 'wp-includes/template-functions-general.php', |
60 'wp-includes/template-functions-links.php', |
58 'wp-includes/template-functions-links.php', |
61 'wp-includes/template-functions-post.php', |
59 'wp-includes/template-functions-post.php', |
62 'wp-includes/wp-l10n.php', |
60 'wp-includes/wp-l10n.php', |
63 // 2.2 |
61 // 2.2 |
64 'wp-admin/cat-js.php', |
62 'wp-admin/cat-js.php', |
65 'wp-admin/import/b2.php', |
|
66 'wp-includes/js/autosave-js.php', |
63 'wp-includes/js/autosave-js.php', |
67 'wp-includes/js/list-manipulation-js.php', |
64 'wp-includes/js/list-manipulation-js.php', |
68 'wp-includes/js/wp-ajax-js.php', |
65 'wp-includes/js/wp-ajax-js.php', |
69 // 2.3 |
66 // 2.3 |
70 'wp-admin/admin-db.php', |
67 'wp-admin/admin-db.php', |
104 'wp-admin/includes/upload.php', |
101 'wp-admin/includes/upload.php', |
105 'wp-admin/js/dbx-admin-key.js', |
102 'wp-admin/js/dbx-admin-key.js', |
106 'wp-admin/js/link-cat.js', |
103 'wp-admin/js/link-cat.js', |
107 'wp-admin/profile-update.php', |
104 'wp-admin/profile-update.php', |
108 'wp-admin/templates.php', |
105 'wp-admin/templates.php', |
109 'wp-includes/images/wlw/WpComments.png', |
|
110 'wp-includes/images/wlw/WpIcon.png', |
|
111 'wp-includes/images/wlw/WpWatermark.png', |
|
112 'wp-includes/js/dbx.js', |
106 'wp-includes/js/dbx.js', |
113 'wp-includes/js/fat.js', |
107 'wp-includes/js/fat.js', |
114 'wp-includes/js/list-manipulation.js', |
108 'wp-includes/js/list-manipulation.js', |
115 'wp-includes/js/tinymce/langs/en.js', |
109 'wp-includes/js/tinymce/langs/en.js', |
116 'wp-includes/js/tinymce/plugins/autosave/editor_plugin_src.js', |
|
117 'wp-includes/js/tinymce/plugins/autosave/langs', |
|
118 'wp-includes/js/tinymce/plugins/directionality/images', |
110 'wp-includes/js/tinymce/plugins/directionality/images', |
119 'wp-includes/js/tinymce/plugins/directionality/langs', |
111 'wp-includes/js/tinymce/plugins/directionality/langs', |
120 'wp-includes/js/tinymce/plugins/inlinepopups/css', |
|
121 'wp-includes/js/tinymce/plugins/inlinepopups/images', |
|
122 'wp-includes/js/tinymce/plugins/inlinepopups/jscripts', |
|
123 'wp-includes/js/tinymce/plugins/paste/images', |
112 'wp-includes/js/tinymce/plugins/paste/images', |
124 'wp-includes/js/tinymce/plugins/paste/jscripts', |
113 'wp-includes/js/tinymce/plugins/paste/jscripts', |
125 'wp-includes/js/tinymce/plugins/paste/langs', |
114 'wp-includes/js/tinymce/plugins/paste/langs', |
126 'wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php', |
|
127 'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php', |
|
128 'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php', |
|
129 'wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php', |
|
130 'wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css', |
|
131 'wp-includes/js/tinymce/plugins/spellchecker/images', |
|
132 'wp-includes/js/tinymce/plugins/spellchecker/langs', |
|
133 'wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php', |
|
134 'wp-includes/js/tinymce/plugins/wordpress/images', |
115 'wp-includes/js/tinymce/plugins/wordpress/images', |
135 'wp-includes/js/tinymce/plugins/wordpress/langs', |
116 'wp-includes/js/tinymce/plugins/wordpress/langs', |
136 'wp-includes/js/tinymce/plugins/wordpress/wordpress.css', |
117 'wp-includes/js/tinymce/plugins/wordpress/wordpress.css', |
137 'wp-includes/js/tinymce/plugins/wphelp', |
118 'wp-includes/js/tinymce/plugins/wphelp', |
138 'wp-includes/js/tinymce/themes/advanced/css', |
|
139 'wp-includes/js/tinymce/themes/advanced/images', |
|
140 'wp-includes/js/tinymce/themes/advanced/jscripts', |
|
141 'wp-includes/js/tinymce/themes/advanced/langs', |
|
142 // 2.5.1 |
119 // 2.5.1 |
143 'wp-includes/js/tinymce/tiny_mce_gzip.php', |
120 'wp-includes/js/tinymce/tiny_mce_gzip.php', |
144 // 2.6 |
121 // 2.6 |
145 'wp-admin/bookmarklet.php', |
122 'wp-admin/bookmarklet.php', |
146 'wp-includes/js/jquery/jquery.dimensions.min.js', |
123 'wp-includes/js/jquery/jquery.dimensions.min.js', |
180 'wp-includes/images/zip.png', |
157 'wp-includes/images/zip.png', |
181 'wp-includes/js/tinymce/tiny_mce_config.php', |
158 'wp-includes/js/tinymce/tiny_mce_config.php', |
182 'wp-includes/js/tinymce/tiny_mce_ext.js', |
159 'wp-includes/js/tinymce/tiny_mce_ext.js', |
183 // 2.8 |
160 // 2.8 |
184 'wp-admin/js/users.js', |
161 'wp-admin/js/users.js', |
185 'wp-includes/js/swfupload/plugins/swfupload.documentready.js', |
|
186 'wp-includes/js/swfupload/plugins/swfupload.graceful_degradation.js', |
|
187 'wp-includes/js/swfupload/swfupload_f9.swf', |
162 'wp-includes/js/swfupload/swfupload_f9.swf', |
188 'wp-includes/js/tinymce/plugins/autosave', |
163 'wp-includes/js/tinymce/plugins/autosave', |
189 'wp-includes/js/tinymce/plugins/paste/css', |
164 'wp-includes/js/tinymce/plugins/paste/css', |
190 'wp-includes/js/tinymce/utils/mclayer.js', |
165 'wp-includes/js/tinymce/utils/mclayer.js', |
191 'wp-includes/js/tinymce/wordpress.css', |
166 'wp-includes/js/tinymce/wordpress.css', |
192 // 2.8.5 |
|
193 'wp-admin/import/btt.php', |
|
194 'wp-admin/import/jkw.php', |
|
195 // 2.9 |
167 // 2.9 |
196 'wp-admin/js/page.dev.js', |
168 'wp-admin/js/page.dev.js', |
197 'wp-admin/js/page.js', |
169 'wp-admin/js/page.js', |
198 'wp-admin/js/set-post-thumbnail-handler.dev.js', |
170 'wp-admin/js/set-post-thumbnail-handler.dev.js', |
199 'wp-admin/js/set-post-thumbnail-handler.js', |
171 'wp-admin/js/set-post-thumbnail-handler.js', |
246 'wp-admin/rtl.dev.css', |
218 'wp-admin/rtl.dev.css', |
247 'wp-admin/update-links.php', |
219 'wp-admin/update-links.php', |
248 'wp-admin/wp-admin.css', |
220 'wp-admin/wp-admin.css', |
249 'wp-admin/wp-admin.dev.css', |
221 'wp-admin/wp-admin.dev.css', |
250 'wp-includes/js/codepress', |
222 'wp-includes/js/codepress', |
251 'wp-includes/js/codepress/engines/khtml.js', |
|
252 'wp-includes/js/codepress/engines/older.js', |
|
253 'wp-includes/js/jquery/autocomplete.dev.js', |
223 'wp-includes/js/jquery/autocomplete.dev.js', |
254 'wp-includes/js/jquery/autocomplete.js', |
224 'wp-includes/js/jquery/autocomplete.js', |
255 'wp-includes/js/jquery/interface.js', |
225 'wp-includes/js/jquery/interface.js', |
256 'wp-includes/js/scriptaculous/prototype.js', |
|
257 // Following file added back in 5.1, see #45645. |
226 // Following file added back in 5.1, see #45645. |
258 //'wp-includes/js/tinymce/wp-tinymce.js', |
227 //'wp-includes/js/tinymce/wp-tinymce.js', |
259 // 3.1 |
228 // 3.1 |
260 'wp-admin/edit-attachment-rows.php', |
229 'wp-admin/edit-attachment-rows.php', |
261 'wp-admin/edit-link-categories.php', |
230 'wp-admin/edit-link-categories.php', |
273 'wp-admin/images/visit-site-button-grad.gif', |
242 'wp-admin/images/visit-site-button-grad.gif', |
274 'wp-admin/link-category.php', |
243 'wp-admin/link-category.php', |
275 'wp-admin/sidebar.php', |
244 'wp-admin/sidebar.php', |
276 'wp-includes/classes.php', |
245 'wp-includes/classes.php', |
277 'wp-includes/js/tinymce/blank.htm', |
246 'wp-includes/js/tinymce/blank.htm', |
278 'wp-includes/js/tinymce/plugins/media/css/content.css', |
|
279 'wp-includes/js/tinymce/plugins/media/img', |
247 'wp-includes/js/tinymce/plugins/media/img', |
280 'wp-includes/js/tinymce/plugins/safari', |
248 'wp-includes/js/tinymce/plugins/safari', |
281 // 3.2 |
249 // 3.2 |
282 'wp-admin/images/logo-login.gif', |
250 'wp-admin/images/logo-login.gif', |
283 'wp-admin/images/star.gif', |
251 'wp-admin/images/star.gif', |
284 'wp-admin/js/list-table.dev.js', |
252 'wp-admin/js/list-table.dev.js', |
285 'wp-admin/js/list-table.js', |
253 'wp-admin/js/list-table.js', |
286 'wp-includes/default-embeds.php', |
254 'wp-includes/default-embeds.php', |
287 'wp-includes/js/tinymce/plugins/wordpress/img/help.gif', |
|
288 'wp-includes/js/tinymce/plugins/wordpress/img/more.gif', |
|
289 'wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif', |
|
290 'wp-includes/js/tinymce/themes/advanced/img/fm.gif', |
|
291 'wp-includes/js/tinymce/themes/advanced/img/sflogo.png', |
|
292 // 3.3 |
255 // 3.3 |
293 'wp-admin/css/colors-classic-rtl.css', |
256 'wp-admin/css/colors-classic-rtl.css', |
294 'wp-admin/css/colors-classic-rtl.dev.css', |
257 'wp-admin/css/colors-classic-rtl.dev.css', |
295 'wp-admin/css/colors-fresh-rtl.css', |
258 'wp-admin/css/colors-fresh-rtl.css', |
296 'wp-admin/css/colors-fresh-rtl.dev.css', |
259 'wp-admin/css/colors-fresh-rtl.dev.css', |
342 'wp-includes/js/l10n.dev.js', |
305 'wp-includes/js/l10n.dev.js', |
343 'wp-includes/js/l10n.js', |
306 'wp-includes/js/l10n.js', |
344 'wp-includes/js/tinymce/plugins/wplink/css', |
307 'wp-includes/js/tinymce/plugins/wplink/css', |
345 'wp-includes/js/tinymce/plugins/wplink/img', |
308 'wp-includes/js/tinymce/plugins/wplink/img', |
346 'wp-includes/js/tinymce/plugins/wplink/js', |
309 'wp-includes/js/tinymce/plugins/wplink/js', |
347 'wp-includes/js/tinymce/themes/advanced/img/wpicons.png', |
|
348 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/butt2.png', |
|
349 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/button_bg.png', |
|
350 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/down_arrow.gif', |
|
351 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/fade-butt.png', |
|
352 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/separator.gif', |
|
353 // Don't delete, yet: 'wp-rss.php', |
310 // Don't delete, yet: 'wp-rss.php', |
354 // Don't delete, yet: 'wp-rdf.php', |
311 // Don't delete, yet: 'wp-rdf.php', |
355 // Don't delete, yet: 'wp-rss2.php', |
312 // Don't delete, yet: 'wp-rss2.php', |
356 // Don't delete, yet: 'wp-commentsrss2.php', |
313 // Don't delete, yet: 'wp-commentsrss2.php', |
357 // Don't delete, yet: 'wp-atom.php', |
314 // Don't delete, yet: 'wp-atom.php', |
361 'wp-admin/images/logo-login.png', |
318 'wp-admin/images/logo-login.png', |
362 'wp-admin/images/star.png', |
319 'wp-admin/images/star.png', |
363 'wp-admin/index-extra.php', |
320 'wp-admin/index-extra.php', |
364 'wp-admin/network/index-extra.php', |
321 'wp-admin/network/index-extra.php', |
365 'wp-admin/user/index-extra.php', |
322 'wp-admin/user/index-extra.php', |
366 'wp-admin/images/screenshots/admin-flyouts.png', |
|
367 'wp-admin/images/screenshots/coediting.png', |
|
368 'wp-admin/images/screenshots/drag-and-drop.png', |
|
369 'wp-admin/images/screenshots/help-screen.png', |
|
370 'wp-admin/images/screenshots/media-icon.png', |
|
371 'wp-admin/images/screenshots/new-feature-pointer.png', |
|
372 'wp-admin/images/screenshots/welcome-screen.png', |
|
373 'wp-includes/css/editor-buttons.css', |
323 'wp-includes/css/editor-buttons.css', |
374 'wp-includes/css/editor-buttons.dev.css', |
324 'wp-includes/css/editor-buttons.dev.css', |
375 'wp-includes/js/tinymce/plugins/paste/blank.htm', |
325 'wp-includes/js/tinymce/plugins/paste/blank.htm', |
376 'wp-includes/js/tinymce/plugins/wordpress/css', |
326 'wp-includes/js/tinymce/plugins/wordpress/css', |
377 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js', |
327 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js', |
378 'wp-includes/js/tinymce/plugins/wordpress/img/embedded.png', |
|
379 'wp-includes/js/tinymce/plugins/wordpress/img/more_bug.gif', |
|
380 'wp-includes/js/tinymce/plugins/wordpress/img/page_bug.gif', |
|
381 'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js', |
328 'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js', |
382 'wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css', |
|
383 'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js', |
329 'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js', |
384 'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js', |
|
385 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js', |
330 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js', |
386 'wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png', |
|
387 'wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js', |
331 'wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js', |
388 // Don't delete, yet: 'wp-pass.php', |
332 // Don't delete, yet: 'wp-pass.php', |
389 // Don't delete, yet: 'wp-register.php', |
333 // Don't delete, yet: 'wp-register.php', |
390 // 3.5 |
334 // 3.5 |
391 'wp-admin/gears-manifest.php', |
335 'wp-admin/gears-manifest.php', |
496 'wp-admin/js/media.dev.js', |
440 'wp-admin/js/media.dev.js', |
497 'wp-admin/js/customize-controls.dev.js', |
441 'wp-admin/js/customize-controls.dev.js', |
498 'wp-admin/js/inline-edit-post.dev.js', |
442 'wp-admin/js/inline-edit-post.dev.js', |
499 'wp-admin/js/categories.dev.js', |
443 'wp-admin/js/categories.dev.js', |
500 'wp-admin/js/editor.dev.js', |
444 'wp-admin/js/editor.dev.js', |
501 'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.dev.js', |
|
502 'wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js', |
|
503 'wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.dev.js', |
|
504 'wp-includes/js/plupload/handlers.dev.js', |
445 'wp-includes/js/plupload/handlers.dev.js', |
505 'wp-includes/js/plupload/wp-plupload.dev.js', |
446 'wp-includes/js/plupload/wp-plupload.dev.js', |
506 'wp-includes/js/swfupload/handlers.dev.js', |
447 'wp-includes/js/swfupload/handlers.dev.js', |
507 'wp-includes/js/jcrop/jquery.Jcrop.dev.js', |
448 'wp-includes/js/jcrop/jquery.Jcrop.dev.js', |
508 'wp-includes/js/jcrop/jquery.Jcrop.js', |
449 'wp-includes/js/jcrop/jquery.Jcrop.js', |
525 'wp-includes/js/jquery/ui/jquery.effects.highlight.min.js', |
466 'wp-includes/js/jquery/ui/jquery.effects.highlight.min.js', |
526 'wp-includes/js/jquery/ui/jquery.effects.bounce.min.js', |
467 'wp-includes/js/jquery/ui/jquery.effects.bounce.min.js', |
527 'wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js', |
468 'wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js', |
528 'wp-includes/js/jquery/ui/jquery.effects.transfer.min.js', |
469 'wp-includes/js/jquery/ui/jquery.effects.transfer.min.js', |
529 'wp-includes/js/jquery/ui/jquery.effects.fold.min.js', |
470 'wp-includes/js/jquery/ui/jquery.effects.fold.min.js', |
530 'wp-admin/images/screenshots/captions-1.png', |
|
531 'wp-admin/images/screenshots/captions-2.png', |
|
532 'wp-admin/images/screenshots/flex-header-1.png', |
|
533 'wp-admin/images/screenshots/flex-header-2.png', |
|
534 'wp-admin/images/screenshots/flex-header-3.png', |
|
535 'wp-admin/images/screenshots/flex-header-media-library.png', |
|
536 'wp-admin/images/screenshots/theme-customizer.png', |
|
537 'wp-admin/images/screenshots/twitter-embed-1.png', |
|
538 'wp-admin/images/screenshots/twitter-embed-2.png', |
|
539 'wp-admin/js/utils.js', |
471 'wp-admin/js/utils.js', |
540 // Added back in 5.3 [45448], see #43895. |
472 // Added back in 5.3 [45448], see #43895. |
541 // 'wp-admin/options-privacy.php', |
473 // 'wp-admin/options-privacy.php', |
542 'wp-app.php', |
474 'wp-app.php', |
543 'wp-includes/class-wp-atom-server.php', |
475 'wp-includes/class-wp-atom-server.php', |
544 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css', |
|
545 // 3.5.2 |
476 // 3.5.2 |
546 'wp-includes/js/swfupload/swfupload-all.js', |
477 'wp-includes/js/swfupload/swfupload-all.js', |
547 // 3.6 |
478 // 3.6 |
548 'wp-admin/js/revisions-js.php', |
479 'wp-admin/js/revisions-js.php', |
549 'wp-admin/images/screenshots', |
480 'wp-admin/images/screenshots', |
552 'wp-admin/js/custom-fields.js', |
483 'wp-admin/js/custom-fields.js', |
553 'wp-admin/js/custom-fields.min.js', |
484 'wp-admin/js/custom-fields.min.js', |
554 // 3.7 |
485 // 3.7 |
555 'wp-admin/js/cat.js', |
486 'wp-admin/js/cat.js', |
556 'wp-admin/js/cat.min.js', |
487 'wp-admin/js/cat.min.js', |
557 'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js', |
|
558 // 3.8 |
488 // 3.8 |
559 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/page_bug.gif', |
|
560 'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/more_bug.gif', |
|
561 'wp-includes/js/thickbox/tb-close-2x.png', |
489 'wp-includes/js/thickbox/tb-close-2x.png', |
562 'wp-includes/js/thickbox/tb-close.png', |
490 'wp-includes/js/thickbox/tb-close.png', |
563 'wp-includes/images/wpmini-blue-2x.png', |
491 'wp-includes/images/wpmini-blue-2x.png', |
564 'wp-includes/images/wpmini-blue.png', |
492 'wp-includes/images/wpmini-blue.png', |
565 'wp-admin/css/colors-fresh.css', |
493 'wp-admin/css/colors-fresh.css', |
626 'wp-includes/js/tinymce/plugins/wpdialogs/js', |
554 'wp-includes/js/tinymce/plugins/wpdialogs/js', |
627 'wp-includes/js/tinymce/plugins/wpeditimage/img', |
555 'wp-includes/js/tinymce/plugins/wpeditimage/img', |
628 'wp-includes/js/tinymce/plugins/wpeditimage/js', |
556 'wp-includes/js/tinymce/plugins/wpeditimage/js', |
629 'wp-includes/js/tinymce/plugins/wpeditimage/css', |
557 'wp-includes/js/tinymce/plugins/wpeditimage/css', |
630 'wp-includes/js/tinymce/plugins/wpgallery/img', |
558 'wp-includes/js/tinymce/plugins/wpgallery/img', |
631 'wp-includes/js/tinymce/plugins/wpfullscreen/css', |
|
632 'wp-includes/js/tinymce/plugins/paste/js', |
559 'wp-includes/js/tinymce/plugins/paste/js', |
633 'wp-includes/js/tinymce/themes/advanced', |
560 'wp-includes/js/tinymce/themes/advanced', |
634 'wp-includes/js/tinymce/tiny_mce.js', |
561 'wp-includes/js/tinymce/tiny_mce.js', |
635 'wp-includes/js/tinymce/mark_loaded_src.js', |
562 'wp-includes/js/tinymce/mark_loaded_src.js', |
636 'wp-includes/js/tinymce/wp-tinymce-schema.js', |
563 'wp-includes/js/tinymce/wp-tinymce-schema.js', |
655 'wp-includes/js/tinymce/plugins/wplink/editor_plugin.js', |
582 'wp-includes/js/tinymce/plugins/wplink/editor_plugin.js', |
656 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js', |
583 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js', |
657 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js', |
584 'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js', |
658 'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js', |
585 'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js', |
659 'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js', |
586 'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js', |
660 'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.js', |
|
661 'wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js', |
|
662 'wp-includes/js/tinymce/plugins/paste/editor_plugin.js', |
587 'wp-includes/js/tinymce/plugins/paste/editor_plugin.js', |
663 'wp-includes/js/tinymce/plugins/paste/pasteword.htm', |
588 'wp-includes/js/tinymce/plugins/paste/pasteword.htm', |
664 'wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js', |
589 'wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js', |
665 'wp-includes/js/tinymce/plugins/paste/pastetext.htm', |
590 'wp-includes/js/tinymce/plugins/paste/pastetext.htm', |
666 'wp-includes/js/tinymce/langs/wp-langs.php', |
591 'wp-includes/js/tinymce/langs/wp-langs.php', |
746 'wp-includes/js/plupload/plupload.silverlight.xap', |
671 'wp-includes/js/plupload/plupload.silverlight.xap', |
747 'wp-includes/js/swfupload/plugins', |
672 'wp-includes/js/swfupload/plugins', |
748 'wp-includes/js/swfupload/swfupload.swf', |
673 'wp-includes/js/swfupload/swfupload.swf', |
749 // 4.9.2 |
674 // 4.9.2 |
750 'wp-includes/js/mediaelement/lang', |
675 'wp-includes/js/mediaelement/lang', |
751 'wp-includes/js/mediaelement/lang/ca.js', |
|
752 'wp-includes/js/mediaelement/lang/cs.js', |
|
753 'wp-includes/js/mediaelement/lang/de.js', |
|
754 'wp-includes/js/mediaelement/lang/es.js', |
|
755 'wp-includes/js/mediaelement/lang/fa.js', |
|
756 'wp-includes/js/mediaelement/lang/fr.js', |
|
757 'wp-includes/js/mediaelement/lang/hr.js', |
|
758 'wp-includes/js/mediaelement/lang/hu.js', |
|
759 'wp-includes/js/mediaelement/lang/it.js', |
|
760 'wp-includes/js/mediaelement/lang/ja.js', |
|
761 'wp-includes/js/mediaelement/lang/ko.js', |
|
762 'wp-includes/js/mediaelement/lang/nl.js', |
|
763 'wp-includes/js/mediaelement/lang/pl.js', |
|
764 'wp-includes/js/mediaelement/lang/pt.js', |
|
765 'wp-includes/js/mediaelement/lang/ro.js', |
|
766 'wp-includes/js/mediaelement/lang/ru.js', |
|
767 'wp-includes/js/mediaelement/lang/sk.js', |
|
768 'wp-includes/js/mediaelement/lang/sv.js', |
|
769 'wp-includes/js/mediaelement/lang/uk.js', |
|
770 'wp-includes/js/mediaelement/lang/zh-cn.js', |
|
771 'wp-includes/js/mediaelement/lang/zh.js', |
|
772 'wp-includes/js/mediaelement/mediaelement-flash-audio-ogg.swf', |
676 'wp-includes/js/mediaelement/mediaelement-flash-audio-ogg.swf', |
773 'wp-includes/js/mediaelement/mediaelement-flash-audio.swf', |
677 'wp-includes/js/mediaelement/mediaelement-flash-audio.swf', |
774 'wp-includes/js/mediaelement/mediaelement-flash-video-hls.swf', |
678 'wp-includes/js/mediaelement/mediaelement-flash-video-hls.swf', |
775 'wp-includes/js/mediaelement/mediaelement-flash-video-mdash.swf', |
679 'wp-includes/js/mediaelement/mediaelement-flash-video-mdash.swf', |
776 'wp-includes/js/mediaelement/mediaelement-flash-video.swf', |
680 'wp-includes/js/mediaelement/mediaelement-flash-video.swf', |
783 'wp-includes/js/mediaelement/renderers/twitch.js', |
687 'wp-includes/js/mediaelement/renderers/twitch.js', |
784 'wp-includes/js/mediaelement/renderers/twitch.min.js', |
688 'wp-includes/js/mediaelement/renderers/twitch.min.js', |
785 // 5.0 |
689 // 5.0 |
786 'wp-includes/js/codemirror/jshint.js', |
690 'wp-includes/js/codemirror/jshint.js', |
787 // 5.1 |
691 // 5.1 |
788 'wp-includes/random_compat/random_bytes_openssl.php', |
|
789 'wp-includes/js/tinymce/wp-tinymce.js.gz', |
692 'wp-includes/js/tinymce/wp-tinymce.js.gz', |
790 // 5.3 |
693 // 5.3 |
791 'wp-includes/js/wp-a11y.js', // Moved to: wp-includes/js/dist/a11y.js |
694 'wp-includes/js/wp-a11y.js', // Moved to: wp-includes/js/dist/a11y.js |
792 'wp-includes/js/wp-a11y.min.js', // Moved to: wp-includes/js/dist/a11y.min.js |
695 'wp-includes/js/wp-a11y.min.js', // Moved to: wp-includes/js/dist/a11y.min.js |
793 // 5.4 |
696 // 5.4 |
818 'wp-includes/block-patterns/two-images.php', |
721 'wp-includes/block-patterns/two-images.php', |
819 'wp-includes/block-patterns/three-buttons.php', |
722 'wp-includes/block-patterns/three-buttons.php', |
820 'wp-includes/block-patterns/text-two-columns-with-images.php', |
723 'wp-includes/block-patterns/text-two-columns-with-images.php', |
821 'wp-includes/block-patterns/text-two-columns.php', |
724 'wp-includes/block-patterns/text-two-columns.php', |
822 'wp-includes/block-patterns/large-header-button.php', |
725 'wp-includes/block-patterns/large-header-button.php', |
823 'wp-includes/blocks/subhead/block.json', |
|
824 'wp-includes/blocks/subhead', |
726 'wp-includes/blocks/subhead', |
825 'wp-includes/css/dist/editor/editor-styles.css', |
727 'wp-includes/css/dist/editor/editor-styles.css', |
826 'wp-includes/css/dist/editor/editor-styles.min.css', |
728 'wp-includes/css/dist/editor/editor-styles.min.css', |
827 'wp-includes/css/dist/editor/editor-styles-rtl.css', |
729 'wp-includes/css/dist/editor/editor-styles-rtl.css', |
828 'wp-includes/css/dist/editor/editor-styles-rtl.min.css', |
730 'wp-includes/css/dist/editor/editor-styles-rtl.min.css', |
829 // 5.9 |
731 // 5.9 |
830 'wp-includes/blocks/heading/editor.css', |
732 'wp-includes/blocks/heading/editor.css', |
831 'wp-includes/blocks/heading/editor.min.css', |
733 'wp-includes/blocks/heading/editor.min.css', |
832 'wp-includes/blocks/heading/editor-rtl.css', |
734 'wp-includes/blocks/heading/editor-rtl.css', |
833 'wp-includes/blocks/heading/editor-rtl.min.css', |
735 'wp-includes/blocks/heading/editor-rtl.min.css', |
834 'wp-includes/blocks/post-content/editor.css', |
|
835 'wp-includes/blocks/post-content/editor.min.css', |
|
836 'wp-includes/blocks/post-content/editor-rtl.css', |
|
837 'wp-includes/blocks/post-content/editor-rtl.min.css', |
|
838 'wp-includes/blocks/query-title/editor.css', |
736 'wp-includes/blocks/query-title/editor.css', |
839 'wp-includes/blocks/query-title/editor.min.css', |
737 'wp-includes/blocks/query-title/editor.min.css', |
840 'wp-includes/blocks/query-title/editor-rtl.css', |
738 'wp-includes/blocks/query-title/editor-rtl.css', |
841 'wp-includes/blocks/query-title/editor-rtl.min.css', |
739 'wp-includes/blocks/query-title/editor-rtl.min.css', |
842 'wp-includes/blocks/tag-cloud/editor.css', |
740 'wp-includes/blocks/tag-cloud/editor.css', |
843 'wp-includes/blocks/tag-cloud/editor.min.css', |
741 'wp-includes/blocks/tag-cloud/editor.min.css', |
844 'wp-includes/blocks/tag-cloud/editor-rtl.css', |
742 'wp-includes/blocks/tag-cloud/editor-rtl.css', |
845 'wp-includes/blocks/tag-cloud/editor-rtl.min.css', |
743 'wp-includes/blocks/tag-cloud/editor-rtl.min.css', |
846 // 6.0 |
744 // 6.1 |
847 'wp-content/themes/twentytwentytwo/assets/fonts/LICENSE.md', |
745 'wp-includes/blocks/post-comments.php', |
746 'wp-includes/blocks/post-comments', |
|
747 'wp-includes/blocks/comments-query-loop', |
|
748 // 6.3 |
|
749 'wp-includes/images/wlw', |
|
750 'wp-includes/wlwmanifest.xml', |
|
751 'wp-includes/random_compat', |
|
752 // 6.4 |
|
753 'wp-includes/navigation-fallback.php', |
|
754 'wp-includes/blocks/navigation/view-modal.min.js', |
|
755 'wp-includes/blocks/navigation/view-modal.js', |
|
756 // 6.5 |
|
757 'wp-includes/ID3/license.commercial.txt', |
|
758 'wp-includes/blocks/query/style-rtl.min.css', |
|
759 'wp-includes/blocks/query/style.min.css', |
|
760 'wp-includes/blocks/query/style-rtl.css', |
|
761 'wp-includes/blocks/query/style.css', |
|
762 'wp-admin/images/about-header-privacy.svg', |
|
763 'wp-admin/images/about-header-about.svg', |
|
764 'wp-admin/images/about-header-credits.svg', |
|
765 'wp-admin/images/about-header-freedoms.svg', |
|
766 'wp-admin/images/about-header-contribute.svg', |
|
767 'wp-admin/images/about-header-background.svg', |
|
768 // 6.6 |
|
769 'wp-includes/blocks/block/editor.css', |
|
770 'wp-includes/blocks/block/editor.min.css', |
|
771 'wp-includes/blocks/block/editor-rtl.css', |
|
772 'wp-includes/blocks/block/editor-rtl.min.css', |
|
773 ); |
|
774 |
|
775 /** |
|
776 * Stores Requests files to be preloaded and deleted. |
|
777 * |
|
778 * For classes/interfaces, use the class/interface name |
|
779 * as the array key. |
|
780 * |
|
781 * All other files/directories should not have a key. |
|
782 * |
|
783 * @since 6.2.0 |
|
784 * |
|
785 * @global array $_old_requests_files |
|
786 * @var array |
|
787 * @name $_old_requests_files |
|
788 */ |
|
789 global $_old_requests_files; |
|
790 |
|
791 $_old_requests_files = array( |
|
792 // Interfaces. |
|
793 'Requests_Auth' => 'wp-includes/Requests/Auth.php', |
|
794 'Requests_Hooker' => 'wp-includes/Requests/Hooker.php', |
|
795 'Requests_Proxy' => 'wp-includes/Requests/Proxy.php', |
|
796 'Requests_Transport' => 'wp-includes/Requests/Transport.php', |
|
797 |
|
798 // Classes. |
|
799 'Requests_Auth_Basic' => 'wp-includes/Requests/Auth/Basic.php', |
|
800 'Requests_Cookie_Jar' => 'wp-includes/Requests/Cookie/Jar.php', |
|
801 'Requests_Exception_HTTP' => 'wp-includes/Requests/Exception/HTTP.php', |
|
802 'Requests_Exception_Transport' => 'wp-includes/Requests/Exception/Transport.php', |
|
803 'Requests_Exception_HTTP_304' => 'wp-includes/Requests/Exception/HTTP/304.php', |
|
804 'Requests_Exception_HTTP_305' => 'wp-includes/Requests/Exception/HTTP/305.php', |
|
805 'Requests_Exception_HTTP_306' => 'wp-includes/Requests/Exception/HTTP/306.php', |
|
806 'Requests_Exception_HTTP_400' => 'wp-includes/Requests/Exception/HTTP/400.php', |
|
807 'Requests_Exception_HTTP_401' => 'wp-includes/Requests/Exception/HTTP/401.php', |
|
808 'Requests_Exception_HTTP_402' => 'wp-includes/Requests/Exception/HTTP/402.php', |
|
809 'Requests_Exception_HTTP_403' => 'wp-includes/Requests/Exception/HTTP/403.php', |
|
810 'Requests_Exception_HTTP_404' => 'wp-includes/Requests/Exception/HTTP/404.php', |
|
811 'Requests_Exception_HTTP_405' => 'wp-includes/Requests/Exception/HTTP/405.php', |
|
812 'Requests_Exception_HTTP_406' => 'wp-includes/Requests/Exception/HTTP/406.php', |
|
813 'Requests_Exception_HTTP_407' => 'wp-includes/Requests/Exception/HTTP/407.php', |
|
814 'Requests_Exception_HTTP_408' => 'wp-includes/Requests/Exception/HTTP/408.php', |
|
815 'Requests_Exception_HTTP_409' => 'wp-includes/Requests/Exception/HTTP/409.php', |
|
816 'Requests_Exception_HTTP_410' => 'wp-includes/Requests/Exception/HTTP/410.php', |
|
817 'Requests_Exception_HTTP_411' => 'wp-includes/Requests/Exception/HTTP/411.php', |
|
818 'Requests_Exception_HTTP_412' => 'wp-includes/Requests/Exception/HTTP/412.php', |
|
819 'Requests_Exception_HTTP_413' => 'wp-includes/Requests/Exception/HTTP/413.php', |
|
820 'Requests_Exception_HTTP_414' => 'wp-includes/Requests/Exception/HTTP/414.php', |
|
821 'Requests_Exception_HTTP_415' => 'wp-includes/Requests/Exception/HTTP/415.php', |
|
822 'Requests_Exception_HTTP_416' => 'wp-includes/Requests/Exception/HTTP/416.php', |
|
823 'Requests_Exception_HTTP_417' => 'wp-includes/Requests/Exception/HTTP/417.php', |
|
824 'Requests_Exception_HTTP_418' => 'wp-includes/Requests/Exception/HTTP/418.php', |
|
825 'Requests_Exception_HTTP_428' => 'wp-includes/Requests/Exception/HTTP/428.php', |
|
826 'Requests_Exception_HTTP_429' => 'wp-includes/Requests/Exception/HTTP/429.php', |
|
827 'Requests_Exception_HTTP_431' => 'wp-includes/Requests/Exception/HTTP/431.php', |
|
828 'Requests_Exception_HTTP_500' => 'wp-includes/Requests/Exception/HTTP/500.php', |
|
829 'Requests_Exception_HTTP_501' => 'wp-includes/Requests/Exception/HTTP/501.php', |
|
830 'Requests_Exception_HTTP_502' => 'wp-includes/Requests/Exception/HTTP/502.php', |
|
831 'Requests_Exception_HTTP_503' => 'wp-includes/Requests/Exception/HTTP/503.php', |
|
832 'Requests_Exception_HTTP_504' => 'wp-includes/Requests/Exception/HTTP/504.php', |
|
833 'Requests_Exception_HTTP_505' => 'wp-includes/Requests/Exception/HTTP/505.php', |
|
834 'Requests_Exception_HTTP_511' => 'wp-includes/Requests/Exception/HTTP/511.php', |
|
835 'Requests_Exception_HTTP_Unknown' => 'wp-includes/Requests/Exception/HTTP/Unknown.php', |
|
836 'Requests_Exception_Transport_cURL' => 'wp-includes/Requests/Exception/Transport/cURL.php', |
|
837 'Requests_Proxy_HTTP' => 'wp-includes/Requests/Proxy/HTTP.php', |
|
838 'Requests_Response_Headers' => 'wp-includes/Requests/Response/Headers.php', |
|
839 'Requests_Transport_cURL' => 'wp-includes/Requests/Transport/cURL.php', |
|
840 'Requests_Transport_fsockopen' => 'wp-includes/Requests/Transport/fsockopen.php', |
|
841 'Requests_Utility_CaseInsensitiveDictionary' => 'wp-includes/Requests/Utility/CaseInsensitiveDictionary.php', |
|
842 'Requests_Utility_FilteredIterator' => 'wp-includes/Requests/Utility/FilteredIterator.php', |
|
843 'Requests_Cookie' => 'wp-includes/Requests/Cookie.php', |
|
844 'Requests_Exception' => 'wp-includes/Requests/Exception.php', |
|
845 'Requests_Hooks' => 'wp-includes/Requests/Hooks.php', |
|
846 'Requests_IDNAEncoder' => 'wp-includes/Requests/IDNAEncoder.php', |
|
847 'Requests_IPv6' => 'wp-includes/Requests/IPv6.php', |
|
848 'Requests_IRI' => 'wp-includes/Requests/IRI.php', |
|
849 'Requests_Response' => 'wp-includes/Requests/Response.php', |
|
850 'Requests_SSL' => 'wp-includes/Requests/SSL.php', |
|
851 'Requests_Session' => 'wp-includes/Requests/Session.php', |
|
852 |
|
853 // Directories. |
|
854 'wp-includes/Requests/Auth/', |
|
855 'wp-includes/Requests/Cookie/', |
|
856 'wp-includes/Requests/Exception/HTTP/', |
|
857 'wp-includes/Requests/Exception/Transport/', |
|
858 'wp-includes/Requests/Exception/', |
|
859 'wp-includes/Requests/Proxy/', |
|
860 'wp-includes/Requests/Response/', |
|
861 'wp-includes/Requests/Transport/', |
|
862 'wp-includes/Requests/Utility/', |
|
848 ); |
863 ); |
849 |
864 |
850 /** |
865 /** |
851 * Stores new files in wp-content to copy |
866 * Stores new files in wp-content to copy |
852 * |
867 * |
853 * The contents of this array indicate any new bundled plugins/themes which |
868 * The contents of this array indicate any new bundled plugins/themes which |
854 * should be installed with the WordPress Upgrade. These items will not be |
869 * should be installed with the WordPress Upgrade. These items will not be |
855 * re-installed in future upgrades, this behaviour is controlled by the |
870 * re-installed in future upgrades, this behavior is controlled by the |
856 * introduced version present here being older than the current installed version. |
871 * introduced version present here being older than the current installed version. |
857 * |
872 * |
858 * The content of this array should follow the following format: |
873 * The content of this array should follow the following format: |
859 * Filename (relative to wp-content) => Introduced version |
874 * Filename (relative to wp-content) => Introduced version |
860 * Directories should be noted by suffixing it with a trailing slash (/) |
875 * Directories should be noted by suffixing it with a trailing slash (/) |
869 * @name $_new_bundled_files |
884 * @name $_new_bundled_files |
870 */ |
885 */ |
871 global $_new_bundled_files; |
886 global $_new_bundled_files; |
872 |
887 |
873 $_new_bundled_files = array( |
888 $_new_bundled_files = array( |
874 'plugins/akismet/' => '2.0', |
889 'plugins/akismet/' => '2.0', |
875 'themes/twentyten/' => '3.0', |
890 'themes/twentyten/' => '3.0', |
876 'themes/twentyeleven/' => '3.2', |
891 'themes/twentyeleven/' => '3.2', |
877 'themes/twentytwelve/' => '3.5', |
892 'themes/twentytwelve/' => '3.5', |
878 'themes/twentythirteen/' => '3.6', |
893 'themes/twentythirteen/' => '3.6', |
879 'themes/twentyfourteen/' => '3.8', |
894 'themes/twentyfourteen/' => '3.8', |
880 'themes/twentyfifteen/' => '4.1', |
895 'themes/twentyfifteen/' => '4.1', |
881 'themes/twentysixteen/' => '4.4', |
896 'themes/twentysixteen/' => '4.4', |
882 'themes/twentyseventeen/' => '4.7', |
897 'themes/twentyseventeen/' => '4.7', |
883 'themes/twentynineteen/' => '5.0', |
898 'themes/twentynineteen/' => '5.0', |
884 'themes/twentytwenty/' => '5.3', |
899 'themes/twentytwenty/' => '5.3', |
885 'themes/twentytwentyone/' => '5.6', |
900 'themes/twentytwentyone/' => '5.6', |
886 'themes/twentytwentytwo/' => '5.9', |
901 'themes/twentytwentytwo/' => '5.9', |
902 'themes/twentytwentythree/' => '6.1', |
|
903 'themes/twentytwentyfour/' => '6.4', |
|
887 ); |
904 ); |
888 |
905 |
889 /** |
906 /** |
890 * Upgrades the core of WordPress. |
907 * Upgrades the core of WordPress. |
891 * |
908 * |
892 * This will create a .maintenance file at the base of the WordPress directory |
909 * This will create a .maintenance file at the base of the WordPress directory |
893 * to ensure that people can not access the web site, when the files are being |
910 * to ensure that people can not access the website, when the files are being |
894 * copied to their locations. |
911 * copied to their locations. |
895 * |
912 * |
896 * The files in the `$_old_files` list will be removed and the new files |
913 * The files in the `$_old_files` list will be removed and the new files |
897 * copied from the zip file after the database is upgraded. |
914 * copied from the zip file after the database is upgraded. |
898 * |
915 * |
928 * |
945 * |
929 * @since 2.7.0 |
946 * @since 2.7.0 |
930 * |
947 * |
931 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. |
948 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. |
932 * @global array $_old_files |
949 * @global array $_old_files |
950 * @global array $_old_requests_files |
|
933 * @global array $_new_bundled_files |
951 * @global array $_new_bundled_files |
934 * @global wpdb $wpdb WordPress database abstraction object. |
952 * @global wpdb $wpdb WordPress database abstraction object. |
935 * @global string $wp_version |
953 * @global string $wp_version |
936 * @global string $required_php_version |
954 * @global string $required_php_version |
937 * @global string $required_mysql_version |
955 * @global string $required_mysql_version |
939 * @param string $from New release unzipped path. |
957 * @param string $from New release unzipped path. |
940 * @param string $to Path to old WordPress installation. |
958 * @param string $to Path to old WordPress installation. |
941 * @return string|WP_Error New WordPress version on success, WP_Error on failure. |
959 * @return string|WP_Error New WordPress version on success, WP_Error on failure. |
942 */ |
960 */ |
943 function update_core( $from, $to ) { |
961 function update_core( $from, $to ) { |
944 global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb; |
962 global $wp_filesystem, $_old_files, $_old_requests_files, $_new_bundled_files, $wpdb; |
945 |
963 |
946 set_time_limit( 300 ); |
964 if ( function_exists( 'set_time_limit' ) ) { |
965 set_time_limit( 300 ); |
|
966 } |
|
967 |
|
968 /* |
|
969 * Merge the old Requests files and directories into the `$_old_files`. |
|
970 * Then preload these Requests files first, before the files are deleted |
|
971 * and replaced to ensure the code is in memory if needed. |
|
972 */ |
|
973 $_old_files = array_merge( $_old_files, array_values( $_old_requests_files ) ); |
|
974 _preload_old_requests_classes_and_interfaces( $to ); |
|
947 |
975 |
948 /** |
976 /** |
949 * Filters feedback messages displayed during the core update process. |
977 * Filters feedback messages displayed during the core update process. |
950 * |
978 * |
951 * The filter is first evaluated after the zip file for the latest version |
979 * The filter is first evaluated after the zip file for the latest version |
962 * |
990 * |
963 * @param string $feedback The core update feedback messages. |
991 * @param string $feedback The core update feedback messages. |
964 */ |
992 */ |
965 apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); |
993 apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); |
966 |
994 |
967 // Sanity check the unzipped distribution. |
995 // Confidence check the unzipped distribution. |
968 $distro = ''; |
996 $distro = ''; |
969 $roots = array( '/wordpress/', '/wordpress-mu/' ); |
997 $roots = array( '/wordpress/', '/wordpress-mu/' ); |
970 |
998 |
971 foreach ( $roots as $root ) { |
999 foreach ( $roots as $root ) { |
972 if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) |
1000 if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) |
1012 } |
1040 } |
1013 |
1041 |
1014 require WP_CONTENT_DIR . '/upgrade/version-current.php'; |
1042 require WP_CONTENT_DIR . '/upgrade/version-current.php'; |
1015 $wp_filesystem->delete( $versions_file ); |
1043 $wp_filesystem->delete( $versions_file ); |
1016 |
1044 |
1017 $php_version = phpversion(); |
1045 $php_version = PHP_VERSION; |
1018 $mysql_version = $wpdb->db_version(); |
1046 $mysql_version = $wpdb->db_version(); |
1019 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. |
1047 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. |
1048 /* |
|
1049 * Note: str_contains() is not used here, as this file is included |
|
1050 * when updating from older WordPress versions, in which case |
|
1051 * the polyfills from wp-includes/compat.php may not be available. |
|
1052 */ |
|
1020 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. |
1053 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. |
1021 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
1054 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
1022 |
1055 |
1023 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) { |
1056 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) { |
1024 $mysql_compat = true; |
1057 $mysql_compat = true; |
1099 } |
1132 } |
1100 |
1133 |
1101 /** This filter is documented in wp-admin/includes/update-core.php */ |
1134 /** This filter is documented in wp-admin/includes/update-core.php */ |
1102 apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) ); |
1135 apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) ); |
1103 |
1136 |
1104 // Don't copy wp-content, we'll deal with that below. |
1137 /* |
1105 // We also copy version.php last so failed updates report their old version. |
1138 * Don't copy wp-content, we'll deal with that below. |
1139 * We also copy version.php last so failed updates report their old version. |
|
1140 */ |
|
1106 $skip = array( 'wp-content', 'wp-includes/version.php' ); |
1141 $skip = array( 'wp-content', 'wp-includes/version.php' ); |
1107 $check_is_writable = array(); |
1142 $check_is_writable = array(); |
1108 |
1143 |
1109 // Check to see which files don't really need updating - only available for 3.7 and higher. |
1144 // Check to see which files don't really need updating - only available for 3.7 and higher. |
1110 if ( function_exists( 'get_core_checksums' ) ) { |
1145 if ( function_exists( 'get_core_checksums' ) ) { |
1117 $checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2. |
1152 $checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2. |
1118 } |
1153 } |
1119 |
1154 |
1120 if ( is_array( $checksums ) ) { |
1155 if ( is_array( $checksums ) ) { |
1121 foreach ( $checksums as $file => $checksum ) { |
1156 foreach ( $checksums as $file => $checksum ) { |
1157 /* |
|
1158 * Note: str_starts_with() is not used here, as this file is included |
|
1159 * when updating from older WordPress versions, in which case |
|
1160 * the polyfills from wp-includes/compat.php may not be available. |
|
1161 */ |
|
1122 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1162 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1123 continue; |
1163 continue; |
1124 } |
1164 } |
1125 |
1165 |
1126 if ( ! file_exists( ABSPATH . $file ) ) { |
1166 if ( ! file_exists( ABSPATH . $file ) ) { |
1166 $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; |
1206 $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; |
1167 |
1207 |
1168 if ( $files_not_writable ) { |
1208 if ( $files_not_writable ) { |
1169 return new WP_Error( |
1209 return new WP_Error( |
1170 'files_not_writable', |
1210 'files_not_writable', |
1171 __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), |
1211 __( 'The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.' ), |
1172 implode( ', ', $error_data ) |
1212 implode( ', ', $error_data ) |
1173 ); |
1213 ); |
1174 } |
1214 } |
1175 } |
1215 } |
1176 } |
1216 } |
1186 |
1226 |
1187 /** This filter is documented in wp-admin/includes/update-core.php */ |
1227 /** This filter is documented in wp-admin/includes/update-core.php */ |
1188 apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); |
1228 apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); |
1189 |
1229 |
1190 // Copy new versions of WP files into place. |
1230 // Copy new versions of WP files into place. |
1191 $result = _copy_dir( $from . $distro, $to, $skip ); |
1231 $result = copy_dir( $from . $distro, $to, $skip ); |
1192 |
1232 |
1193 if ( is_wp_error( $result ) ) { |
1233 if ( is_wp_error( $result ) ) { |
1194 $result = new WP_Error( |
1234 $result = new WP_Error( |
1195 $result->get_error_code(), |
1235 $result->get_error_code(), |
1196 $result->get_error_message(), |
1236 $result->get_error_message(), |
1202 if ( ! is_wp_error( $result ) ) { |
1242 if ( ! is_wp_error( $result ) ) { |
1203 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { |
1243 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { |
1204 $wp_filesystem->delete( $from, true ); |
1244 $wp_filesystem->delete( $from, true ); |
1205 $result = new WP_Error( |
1245 $result = new WP_Error( |
1206 'copy_failed_for_version_file', |
1246 'copy_failed_for_version_file', |
1207 __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), |
1247 __( 'The update cannot be installed because your site is unable to copy some files. This is usually due to inconsistent file permissions.' ), |
1208 'wp-includes/version.php' |
1248 'wp-includes/version.php' |
1209 ); |
1249 ); |
1210 } |
1250 } |
1211 |
1251 |
1212 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); |
1252 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); |
1224 $skip = array( 'wp-content' ); |
1264 $skip = array( 'wp-content' ); |
1225 $failed = array(); |
1265 $failed = array(); |
1226 |
1266 |
1227 if ( isset( $checksums ) && is_array( $checksums ) ) { |
1267 if ( isset( $checksums ) && is_array( $checksums ) ) { |
1228 foreach ( $checksums as $file => $checksum ) { |
1268 foreach ( $checksums as $file => $checksum ) { |
1269 /* |
|
1270 * Note: str_starts_with() is not used here, as this file is included |
|
1271 * when updating from older WordPress versions, in which case |
|
1272 * the polyfills from wp-includes/compat.php may not be available. |
|
1273 */ |
|
1229 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1274 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1230 continue; |
1275 continue; |
1231 } |
1276 } |
1232 |
1277 |
1233 if ( ! file_exists( $working_dir_local . $file ) ) { |
1278 if ( ! file_exists( $working_dir_local . $file ) ) { |
1257 if ( file_exists( $working_dir_local . $file ) ) { |
1302 if ( file_exists( $working_dir_local . $file ) ) { |
1258 $total_size += filesize( $working_dir_local . $file ); |
1303 $total_size += filesize( $working_dir_local . $file ); |
1259 } |
1304 } |
1260 } |
1305 } |
1261 |
1306 |
1262 // If we don't have enough free space, it isn't worth trying again. |
1307 /* |
1263 // Unlikely to be hit due to the check in unzip_file(). |
1308 * If we don't have enough free space, it isn't worth trying again. |
1309 * Unlikely to be hit due to the check in unzip_file(). |
|
1310 */ |
|
1264 $available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( ABSPATH ) : false; |
1311 $available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( ABSPATH ) : false; |
1265 |
1312 |
1266 if ( $available_space && $total_size >= $available_space ) { |
1313 if ( $available_space && $total_size >= $available_space ) { |
1267 $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); |
1314 $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); |
1268 } else { |
1315 } else { |
1269 $result = _copy_dir( $from . $distro, $to, $skip ); |
1316 $result = copy_dir( $from . $distro, $to, $skip ); |
1270 |
1317 |
1271 if ( is_wp_error( $result ) ) { |
1318 if ( is_wp_error( $result ) ) { |
1272 $result = new WP_Error( |
1319 $result = new WP_Error( |
1273 $result->get_error_code() . '_retry', |
1320 $result->get_error_code() . '_retry', |
1274 $result->get_error_message(), |
1321 $result->get_error_message(), |
1276 ); |
1323 ); |
1277 } |
1324 } |
1278 } |
1325 } |
1279 } |
1326 } |
1280 |
1327 |
1281 // Custom content directory needs updating now. |
1328 /* |
1282 // Copy languages. |
1329 * Custom content directory needs updating now. |
1330 * Copy languages. |
|
1331 */ |
|
1283 if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) { |
1332 if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) { |
1284 if ( WP_LANG_DIR !== ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) { |
1333 if ( WP_LANG_DIR !== ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) { |
1285 $lang_dir = WP_LANG_DIR; |
1334 $lang_dir = WP_LANG_DIR; |
1286 } else { |
1335 } else { |
1287 $lang_dir = WP_CONTENT_DIR . '/languages'; |
1336 $lang_dir = WP_CONTENT_DIR . '/languages'; |
1288 } |
1337 } |
1289 |
1338 /* |
1339 * Note: str_starts_with() is not used here, as this file is included |
|
1340 * when updating from older WordPress versions, in which case |
|
1341 * the polyfills from wp-includes/compat.php may not be available. |
|
1342 */ |
|
1290 // Check if the language directory exists first. |
1343 // Check if the language directory exists first. |
1291 if ( ! @is_dir( $lang_dir ) && 0 === strpos( $lang_dir, ABSPATH ) ) { |
1344 if ( ! @is_dir( $lang_dir ) && 0 === strpos( $lang_dir, ABSPATH ) ) { |
1292 // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. |
1345 // If it's within the ABSPATH we can handle it here, otherwise they're out of luck. |
1293 $wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR ); |
1346 $wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR ); |
1294 clearstatcache(); // For FTP, need to clear the stat cache. |
1347 clearstatcache(); // For FTP, need to clear the stat cache. |
1315 apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); |
1368 apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); |
1316 |
1369 |
1317 // Remove maintenance file, we're done with potential site-breaking changes. |
1370 // Remove maintenance file, we're done with potential site-breaking changes. |
1318 $wp_filesystem->delete( $maintenance_file ); |
1371 $wp_filesystem->delete( $maintenance_file ); |
1319 |
1372 |
1320 // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, |
1373 /* |
1321 // preventing installation of Twenty Twelve. |
1374 * 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, |
1375 * preventing installation of Twenty Twelve. |
|
1376 */ |
|
1322 if ( '3.5' === $old_wp_version ) { |
1377 if ( '3.5' === $old_wp_version ) { |
1323 if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) |
1378 if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) |
1324 && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) |
1379 && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) |
1325 ) { |
1380 ) { |
1326 $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); |
1381 $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); |
1371 } |
1426 } |
1372 |
1427 |
1373 $wp_filesystem->mkdir( $dest . $filename, FS_CHMOD_DIR ); |
1428 $wp_filesystem->mkdir( $dest . $filename, FS_CHMOD_DIR ); |
1374 $_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename ); |
1429 $_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename ); |
1375 |
1430 |
1376 // If a error occurs partway through this final step, keep the error flowing through, but keep process going. |
1431 /* |
1432 * If an error occurs partway through this final step, |
|
1433 * keep the error flowing through, but keep the process going. |
|
1434 */ |
|
1377 if ( is_wp_error( $_result ) ) { |
1435 if ( is_wp_error( $_result ) ) { |
1378 if ( ! is_wp_error( $result ) ) { |
1436 if ( ! is_wp_error( $result ) ) { |
1379 $result = new WP_Error; |
1437 $result = new WP_Error(); |
1380 } |
1438 } |
1381 |
1439 |
1382 $result->add( |
1440 $result->add( |
1383 $_result->get_error_code() . "_$type", |
1441 $_result->get_error_code() . "_$type", |
1384 $_result->get_error_message(), |
1442 $_result->get_error_message(), |
1415 _upgrade_422_remove_genericons(); |
1473 _upgrade_422_remove_genericons(); |
1416 |
1474 |
1417 // Deactivate the REST API plugin if its version is 2.0 Beta 4 or lower. |
1475 // Deactivate the REST API plugin if its version is 2.0 Beta 4 or lower. |
1418 _upgrade_440_force_deactivate_incompatible_plugins(); |
1476 _upgrade_440_force_deactivate_incompatible_plugins(); |
1419 |
1477 |
1420 // Deactivate the Gutenberg plugin if its version is 11.8 or lower. |
1478 // Deactivate incompatible plugins. |
1421 _upgrade_590_force_deactivate_incompatible_plugins(); |
1479 _upgrade_core_deactivate_incompatible_plugins(); |
1422 |
1480 |
1423 // Upgrade DB with separate request. |
1481 // Upgrade DB with separate request. |
1424 /** This filter is documented in wp-admin/includes/update-core.php */ |
1482 /** This filter is documented in wp-admin/includes/update-core.php */ |
1425 apply_filters( 'update_feedback', __( 'Upgrading database…' ) ); |
1483 apply_filters( 'update_feedback', __( 'Upgrading database…' ) ); |
1426 |
1484 |
1458 |
1516 |
1459 return $wp_version; |
1517 return $wp_version; |
1460 } |
1518 } |
1461 |
1519 |
1462 /** |
1520 /** |
1463 * Copies a directory from one location to another via the WordPress Filesystem Abstraction. |
1521 * Preloads old Requests classes and interfaces. |
1464 * |
1522 * |
1465 * Assumes that WP_Filesystem() has already been called and setup. |
1523 * This function preloads the old Requests code into memory before the |
1466 * |
1524 * upgrade process deletes the files. Why? Requests code is loaded into |
1467 * This is a standalone copy of the `copy_dir()` function that is used to |
1525 * memory via an autoloader, meaning when a class or interface is needed |
1468 * upgrade the core files. It is placed here so that the version of this |
1526 * If a request is in process, Requests could attempt to access code. If |
1469 * function from the *new* WordPress version will be called. |
1527 * the file is not there, a fatal error could occur. If the file was |
1470 * |
1528 * replaced, the new code is not compatible with the old, resulting in |
1471 * It was initially added for the 3.1 -> 3.2 upgrade. |
1529 * a fatal error. Preloading ensures the code is in memory before the |
1472 * |
1530 * code is updated. |
1473 * @ignore |
1531 * |
1474 * @since 3.2.0 |
1532 * @since 6.2.0 |
1475 * @since 3.7.0 Updated not to use a regular expression for the skip list. |
1533 * |
1476 * |
1534 * @global array $_old_requests_files Requests files to be preloaded. |
1477 * @see copy_dir() |
1535 * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. |
1478 * @link https://core.trac.wordpress.org/ticket/17173 |
1536 * @global string $wp_version The WordPress version string. |
1479 * |
1537 * |
1480 * @global WP_Filesystem_Base $wp_filesystem |
1538 * @param string $to Path to old WordPress installation. |
1481 * |
|
1482 * @param string $from Source directory. |
|
1483 * @param string $to Destination directory. |
|
1484 * @param string[] $skip_list Array of files/folders to skip copying. |
|
1485 * @return true|WP_Error True on success, WP_Error on failure. |
|
1486 */ |
1539 */ |
1487 function _copy_dir( $from, $to, $skip_list = array() ) { |
1540 function _preload_old_requests_classes_and_interfaces( $to ) { |
1488 global $wp_filesystem; |
1541 global $_old_requests_files, $wp_filesystem, $wp_version; |
1489 |
1542 |
1490 $dirlist = $wp_filesystem->dirlist( $from ); |
1543 /* |
1491 |
1544 * Requests was introduced in WordPress 4.6. |
1492 if ( false === $dirlist ) { |
1545 * |
1493 return new WP_Error( 'dirlist_failed__copy_dir', __( 'Directory listing failed.' ), basename( $to ) ); |
1546 * Skip preloading if the website was previously using |
1494 } |
1547 * an earlier version of WordPress. |
1495 |
1548 */ |
1496 $from = trailingslashit( $from ); |
1549 if ( version_compare( $wp_version, '4.6', '<' ) ) { |
1497 $to = trailingslashit( $to ); |
1550 return; |
1498 |
1551 } |
1499 foreach ( (array) $dirlist as $filename => $fileinfo ) { |
1552 |
1500 if ( in_array( $filename, $skip_list, true ) ) { |
1553 if ( ! defined( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS' ) ) { |
1554 define( 'REQUESTS_SILENCE_PSR0_DEPRECATIONS', true ); |
|
1555 } |
|
1556 |
|
1557 foreach ( $_old_requests_files as $name => $file ) { |
|
1558 // Skip files that aren't interfaces or classes. |
|
1559 if ( is_int( $name ) ) { |
|
1501 continue; |
1560 continue; |
1502 } |
1561 } |
1503 |
1562 |
1504 if ( 'f' === $fileinfo['type'] ) { |
1563 // Skip if it's already loaded. |
1505 if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) { |
1564 if ( class_exists( $name ) || interface_exists( $name ) ) { |
1506 // If copy failed, chmod file to 0644 and try again. |
1565 continue; |
1507 $wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); |
1566 } |
1508 |
1567 |
1509 if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) { |
1568 // Skip if the file is missing. |
1510 return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename ); |
1569 if ( ! $wp_filesystem->is_file( $to . $file ) ) { |
1511 } |
1570 continue; |
1512 } |
1571 } |
1513 |
1572 |
1514 /* |
1573 require_once $to . $file; |
1515 * `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
1574 } |
1516 * so don't run it when upgrading from older versions. |
|
1517 */ |
|
1518 if ( function_exists( 'wp_opcache_invalidate' ) ) { |
|
1519 wp_opcache_invalidate( $to . $filename ); |
|
1520 } |
|
1521 } elseif ( 'd' === $fileinfo['type'] ) { |
|
1522 if ( ! $wp_filesystem->is_dir( $to . $filename ) ) { |
|
1523 if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) { |
|
1524 return new WP_Error( 'mkdir_failed__copy_dir', __( 'Could not create directory.' ), $to . $filename ); |
|
1525 } |
|
1526 } |
|
1527 |
|
1528 /* |
|
1529 * Generate the $sub_skip_list for the subdirectory as a sub-set |
|
1530 * of the existing $skip_list. |
|
1531 */ |
|
1532 $sub_skip_list = array(); |
|
1533 |
|
1534 foreach ( $skip_list as $skip_item ) { |
|
1535 if ( 0 === strpos( $skip_item, $filename . '/' ) ) { |
|
1536 $sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item ); |
|
1537 } |
|
1538 } |
|
1539 |
|
1540 $result = _copy_dir( $from . $filename, $to . $filename, $sub_skip_list ); |
|
1541 |
|
1542 if ( is_wp_error( $result ) ) { |
|
1543 return $result; |
|
1544 } |
|
1545 } |
|
1546 } |
|
1547 |
|
1548 return true; |
|
1549 } |
1575 } |
1550 |
1576 |
1551 /** |
1577 /** |
1552 * Redirect to the About WordPress page after a successful upgrade. |
1578 * Redirect to the About WordPress page after a successful upgrade. |
1553 * |
1579 * |
1668 function _upgrade_422_find_genericons_files_in_folder( $directory ) { |
1694 function _upgrade_422_find_genericons_files_in_folder( $directory ) { |
1669 $directory = trailingslashit( $directory ); |
1695 $directory = trailingslashit( $directory ); |
1670 $files = array(); |
1696 $files = array(); |
1671 |
1697 |
1672 if ( file_exists( "{$directory}example.html" ) |
1698 if ( file_exists( "{$directory}example.html" ) |
1699 /* |
|
1700 * Note: str_contains() is not used here, as this file is included |
|
1701 * when updating from older WordPress versions, in which case |
|
1702 * the polyfills from wp-includes/compat.php may not be available. |
|
1703 */ |
|
1673 && false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) |
1704 && false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) |
1674 ) { |
1705 ) { |
1675 $files[] = "{$directory}example.html"; |
1706 $files[] = "{$directory}example.html"; |
1676 } |
1707 } |
1677 |
1708 |
1678 $dirs = glob( $directory . '*', GLOB_ONLYDIR ); |
1709 $dirs = glob( $directory . '*', GLOB_ONLYDIR ); |
1679 $dirs = array_filter( |
1710 $dirs = array_filter( |
1680 $dirs, |
1711 $dirs, |
1681 static function( $dir ) { |
1712 static function ( $dir ) { |
1682 // Skip any node_modules directories. |
1713 /* |
1714 * Skip any node_modules directories. |
|
1715 * |
|
1716 * Note: str_contains() is not used here, as this file is included |
|
1717 * when updating from older WordPress versions, in which case |
|
1718 * the polyfills from wp-includes/compat.php may not be available. |
|
1719 */ |
|
1683 return false === strpos( $dir, 'node_modules' ); |
1720 return false === strpos( $dir, 'node_modules' ); |
1684 } |
1721 } |
1685 ); |
1722 ); |
1686 |
1723 |
1687 if ( $dirs ) { |
1724 if ( $dirs ) { |
1704 } |
1741 } |
1705 |
1742 |
1706 /** |
1743 /** |
1707 * @access private |
1744 * @access private |
1708 * @ignore |
1745 * @ignore |
1709 * @since 5.9.0 |
1746 * @since 5.8.0 |
1747 * @since 5.9.0 The minimum compatible version of Gutenberg is 11.9. |
|
1748 * @since 6.1.1 The minimum compatible version of Gutenberg is 14.1. |
|
1749 * @since 6.4.0 The minimum compatible version of Gutenberg is 16.5. |
|
1750 * @since 6.5.0 The minimum compatible version of Gutenberg is 17.6. |
|
1710 */ |
1751 */ |
1711 function _upgrade_590_force_deactivate_incompatible_plugins() { |
1752 function _upgrade_core_deactivate_incompatible_plugins() { |
1712 if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.9', '<' ) ) { |
1753 if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '17.6', '<' ) ) { |
1713 $deactivated_gutenberg['gutenberg'] = array( |
1754 $deactivated_gutenberg['gutenberg'] = array( |
1714 'plugin_name' => 'Gutenberg', |
1755 'plugin_name' => 'Gutenberg', |
1715 'version_deactivated' => GUTENBERG_VERSION, |
1756 'version_deactivated' => GUTENBERG_VERSION, |
1716 'version_compatible' => '11.9', |
1757 'version_compatible' => '17.6', |
1717 ); |
1758 ); |
1718 if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) { |
1759 if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) { |
1719 $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() ); |
1760 $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() ); |
1720 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); |
1761 $deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); |
1721 update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); |
1762 update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); |