author | ymh <ymh.work@gmail.com> |
Tue, 27 Sep 2022 16:37:53 +0200 | |
changeset 19 | 3d72ae0968f4 |
parent 18 | be944660c56a |
child 21 | 48c4eec2b7e6 |
permissions | -rw-r--r-- |
0 | 1 |
<?php |
2 |
/** |
|
3 |
* WordPress core upgrade functionality. |
|
4 |
* |
|
5 |
* @package WordPress |
|
6 |
* @subpackage Administration |
|
7 |
* @since 2.7.0 |
|
8 |
*/ |
|
9 |
||
10 |
/** |
|
11 |
* Stores files to be deleted. |
|
12 |
* |
|
13 |
* @since 2.7.0 |
|
16 | 14 |
* |
0 | 15 |
* @global array $_old_files |
16 |
* @var array |
|
17 |
* @name $_old_files |
|
18 |
*/ |
|
19 |
global $_old_files; |
|
20 |
||
21 |
$_old_files = array( |
|
9 | 22 |
// 2.0 |
23 |
'wp-admin/import-b2.php', |
|
24 |
'wp-admin/import-blogger.php', |
|
25 |
'wp-admin/import-greymatter.php', |
|
26 |
'wp-admin/import-livejournal.php', |
|
27 |
'wp-admin/import-mt.php', |
|
28 |
'wp-admin/import-rss.php', |
|
29 |
'wp-admin/import-textpattern.php', |
|
30 |
'wp-admin/quicktags.js', |
|
31 |
'wp-images/fade-butt.png', |
|
32 |
'wp-images/get-firefox.png', |
|
33 |
'wp-images/header-shadow.png', |
|
34 |
'wp-images/smilies', |
|
35 |
'wp-images/wp-small.png', |
|
36 |
'wp-images/wpminilogo.png', |
|
37 |
'wp.php', |
|
38 |
// 2.0.8 |
|
39 |
'wp-includes/js/tinymce/plugins/inlinepopups/readme.txt', |
|
40 |
// 2.1 |
|
41 |
'wp-admin/edit-form-ajax-cat.php', |
|
42 |
'wp-admin/execute-pings.php', |
|
43 |
'wp-admin/inline-uploading.php', |
|
44 |
'wp-admin/link-categories.php', |
|
45 |
'wp-admin/list-manipulation.js', |
|
46 |
'wp-admin/list-manipulation.php', |
|
47 |
'wp-includes/comment-functions.php', |
|
48 |
'wp-includes/feed-functions.php', |
|
49 |
'wp-includes/functions-compat.php', |
|
50 |
'wp-includes/functions-formatting.php', |
|
51 |
'wp-includes/functions-post.php', |
|
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', |
|
56 |
'wp-includes/pluggable-functions.php', |
|
57 |
'wp-includes/template-functions-author.php', |
|
58 |
'wp-includes/template-functions-category.php', |
|
59 |
'wp-includes/template-functions-general.php', |
|
60 |
'wp-includes/template-functions-links.php', |
|
61 |
'wp-includes/template-functions-post.php', |
|
62 |
'wp-includes/wp-l10n.php', |
|
63 |
// 2.2 |
|
64 |
'wp-admin/cat-js.php', |
|
65 |
'wp-admin/import/b2.php', |
|
66 |
'wp-includes/js/autosave-js.php', |
|
67 |
'wp-includes/js/list-manipulation-js.php', |
|
68 |
'wp-includes/js/wp-ajax-js.php', |
|
69 |
// 2.3 |
|
70 |
'wp-admin/admin-db.php', |
|
71 |
'wp-admin/cat.js', |
|
72 |
'wp-admin/categories.js', |
|
73 |
'wp-admin/custom-fields.js', |
|
74 |
'wp-admin/dbx-admin-key.js', |
|
75 |
'wp-admin/edit-comments.js', |
|
76 |
'wp-admin/install-rtl.css', |
|
77 |
'wp-admin/install.css', |
|
78 |
'wp-admin/upgrade-schema.php', |
|
79 |
'wp-admin/upload-functions.php', |
|
80 |
'wp-admin/upload-rtl.css', |
|
81 |
'wp-admin/upload.css', |
|
82 |
'wp-admin/upload.js', |
|
83 |
'wp-admin/users.js', |
|
84 |
'wp-admin/widgets-rtl.css', |
|
85 |
'wp-admin/widgets.css', |
|
86 |
'wp-admin/xfn.js', |
|
87 |
'wp-includes/js/tinymce/license.html', |
|
88 |
// 2.5 |
|
89 |
'wp-admin/css/upload.css', |
|
90 |
'wp-admin/images/box-bg-left.gif', |
|
91 |
'wp-admin/images/box-bg-right.gif', |
|
92 |
'wp-admin/images/box-bg.gif', |
|
93 |
'wp-admin/images/box-butt-left.gif', |
|
94 |
'wp-admin/images/box-butt-right.gif', |
|
95 |
'wp-admin/images/box-butt.gif', |
|
96 |
'wp-admin/images/box-head-left.gif', |
|
97 |
'wp-admin/images/box-head-right.gif', |
|
98 |
'wp-admin/images/box-head.gif', |
|
99 |
'wp-admin/images/heading-bg.gif', |
|
100 |
'wp-admin/images/login-bkg-bottom.gif', |
|
101 |
'wp-admin/images/login-bkg-tile.gif', |
|
102 |
'wp-admin/images/notice.gif', |
|
103 |
'wp-admin/images/toggle.gif', |
|
104 |
'wp-admin/includes/upload.php', |
|
105 |
'wp-admin/js/dbx-admin-key.js', |
|
106 |
'wp-admin/js/link-cat.js', |
|
107 |
'wp-admin/profile-update.php', |
|
108 |
'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', |
|
113 |
'wp-includes/js/fat.js', |
|
114 |
'wp-includes/js/list-manipulation.js', |
|
115 |
'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', |
|
119 |
'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', |
|
124 |
'wp-includes/js/tinymce/plugins/paste/jscripts', |
|
125 |
'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', |
|
135 |
'wp-includes/js/tinymce/plugins/wordpress/langs', |
|
136 |
'wp-includes/js/tinymce/plugins/wordpress/wordpress.css', |
|
137 |
'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 |
|
143 |
'wp-includes/js/tinymce/tiny_mce_gzip.php', |
|
144 |
// 2.6 |
|
145 |
'wp-admin/bookmarklet.php', |
|
146 |
'wp-includes/js/jquery/jquery.dimensions.min.js', |
|
147 |
'wp-includes/js/tinymce/plugins/wordpress/popups.css', |
|
148 |
'wp-includes/js/wp-ajax.js', |
|
149 |
// 2.7 |
|
150 |
'wp-admin/css/press-this-ie-rtl.css', |
|
151 |
'wp-admin/css/press-this-ie.css', |
|
152 |
'wp-admin/css/upload-rtl.css', |
|
153 |
'wp-admin/edit-form.php', |
|
154 |
'wp-admin/images/comment-pill.gif', |
|
155 |
'wp-admin/images/comment-stalk-classic.gif', |
|
156 |
'wp-admin/images/comment-stalk-fresh.gif', |
|
157 |
'wp-admin/images/comment-stalk-rtl.gif', |
|
158 |
'wp-admin/images/del.png', |
|
159 |
'wp-admin/images/gear.png', |
|
160 |
'wp-admin/images/media-button-gallery.gif', |
|
161 |
'wp-admin/images/media-buttons.gif', |
|
162 |
'wp-admin/images/postbox-bg.gif', |
|
163 |
'wp-admin/images/tab.png', |
|
164 |
'wp-admin/images/tail.gif', |
|
165 |
'wp-admin/js/forms.js', |
|
166 |
'wp-admin/js/upload.js', |
|
167 |
'wp-admin/link-import.php', |
|
168 |
'wp-includes/images/audio.png', |
|
169 |
'wp-includes/images/css.png', |
|
170 |
'wp-includes/images/default.png', |
|
171 |
'wp-includes/images/doc.png', |
|
172 |
'wp-includes/images/exe.png', |
|
173 |
'wp-includes/images/html.png', |
|
174 |
'wp-includes/images/js.png', |
|
175 |
'wp-includes/images/pdf.png', |
|
176 |
'wp-includes/images/swf.png', |
|
177 |
'wp-includes/images/tar.png', |
|
178 |
'wp-includes/images/text.png', |
|
179 |
'wp-includes/images/video.png', |
|
180 |
'wp-includes/images/zip.png', |
|
181 |
'wp-includes/js/tinymce/tiny_mce_config.php', |
|
182 |
'wp-includes/js/tinymce/tiny_mce_ext.js', |
|
183 |
// 2.8 |
|
184 |
'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', |
|
188 |
'wp-includes/js/tinymce/plugins/autosave', |
|
189 |
'wp-includes/js/tinymce/plugins/paste/css', |
|
190 |
'wp-includes/js/tinymce/utils/mclayer.js', |
|
191 |
'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 |
|
196 |
'wp-admin/js/page.dev.js', |
|
197 |
'wp-admin/js/page.js', |
|
198 |
'wp-admin/js/set-post-thumbnail-handler.dev.js', |
|
199 |
'wp-admin/js/set-post-thumbnail-handler.js', |
|
200 |
'wp-admin/js/slug.dev.js', |
|
201 |
'wp-admin/js/slug.js', |
|
202 |
'wp-includes/gettext.php', |
|
203 |
'wp-includes/js/tinymce/plugins/wordpress/js', |
|
204 |
'wp-includes/streams.php', |
|
205 |
// MU |
|
206 |
'README.txt', |
|
207 |
'htaccess.dist', |
|
208 |
'index-install.php', |
|
209 |
'wp-admin/css/mu-rtl.css', |
|
210 |
'wp-admin/css/mu.css', |
|
211 |
'wp-admin/images/site-admin.png', |
|
212 |
'wp-admin/includes/mu.php', |
|
213 |
'wp-admin/wpmu-admin.php', |
|
214 |
'wp-admin/wpmu-blogs.php', |
|
215 |
'wp-admin/wpmu-edit.php', |
|
216 |
'wp-admin/wpmu-options.php', |
|
217 |
'wp-admin/wpmu-themes.php', |
|
218 |
'wp-admin/wpmu-upgrade-site.php', |
|
219 |
'wp-admin/wpmu-users.php', |
|
220 |
'wp-includes/images/wordpress-mu.png', |
|
221 |
'wp-includes/wpmu-default-filters.php', |
|
222 |
'wp-includes/wpmu-functions.php', |
|
223 |
'wpmu-settings.php', |
|
224 |
// 3.0 |
|
225 |
'wp-admin/categories.php', |
|
226 |
'wp-admin/edit-category-form.php', |
|
227 |
'wp-admin/edit-page-form.php', |
|
228 |
'wp-admin/edit-pages.php', |
|
229 |
'wp-admin/images/admin-header-footer.png', |
|
230 |
'wp-admin/images/browse-happy.gif', |
|
231 |
'wp-admin/images/ico-add.png', |
|
232 |
'wp-admin/images/ico-close.png', |
|
233 |
'wp-admin/images/ico-edit.png', |
|
234 |
'wp-admin/images/ico-viewpage.png', |
|
235 |
'wp-admin/images/fav-top.png', |
|
236 |
'wp-admin/images/screen-options-left.gif', |
|
237 |
'wp-admin/images/wp-logo-vs.gif', |
|
238 |
'wp-admin/images/wp-logo.gif', |
|
239 |
'wp-admin/import', |
|
240 |
'wp-admin/js/wp-gears.dev.js', |
|
241 |
'wp-admin/js/wp-gears.js', |
|
242 |
'wp-admin/options-misc.php', |
|
243 |
'wp-admin/page-new.php', |
|
244 |
'wp-admin/page.php', |
|
245 |
'wp-admin/rtl.css', |
|
246 |
'wp-admin/rtl.dev.css', |
|
247 |
'wp-admin/update-links.php', |
|
248 |
'wp-admin/wp-admin.css', |
|
249 |
'wp-admin/wp-admin.dev.css', |
|
250 |
'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', |
|
254 |
'wp-includes/js/jquery/autocomplete.js', |
|
255 |
'wp-includes/js/jquery/interface.js', |
|
256 |
'wp-includes/js/scriptaculous/prototype.js', |
|
16 | 257 |
// Following file added back in 5.1, see #45645. |
9 | 258 |
//'wp-includes/js/tinymce/wp-tinymce.js', |
259 |
// 3.1 |
|
260 |
'wp-admin/edit-attachment-rows.php', |
|
261 |
'wp-admin/edit-link-categories.php', |
|
262 |
'wp-admin/edit-link-category-form.php', |
|
263 |
'wp-admin/edit-post-rows.php', |
|
264 |
'wp-admin/images/button-grad-active-vs.png', |
|
265 |
'wp-admin/images/button-grad-vs.png', |
|
266 |
'wp-admin/images/fav-arrow-vs-rtl.gif', |
|
267 |
'wp-admin/images/fav-arrow-vs.gif', |
|
268 |
'wp-admin/images/fav-top-vs.gif', |
|
269 |
'wp-admin/images/list-vs.png', |
|
270 |
'wp-admin/images/screen-options-right-up.gif', |
|
271 |
'wp-admin/images/screen-options-right.gif', |
|
272 |
'wp-admin/images/visit-site-button-grad-vs.gif', |
|
273 |
'wp-admin/images/visit-site-button-grad.gif', |
|
274 |
'wp-admin/link-category.php', |
|
275 |
'wp-admin/sidebar.php', |
|
276 |
'wp-includes/classes.php', |
|
277 |
'wp-includes/js/tinymce/blank.htm', |
|
278 |
'wp-includes/js/tinymce/plugins/media/css/content.css', |
|
279 |
'wp-includes/js/tinymce/plugins/media/img', |
|
280 |
'wp-includes/js/tinymce/plugins/safari', |
|
281 |
// 3.2 |
|
282 |
'wp-admin/images/logo-login.gif', |
|
283 |
'wp-admin/images/star.gif', |
|
284 |
'wp-admin/js/list-table.dev.js', |
|
285 |
'wp-admin/js/list-table.js', |
|
286 |
'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 |
|
293 |
'wp-admin/css/colors-classic-rtl.css', |
|
294 |
'wp-admin/css/colors-classic-rtl.dev.css', |
|
295 |
'wp-admin/css/colors-fresh-rtl.css', |
|
296 |
'wp-admin/css/colors-fresh-rtl.dev.css', |
|
297 |
'wp-admin/css/dashboard-rtl.dev.css', |
|
298 |
'wp-admin/css/dashboard.dev.css', |
|
299 |
'wp-admin/css/global-rtl.css', |
|
300 |
'wp-admin/css/global-rtl.dev.css', |
|
301 |
'wp-admin/css/global.css', |
|
302 |
'wp-admin/css/global.dev.css', |
|
303 |
'wp-admin/css/install-rtl.dev.css', |
|
304 |
'wp-admin/css/login-rtl.dev.css', |
|
305 |
'wp-admin/css/login.dev.css', |
|
306 |
'wp-admin/css/ms.css', |
|
307 |
'wp-admin/css/ms.dev.css', |
|
308 |
'wp-admin/css/nav-menu-rtl.css', |
|
309 |
'wp-admin/css/nav-menu-rtl.dev.css', |
|
310 |
'wp-admin/css/nav-menu.css', |
|
311 |
'wp-admin/css/nav-menu.dev.css', |
|
312 |
'wp-admin/css/plugin-install-rtl.css', |
|
313 |
'wp-admin/css/plugin-install-rtl.dev.css', |
|
314 |
'wp-admin/css/plugin-install.css', |
|
315 |
'wp-admin/css/plugin-install.dev.css', |
|
316 |
'wp-admin/css/press-this-rtl.dev.css', |
|
317 |
'wp-admin/css/press-this.dev.css', |
|
318 |
'wp-admin/css/theme-editor-rtl.css', |
|
319 |
'wp-admin/css/theme-editor-rtl.dev.css', |
|
320 |
'wp-admin/css/theme-editor.css', |
|
321 |
'wp-admin/css/theme-editor.dev.css', |
|
322 |
'wp-admin/css/theme-install-rtl.css', |
|
323 |
'wp-admin/css/theme-install-rtl.dev.css', |
|
324 |
'wp-admin/css/theme-install.css', |
|
325 |
'wp-admin/css/theme-install.dev.css', |
|
326 |
'wp-admin/css/widgets-rtl.dev.css', |
|
327 |
'wp-admin/css/widgets.dev.css', |
|
328 |
'wp-admin/includes/internal-linking.php', |
|
329 |
'wp-includes/images/admin-bar-sprite-rtl.png', |
|
330 |
'wp-includes/js/jquery/ui.button.js', |
|
331 |
'wp-includes/js/jquery/ui.core.js', |
|
332 |
'wp-includes/js/jquery/ui.dialog.js', |
|
333 |
'wp-includes/js/jquery/ui.draggable.js', |
|
334 |
'wp-includes/js/jquery/ui.droppable.js', |
|
335 |
'wp-includes/js/jquery/ui.mouse.js', |
|
336 |
'wp-includes/js/jquery/ui.position.js', |
|
337 |
'wp-includes/js/jquery/ui.resizable.js', |
|
338 |
'wp-includes/js/jquery/ui.selectable.js', |
|
339 |
'wp-includes/js/jquery/ui.sortable.js', |
|
340 |
'wp-includes/js/jquery/ui.tabs.js', |
|
341 |
'wp-includes/js/jquery/ui.widget.js', |
|
342 |
'wp-includes/js/l10n.dev.js', |
|
343 |
'wp-includes/js/l10n.js', |
|
344 |
'wp-includes/js/tinymce/plugins/wplink/css', |
|
345 |
'wp-includes/js/tinymce/plugins/wplink/img', |
|
346 |
'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', |
|
354 |
// Don't delete, yet: 'wp-rdf.php', |
|
355 |
// Don't delete, yet: 'wp-rss2.php', |
|
356 |
// Don't delete, yet: 'wp-commentsrss2.php', |
|
357 |
// Don't delete, yet: 'wp-atom.php', |
|
358 |
// Don't delete, yet: 'wp-feed.php', |
|
359 |
// 3.4 |
|
360 |
'wp-admin/images/gray-star.png', |
|
361 |
'wp-admin/images/logo-login.png', |
|
362 |
'wp-admin/images/star.png', |
|
363 |
'wp-admin/index-extra.php', |
|
364 |
'wp-admin/network/index-extra.php', |
|
365 |
'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', |
|
374 |
'wp-includes/css/editor-buttons.dev.css', |
|
375 |
'wp-includes/js/tinymce/plugins/paste/blank.htm', |
|
376 |
'wp-includes/js/tinymce/plugins/wordpress/css', |
|
377 |
'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', |
|
382 |
'wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css', |
|
383 |
'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', |
|
386 |
'wp-includes/js/tinymce/plugins/wpgallery/img/gallery.png', |
|
387 |
'wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js', |
|
388 |
// Don't delete, yet: 'wp-pass.php', |
|
389 |
// Don't delete, yet: 'wp-register.php', |
|
390 |
// 3.5 |
|
391 |
'wp-admin/gears-manifest.php', |
|
392 |
'wp-admin/includes/manifest.php', |
|
393 |
'wp-admin/images/archive-link.png', |
|
394 |
'wp-admin/images/blue-grad.png', |
|
395 |
'wp-admin/images/button-grad-active.png', |
|
396 |
'wp-admin/images/button-grad.png', |
|
397 |
'wp-admin/images/ed-bg-vs.gif', |
|
398 |
'wp-admin/images/ed-bg.gif', |
|
399 |
'wp-admin/images/fade-butt.png', |
|
400 |
'wp-admin/images/fav-arrow-rtl.gif', |
|
401 |
'wp-admin/images/fav-arrow.gif', |
|
402 |
'wp-admin/images/fav-vs.png', |
|
403 |
'wp-admin/images/fav.png', |
|
404 |
'wp-admin/images/gray-grad.png', |
|
405 |
'wp-admin/images/loading-publish.gif', |
|
406 |
'wp-admin/images/logo-ghost.png', |
|
407 |
'wp-admin/images/logo.gif', |
|
408 |
'wp-admin/images/menu-arrow-frame-rtl.png', |
|
409 |
'wp-admin/images/menu-arrow-frame.png', |
|
410 |
'wp-admin/images/menu-arrows.gif', |
|
411 |
'wp-admin/images/menu-bits-rtl-vs.gif', |
|
412 |
'wp-admin/images/menu-bits-rtl.gif', |
|
413 |
'wp-admin/images/menu-bits-vs.gif', |
|
414 |
'wp-admin/images/menu-bits.gif', |
|
415 |
'wp-admin/images/menu-dark-rtl-vs.gif', |
|
416 |
'wp-admin/images/menu-dark-rtl.gif', |
|
417 |
'wp-admin/images/menu-dark-vs.gif', |
|
418 |
'wp-admin/images/menu-dark.gif', |
|
419 |
'wp-admin/images/required.gif', |
|
420 |
'wp-admin/images/screen-options-toggle-vs.gif', |
|
421 |
'wp-admin/images/screen-options-toggle.gif', |
|
422 |
'wp-admin/images/toggle-arrow-rtl.gif', |
|
423 |
'wp-admin/images/toggle-arrow.gif', |
|
424 |
'wp-admin/images/upload-classic.png', |
|
425 |
'wp-admin/images/upload-fresh.png', |
|
426 |
'wp-admin/images/white-grad-active.png', |
|
427 |
'wp-admin/images/white-grad.png', |
|
428 |
'wp-admin/images/widgets-arrow-vs.gif', |
|
429 |
'wp-admin/images/widgets-arrow.gif', |
|
430 |
'wp-admin/images/wpspin_dark.gif', |
|
431 |
'wp-includes/images/upload.png', |
|
432 |
'wp-includes/js/prototype.js', |
|
433 |
'wp-includes/js/scriptaculous', |
|
434 |
'wp-admin/css/wp-admin-rtl.dev.css', |
|
435 |
'wp-admin/css/wp-admin.dev.css', |
|
436 |
'wp-admin/css/media-rtl.dev.css', |
|
437 |
'wp-admin/css/media.dev.css', |
|
438 |
'wp-admin/css/colors-classic.dev.css', |
|
439 |
'wp-admin/css/customize-controls-rtl.dev.css', |
|
440 |
'wp-admin/css/customize-controls.dev.css', |
|
441 |
'wp-admin/css/ie-rtl.dev.css', |
|
442 |
'wp-admin/css/ie.dev.css', |
|
443 |
'wp-admin/css/install.dev.css', |
|
444 |
'wp-admin/css/colors-fresh.dev.css', |
|
445 |
'wp-includes/js/customize-base.dev.js', |
|
446 |
'wp-includes/js/json2.dev.js', |
|
447 |
'wp-includes/js/comment-reply.dev.js', |
|
448 |
'wp-includes/js/customize-preview.dev.js', |
|
449 |
'wp-includes/js/wplink.dev.js', |
|
450 |
'wp-includes/js/tw-sack.dev.js', |
|
451 |
'wp-includes/js/wp-list-revisions.dev.js', |
|
452 |
'wp-includes/js/autosave.dev.js', |
|
453 |
'wp-includes/js/admin-bar.dev.js', |
|
454 |
'wp-includes/js/quicktags.dev.js', |
|
455 |
'wp-includes/js/wp-ajax-response.dev.js', |
|
456 |
'wp-includes/js/wp-pointer.dev.js', |
|
457 |
'wp-includes/js/hoverIntent.dev.js', |
|
458 |
'wp-includes/js/colorpicker.dev.js', |
|
459 |
'wp-includes/js/wp-lists.dev.js', |
|
460 |
'wp-includes/js/customize-loader.dev.js', |
|
461 |
'wp-includes/js/jquery/jquery.table-hotkeys.dev.js', |
|
462 |
'wp-includes/js/jquery/jquery.color.dev.js', |
|
463 |
'wp-includes/js/jquery/jquery.color.js', |
|
464 |
'wp-includes/js/jquery/jquery.hotkeys.dev.js', |
|
465 |
'wp-includes/js/jquery/jquery.form.dev.js', |
|
466 |
'wp-includes/js/jquery/suggest.dev.js', |
|
467 |
'wp-admin/js/xfn.dev.js', |
|
468 |
'wp-admin/js/set-post-thumbnail.dev.js', |
|
469 |
'wp-admin/js/comment.dev.js', |
|
470 |
'wp-admin/js/theme.dev.js', |
|
471 |
'wp-admin/js/cat.dev.js', |
|
472 |
'wp-admin/js/password-strength-meter.dev.js', |
|
473 |
'wp-admin/js/user-profile.dev.js', |
|
474 |
'wp-admin/js/theme-preview.dev.js', |
|
475 |
'wp-admin/js/post.dev.js', |
|
476 |
'wp-admin/js/media-upload.dev.js', |
|
477 |
'wp-admin/js/word-count.dev.js', |
|
478 |
'wp-admin/js/plugin-install.dev.js', |
|
479 |
'wp-admin/js/edit-comments.dev.js', |
|
480 |
'wp-admin/js/media-gallery.dev.js', |
|
481 |
'wp-admin/js/custom-fields.dev.js', |
|
482 |
'wp-admin/js/custom-background.dev.js', |
|
483 |
'wp-admin/js/common.dev.js', |
|
484 |
'wp-admin/js/inline-edit-tax.dev.js', |
|
485 |
'wp-admin/js/gallery.dev.js', |
|
486 |
'wp-admin/js/utils.dev.js', |
|
487 |
'wp-admin/js/widgets.dev.js', |
|
488 |
'wp-admin/js/wp-fullscreen.dev.js', |
|
489 |
'wp-admin/js/nav-menu.dev.js', |
|
490 |
'wp-admin/js/dashboard.dev.js', |
|
491 |
'wp-admin/js/link.dev.js', |
|
492 |
'wp-admin/js/user-suggest.dev.js', |
|
493 |
'wp-admin/js/postbox.dev.js', |
|
494 |
'wp-admin/js/tags.dev.js', |
|
495 |
'wp-admin/js/image-edit.dev.js', |
|
496 |
'wp-admin/js/media.dev.js', |
|
497 |
'wp-admin/js/customize-controls.dev.js', |
|
498 |
'wp-admin/js/inline-edit-post.dev.js', |
|
499 |
'wp-admin/js/categories.dev.js', |
|
500 |
'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', |
|
505 |
'wp-includes/js/plupload/wp-plupload.dev.js', |
|
506 |
'wp-includes/js/swfupload/handlers.dev.js', |
|
507 |
'wp-includes/js/jcrop/jquery.Jcrop.dev.js', |
|
508 |
'wp-includes/js/jcrop/jquery.Jcrop.js', |
|
509 |
'wp-includes/js/jcrop/jquery.Jcrop.css', |
|
510 |
'wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js', |
|
511 |
'wp-includes/css/wp-pointer.dev.css', |
|
512 |
'wp-includes/css/editor.dev.css', |
|
513 |
'wp-includes/css/jquery-ui-dialog.dev.css', |
|
514 |
'wp-includes/css/admin-bar-rtl.dev.css', |
|
515 |
'wp-includes/css/admin-bar.dev.css', |
|
516 |
'wp-includes/js/jquery/ui/jquery.effects.clip.min.js', |
|
517 |
'wp-includes/js/jquery/ui/jquery.effects.scale.min.js', |
|
518 |
'wp-includes/js/jquery/ui/jquery.effects.blind.min.js', |
|
519 |
'wp-includes/js/jquery/ui/jquery.effects.core.min.js', |
|
520 |
'wp-includes/js/jquery/ui/jquery.effects.shake.min.js', |
|
521 |
'wp-includes/js/jquery/ui/jquery.effects.fade.min.js', |
|
522 |
'wp-includes/js/jquery/ui/jquery.effects.explode.min.js', |
|
523 |
'wp-includes/js/jquery/ui/jquery.effects.slide.min.js', |
|
524 |
'wp-includes/js/jquery/ui/jquery.effects.drop.min.js', |
|
525 |
'wp-includes/js/jquery/ui/jquery.effects.highlight.min.js', |
|
526 |
'wp-includes/js/jquery/ui/jquery.effects.bounce.min.js', |
|
527 |
'wp-includes/js/jquery/ui/jquery.effects.pulsate.min.js', |
|
528 |
'wp-includes/js/jquery/ui/jquery.effects.transfer.min.js', |
|
529 |
'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', |
|
16 | 540 |
// Added back in 5.3 [45448], see #43895. |
541 |
// 'wp-admin/options-privacy.php', |
|
9 | 542 |
'wp-app.php', |
543 |
'wp-includes/class-wp-atom-server.php', |
|
544 |
'wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css', |
|
545 |
// 3.5.2 |
|
546 |
'wp-includes/js/swfupload/swfupload-all.js', |
|
547 |
// 3.6 |
|
548 |
'wp-admin/js/revisions-js.php', |
|
549 |
'wp-admin/images/screenshots', |
|
550 |
'wp-admin/js/categories.js', |
|
551 |
'wp-admin/js/categories.min.js', |
|
552 |
'wp-admin/js/custom-fields.js', |
|
553 |
'wp-admin/js/custom-fields.min.js', |
|
554 |
// 3.7 |
|
555 |
'wp-admin/js/cat.js', |
|
556 |
'wp-admin/js/cat.min.js', |
|
557 |
'wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js', |
|
558 |
// 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', |
|
562 |
'wp-includes/js/thickbox/tb-close.png', |
|
563 |
'wp-includes/images/wpmini-blue-2x.png', |
|
564 |
'wp-includes/images/wpmini-blue.png', |
|
565 |
'wp-admin/css/colors-fresh.css', |
|
566 |
'wp-admin/css/colors-classic.css', |
|
567 |
'wp-admin/css/colors-fresh.min.css', |
|
568 |
'wp-admin/css/colors-classic.min.css', |
|
569 |
'wp-admin/js/about.min.js', |
|
570 |
'wp-admin/js/about.js', |
|
571 |
'wp-admin/images/arrows-dark-vs-2x.png', |
|
572 |
'wp-admin/images/wp-logo-vs.png', |
|
573 |
'wp-admin/images/arrows-dark-vs.png', |
|
574 |
'wp-admin/images/wp-logo.png', |
|
575 |
'wp-admin/images/arrows-pr.png', |
|
576 |
'wp-admin/images/arrows-dark.png', |
|
577 |
'wp-admin/images/press-this.png', |
|
578 |
'wp-admin/images/press-this-2x.png', |
|
579 |
'wp-admin/images/arrows-vs-2x.png', |
|
580 |
'wp-admin/images/welcome-icons.png', |
|
581 |
'wp-admin/images/wp-logo-2x.png', |
|
582 |
'wp-admin/images/stars-rtl-2x.png', |
|
583 |
'wp-admin/images/arrows-dark-2x.png', |
|
584 |
'wp-admin/images/arrows-pr-2x.png', |
|
585 |
'wp-admin/images/menu-shadow-rtl.png', |
|
586 |
'wp-admin/images/arrows-vs.png', |
|
587 |
'wp-admin/images/about-search-2x.png', |
|
588 |
'wp-admin/images/bubble_bg-rtl-2x.gif', |
|
589 |
'wp-admin/images/wp-badge-2x.png', |
|
590 |
'wp-admin/images/wordpress-logo-2x.png', |
|
591 |
'wp-admin/images/bubble_bg-rtl.gif', |
|
592 |
'wp-admin/images/wp-badge.png', |
|
593 |
'wp-admin/images/menu-shadow.png', |
|
594 |
'wp-admin/images/about-globe-2x.png', |
|
595 |
'wp-admin/images/welcome-icons-2x.png', |
|
596 |
'wp-admin/images/stars-rtl.png', |
|
597 |
'wp-admin/images/wp-logo-vs-2x.png', |
|
598 |
'wp-admin/images/about-updates-2x.png', |
|
599 |
// 3.9 |
|
600 |
'wp-admin/css/colors.css', |
|
601 |
'wp-admin/css/colors.min.css', |
|
602 |
'wp-admin/css/colors-rtl.css', |
|
603 |
'wp-admin/css/colors-rtl.min.css', |
|
16 | 604 |
// Following files added back in 4.5, see #36083. |
9 | 605 |
// 'wp-admin/css/media-rtl.min.css', |
606 |
// 'wp-admin/css/media.min.css', |
|
607 |
// 'wp-admin/css/farbtastic-rtl.min.css', |
|
608 |
'wp-admin/images/lock-2x.png', |
|
609 |
'wp-admin/images/lock.png', |
|
610 |
'wp-admin/js/theme-preview.js', |
|
611 |
'wp-admin/js/theme-install.min.js', |
|
612 |
'wp-admin/js/theme-install.js', |
|
613 |
'wp-admin/js/theme-preview.min.js', |
|
614 |
'wp-includes/js/plupload/plupload.html4.js', |
|
615 |
'wp-includes/js/plupload/plupload.html5.js', |
|
616 |
'wp-includes/js/plupload/changelog.txt', |
|
617 |
'wp-includes/js/plupload/plupload.silverlight.js', |
|
618 |
'wp-includes/js/plupload/plupload.flash.js', |
|
16 | 619 |
// Added back in 4.9 [41328], see #41755. |
9 | 620 |
// 'wp-includes/js/plupload/plupload.js', |
621 |
'wp-includes/js/tinymce/plugins/spellchecker', |
|
622 |
'wp-includes/js/tinymce/plugins/inlinepopups', |
|
623 |
'wp-includes/js/tinymce/plugins/media/js', |
|
624 |
'wp-includes/js/tinymce/plugins/media/css', |
|
625 |
'wp-includes/js/tinymce/plugins/wordpress/img', |
|
626 |
'wp-includes/js/tinymce/plugins/wpdialogs/js', |
|
627 |
'wp-includes/js/tinymce/plugins/wpeditimage/img', |
|
628 |
'wp-includes/js/tinymce/plugins/wpeditimage/js', |
|
629 |
'wp-includes/js/tinymce/plugins/wpeditimage/css', |
|
630 |
'wp-includes/js/tinymce/plugins/wpgallery/img', |
|
631 |
'wp-includes/js/tinymce/plugins/wpfullscreen/css', |
|
632 |
'wp-includes/js/tinymce/plugins/paste/js', |
|
633 |
'wp-includes/js/tinymce/themes/advanced', |
|
634 |
'wp-includes/js/tinymce/tiny_mce.js', |
|
635 |
'wp-includes/js/tinymce/mark_loaded_src.js', |
|
636 |
'wp-includes/js/tinymce/wp-tinymce-schema.js', |
|
637 |
'wp-includes/js/tinymce/plugins/media/editor_plugin.js', |
|
638 |
'wp-includes/js/tinymce/plugins/media/editor_plugin_src.js', |
|
639 |
'wp-includes/js/tinymce/plugins/media/media.htm', |
|
640 |
'wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js', |
|
641 |
'wp-includes/js/tinymce/plugins/wpview/editor_plugin.js', |
|
642 |
'wp-includes/js/tinymce/plugins/directionality/editor_plugin.js', |
|
643 |
'wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js', |
|
644 |
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js', |
|
645 |
'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js', |
|
646 |
'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js', |
|
647 |
'wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.js', |
|
648 |
'wp-includes/js/tinymce/plugins/wpeditimage/editimage.html', |
|
649 |
'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js', |
|
650 |
'wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js', |
|
651 |
'wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js', |
|
652 |
'wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm', |
|
653 |
'wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js', |
|
654 |
'wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js', |
|
655 |
'wp-includes/js/tinymce/plugins/wplink/editor_plugin.js', |
|
656 |
'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js', |
|
657 |
'wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.js', |
|
658 |
'wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js', |
|
659 |
'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', |
|
663 |
'wp-includes/js/tinymce/plugins/paste/pasteword.htm', |
|
664 |
'wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js', |
|
665 |
'wp-includes/js/tinymce/plugins/paste/pastetext.htm', |
|
666 |
'wp-includes/js/tinymce/langs/wp-langs.php', |
|
667 |
// 4.1 |
|
668 |
'wp-includes/js/jquery/ui/jquery.ui.accordion.min.js', |
|
669 |
'wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js', |
|
670 |
'wp-includes/js/jquery/ui/jquery.ui.button.min.js', |
|
671 |
'wp-includes/js/jquery/ui/jquery.ui.core.min.js', |
|
672 |
'wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js', |
|
673 |
'wp-includes/js/jquery/ui/jquery.ui.dialog.min.js', |
|
674 |
'wp-includes/js/jquery/ui/jquery.ui.draggable.min.js', |
|
675 |
'wp-includes/js/jquery/ui/jquery.ui.droppable.min.js', |
|
676 |
'wp-includes/js/jquery/ui/jquery.ui.effect-blind.min.js', |
|
677 |
'wp-includes/js/jquery/ui/jquery.ui.effect-bounce.min.js', |
|
678 |
'wp-includes/js/jquery/ui/jquery.ui.effect-clip.min.js', |
|
679 |
'wp-includes/js/jquery/ui/jquery.ui.effect-drop.min.js', |
|
680 |
'wp-includes/js/jquery/ui/jquery.ui.effect-explode.min.js', |
|
681 |
'wp-includes/js/jquery/ui/jquery.ui.effect-fade.min.js', |
|
682 |
'wp-includes/js/jquery/ui/jquery.ui.effect-fold.min.js', |
|
683 |
'wp-includes/js/jquery/ui/jquery.ui.effect-highlight.min.js', |
|
684 |
'wp-includes/js/jquery/ui/jquery.ui.effect-pulsate.min.js', |
|
685 |
'wp-includes/js/jquery/ui/jquery.ui.effect-scale.min.js', |
|
686 |
'wp-includes/js/jquery/ui/jquery.ui.effect-shake.min.js', |
|
687 |
'wp-includes/js/jquery/ui/jquery.ui.effect-slide.min.js', |
|
688 |
'wp-includes/js/jquery/ui/jquery.ui.effect-transfer.min.js', |
|
689 |
'wp-includes/js/jquery/ui/jquery.ui.effect.min.js', |
|
690 |
'wp-includes/js/jquery/ui/jquery.ui.menu.min.js', |
|
691 |
'wp-includes/js/jquery/ui/jquery.ui.mouse.min.js', |
|
692 |
'wp-includes/js/jquery/ui/jquery.ui.position.min.js', |
|
693 |
'wp-includes/js/jquery/ui/jquery.ui.progressbar.min.js', |
|
694 |
'wp-includes/js/jquery/ui/jquery.ui.resizable.min.js', |
|
695 |
'wp-includes/js/jquery/ui/jquery.ui.selectable.min.js', |
|
696 |
'wp-includes/js/jquery/ui/jquery.ui.slider.min.js', |
|
697 |
'wp-includes/js/jquery/ui/jquery.ui.sortable.min.js', |
|
698 |
'wp-includes/js/jquery/ui/jquery.ui.spinner.min.js', |
|
699 |
'wp-includes/js/jquery/ui/jquery.ui.tabs.min.js', |
|
700 |
'wp-includes/js/jquery/ui/jquery.ui.tooltip.min.js', |
|
701 |
'wp-includes/js/jquery/ui/jquery.ui.widget.min.js', |
|
702 |
'wp-includes/js/tinymce/skins/wordpress/images/dashicon-no-alt.png', |
|
703 |
// 4.3 |
|
704 |
'wp-admin/js/wp-fullscreen.js', |
|
705 |
'wp-admin/js/wp-fullscreen.min.js', |
|
706 |
'wp-includes/js/tinymce/wp-mce-help.php', |
|
707 |
'wp-includes/js/tinymce/plugins/wpfullscreen', |
|
708 |
// 4.5 |
|
709 |
'wp-includes/theme-compat/comments-popup.php', |
|
710 |
// 4.6 |
|
711 |
'wp-admin/includes/class-wp-automatic-upgrader.php', // Wrong file name, see #37628. |
|
712 |
// 4.8 |
|
713 |
'wp-includes/js/tinymce/plugins/wpembed', |
|
714 |
'wp-includes/js/tinymce/plugins/media/moxieplayer.swf', |
|
715 |
'wp-includes/js/tinymce/skins/lightgray/fonts/readme.md', |
|
716 |
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.json', |
|
717 |
'wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.json', |
|
718 |
'wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css', |
|
719 |
// 4.9 |
|
720 |
'wp-admin/css/press-this-editor-rtl.css', |
|
721 |
'wp-admin/css/press-this-editor-rtl.min.css', |
|
722 |
'wp-admin/css/press-this-editor.css', |
|
723 |
'wp-admin/css/press-this-editor.min.css', |
|
724 |
'wp-admin/css/press-this-rtl.css', |
|
725 |
'wp-admin/css/press-this-rtl.min.css', |
|
726 |
'wp-admin/css/press-this.css', |
|
727 |
'wp-admin/css/press-this.min.css', |
|
728 |
'wp-admin/includes/class-wp-press-this.php', |
|
729 |
'wp-admin/js/bookmarklet.js', |
|
730 |
'wp-admin/js/bookmarklet.min.js', |
|
731 |
'wp-admin/js/press-this.js', |
|
732 |
'wp-admin/js/press-this.min.js', |
|
733 |
'wp-includes/js/mediaelement/background.png', |
|
734 |
'wp-includes/js/mediaelement/bigplay.png', |
|
735 |
'wp-includes/js/mediaelement/bigplay.svg', |
|
736 |
'wp-includes/js/mediaelement/controls.png', |
|
737 |
'wp-includes/js/mediaelement/controls.svg', |
|
738 |
'wp-includes/js/mediaelement/flashmediaelement.swf', |
|
739 |
'wp-includes/js/mediaelement/froogaloop.min.js', |
|
740 |
'wp-includes/js/mediaelement/jumpforward.png', |
|
741 |
'wp-includes/js/mediaelement/loading.gif', |
|
742 |
'wp-includes/js/mediaelement/silverlightmediaelement.xap', |
|
743 |
'wp-includes/js/mediaelement/skipback.png', |
|
744 |
'wp-includes/js/plupload/plupload.flash.swf', |
|
745 |
'wp-includes/js/plupload/plupload.full.min.js', |
|
746 |
'wp-includes/js/plupload/plupload.silverlight.xap', |
|
747 |
'wp-includes/js/swfupload/plugins', |
|
748 |
'wp-includes/js/swfupload/swfupload.swf', |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
749 |
// 4.9.2 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
750 |
'wp-includes/js/mediaelement/lang', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
751 |
'wp-includes/js/mediaelement/lang/ca.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
752 |
'wp-includes/js/mediaelement/lang/cs.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
753 |
'wp-includes/js/mediaelement/lang/de.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
754 |
'wp-includes/js/mediaelement/lang/es.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
755 |
'wp-includes/js/mediaelement/lang/fa.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
756 |
'wp-includes/js/mediaelement/lang/fr.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
757 |
'wp-includes/js/mediaelement/lang/hr.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
758 |
'wp-includes/js/mediaelement/lang/hu.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
759 |
'wp-includes/js/mediaelement/lang/it.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
760 |
'wp-includes/js/mediaelement/lang/ja.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
761 |
'wp-includes/js/mediaelement/lang/ko.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
762 |
'wp-includes/js/mediaelement/lang/nl.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
763 |
'wp-includes/js/mediaelement/lang/pl.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
764 |
'wp-includes/js/mediaelement/lang/pt.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
765 |
'wp-includes/js/mediaelement/lang/ro.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
766 |
'wp-includes/js/mediaelement/lang/ru.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
767 |
'wp-includes/js/mediaelement/lang/sk.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
768 |
'wp-includes/js/mediaelement/lang/sv.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
769 |
'wp-includes/js/mediaelement/lang/uk.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
770 |
'wp-includes/js/mediaelement/lang/zh-cn.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
771 |
'wp-includes/js/mediaelement/lang/zh.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
772 |
'wp-includes/js/mediaelement/mediaelement-flash-audio-ogg.swf', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
773 |
'wp-includes/js/mediaelement/mediaelement-flash-audio.swf', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
774 |
'wp-includes/js/mediaelement/mediaelement-flash-video-hls.swf', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
775 |
'wp-includes/js/mediaelement/mediaelement-flash-video-mdash.swf', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
776 |
'wp-includes/js/mediaelement/mediaelement-flash-video.swf', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
777 |
'wp-includes/js/mediaelement/renderers/dailymotion.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
778 |
'wp-includes/js/mediaelement/renderers/dailymotion.min.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
779 |
'wp-includes/js/mediaelement/renderers/facebook.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
780 |
'wp-includes/js/mediaelement/renderers/facebook.min.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
781 |
'wp-includes/js/mediaelement/renderers/soundcloud.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
782 |
'wp-includes/js/mediaelement/renderers/soundcloud.min.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
783 |
'wp-includes/js/mediaelement/renderers/twitch.js', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
784 |
'wp-includes/js/mediaelement/renderers/twitch.min.js', |
9 | 785 |
// 5.0 |
786 |
'wp-includes/js/codemirror/jshint.js', |
|
787 |
// 5.1 |
|
788 |
'wp-includes/random_compat/random_bytes_openssl.php', |
|
789 |
'wp-includes/js/tinymce/wp-tinymce.js.gz', |
|
16 | 790 |
// 5.3 |
791 |
'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 |
|
793 |
// 5.4 |
|
794 |
'wp-admin/js/wp-fullscreen-stub.js', |
|
795 |
'wp-admin/js/wp-fullscreen-stub.min.js', |
|
796 |
// 5.5 |
|
797 |
'wp-admin/css/ie.css', |
|
798 |
'wp-admin/css/ie.min.css', |
|
799 |
'wp-admin/css/ie-rtl.css', |
|
800 |
'wp-admin/css/ie-rtl.min.css', |
|
18 | 801 |
// 5.6 |
802 |
'wp-includes/js/jquery/ui/position.min.js', |
|
803 |
'wp-includes/js/jquery/ui/widget.min.js', |
|
804 |
// 5.7 |
|
805 |
'wp-includes/blocks/classic/block.json', |
|
806 |
// 5.8 |
|
807 |
'wp-admin/images/freedoms.png', |
|
808 |
'wp-admin/images/privacy.png', |
|
809 |
'wp-admin/images/about-badge.svg', |
|
810 |
'wp-admin/images/about-color-palette.svg', |
|
811 |
'wp-admin/images/about-color-palette-vert.svg', |
|
812 |
'wp-admin/images/about-header-brushes.svg', |
|
813 |
'wp-includes/block-patterns/large-header.php', |
|
814 |
'wp-includes/block-patterns/heading-paragraph.php', |
|
815 |
'wp-includes/block-patterns/quote.php', |
|
816 |
'wp-includes/block-patterns/text-three-columns-buttons.php', |
|
817 |
'wp-includes/block-patterns/two-buttons.php', |
|
818 |
'wp-includes/block-patterns/two-images.php', |
|
819 |
'wp-includes/block-patterns/three-buttons.php', |
|
820 |
'wp-includes/block-patterns/text-two-columns-with-images.php', |
|
821 |
'wp-includes/block-patterns/text-two-columns.php', |
|
822 |
'wp-includes/block-patterns/large-header-button.php', |
|
823 |
'wp-includes/blocks/subhead/block.json', |
|
824 |
'wp-includes/blocks/subhead', |
|
825 |
'wp-includes/css/dist/editor/editor-styles.css', |
|
826 |
'wp-includes/css/dist/editor/editor-styles.min.css', |
|
827 |
'wp-includes/css/dist/editor/editor-styles-rtl.css', |
|
828 |
'wp-includes/css/dist/editor/editor-styles-rtl.min.css', |
|
19 | 829 |
// 5.9 |
830 |
'wp-includes/blocks/heading/editor.css', |
|
831 |
'wp-includes/blocks/heading/editor.min.css', |
|
832 |
'wp-includes/blocks/heading/editor-rtl.css', |
|
833 |
'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', |
|
839 |
'wp-includes/blocks/query-title/editor.min.css', |
|
840 |
'wp-includes/blocks/query-title/editor-rtl.css', |
|
841 |
'wp-includes/blocks/query-title/editor-rtl.min.css', |
|
842 |
'wp-includes/blocks/tag-cloud/editor.css', |
|
843 |
'wp-includes/blocks/tag-cloud/editor.min.css', |
|
844 |
'wp-includes/blocks/tag-cloud/editor-rtl.css', |
|
845 |
'wp-includes/blocks/tag-cloud/editor-rtl.min.css', |
|
846 |
// 6.0 |
|
847 |
'wp-content/themes/twentytwentytwo/assets/fonts/LICENSE.md', |
|
0 | 848 |
); |
849 |
||
850 |
/** |
|
851 |
* Stores new files in wp-content to copy |
|
852 |
* |
|
853 |
* 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 |
|
855 |
* re-installed in future upgrades, this behaviour is controlled by the |
|
856 |
* introduced version present here being older than the current installed version. |
|
857 |
* |
|
858 |
* The content of this array should follow the following format: |
|
859 |
* Filename (relative to wp-content) => Introduced version |
|
860 |
* Directories should be noted by suffixing it with a trailing slash (/) |
|
861 |
* |
|
862 |
* @since 3.2.0 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
863 |
* @since 4.7.0 New themes were not automatically installed for 4.4-4.6 on |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
864 |
* upgrade. New themes are now installed again. To disable new |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
865 |
* themes from being installed on upgrade, explicitly define |
16 | 866 |
* CORE_UPGRADE_SKIP_NEW_BUNDLED as true. |
0 | 867 |
* @global array $_new_bundled_files |
868 |
* @var array |
|
869 |
* @name $_new_bundled_files |
|
870 |
*/ |
|
871 |
global $_new_bundled_files; |
|
872 |
||
873 |
$_new_bundled_files = array( |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
874 |
'plugins/akismet/' => '2.0', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
875 |
'themes/twentyten/' => '3.0', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
876 |
'themes/twentyeleven/' => '3.2', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
877 |
'themes/twentytwelve/' => '3.5', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
878 |
'themes/twentythirteen/' => '3.6', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
879 |
'themes/twentyfourteen/' => '3.8', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
880 |
'themes/twentyfifteen/' => '4.1', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
881 |
'themes/twentysixteen/' => '4.4', |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
882 |
'themes/twentyseventeen/' => '4.7', |
9 | 883 |
'themes/twentynineteen/' => '5.0', |
16 | 884 |
'themes/twentytwenty/' => '5.3', |
18 | 885 |
'themes/twentytwentyone/' => '5.6', |
19 | 886 |
'themes/twentytwentytwo/' => '5.9', |
0 | 887 |
); |
888 |
||
889 |
/** |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
890 |
* Upgrades the core of WordPress. |
0 | 891 |
* |
892 |
* 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 |
|
894 |
* copied to their locations. |
|
895 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
896 |
* The files in the `$_old_files` list will be removed and the new files |
0 | 897 |
* copied from the zip file after the database is upgraded. |
898 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
899 |
* The files in the `$_new_bundled_files` list will be added to the installation |
0 | 900 |
* if the version is greater than or equal to the old version being upgraded. |
901 |
* |
|
902 |
* The steps for the upgrader for after the new release is downloaded and |
|
903 |
* unzipped is: |
|
904 |
* 1. Test unzipped location for select files to ensure that unzipped worked. |
|
905 |
* 2. Create the .maintenance file in current WordPress base. |
|
906 |
* 3. Copy new WordPress directory over old WordPress files. |
|
907 |
* 4. Upgrade WordPress to new version. |
|
908 |
* 4.1. Copy all files/folders other than wp-content |
|
909 |
* 4.2. Copy any language files to WP_LANG_DIR (which may differ from WP_CONTENT_DIR |
|
910 |
* 4.3. Copy any new bundled themes/plugins to their respective locations |
|
911 |
* 5. Delete new WordPress directory path. |
|
912 |
* 6. Delete .maintenance file. |
|
913 |
* 7. Remove old files. |
|
914 |
* 8. Delete 'update_core' option. |
|
915 |
* |
|
916 |
* There are several areas of failure. For instance if PHP times out before step |
|
917 |
* 6, then you will not be able to access any portion of your site. Also, since |
|
918 |
* the upgrade will not continue where it left off, you will not be able to |
|
919 |
* automatically remove old files and remove the 'update_core' option. This |
|
920 |
* isn't that bad. |
|
921 |
* |
|
922 |
* If the copy of the new WordPress over the old fails, then the worse is that |
|
923 |
* the new WordPress directory will remain. |
|
924 |
* |
|
925 |
* If it is assumed that every file will be copied over, including plugins and |
|
926 |
* themes, then if you edit the default theme, you should rename it, so that |
|
927 |
* your changes remain. |
|
928 |
* |
|
929 |
* @since 2.7.0 |
|
930 |
* |
|
9 | 931 |
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
932 |
* @global array $_old_files |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
933 |
* @global array $_new_bundled_files |
16 | 934 |
* @global wpdb $wpdb WordPress database abstraction object. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
935 |
* @global string $wp_version |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
936 |
* @global string $required_php_version |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
937 |
* @global string $required_mysql_version |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
938 |
* |
0 | 939 |
* @param string $from New release unzipped path. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
940 |
* @param string $to Path to old WordPress installation. |
16 | 941 |
* @return string|WP_Error New WordPress version on success, WP_Error on failure. |
0 | 942 |
*/ |
9 | 943 |
function update_core( $from, $to ) { |
0 | 944 |
global $wp_filesystem, $_old_files, $_new_bundled_files, $wpdb; |
945 |
||
16 | 946 |
set_time_limit( 300 ); |
0 | 947 |
|
5 | 948 |
/** |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
949 |
* Filters feedback messages displayed during the core update process. |
5 | 950 |
* |
951 |
* The filter is first evaluated after the zip file for the latest version |
|
952 |
* has been downloaded and unzipped. It is evaluated five more times during |
|
953 |
* the process: |
|
954 |
* |
|
955 |
* 1. Before WordPress begins the core upgrade process. |
|
956 |
* 2. Before Maintenance Mode is enabled. |
|
957 |
* 3. Before WordPress begins copying over the necessary files. |
|
958 |
* 4. Before Maintenance Mode is disabled. |
|
959 |
* 5. Before the database is upgraded. |
|
960 |
* |
|
961 |
* @since 2.5.0 |
|
962 |
* |
|
963 |
* @param string $feedback The core update feedback messages. |
|
964 |
*/ |
|
965 |
apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); |
|
966 |
||
967 |
// Sanity check the unzipped distribution. |
|
0 | 968 |
$distro = ''; |
9 | 969 |
$roots = array( '/wordpress/', '/wordpress-mu/' ); |
18 | 970 |
|
0 | 971 |
foreach ( $roots as $root ) { |
18 | 972 |
if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) |
973 |
&& $wp_filesystem->exists( $from . $root . 'wp-includes/version.php' ) |
|
974 |
) { |
|
0 | 975 |
$distro = $root; |
976 |
break; |
|
977 |
} |
|
978 |
} |
|
18 | 979 |
|
0 | 980 |
if ( ! $distro ) { |
981 |
$wp_filesystem->delete( $from, true ); |
|
18 | 982 |
|
9 | 983 |
return new WP_Error( 'insane_distro', __( 'The update could not be unpacked' ) ); |
0 | 984 |
} |
985 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
986 |
/* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
987 |
* Import $wp_version, $required_php_version, and $required_mysql_version from the new version. |
19 | 988 |
* DO NOT globalize any variables imported from `version-current.php` in this function. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
989 |
* |
18 | 990 |
* BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
991 |
*/ |
0 | 992 |
$versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; |
18 | 993 |
|
0 | 994 |
if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { |
5 | 995 |
$wp_filesystem->delete( $from, true ); |
18 | 996 |
|
997 |
return new WP_Error( |
|
998 |
'copy_failed_for_version_file', |
|
19 | 999 |
__( 'The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions.' ), |
18 | 1000 |
'wp-includes/version.php' |
1001 |
); |
|
0 | 1002 |
} |
1003 |
||
1004 |
$wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE ); |
|
18 | 1005 |
|
1006 |
/* |
|
1007 |
* `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
|
1008 |
* so don't run it when upgrading from older versions. |
|
1009 |
*/ |
|
1010 |
if ( function_exists( 'wp_opcache_invalidate' ) ) { |
|
1011 |
wp_opcache_invalidate( $versions_file ); |
|
1012 |
} |
|
1013 |
||
16 | 1014 |
require WP_CONTENT_DIR . '/upgrade/version-current.php'; |
0 | 1015 |
$wp_filesystem->delete( $versions_file ); |
1016 |
||
9 | 1017 |
$php_version = phpversion(); |
1018 |
$mysql_version = $wpdb->db_version(); |
|
16 | 1019 |
$old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. |
1020 |
$development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. |
|
9 | 1021 |
$php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
18 | 1022 |
|
9 | 1023 |
if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) { |
0 | 1024 |
$mysql_compat = true; |
9 | 1025 |
} else { |
0 | 1026 |
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); |
9 | 1027 |
} |
1028 |
||
1029 |
if ( ! $mysql_compat || ! $php_compat ) { |
|
1030 |
$wp_filesystem->delete( $from, true ); |
|
1031 |
} |
|
0 | 1032 |
|
9 | 1033 |
$php_update_message = ''; |
16 | 1034 |
|
9 | 1035 |
if ( function_exists( 'wp_get_update_php_url' ) ) { |
16 | 1036 |
$php_update_message = '</p><p>' . sprintf( |
18 | 1037 |
/* translators: %s: URL to Update PHP page. */ |
16 | 1038 |
__( '<a href="%s">Learn more about updating PHP</a>.' ), |
1039 |
esc_url( wp_get_update_php_url() ) |
|
1040 |
); |
|
0 | 1041 |
|
9 | 1042 |
if ( function_exists( 'wp_get_update_php_annotation' ) ) { |
1043 |
$annotation = wp_get_update_php_annotation(); |
|
16 | 1044 |
|
9 | 1045 |
if ( $annotation ) { |
1046 |
$php_update_message .= '</p><p><em>' . $annotation . '</em>'; |
|
1047 |
} |
|
1048 |
} |
|
1049 |
} |
|
1050 |
||
1051 |
if ( ! $mysql_compat && ! $php_compat ) { |
|
16 | 1052 |
return new WP_Error( |
1053 |
'php_mysql_not_compatible', |
|
1054 |
sprintf( |
|
1055 |
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Minimum required MySQL version number, 4: Current PHP version number, 5: Current MySQL version number. */ |
|
1056 |
__( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.' ), |
|
1057 |
$wp_version, |
|
1058 |
$required_php_version, |
|
1059 |
$required_mysql_version, |
|
1060 |
$php_version, |
|
1061 |
$mysql_version |
|
1062 |
) . $php_update_message |
|
1063 |
); |
|
9 | 1064 |
} elseif ( ! $php_compat ) { |
16 | 1065 |
return new WP_Error( |
1066 |
'php_not_compatible', |
|
1067 |
sprintf( |
|
1068 |
/* translators: 1: WordPress version number, 2: Minimum required PHP version number, 3: Current PHP version number. */ |
|
1069 |
__( 'The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.' ), |
|
1070 |
$wp_version, |
|
1071 |
$required_php_version, |
|
1072 |
$php_version |
|
1073 |
) . $php_update_message |
|
1074 |
); |
|
9 | 1075 |
} elseif ( ! $mysql_compat ) { |
16 | 1076 |
return new WP_Error( |
1077 |
'mysql_not_compatible', |
|
1078 |
sprintf( |
|
1079 |
/* translators: 1: WordPress version number, 2: Minimum required MySQL version number, 3: Current MySQL version number. */ |
|
1080 |
__( 'The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.' ), |
|
1081 |
$wp_version, |
|
1082 |
$required_mysql_version, |
|
1083 |
$mysql_version |
|
1084 |
) |
|
1085 |
); |
|
1086 |
} |
|
1087 |
||
1088 |
// Add a warning when the JSON PHP extension is missing. |
|
1089 |
if ( ! extension_loaded( 'json' ) ) { |
|
1090 |
return new WP_Error( |
|
1091 |
'php_not_compatible_json', |
|
1092 |
sprintf( |
|
1093 |
/* translators: 1: WordPress version number, 2: The PHP extension name needed. */ |
|
1094 |
__( 'The update cannot be installed because WordPress %1$s requires the %2$s PHP extension.' ), |
|
1095 |
$wp_version, |
|
1096 |
'JSON' |
|
1097 |
) |
|
1098 |
); |
|
9 | 1099 |
} |
0 | 1100 |
|
5 | 1101 |
/** This filter is documented in wp-admin/includes/update-core.php */ |
0 | 1102 |
apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) ); |
1103 |
||
16 | 1104 |
// Don't copy wp-content, we'll deal with that below. |
1105 |
// We also copy version.php last so failed updates report their old version. |
|
9 | 1106 |
$skip = array( 'wp-content', 'wp-includes/version.php' ); |
0 | 1107 |
$check_is_writable = array(); |
1108 |
||
16 | 1109 |
// Check to see which files don't really need updating - only available for 3.7 and higher. |
0 | 1110 |
if ( function_exists( 'get_core_checksums' ) ) { |
16 | 1111 |
// Find the local version of the working directory. |
5 | 1112 |
$working_dir_local = WP_CONTENT_DIR . '/upgrade/' . basename( $from ) . $distro; |
1113 |
||
0 | 1114 |
$checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' ); |
18 | 1115 |
|
9 | 1116 |
if ( is_array( $checksums ) && isset( $checksums[ $wp_version ] ) ) { |
16 | 1117 |
$checksums = $checksums[ $wp_version ]; // Compat code for 3.7-beta2. |
9 | 1118 |
} |
18 | 1119 |
|
0 | 1120 |
if ( is_array( $checksums ) ) { |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1121 |
foreach ( $checksums as $file => $checksum ) { |
16 | 1122 |
if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
0 | 1123 |
continue; |
9 | 1124 |
} |
18 | 1125 |
|
9 | 1126 |
if ( ! file_exists( ABSPATH . $file ) ) { |
0 | 1127 |
continue; |
9 | 1128 |
} |
18 | 1129 |
|
9 | 1130 |
if ( ! file_exists( $working_dir_local . $file ) ) { |
5 | 1131 |
continue; |
9 | 1132 |
} |
18 | 1133 |
|
1134 |
if ( '.' === dirname( $file ) |
|
1135 |
&& in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ), true ) |
|
1136 |
) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1137 |
continue; |
9 | 1138 |
} |
18 | 1139 |
|
9 | 1140 |
if ( md5_file( ABSPATH . $file ) === $checksum ) { |
0 | 1141 |
$skip[] = $file; |
9 | 1142 |
} else { |
0 | 1143 |
$check_is_writable[ $file ] = ABSPATH . $file; |
9 | 1144 |
} |
0 | 1145 |
} |
1146 |
} |
|
1147 |
} |
|
1148 |
||
1149 |
// If we're using the direct method, we can predict write failures that are due to permissions. |
|
1150 |
if ( $check_is_writable && 'direct' === $wp_filesystem->method ) { |
|
1151 |
$files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) ); |
|
18 | 1152 |
|
0 | 1153 |
if ( $files_writable !== $check_is_writable ) { |
1154 |
$files_not_writable = array_diff_key( $check_is_writable, $files_writable ); |
|
18 | 1155 |
|
0 | 1156 |
foreach ( $files_not_writable as $relative_file_not_writable => $file_not_writable ) { |
1157 |
// If the writable check failed, chmod file to 0644 and try again, same as copy_dir(). |
|
1158 |
$wp_filesystem->chmod( $file_not_writable, FS_CHMOD_FILE ); |
|
18 | 1159 |
|
9 | 1160 |
if ( $wp_filesystem->is_writable( $file_not_writable ) ) { |
0 | 1161 |
unset( $files_not_writable[ $relative_file_not_writable ] ); |
9 | 1162 |
} |
0 | 1163 |
} |
1164 |
||
1165 |
// Store package-relative paths (the key) of non-writable files in the WP_Error object. |
|
1166 |
$error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; |
|
1167 |
||
9 | 1168 |
if ( $files_not_writable ) { |
18 | 1169 |
return new WP_Error( |
1170 |
'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.' ), |
|
1172 |
implode( ', ', $error_data ) |
|
1173 |
); |
|
9 | 1174 |
} |
0 | 1175 |
} |
1176 |
} |
|
1177 |
||
5 | 1178 |
/** This filter is documented in wp-admin/includes/update-core.php */ |
0 | 1179 |
apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) ); |
18 | 1180 |
|
16 | 1181 |
// Create maintenance file to signal that we are upgrading. |
0 | 1182 |
$maintenance_string = '<?php $upgrading = ' . time() . '; ?>'; |
9 | 1183 |
$maintenance_file = $to . '.maintenance'; |
1184 |
$wp_filesystem->delete( $maintenance_file ); |
|
1185 |
$wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE ); |
|
0 | 1186 |
|
5 | 1187 |
/** This filter is documented in wp-admin/includes/update-core.php */ |
0 | 1188 |
apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); |
18 | 1189 |
|
0 | 1190 |
// Copy new versions of WP files into place. |
1191 |
$result = _copy_dir( $from . $distro, $to, $skip ); |
|
18 | 1192 |
|
9 | 1193 |
if ( is_wp_error( $result ) ) { |
18 | 1194 |
$result = new WP_Error( |
1195 |
$result->get_error_code(), |
|
1196 |
$result->get_error_message(), |
|
1197 |
substr( $result->get_error_data(), strlen( $to ) ) |
|
1198 |
); |
|
9 | 1199 |
} |
0 | 1200 |
|
16 | 1201 |
// Since we know the core files have copied over, we can now copy the version file. |
5 | 1202 |
if ( ! is_wp_error( $result ) ) { |
1203 |
if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { |
|
1204 |
$wp_filesystem->delete( $from, true ); |
|
18 | 1205 |
$result = new WP_Error( |
1206 |
'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.' ), |
|
1208 |
'wp-includes/version.php' |
|
1209 |
); |
|
5 | 1210 |
} |
18 | 1211 |
|
5 | 1212 |
$wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); |
18 | 1213 |
|
1214 |
/* |
|
1215 |
* `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
|
1216 |
* so don't run it when upgrading from older versions. |
|
1217 |
*/ |
|
1218 |
if ( function_exists( 'wp_opcache_invalidate' ) ) { |
|
1219 |
wp_opcache_invalidate( $to . 'wp-includes/version.php' ); |
|
1220 |
} |
|
5 | 1221 |
} |
1222 |
||
16 | 1223 |
// Check to make sure everything copied correctly, ignoring the contents of wp-content. |
9 | 1224 |
$skip = array( 'wp-content' ); |
0 | 1225 |
$failed = array(); |
18 | 1226 |
|
0 | 1227 |
if ( isset( $checksums ) && is_array( $checksums ) ) { |
1228 |
foreach ( $checksums as $file => $checksum ) { |
|
16 | 1229 |
if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
0 | 1230 |
continue; |
9 | 1231 |
} |
18 | 1232 |
|
9 | 1233 |
if ( ! file_exists( $working_dir_local . $file ) ) { |
5 | 1234 |
continue; |
9 | 1235 |
} |
18 | 1236 |
|
1237 |
if ( '.' === dirname( $file ) |
|
1238 |
&& in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ), true ) |
|
1239 |
) { |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1240 |
$skip[] = $file; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1241 |
continue; |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1242 |
} |
18 | 1243 |
|
1244 |
if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) === $checksum ) { |
|
0 | 1245 |
$skip[] = $file; |
9 | 1246 |
} else { |
0 | 1247 |
$failed[] = $file; |
9 | 1248 |
} |
0 | 1249 |
} |
1250 |
} |
|
1251 |
||
16 | 1252 |
// Some files didn't copy properly. |
0 | 1253 |
if ( ! empty( $failed ) ) { |
1254 |
$total_size = 0; |
|
18 | 1255 |
|
0 | 1256 |
foreach ( $failed as $file ) { |
9 | 1257 |
if ( file_exists( $working_dir_local . $file ) ) { |
0 | 1258 |
$total_size += filesize( $working_dir_local . $file ); |
9 | 1259 |
} |
0 | 1260 |
} |
1261 |
||
1262 |
// If we don't have enough free space, it isn't worth trying again. |
|
1263 |
// Unlikely to be hit due to the check in unzip_file(). |
|
19 | 1264 |
$available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( ABSPATH ) : false; |
18 | 1265 |
|
0 | 1266 |
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.' ) ); |
|
1268 |
} else { |
|
1269 |
$result = _copy_dir( $from . $distro, $to, $skip ); |
|
18 | 1270 |
|
9 | 1271 |
if ( is_wp_error( $result ) ) { |
18 | 1272 |
$result = new WP_Error( |
1273 |
$result->get_error_code() . '_retry', |
|
1274 |
$result->get_error_message(), |
|
1275 |
substr( $result->get_error_data(), strlen( $to ) ) |
|
1276 |
); |
|
9 | 1277 |
} |
0 | 1278 |
} |
1279 |
} |
|
1280 |
||
16 | 1281 |
// Custom content directory needs updating now. |
1282 |
// Copy languages. |
|
9 | 1283 |
if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) { |
18 | 1284 |
if ( WP_LANG_DIR !== ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) { |
0 | 1285 |
$lang_dir = WP_LANG_DIR; |
9 | 1286 |
} else { |
0 | 1287 |
$lang_dir = WP_CONTENT_DIR . '/languages'; |
9 | 1288 |
} |
0 | 1289 |
|
16 | 1290 |
// Check if the language directory exists first. |
1291 |
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. |
|
1293 |
$wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR ); |
|
1294 |
clearstatcache(); // For FTP, need to clear the stat cache. |
|
0 | 1295 |
} |
1296 |
||
9 | 1297 |
if ( @is_dir( $lang_dir ) ) { |
1298 |
$wp_lang_dir = $wp_filesystem->find_folder( $lang_dir ); |
|
18 | 1299 |
|
0 | 1300 |
if ( $wp_lang_dir ) { |
9 | 1301 |
$result = copy_dir( $from . $distro . 'wp-content/languages/', $wp_lang_dir ); |
18 | 1302 |
|
9 | 1303 |
if ( is_wp_error( $result ) ) { |
18 | 1304 |
$result = new WP_Error( |
1305 |
$result->get_error_code() . '_languages', |
|
1306 |
$result->get_error_message(), |
|
1307 |
substr( $result->get_error_data(), strlen( $wp_lang_dir ) ) |
|
1308 |
); |
|
9 | 1309 |
} |
0 | 1310 |
} |
1311 |
} |
|
1312 |
} |
|
1313 |
||
5 | 1314 |
/** This filter is documented in wp-admin/includes/update-core.php */ |
0 | 1315 |
apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); |
18 | 1316 |
|
16 | 1317 |
// Remove maintenance file, we're done with potential site-breaking changes. |
0 | 1318 |
$wp_filesystem->delete( $maintenance_file ); |
1319 |
||
18 | 1320 |
// 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, |
1321 |
// preventing installation of Twenty Twelve. |
|
16 | 1322 |
if ( '3.5' === $old_wp_version ) { |
18 | 1323 |
if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) |
1324 |
&& ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) |
|
1325 |
) { |
|
0 | 1326 |
$wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); |
1327 |
} |
|
1328 |
} |
|
1329 |
||
16 | 1330 |
/* |
1331 |
* Copy new bundled plugins & themes. |
|
1332 |
* This gives us the ability to install new plugins & themes bundled with |
|
1333 |
* future versions of WordPress whilst avoiding the re-install upon upgrade issue. |
|
1334 |
* $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated. |
|
1335 |
*/ |
|
18 | 1336 |
if ( ! is_wp_error( $result ) |
1337 |
&& ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) |
|
1338 |
) { |
|
0 | 1339 |
foreach ( (array) $_new_bundled_files as $file => $introduced_version ) { |
16 | 1340 |
// If a $development_build or if $introduced version is greater than what the site was previously running. |
0 | 1341 |
if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { |
16 | 1342 |
$directory = ( '/' === $file[ strlen( $file ) - 1 ] ); |
0 | 1343 |
|
16 | 1344 |
list( $type, $filename ) = explode( '/', $file, 2 ); |
1345 |
||
1346 |
// Check to see if the bundled items exist before attempting to copy them. |
|
9 | 1347 |
if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) ) { |
0 | 1348 |
continue; |
9 | 1349 |
} |
0 | 1350 |
|
16 | 1351 |
if ( 'plugins' === $type ) { |
0 | 1352 |
$dest = $wp_filesystem->wp_plugins_dir(); |
16 | 1353 |
} elseif ( 'themes' === $type ) { |
1354 |
// Back-compat, ::wp_themes_dir() did not return trailingslash'd pre-3.2. |
|
1355 |
$dest = trailingslashit( $wp_filesystem->wp_themes_dir() ); |
|
9 | 1356 |
} else { |
0 | 1357 |
continue; |
9 | 1358 |
} |
0 | 1359 |
|
1360 |
if ( ! $directory ) { |
|
9 | 1361 |
if ( ! $development_build && $wp_filesystem->exists( $dest . $filename ) ) { |
0 | 1362 |
continue; |
9 | 1363 |
} |
0 | 1364 |
|
9 | 1365 |
if ( ! $wp_filesystem->copy( $from . $distro . 'wp-content/' . $file, $dest . $filename, FS_CHMOD_FILE ) ) { |
0 | 1366 |
$result = new WP_Error( "copy_failed_for_new_bundled_$type", __( 'Could not copy file.' ), $dest . $filename ); |
9 | 1367 |
} |
0 | 1368 |
} else { |
9 | 1369 |
if ( ! $development_build && $wp_filesystem->is_dir( $dest . $filename ) ) { |
0 | 1370 |
continue; |
9 | 1371 |
} |
0 | 1372 |
|
9 | 1373 |
$wp_filesystem->mkdir( $dest . $filename, FS_CHMOD_DIR ); |
1374 |
$_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename ); |
|
0 | 1375 |
|
1376 |
// If a error occurs partway through this final step, keep the error flowing through, but keep process going. |
|
1377 |
if ( is_wp_error( $_result ) ) { |
|
9 | 1378 |
if ( ! is_wp_error( $result ) ) { |
0 | 1379 |
$result = new WP_Error; |
9 | 1380 |
} |
18 | 1381 |
|
1382 |
$result->add( |
|
1383 |
$_result->get_error_code() . "_$type", |
|
1384 |
$_result->get_error_message(), |
|
1385 |
substr( $_result->get_error_data(), strlen( $dest ) ) |
|
1386 |
); |
|
0 | 1387 |
} |
1388 |
} |
|
1389 |
} |
|
16 | 1390 |
} // End foreach. |
0 | 1391 |
} |
1392 |
||
16 | 1393 |
// Handle $result error from the above blocks. |
9 | 1394 |
if ( is_wp_error( $result ) ) { |
1395 |
$wp_filesystem->delete( $from, true ); |
|
18 | 1396 |
|
0 | 1397 |
return $result; |
1398 |
} |
|
1399 |
||
16 | 1400 |
// Remove old files. |
0 | 1401 |
foreach ( $_old_files as $old_file ) { |
1402 |
$old_file = $to . $old_file; |
|
18 | 1403 |
|
9 | 1404 |
if ( ! $wp_filesystem->exists( $old_file ) ) { |
0 | 1405 |
continue; |
9 | 1406 |
} |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1407 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1408 |
// If the file isn't deleted, try writing an empty string to the file instead. |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1409 |
if ( ! $wp_filesystem->delete( $old_file, true ) && $wp_filesystem->is_file( $old_file ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1410 |
$wp_filesystem->put_contents( $old_file, '' ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1411 |
} |
0 | 1412 |
} |
1413 |
||
16 | 1414 |
// Remove any Genericons example.html's from the filesystem. |
5 | 1415 |
_upgrade_422_remove_genericons(); |
1416 |
||
18 | 1417 |
// Deactivate the REST API plugin if its version is 2.0 Beta 4 or lower. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1418 |
_upgrade_440_force_deactivate_incompatible_plugins(); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1419 |
|
19 | 1420 |
// Deactivate the Gutenberg plugin if its version is 11.8 or lower. |
1421 |
_upgrade_590_force_deactivate_incompatible_plugins(); |
|
18 | 1422 |
|
16 | 1423 |
// Upgrade DB with separate request. |
5 | 1424 |
/** This filter is documented in wp-admin/includes/update-core.php */ |
1425 |
apply_filters( 'update_feedback', __( 'Upgrading database…' ) ); |
|
18 | 1426 |
|
9 | 1427 |
$db_upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' ); |
1428 |
wp_remote_post( $db_upgrade_url, array( 'timeout' => 60 ) ); |
|
0 | 1429 |
|
16 | 1430 |
// Clear the cache to prevent an update_option() from saving a stale db_version to the cache. |
5 | 1431 |
wp_cache_flush(); |
16 | 1432 |
// Not all cache back ends listen to 'flush'. |
5 | 1433 |
wp_cache_delete( 'alloptions', 'options' ); |
1434 |
||
16 | 1435 |
// Remove working directory. |
9 | 1436 |
$wp_filesystem->delete( $from, true ); |
0 | 1437 |
|
16 | 1438 |
// Force refresh of update information. |
9 | 1439 |
if ( function_exists( 'delete_site_transient' ) ) { |
1440 |
delete_site_transient( 'update_core' ); |
|
1441 |
} else { |
|
1442 |
delete_option( 'update_core' ); |
|
1443 |
} |
|
0 | 1444 |
|
5 | 1445 |
/** |
1446 |
* Fires after WordPress core has been successfully updated. |
|
1447 |
* |
|
1448 |
* @since 3.3.0 |
|
1449 |
* |
|
1450 |
* @param string $wp_version The current WordPress version. |
|
1451 |
*/ |
|
0 | 1452 |
do_action( '_core_updated_successfully', $wp_version ); |
1453 |
||
16 | 1454 |
// Clear the option that blocks auto-updates after failures, now that we've been successful. |
9 | 1455 |
if ( function_exists( 'delete_site_option' ) ) { |
0 | 1456 |
delete_site_option( 'auto_core_update_failed' ); |
9 | 1457 |
} |
0 | 1458 |
|
1459 |
return $wp_version; |
|
1460 |
} |
|
1461 |
||
1462 |
/** |
|
1463 |
* Copies a directory from one location to another via the WordPress Filesystem Abstraction. |
|
16 | 1464 |
* |
0 | 1465 |
* Assumes that WP_Filesystem() has already been called and setup. |
1466 |
* |
|
16 | 1467 |
* This is a standalone copy of the `copy_dir()` function that is used to |
1468 |
* upgrade the core files. It is placed here so that the version of this |
|
1469 |
* function from the *new* WordPress version will be called. |
|
1470 |
* |
|
1471 |
* It was initially added for the 3.1 -> 3.2 upgrade. |
|
0 | 1472 |
* |
1473 |
* @ignore |
|
1474 |
* @since 3.2.0 |
|
16 | 1475 |
* @since 3.7.0 Updated not to use a regular expression for the skip list. |
1476 |
* |
|
0 | 1477 |
* @see copy_dir() |
16 | 1478 |
* @link https://core.trac.wordpress.org/ticket/17173 |
0 | 1479 |
* |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1480 |
* @global WP_Filesystem_Base $wp_filesystem |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1481 |
* |
16 | 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. |
|
0 | 1486 |
*/ |
9 | 1487 |
function _copy_dir( $from, $to, $skip_list = array() ) { |
0 | 1488 |
global $wp_filesystem; |
1489 |
||
9 | 1490 |
$dirlist = $wp_filesystem->dirlist( $from ); |
0 | 1491 |
|
18 | 1492 |
if ( false === $dirlist ) { |
1493 |
return new WP_Error( 'dirlist_failed__copy_dir', __( 'Directory listing failed.' ), basename( $to ) ); |
|
1494 |
} |
|
1495 |
||
9 | 1496 |
$from = trailingslashit( $from ); |
1497 |
$to = trailingslashit( $to ); |
|
0 | 1498 |
|
1499 |
foreach ( (array) $dirlist as $filename => $fileinfo ) { |
|
16 | 1500 |
if ( in_array( $filename, $skip_list, true ) ) { |
0 | 1501 |
continue; |
9 | 1502 |
} |
0 | 1503 |
|
16 | 1504 |
if ( 'f' === $fileinfo['type'] ) { |
9 | 1505 |
if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) { |
0 | 1506 |
// If copy failed, chmod file to 0644 and try again. |
1507 |
$wp_filesystem->chmod( $to . $filename, FS_CHMOD_FILE ); |
|
18 | 1508 |
|
9 | 1509 |
if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) { |
0 | 1510 |
return new WP_Error( 'copy_failed__copy_dir', __( 'Could not copy file.' ), $to . $filename ); |
9 | 1511 |
} |
0 | 1512 |
} |
16 | 1513 |
|
18 | 1514 |
/* |
1515 |
* `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
|
1516 |
* so don't run it when upgrading from older versions. |
|
1517 |
*/ |
|
16 | 1518 |
if ( function_exists( 'wp_opcache_invalidate' ) ) { |
1519 |
wp_opcache_invalidate( $to . $filename ); |
|
1520 |
} |
|
1521 |
} elseif ( 'd' === $fileinfo['type'] ) { |
|
9 | 1522 |
if ( ! $wp_filesystem->is_dir( $to . $filename ) ) { |
1523 |
if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) { |
|
0 | 1524 |
return new WP_Error( 'mkdir_failed__copy_dir', __( 'Could not create directory.' ), $to . $filename ); |
9 | 1525 |
} |
0 | 1526 |
} |
1527 |
||
5 | 1528 |
/* |
1529 |
* Generate the $sub_skip_list for the subdirectory as a sub-set |
|
1530 |
* of the existing $skip_list. |
|
1531 |
*/ |
|
0 | 1532 |
$sub_skip_list = array(); |
18 | 1533 |
|
0 | 1534 |
foreach ( $skip_list as $skip_item ) { |
9 | 1535 |
if ( 0 === strpos( $skip_item, $filename . '/' ) ) { |
0 | 1536 |
$sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item ); |
9 | 1537 |
} |
0 | 1538 |
} |
1539 |
||
9 | 1540 |
$result = _copy_dir( $from . $filename, $to . $filename, $sub_skip_list ); |
18 | 1541 |
|
9 | 1542 |
if ( is_wp_error( $result ) ) { |
0 | 1543 |
return $result; |
9 | 1544 |
} |
0 | 1545 |
} |
1546 |
} |
|
18 | 1547 |
|
0 | 1548 |
return true; |
1549 |
} |
|
1550 |
||
1551 |
/** |
|
1552 |
* Redirect to the About WordPress page after a successful upgrade. |
|
1553 |
* |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1554 |
* This function is only needed when the existing installation is older than 3.4.0. |
0 | 1555 |
* |
1556 |
* @since 3.3.0 |
|
1557 |
* |
|
16 | 1558 |
* @global string $wp_version The WordPress version string. |
19 | 1559 |
* @global string $pagenow The filename of the current screen. |
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1560 |
* @global string $action |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1561 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1562 |
* @param string $new_version |
0 | 1563 |
*/ |
1564 |
function _redirect_to_about_wordpress( $new_version ) { |
|
1565 |
global $wp_version, $pagenow, $action; |
|
1566 |
||
9 | 1567 |
if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) { |
0 | 1568 |
return; |
9 | 1569 |
} |
0 | 1570 |
|
1571 |
// Ensure we only run this on the update-core.php page. The Core_Upgrader may be used in other contexts. |
|
16 | 1572 |
if ( 'update-core.php' !== $pagenow ) { |
0 | 1573 |
return; |
9 | 1574 |
} |
0 | 1575 |
|
16 | 1576 |
if ( 'do-core-upgrade' !== $action && 'do-core-reinstall' !== $action ) { |
9 | 1577 |
return; |
1578 |
} |
|
0 | 1579 |
|
5 | 1580 |
// Load the updated default text localization domain for new strings. |
0 | 1581 |
load_default_textdomain(); |
1582 |
||
16 | 1583 |
// See do_core_upgrade(). |
1584 |
show_message( __( 'WordPress updated successfully.' ) ); |
|
0 | 1585 |
|
1586 |
// self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional. |
|
16 | 1587 |
show_message( |
1588 |
'<span class="hide-if-no-js">' . sprintf( |
|
1589 |
/* translators: 1: WordPress version, 2: URL to About screen. */ |
|
1590 |
__( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%2$s">here</a>.' ), |
|
1591 |
$new_version, |
|
1592 |
'about.php?updated' |
|
1593 |
) . '</span>' |
|
1594 |
); |
|
1595 |
show_message( |
|
1596 |
'<span class="hide-if-js">' . sprintf( |
|
1597 |
/* translators: 1: WordPress version, 2: URL to About screen. */ |
|
1598 |
__( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), |
|
1599 |
$new_version, |
|
1600 |
'about.php?updated' |
|
1601 |
) . '</span>' |
|
1602 |
); |
|
0 | 1603 |
echo '</div>'; |
1604 |
?> |
|
1605 |
<script type="text/javascript"> |
|
1606 |
window.location = 'about.php?updated'; |
|
1607 |
</script> |
|
1608 |
<?php |
|
1609 |
||
5 | 1610 |
// Include admin-footer.php and exit. |
16 | 1611 |
require_once ABSPATH . 'wp-admin/admin-footer.php'; |
1612 |
exit; |
|
0 | 1613 |
} |
5 | 1614 |
|
1615 |
/** |
|
1616 |
* Cleans up Genericons example files. |
|
1617 |
* |
|
1618 |
* @since 4.2.2 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1619 |
* |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1620 |
* @global array $wp_theme_directories |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1621 |
* @global WP_Filesystem_Base $wp_filesystem |
5 | 1622 |
*/ |
1623 |
function _upgrade_422_remove_genericons() { |
|
1624 |
global $wp_theme_directories, $wp_filesystem; |
|
1625 |
||
1626 |
// A list of the affected files using the filesystem absolute paths. |
|
1627 |
$affected_files = array(); |
|
1628 |
||
16 | 1629 |
// Themes. |
5 | 1630 |
foreach ( $wp_theme_directories as $directory ) { |
1631 |
$affected_theme_files = _upgrade_422_find_genericons_files_in_folder( $directory ); |
|
1632 |
$affected_files = array_merge( $affected_files, $affected_theme_files ); |
|
1633 |
} |
|
1634 |
||
16 | 1635 |
// Plugins. |
5 | 1636 |
$affected_plugin_files = _upgrade_422_find_genericons_files_in_folder( WP_PLUGIN_DIR ); |
1637 |
$affected_files = array_merge( $affected_files, $affected_plugin_files ); |
|
1638 |
||
1639 |
foreach ( $affected_files as $file ) { |
|
1640 |
$gen_dir = $wp_filesystem->find_folder( trailingslashit( dirname( $file ) ) ); |
|
18 | 1641 |
|
5 | 1642 |
if ( empty( $gen_dir ) ) { |
1643 |
continue; |
|
1644 |
} |
|
1645 |
||
16 | 1646 |
// The path when the file is accessed via WP_Filesystem may differ in the case of FTP. |
5 | 1647 |
$remote_file = $gen_dir . basename( $file ); |
1648 |
||
1649 |
if ( ! $wp_filesystem->exists( $remote_file ) ) { |
|
1650 |
continue; |
|
1651 |
} |
|
1652 |
||
1653 |
if ( ! $wp_filesystem->delete( $remote_file, false, 'f' ) ) { |
|
1654 |
$wp_filesystem->put_contents( $remote_file, '' ); |
|
1655 |
} |
|
1656 |
} |
|
1657 |
} |
|
1658 |
||
1659 |
/** |
|
1660 |
* Recursively find Genericons example files in a given folder. |
|
1661 |
* |
|
1662 |
* @ignore |
|
1663 |
* @since 4.2.2 |
|
1664 |
* |
|
1665 |
* @param string $directory Directory path. Expects trailingslashed. |
|
1666 |
* @return array |
|
1667 |
*/ |
|
1668 |
function _upgrade_422_find_genericons_files_in_folder( $directory ) { |
|
1669 |
$directory = trailingslashit( $directory ); |
|
1670 |
$files = array(); |
|
1671 |
||
18 | 1672 |
if ( file_exists( "{$directory}example.html" ) |
1673 |
&& false !== strpos( file_get_contents( "{$directory}example.html" ), '<title>Genericons</title>' ) |
|
1674 |
) { |
|
5 | 1675 |
$files[] = "{$directory}example.html"; |
1676 |
} |
|
1677 |
||
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1678 |
$dirs = glob( $directory . '*', GLOB_ONLYDIR ); |
19 | 1679 |
$dirs = array_filter( |
1680 |
$dirs, |
|
1681 |
static function( $dir ) { |
|
1682 |
// Skip any node_modules directories. |
|
1683 |
return false === strpos( $dir, 'node_modules' ); |
|
1684 |
} |
|
1685 |
); |
|
18 | 1686 |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1687 |
if ( $dirs ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1688 |
foreach ( $dirs as $dir ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1689 |
$files = array_merge( $files, _upgrade_422_find_genericons_files_in_folder( $dir ) ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1690 |
} |
5 | 1691 |
} |
1692 |
||
1693 |
return $files; |
|
1694 |
} |
|
7
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1695 |
|
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1696 |
/** |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1697 |
* @ignore |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1698 |
* @since 4.4.0 |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1699 |
*/ |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1700 |
function _upgrade_440_force_deactivate_incompatible_plugins() { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1701 |
if ( defined( 'REST_API_VERSION' ) && version_compare( REST_API_VERSION, '2.0-beta4', '<=' ) ) { |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1702 |
deactivate_plugins( array( 'rest-api/plugin.php' ), true ); |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1703 |
} |
cf61fcea0001
resynchronize code repo with production
ymh <ymh.work@gmail.com>
parents:
5
diff
changeset
|
1704 |
} |
18 | 1705 |
|
1706 |
/** |
|
19 | 1707 |
* @access private |
18 | 1708 |
* @ignore |
19 | 1709 |
* @since 5.9.0 |
18 | 1710 |
*/ |
19 | 1711 |
function _upgrade_590_force_deactivate_incompatible_plugins() { |
1712 |
if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.9', '<' ) ) { |
|
18 | 1713 |
$deactivated_gutenberg['gutenberg'] = array( |
1714 |
'plugin_name' => 'Gutenberg', |
|
1715 |
'version_deactivated' => GUTENBERG_VERSION, |
|
19 | 1716 |
'version_compatible' => '11.9', |
18 | 1717 |
); |
1718 |
if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) { |
|
1719 |
$deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() ); |
|
1720 |
$deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); |
|
1721 |
update_site_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); |
|
1722 |
} else { |
|
1723 |
$deactivated_plugins = get_option( 'wp_force_deactivated_plugins', array() ); |
|
1724 |
$deactivated_plugins = array_merge( $deactivated_plugins, $deactivated_gutenberg ); |
|
1725 |
update_option( 'wp_force_deactivated_plugins', $deactivated_plugins ); |
|
1726 |
} |
|
1727 |
deactivate_plugins( array( 'gutenberg/gutenberg.php' ), true ); |
|
1728 |
} |
|
1729 |
} |