Commit Graph

305 Commits

Author SHA1 Message Date
Sergey Biryukov
48f9940cfc I18N: Change unnecessary uppercased words in WP_Upgrader::generic_strings() to lower case.
See #18218.
Built from https://develop.svn.wordpress.org/trunk@38074


git-svn-id: http://core.svn.wordpress.org/trunk@38015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-17 13:29:29 +00:00
Konstantin Obenland
8c82515ab6 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.


Built from https://develop.svn.wordpress.org/trunk@37714


git-svn-id: http://core.svn.wordpress.org/trunk@37680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-15 16:37:29 +00:00
Dominik Schilling
bdd2199647 Upgrade: Trigger the upgrader_process_complete action for translation updates.
This brings `Language_Pack_Upgrader` in line with the core, theme, and plugin upgrader.

Props ronalfy.
Fixes #36872.
Built from https://develop.svn.wordpress.org/trunk@37687


git-svn-id: http://core.svn.wordpress.org/trunk@37653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-11 17:44:28 +00:00
Drew Jaynes
62d4798863 Docs: Update hook docs for the upgrader_package_options filter and upgrader_process_complete action to reflect expected values in the core, language pack, theme, and plugin contexts.
Props nextendweb for the initial patch.
See [37550]. Fixes #36875.

Built from https://develop.svn.wordpress.org/trunk@37558


git-svn-id: http://core.svn.wordpress.org/trunk@37526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 14:45:27 +00:00
Drew Jaynes
ada2858cd9 Docs: Fix the hook doc for upgrader_process_complete to notate all values that might be present in the hook_extra array in the various update contexts.
h/t Nextendweb.

See #32246.

Built from https://develop.svn.wordpress.org/trunk@37550


git-svn-id: http://core.svn.wordpress.org/trunk@37518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-24 17:52:30 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

Built from https://develop.svn.wordpress.org/trunk@37488


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Sergey Biryukov
117cef2d46 Docs: Correct variable type for WP_Upgrader::$strings.
Props mt8.biz.
Fixes #36883.
Built from https://develop.svn.wordpress.org/trunk@37462


git-svn-id: http://core.svn.wordpress.org/trunk@37430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-19 00:36:27 +00:00
Dominik Schilling
1564bd2c1f Upgrader: Remove debug cruft.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37413


git-svn-id: http://core.svn.wordpress.org/trunk@37379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 18:32:28 +00:00
Dominik Schilling
a8525b1109 Upgrader: After [37409] move the hook docs for upgrader_process_complete to WP_Upgrader::run().
Add changelog entry for [23912].

Part 7/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37412


git-svn-id: http://core.svn.wordpress.org/trunk@37378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 12:20:27 +00:00
Dominik Schilling
5844c585f6 Upgrader: Update wp-admin/includes/class-wp-upgrader.php to require_once the new files added in [37406] and [37409].
Part 6/8.
See #36618.
Built from https://develop.svn.wordpress.org/trunk@37411


git-svn-id: http://core.svn.wordpress.org/trunk@37377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-10 11:59:27 +00:00
Drew Jaynes
fe3b007fdd Docs: Remove inline @see tags from function, class, and method references in inline docs.
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.

Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.

See #32246.

Built from https://develop.svn.wordpress.org/trunk@37342


git-svn-id: http://core.svn.wordpress.org/trunk@37308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-02 04:00:28 +00:00
Dominik Schilling
7b03510520 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been updated.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches, `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

This is a follow-up to [34751].

See #34029.
Fixes #36383.
Built from https://develop.svn.wordpress.org/trunk@37272


git-svn-id: http://core.svn.wordpress.org/trunk@37238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-21 09:09:28 +00:00
John Blackbourn
852f085d19 Docs: The $update_result parameter passed to WP_Automatic_Updater::after_core_update() is never a WP_Error. If an error is returned, the error object lives in the result property of the paramter.
See #32246

Built from https://develop.svn.wordpress.org/trunk@36995


git-svn-id: http://core.svn.wordpress.org/trunk@36962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-14 22:43:27 +00:00
Drew Jaynes
08e7c845cc Docs: Improve documentation for WP_Upgrader::release_lock(), introduced in [36349].
See #34878. See #35986.

Built from https://develop.svn.wordpress.org/trunk@36822


git-svn-id: http://core.svn.wordpress.org/trunk@36789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 07:11:25 +00:00
Drew Jaynes
1dc0a9a5f7 Docs: Improve documentation for WP_Upgrader::create_lock(), introduced in [36349].
See #34878. See #35986.

Built from https://develop.svn.wordpress.org/trunk@36821


git-svn-id: http://core.svn.wordpress.org/trunk@36788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 07:08:25 +00:00
Dion Hulse
65182e4dc8 Upgrade: Switch the locking mechanism to using static methods so that it can be accessed from other upgrade-classes.
Fixes #34878

Built from https://develop.svn.wordpress.org/trunk@36370


git-svn-id: http://core.svn.wordpress.org/trunk@36337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-21 01:22:25 +00:00
Dion Hulse
006ae74d4c Core Upgrader: Add a locking mechanism to avoid two concurrent updates of WordPress occuring.
Fixes #34878

Built from https://develop.svn.wordpress.org/trunk@36349


git-svn-id: http://core.svn.wordpress.org/trunk@36316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-19 05:07:26 +00:00
Dion Hulse
be94558c46 Upgrader: Pass the $args['hook_extra'] context to the upgrader_source_selection filter.
Props afragen
Fixes #34696

Built from https://develop.svn.wordpress.org/trunk@35642


git-svn-id: http://core.svn.wordpress.org/trunk@35606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-16 02:47:25 +00:00
Dominik Schilling
1f15d30396 Upgrade: Revert [34543] because of incomplete and incorrect functionality.
See #33932.
Fixes #34434.
Built from https://develop.svn.wordpress.org/trunk@35619


git-svn-id: http://core.svn.wordpress.org/trunk@35583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-11 22:46:26 +00:00
Dion Hulse
2103984c02 Fix a typo in a docblock
Built from https://develop.svn.wordpress.org/trunk@35586


git-svn-id: http://core.svn.wordpress.org/trunk@35550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-09 03:38:26 +00:00
Sergey Biryukov
d6e25c0aae Remove <code> tags from translatable strings in wp-admin/includes/class-wp-upgrader.php.
Add translator comments.

Props ramiy.
Fixes #34580.
Built from https://develop.svn.wordpress.org/trunk@35551


git-svn-id: http://core.svn.wordpress.org/trunk@35515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-06 00:41:25 +00:00
Drew Jaynes
217b661703 Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@35170


git-svn-id: http://core.svn.wordpress.org/trunk@35136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-14 23:44:25 +00:00
Drew Jaynes
57e69d4a3f Upgrader: Introduce a new action hook pre_auto_update, which fires immediately prior to an auto-update for core, themes, plugins, or translations.
Props DavidAnderson, welcher.
Fixes #30441.

Built from https://develop.svn.wordpress.org/trunk@35144


git-svn-id: http://core.svn.wordpress.org/trunk@35110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-13 18:58:25 +00:00
Jeremy Felt
9926983b66 Revert [34778], continue using _site_option() for the current network.
The `_network_option()` parameter order will be changing to accept `$network_id` first. The `_site_option()` functions will remain in use throughout core as our way of retrieving a network option for the current network.

See #28290.

Built from https://develop.svn.wordpress.org/trunk@34912


git-svn-id: http://core.svn.wordpress.org/trunk@34877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-07 17:11:25 +00:00
Boone Gorges
0e7c1d3b14 Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.
Built from https://develop.svn.wordpress.org/trunk@34828


git-svn-id: http://core.svn.wordpress.org/trunk@34793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 15:06:28 +00:00
Jeremy Felt
54512d64cb MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.

Built from https://develop.svn.wordpress.org/trunk@34778


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Dominik Schilling
18413f3e81 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been installed.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

Fixes #34029.
Built from https://develop.svn.wordpress.org/trunk@34751


git-svn-id: http://core.svn.wordpress.org/trunk@34716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 21:21:25 +00:00
Dominik Schilling
113a9d4517 Language Upgrader: Re-use the automatic upgrader skin if the parent upgrader is using it.
Prevents broken Ajax responses when `Language_Pack_Upgrader::async_upgrade()` gets triggered during a shiny update.

Fixes #34048.
Built from https://develop.svn.wordpress.org/trunk@34748


git-svn-id: http://core.svn.wordpress.org/trunk@34713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:25:26 +00:00
Drew Jaynes
8b4c499664 Docs: There are quite alot of typos in core inline comments.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@34717


git-svn-id: http://core.svn.wordpress.org/trunk@34681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:48 +00:00
John Blackbourn
aa35e473f7 callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead.
Fixes #34032

Built from https://develop.svn.wordpress.org/trunk@34566


git-svn-id: http://core.svn.wordpress.org/trunk@34530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 23:58:25 +00:00
John Blackbourn
c69ec5a19a Introduce a send_update_notification_email which controls whether an update notification email is sent for background updates. This filter allows control over each of the update types (plugin, theme, translation) and compliments the automatic_updates_send_debug_email and send_core_update_notification_email filters.
Fixes #33932
Props ronalfy

Built from https://develop.svn.wordpress.org/trunk@34543


git-svn-id: http://core.svn.wordpress.org/trunk@34507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 14:29:23 +00:00
Drew Jaynes
9dba452afc Docs: Standardize and clarify class DocBlocks for all of the Upgrade API classes.
Standardizes summaries and tags for the following classes:

* `WP_Upgrader`
* `Plugin_Upgrader`
* `Theme_Upgrader`
* `Language_Pack_Upgrader`
* `Core_Upgrader`
* `File_Upload_Upgrader`
* `WP_Automatic_Updater`

See #32246.

Built from https://develop.svn.wordpress.org/trunk@34499


git-svn-id: http://core.svn.wordpress.org/trunk@34463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:54:25 +00:00
Drew Jaynes
dae68e1485 Docs: Clarify the file header for wp-admin/includes/class-wp-upgrader.php.
See #33701.

Built from https://develop.svn.wordpress.org/trunk@34498


git-svn-id: http://core.svn.wordpress.org/trunk@34462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:44:25 +00:00
Drew Jaynes
8c0a805273 Docs: Mark the optional $upgrader parameter as such and add a description in the DocBlock for Language_Pack_Upgrader::async_upgrade().
See [32655].

See #30989. See #32246.

Built from https://develop.svn.wordpress.org/trunk@34497


git-svn-id: http://core.svn.wordpress.org/trunk@34461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:35:25 +00:00
Drew Jaynes
416df545ba Docs: Fix a variety of inline documentation syntax issues and add some strategic spacing.
Fixes #29086.

Built from https://develop.svn.wordpress.org/trunk@33685


git-svn-id: http://core.svn.wordpress.org/trunk@33652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 04:13:24 +00:00
Drew Jaynes
3bb87e08e4 Docs: Add missing @access tags to properties and methods in wp-admin/includes/class-wp-upgrader.
See #29086.

Built from https://develop.svn.wordpress.org/trunk@33684


git-svn-id: http://core.svn.wordpress.org/trunk@33651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 04:05:25 +00:00
Drew Jaynes
73d6dec8eb Docs: Correct a typo in the summary for the Theme_Upgrader->bulk property.
Also adds a couple of missing `@access` tags.

Props kraftbj
See #29086.

Built from https://develop.svn.wordpress.org/trunk@33683


git-svn-id: http://core.svn.wordpress.org/trunk@33650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-21 03:15:25 +00:00
Dominik Schilling
dc4c2fa0bf Upgrade: Lowercase the "s" in remove_all_filters().
props afragen.
fixes #33173.
Built from https://develop.svn.wordpress.org/trunk@33487


git-svn-id: http://core.svn.wordpress.org/trunk@33454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-29 14:57:25 +00:00
Mark Jaquith
4965581097 Don't blindly trust the output of glob() to be an array.
props kitchin
fixes #33093
Built from https://develop.svn.wordpress.org/trunk@33447


git-svn-id: http://core.svn.wordpress.org/trunk@33414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-27 18:05:24 +00:00
Drew Jaynes
0322d0e89b Fix inline documentation syntax in the WP_Upgrader->clear_destination() method added in 4.3.
See [32854]. See #32891.

Built from https://develop.svn.wordpress.org/trunk@33209


git-svn-id: http://core.svn.wordpress.org/trunk@33181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-13 19:46:25 +00:00
Scott Taylor
642af1f3f4 Some doc blocks should use bool instead of true|false
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32963


git-svn-id: http://core.svn.wordpress.org/trunk@32934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 00:45:24 +00:00
Scott Taylor
032ea5b132 Add access modifier to WP_Upgrader::clear_destination()
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32871


git-svn-id: http://core.svn.wordpress.org/trunk@32842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 21:53:25 +00:00
Dion Hulse
8593dc3172 When updating plugins/themes verify that the files to be deleted can be modified before starting the deletion process.
This will avoid partially deleting an item during update which has inconsistent permissions.
This change only affects those using the direct & ssh transports as FTP's is_writable() currently always returns `true`.
Fixes #30921

Built from https://develop.svn.wordpress.org/trunk@32854


git-svn-id: http://core.svn.wordpress.org/trunk@32825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 03:49:25 +00:00
Dion Hulse
c6bb637f89 Updats: Add a filter for the options params for the update being performed.
Props nofearinc. Fixes #27754

Built from https://develop.svn.wordpress.org/trunk@32783


git-svn-id: http://core.svn.wordpress.org/trunk@32754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-15 05:35:26 +00:00
Scott Taylor
b3e0cfd25d Add (more) missing doc blocks to wp-admin/includes/*.
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32655


git-svn-id: http://core.svn.wordpress.org/trunk@32625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 21:17:27 +00:00
Scott Taylor
a51dfa3971 In the style of #30947 and default-filters.php, add 2 new files to wp-admin/includes:
`admin-filters.php`
`ms-admin-filters.php`

There are random actions and filters littered among files like `misc.php`. These files contain functions that won't work outside of admin context and are typically only loaded in files that have already loaded the admin bootstrap.

See #32529.

Built from https://develop.svn.wordpress.org/trunk@32653


git-svn-id: http://core.svn.wordpress.org/trunk@32623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 17:04:26 +00:00
Scott Taylor
19a3aacc94 Add @static* annotations where they are missing.
Initialize all static vars that are not, most to `null`.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32650


git-svn-id: http://core.svn.wordpress.org/trunk@32620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 15:43:29 +00:00
Scott Taylor
b56b9b3e5c Add @global annotations for wp-admin/*.
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32642


git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +00:00
John Blackbourn
d05236f756 Introduce a string representing bulk plugin update success, ready for string freeze. Not used yet.
See #31770.

Built from https://develop.svn.wordpress.org/trunk@31991


git-svn-id: http://core.svn.wordpress.org/trunk@31970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-03 00:18:27 +00:00
Dion Hulse
3dc53770b7 Upgrader: When creating a temporary working directory, strip off .tmp as well as .zip incase we end up using that directory as the items main directory.
Fixes #30945

Built from https://develop.svn.wordpress.org/trunk@31863


git-svn-id: http://core.svn.wordpress.org/trunk@31842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-23 04:40:27 +00:00