Commit Graph

265 Commits

Author SHA1 Message Date
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
Sergey Biryukov 42b9557137 Remove leading newlines from two translatable strings.
fixes #29480.
Built from https://develop.svn.wordpress.org/trunk@31844


git-svn-id: http://core.svn.wordpress.org/trunk@31826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-20 02:42:26 +00:00
Scott Taylor bce851dcf2 Replace `array_shift()` with `reset()` where appropriate for performance.
Props SergeyBiryukov.
Fixes #31259.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-19 03:56:27 +00:00
Sergey Biryukov 6fd67ad80e Correct parameter types for `Plugin_Upgrader::bulk_upgrade()` and `Theme_Upgrader::bulk_upgrade()`.
props ipm-frommen.
fixes #31312.
Built from https://develop.svn.wordpress.org/trunk@31441


git-svn-id: http://core.svn.wordpress.org/trunk@31422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-13 04:19:27 +00:00
Dion Hulse e8f032c747 WP_Upgrader: Remove references to non-existant variables that have never existed.
Props jdgrimes. Fixes  #29087

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


git-svn-id: http://core.svn.wordpress.org/trunk@31308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-03 06:18:24 +00:00
Scott Taylor 4a1ad9acec Jump statements should not be followed by other statements (there were 5 lingering).
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 21:15:22 +00:00
Scott Taylor 60b0cd7943 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Dion Hulse 5661464d35 Background Updates: Pass back whether Group Writable support is being leveraged for an update to the WordPress.org API.
See #30245

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


git-svn-id: http://core.svn.wordpress.org/trunk@30850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-15 14:08:23 +00:00
Andrew Nacin 180c596d7b 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-15 08:55:22 +00:00
Andrew Ozz ef0501e1bc Better docs for `Plugin_Upgrader::deactivate_plugin_before_upgrade()`. Props DrewAPicture. Fixes #29088.
Built from https://develop.svn.wordpress.org/trunk@30762


git-svn-id: http://core.svn.wordpress.org/trunk@30752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 01:19:24 +00:00
Andrew Ozz 1bb4b6a82b Always return a value in `Plugin_Upgrader::deactivate_plugin_before_upgrade()`. Props jdgrimes. Fixes #29088.
Built from https://develop.svn.wordpress.org/trunk@30761


git-svn-id: http://core.svn.wordpress.org/trunk@30751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 00:53:23 +00:00
Drew Jaynes 473ebca2af 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-07 00:26:22 +00:00
Drew Jaynes c4b9da857a Using let's properly in inline comments lets us move on to more pressing matters of inline documentation.
Props trepmal.
Fixes #30570.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 04:43:22 +00:00
Drew Jaynes 78bb3e5ff5 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:28:24 +00:00
Dominik Schilling e39c43ad6c Clear update caches when site language is changed.
The update screen has a re-install button which could show the wrong language locale after the site language was changed. That's because the update data is cached. 
Introduce `_wp_clear_update_cache()` as a helper function to clean up the update cache.

props SergeyBiryukov, ocean90.
fixes #30369.
Built from https://develop.svn.wordpress.org/trunk@30554


git-svn-id: http://core.svn.wordpress.org/trunk@30543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 22:50:22 +00:00
Dion Hulse 9b9289e0a3 Background Updates: Introduce support to take advantage of Group Writable (or World Writable) to Core Background updates.
This is only enabled when new files will not be installed during the update (as indicated by the WordPress.org API), and does not apply to Plugin/Theme/Translation Background Updates.

Additionally, the code to determine if the 'direct' filesystem transport should be used has been tweaked for wider support (where getmyuid() was unavailalbe) which fixes #10424

See #10205, #30245

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


git-svn-id: http://core.svn.wordpress.org/trunk@30381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-19 05:40:23 +00:00
Scott Taylor 73c8e4cf10 Declare the `$update_count` and `$update_current` properties for `WP_Upgrader`.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 23:07:23 +00:00
Mark Jaquith e1f2b3b9e2 Use HTTPS URLs for trac.wordpress.org (and use core.trac.wordpress.org)
see #27115
Built from https://develop.svn.wordpress.org/trunk@29789


git-svn-id: http://core.svn.wordpress.org/trunk@29561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:37:16 +00:00
Mark Jaquith 0d3b83551f Use HTTPS URLs for core.trac.wordpress.org
see #27115
Built from https://develop.svn.wordpress.org/trunk@29788


git-svn-id: http://core.svn.wordpress.org/trunk@29560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:28:16 +00:00
Dominik Schilling de59e21b62 Language Pack Upgrader: Allow to disable asynchronously translation updates.
* Don't touch VCS installs.
* Use the `async_update_translation` filter (which corresponds exactly to `auto_update_translation`) to entirely disable it, or based on the update offer. 

props nacin, ocean90.
fixes #28571.
Built from https://develop.svn.wordpress.org/trunk@29694


git-svn-id: http://core.svn.wordpress.org/trunk@29469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-03 10:38:17 +00:00
Dion Hulse e8f6320bb4 Language Pack Upgrader: Remove ALL pre-existing filters before performing a translation update these filters may act in an unexpected way during the upgrade process.
See #29230. Fixes #29425.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-03 05:38:14 +00:00
Dominik Schilling c6af00d8b0 Language Pack Upgrader: Check return value before accessing the first array key.
Prevents a fatal error when Language_Pack_Upgrader::bulk_upgrade() returns a WP_Error object.

fixes #29470.
Built from https://develop.svn.wordpress.org/trunk@29675


git-svn-id: http://core.svn.wordpress.org/trunk@29450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-02 18:28:17 +00:00
Dominik Schilling 9972b54e62 Theme Upgrader: Set `is_multi` to true when doing bulk upgrades.
fixes #29234.
Built from https://develop.svn.wordpress.org/trunk@29622


git-svn-id: http://core.svn.wordpress.org/trunk@29396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 09:24:17 +00:00
Dominik Schilling 5a67538b40 Language Pack Upgrader: Remove any pre-existing package checks and then set the new one for translations.
fixes #29230.
Built from https://develop.svn.wordpress.org/trunk@29621


git-svn-id: http://core.svn.wordpress.org/trunk@29395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-26 09:20:18 +00:00
Drew Jaynes d33c807723 Fix some documentation typos in various core files.
Props vlajos.
Fixes #29199.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-13 03:56:17 +00:00
Drew Jaynes 097dc8ee15 Fix syntax for single- and multi-line comments in wp-admin-directory files.
See #28931.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +00:00
Sergey Biryukov 489693cd30 Remove non-breaking spaces from auto update email text.
props trepmal.
fixes #28715.
Built from https://develop.svn.wordpress.org/trunk@28956


git-svn-id: http://core.svn.wordpress.org/trunk@28752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-02 12:46:17 +00:00
Scott Taylor c403768fa2 Remove some dead variable assignments.
See #27882.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 16:59:14 +00:00
Sergey Biryukov 219321eedc Fix inconsistent header underlining and spacing in background update emails.
fixes #28306.
Built from https://develop.svn.wordpress.org/trunk@28537


git-svn-id: http://core.svn.wordpress.org/trunk@28363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 09:41:15 +00:00
Scott Taylor 1383990ae2 Add access modifier (`public`) to methods and members of `WP_Upgrader` and its subclasses.
See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 01:29:15 +00:00
Scott Taylor b9afafffe3 `hackificator` complains if you call `include 'file.php'` without the parens, needs to be `include( 'file.php' )`
See #27881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-18 20:52:15 +00:00
Scott Taylor 4ce9706db1 Add inline comment after fix in [28467].
Props jesin.
Fixes #28292.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 15:42:14 +00:00
Scott Taylor bdd1ae2fc7 Restore `$soucrce` in `WP_Upgrader::install_package()`.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-17 15:40:15 +00:00
Scott Taylor b2d1e73fd5 Eliminate the use of `extract()` in `WP_Upgrader`.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 05:02:14 +00:00
Sergey Biryukov 997cbaa03c Use a time constant in get_theme_feature_list() and File_Upload_Upgrader.
props GaVrA.
fixes #28124.
Built from https://develop.svn.wordpress.org/trunk@28253


git-svn-id: http://core.svn.wordpress.org/trunk@28081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-05 08:26:24 +00:00
Dion Hulse ca0b5c9859 Background Updates: Avoid a PHP warning during theme update checks when there are multiple theme directories registered. Fixes #27815
Built from https://develop.svn.wordpress.org/trunk@28137


git-svn-id: http://core.svn.wordpress.org/trunk@27968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-15 10:57:14 +00:00
Andrew Nacin fa3900168e Allow the API to add text to auto update emails.
fixes #27812.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-15 08:52:15 +00:00
Dion Hulse 50a7503c2e Background Updates: Record Plugin & Theme update statistics like we for for Core updates, Pass Plugin/Theme update objects into the Background updater for consistency with Core & Translations. See #27633
Built from https://develop.svn.wordpress.org/trunk@27905


git-svn-id: http://core.svn.wordpress.org/trunk@27736 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 13:05:15 +00:00
Andrew Nacin c3ca81ba94 Always decode special characters for email subjects.
props tlovett1, jeremyfelt.
fixes #25346.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 02:44:15 +00:00
Drew Jaynes 0cee31065e Inline documentation for wp-admin/includes/class-wp-upgrader.php.
Props kpdesign for some minor cleanup.
Fixes #27436.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 03:00:15 +00:00
Andrew Nacin 0c16c0477b Reference https://wordpress.org rather than http://wordpress.org in strings, links, comments, etc.
props Ipstenu, markjaquith.
see #27115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:27 +00:00