Drew Jaynes
ecc7d4f1b3
Docs: Improve documentation for WP_Upgrader::release_lock()
, introduced in [36349].
...
See #34878 . See #35986 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36822 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-03 07:10:58 +00:00
Drew Jaynes
5fc3cdb07e
Docs: Improve documentation for WP_Upgrader::create_lock()
, introduced in [36349].
...
See #34878 . See #35986 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36821 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-03 07:07:31 +00:00
Dion Hulse
51aee5ab1b
Upgrade: Switch the locking mechanism to using static methods so that it can be accessed from other upgrade-classes.
...
Fixes #34878
git-svn-id: https://develop.svn.wordpress.org/trunk@36370 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-21 01:21:52 +00:00
Dion Hulse
b9e62671f6
Core Upgrader: Add a locking mechanism to avoid two concurrent updates of WordPress occuring.
...
Fixes #34878
git-svn-id: https://develop.svn.wordpress.org/trunk@36349 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-19 05:06:46 +00:00
Dion Hulse
7be4ad61ca
Upgrader: Pass the $args['hook_extra']
context to the upgrader_source_selection
filter.
...
Props afragen
Fixes #34696
git-svn-id: https://develop.svn.wordpress.org/trunk@35642 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-16 02:46:43 +00:00
Dominik Schilling (ocean90)
4f837ef5b6
Upgrade: Revert [34543] because of incomplete and incorrect functionality.
...
See #33932 .
Fixes #34434 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35619 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-11 22:45:44 +00:00
Dion Hulse
13000b7036
Fix a typo in a docblock
...
git-svn-id: https://develop.svn.wordpress.org/trunk@35586 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-09 03:37:08 +00:00
Sergey Biryukov
f75a2b113e
Remove <code>
tags from translatable strings in wp-admin/includes/class-wp-upgrader.php
.
...
Add translator comments.
Props ramiy.
Fixes #34580 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35551 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-06 00:40:09 +00:00
Drew Jaynes
0cb7c0bd9f
Docs: Add missing descriptions for the $wpdb
global in DocBlocks all the places.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35170 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 23:43:10 +00:00
Drew Jaynes
99ec80b140
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35144 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 18:58:00 +00:00
Jeremy Felt
599fb50e09
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34912 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 17:11:01 +00:00
Boone Gorges
578134d4ff
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34828 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:05:26 +00:00
Jeremy Felt
3c177b8c6f
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34778 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 19:07:23 +00:00
Dominik Schilling (ocean90)
00762410b0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34751 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 21:20:09 +00:00
Dominik Schilling (ocean90)
2f16a92362
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34748 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:24:18 +00:00
Drew Jaynes
69db043e3c
Docs: There are quite alot of typos in core inline comments.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34717 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:12:16 +00:00
John Blackbourn
1bb2876fe6
callback
is not a valid type in PHP, PSR-5, or phpDocumentor. callable
should be used instead.
...
Fixes #34032
git-svn-id: https://develop.svn.wordpress.org/trunk@34566 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 23:57:46 +00:00
John Blackbourn
03515ca82d
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
git-svn-id: https://develop.svn.wordpress.org/trunk@34543 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 14:28:23 +00:00
Drew Jaynes
b408cd37fb
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34499 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 14:53:46 +00:00
DrewAPicture
cccd9356fe
Docs: Clarify the file header for wp-admin/includes/class-wp-upgrader.php.
...
See #33701 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34498 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 14:43:02 +00:00
Drew Jaynes
ad64ee866b
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34497 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 14:34:15 +00:00
Drew Jaynes
a65c2e068a
Docs: Fix a variety of inline documentation syntax issues and add some strategic spacing.
...
Fixes #29086 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33685 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 04:12:45 +00:00
Drew Jaynes
c53fe2779e
Docs: Add missing @access
tags to properties and methods in wp-admin/includes/class-wp-upgrader.
...
See #29086 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33684 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 04:04:23 +00:00
Drew Jaynes
3721940e0f
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33683 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 03:14:35 +00:00
Dominik Schilling (ocean90)
dec1b4da8b
Upgrade: Lowercase the "s" in remove_all_filters()
.
...
props afragen.
fixes #33173 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33487 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-29 14:56:23 +00:00
Mark Jaquith
3f2b0779f5
Don't blindly trust the output of glob()
to be an array.
...
props kitchin
fixes #33093
git-svn-id: https://develop.svn.wordpress.org/trunk@33447 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 18:04:19 +00:00
Drew Jaynes
0aecc0ce8b
Fix inline documentation syntax in the WP_Upgrader->clear_destination()
method added in 4.3.
...
See [32854]. See #32891 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33209 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-13 19:45:45 +00:00
Scott Taylor
2a5278e2dd
Some doc blocks should use bool
instead of true|false
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32963 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-27 00:44:21 +00:00
Scott Taylor
6ffc540366
Add access modifier to WP_Upgrader::clear_destination()
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32871 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 21:52:44 +00:00
Dion Hulse
9c0750ac52
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
git-svn-id: https://develop.svn.wordpress.org/trunk@32854 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 03:48:55 +00:00
Dion Hulse
8455dd10da
Updats: Add a filter for the options params for the update being performed.
...
Props nofearinc. Fixes #27754
git-svn-id: https://develop.svn.wordpress.org/trunk@32783 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-15 05:34:52 +00:00
Scott Taylor
60e5c90e62
Add (more) missing doc blocks to wp-admin/includes/*
.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32655 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 21:16:59 +00:00
Scott Taylor
d55800a4f2
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32653 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 17:03:13 +00:00
Scott Taylor
c8a44d437a
Add @static*
annotations where they are missing.
...
Initialize all static vars that are not, most to `null`.
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32650 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-29 15:42:40 +00:00
Scott Taylor
23ce2efd12
Add @global
annotations for wp-admin/*
.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32642 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-28 21:40:27 +00:00
John Blackbourn
a0bd96bafb
Introduce a string representing bulk plugin update success, ready for string freeze. Not used yet.
...
See #31770 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31991 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-03 00:17:20 +00:00
Dion Hulse
f0849242d3
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
git-svn-id: https://develop.svn.wordpress.org/trunk@31863 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-23 04:39:56 +00:00
Sergey Biryukov
630aac94a3
Remove leading newlines from two translatable strings.
...
fixes #29480 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31844 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-20 02:41:33 +00:00
Scott Taylor
2f20da29b5
Replace array_shift()
with reset()
where appropriate for performance.
...
Props SergeyBiryukov.
Fixes #31259 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31829 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-19 03:55:39 +00:00
Sergey Biryukov
e3728870fb
Correct parameter types for Plugin_Upgrader::bulk_upgrade()
and Theme_Upgrader::bulk_upgrade()
.
...
props ipm-frommen.
fixes #31312 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31441 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-13 04:18:45 +00:00
Dion Hulse
4ed2d89ced
WP_Upgrader: Remove references to non-existant variables that have never existed.
...
Props jdgrimes. Fixes #29087
git-svn-id: https://develop.svn.wordpress.org/trunk@31327 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-03 06:17:05 +00:00
Scott Taylor
0522fcb3f9
Jump statements should not be followed by other statements (there were 5 lingering).
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31100 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 21:14:56 +00:00
Scott Taylor
6fd11624d1
The keyword elseif
should be used instead of else if
so that all control keywords look like single words.
...
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Dion Hulse
28e22a4ec4
Background Updates: Pass back whether Group Writable support is being leveraged for an update to the WordPress.org API.
...
See #30245
git-svn-id: https://develop.svn.wordpress.org/trunk@30860 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-15 14:07:35 +00:00
Andrew Nacin
b38c603682
Rename _wp_clear_update_cache() to wp_clean_update_cache().
...
This makes it match most cache-clearing functions, including the ones it wraps. Also no need for it to be prefixed as "private."
wp_clean_plugins_cache() doesn't always exist, so as a quick fix, clear the transient we care to clear.
see #30369 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30856 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-15 08:54:14 +00:00
Andrew Ozz
fce20e9784
Better docs for Plugin_Upgrader::deactivate_plugin_before_upgrade()
. Props DrewAPicture. Fixes #29088 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@30762 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-07 01:18:21 +00:00
Andrew Ozz
d948f0bf32
Always return a value in Plugin_Upgrader::deactivate_plugin_before_upgrade()
. Props jdgrimes. Fixes #29088 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@30761 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-07 00:52:06 +00:00
Drew Jaynes (DrewAPicture)
3cdbc730d3
Add missing DocBlocks and parameter descriptions for a wide variety of properties and methods in WP_Upgrader
, Plugin_Upgrader
, Theme_Upgrader
, Language_Pack_Upgrader
, Core_Upgrader
, and File_upload_Upgrader
.
...
Props jdgrimes, DrewAPicture.
See #29086 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30758 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-07 00:25:44 +00:00
Drew Jaynes (DrewAPicture)
18f101b4bf
Using let's properly in inline comments lets us move on to more pressing matters of inline documentation.
...
Props trepmal.
Fixes #30570 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30703 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-02 04:42:17 +00:00
Drew Jaynes (DrewAPicture)
f45fd382b3
Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/includes/*.
...
Also adds a few inline `@see` cross-references as they apply.
Affects DocBlocks for the following hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
* `theme_action_links_$stylesheet`
* `after_theme_row_$stylesheet`
* `install_plugins_table_api_args_$tab`
* `$prefix . plugin_action_links`
* `after_plugin_row_$plugin_file`
* `manage_taxonomies_for_{$post_type}_columns`
* `manage_{$post_type}_posts_columns`
* `manage_{$post->post_type}_posts_custom_column`
* `{$taxonomy}_row_actions`
* `manage_{$this->screen->taxonomy}_custom_column`
* `install_themes_table_api_args_' . $tab`
* `auto_update_ . $type`
* `{$action}_prefilter`
* `admin_head_{$content_func}`
* `nav_menu_items_{$post_type_name}`
* `activate_ . $plugin`
* `deactivate_ . $plugin`
* `edit_{$post_type}_per_page`
* `postbox_classes_{$page}_{$id}`
* `_wp_post_revision_field_$field`
* `manage_{$screen->id}_columns`
* `in_plugin_update_message-{$file}`
* `in_theme_update_message-{$theme_key}`
See #30552 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30648 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 11:27:19 +00:00