Commit Graph

222 Commits

Author SHA1 Message Date
Gary Pendergast
8608b710b7 Docs: Expand the docs for the core_version_check_query_args filter.
Add documentation for the parameters in the `$query` parameter.

Props MattyRob.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 13:46:50 +00:00
Gary Pendergast
f7fcb2cd5b Updates: Add the core_version_check_query_args filter.
This filter allows the data being sent for core update checks to be controlled for privacy concerns.

Props toscho, MattyRob, swissspidy, pento.
Fixes #16778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-21 11:55:47 +00:00
John Blackbourn
50948669eb Users: Revert [41613], [41614], and [41623] as this feature needs some more work.
See #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 22:17:46 +00:00
John Blackbourn
807bc5a6c9 Users: Introduce the concept of a large site in order to speed up the Users screen when there are many users.
Calling the `count_users()` function is expensive, regardless of the counting strategy that's used, and it gets
slower the more users there are on a site. In order to speed up the Users screen in the admin area, calling
`count_users()` can be avoided entirely while still displaying the total count for users.

This introduces some new functions:

* `wp_is_large_user_count()`
* `wp_get_active_user_count()`
* `wp_update_active_user_count()`

A corresponding `wp_is_large_user_count` filter is also introduced.

Props tharsheblows, johnbillion

Fixes #38741

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


git-svn-id: http://core.svn.wordpress.org/trunk@41448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 13:04:47 +00:00
Dion Hulse
db86c635ba Standardise on performing api.WordPress.org requests over SSL when possible, falling back to non-SSL when appropriate.
This also standardises the `User-Agent` used when communicating with WordPress.org, allowing for more consistent version detection.

Fixes #42004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-27 08:00:49 +00:00
Pascal Birchler
064e62cbea Cron API: Add a new wp_doing_cron() helper function.
This replaces `DOING_CRON` checks via the constant.

Props tfrommen.
Fixes #39591.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-06 14:30:40 +00:00
John Blackbourn
c2d709e9d6 I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment.
See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 02:46:30 +00:00
Sergey Biryukov
1b2ed70f39 I18N: Move the support forums URL in update-related HTTP API error messages to a separate translatable string that is already used elsewhere.
Props ramiy, SergeyBiryukov.
Fixes #38880.
Built from https://develop.svn.wordpress.org/trunk@39325


git-svn-id: http://core.svn.wordpress.org/trunk@39265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:52:32 +00:00
Scott Taylor
a3ffebce30 Bootstrap: do not go gentle into that good night r38411, r38412, and parts of r38389.
See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 16:31:29 +00:00
Scott Taylor
390ceba6c7 Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 22:32:37 +00:00
Dion Hulse
0e31a46161 Bootstrap: Revert [38399] as it's broken /build/ and subsequently core.svn.wordpress.org.
The generated classmaps reference `/src/` files and operates in the assumption that the base directory is one level above `wp-settings.php`, which it isn't after our build processes are run.

See #36335

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


git-svn-id: http://core.svn.wordpress.org/trunk@38343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 14:37:32 +00:00
Scott Taylor
6a529648cf Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.
* `wp-admin` and `wp-includes` are scanned for classes to autoload
* Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see `composer.json`: `autoload.exclude-from-classmap`
* `wp-vendor/autoload_52.php` is included at the top of `wp-settings.php` - no changes need to be made to unit tests to include the autoloader
* An avalanche of `require()` and `require_once()` calls that loaded class files have been removed from the codebase.

The following files have been added to `svn:ignore` - they are not 5.2-compatible and fail during pre-commit:
* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

We favor these files instead:
* src/wp-vendor/autoload_52.php
* src/wp-vendor/composer/autoload_real_52.php
* src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run `composer install` or `composer update` from the project root to update the autoloader.

The future is now.

See #36335.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-27 09:15:29 +00:00
Scott Taylor
b7812bd416 AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-23 14:33:30 +00:00
Dominik Schilling
da72b04ab2 Upgrade: Allow update checks on upgrader_process_complete to be run during Ajax requests.
Fixes missing translation updates during shiny updates.

Fixes #36914.
Built from https://develop.svn.wordpress.org/trunk@37570


git-svn-id: http://core.svn.wordpress.org/trunk@37538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-25 19:36:28 +00:00
Drew Jaynes
9cb5247392 Docs: Standardize filter docs in remaining wp-includes/* files to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37486 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:50:28 +00:00
Drew Jaynes
0fdbfa3f03 Docs: Add a couple of spaces before hook docs for filters introduced in 4.5.
See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-16 16:15:28 +00:00
Drew Jaynes
4ecad983b3 Docs: Improve two 4.5.0 changelog entries added for the plugins_update_check_locales and themes_update_check_locales filters, introduced in [36630].
See #34937. See #35986.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 23:01:26 +00:00
Dominik Schilling
f6b632983f Updates: Pass locales of all available languages to the themes/plugins update API.
This ensures that language packs for all languages in a Multisite install are updated.

Fixes #34937.
Built from https://develop.svn.wordpress.org/trunk@36630


git-svn-id: http://core.svn.wordpress.org/trunk@36597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-23 16:17:26 +00:00
Dion Hulse
4a0e40a814 Updates: Don't perform an API call to WordPress.org for every plugin update displayed. The API has been updated to return this information with the update response.
See #35301

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


git-svn-id: http://core.svn.wordpress.org/trunk@36149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 07:53:26 +00:00
Dion Hulse
06a3f799e7 Background Updates: Remove the 7am/7pm background update check. This check was made redundant by [28129] as background updates are now run after a version check takes place.
See #27772, #35323.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-06 06:12:26 +00:00
John Blackbourn
0003a004db Docs: Miscellaneous docblock code quality tweaks.
See #32246

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


git-svn-id: http://core.svn.wordpress.org/trunk@36039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 07:53:26 +00:00
Drew Jaynes
b6281e857f Docs: Add a missing summary and @since version to the DocBlock for _maybe_update_core().
Introduced in [10583].

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-17 16:38:26 +00:00
Andrew Nacin
45032198e3 Updates: Avoid stomping global $wp_version in wp_version_check() and related.
fixes #34868.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 17:39:27 +00:00
Andrew Nacin
0cf9d8b922 Add initial_db_version to wp_version_check().
fixes #34854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-06 15:44:27 +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
Scott Taylor
66a9c83284 Add missing doc blocks to update.php:
* `wp_version_check()`, `wp_update_plugins()`, and `wp_update_themes()` do not return meaningful responses, and their responses are never handled by core. As such, they shouldn't alternately return `void` or `false`. "Returning" in those functions is just "bailing"
* In the same functions, `version.php` doesn't need to load if `WP_INSTALLING` is defined - the function will immediately bail, the values will never be read, and the globals won't be reset. I have unified the approach in all 3 functions.
* When returning filtered `$locale`, there is no need to set the variable twice.
* In `_maybe_update_core()`, `isset()` can take multiple values to bail before the call to `time()`, if necessary. This is a micro-optimization to prevent PHP from hitting the OS unnecessarily.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 15:29:28 +00:00
Dominik Schilling
ed26d94667 Don't try to call wp_clean_plugins_cache(); twice in wp_clean_update_cache().
props TobiasBg.
fixes #31503.
Built from https://develop.svn.wordpress.org/trunk@31825


git-svn-id: http://core.svn.wordpress.org/trunk@31807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-18 22:07:28 +00:00
Sergey Biryukov
bff59aa8cb Revert the part of [31168] that [31701] was trying to fix.
`default-filters.php` is loaded before the `$current_site` global is set, so `is_main_site()` cannot be used there.

fixes #30947.
Built from https://develop.svn.wordpress.org/trunk@31708


git-svn-id: http://core.svn.wordpress.org/trunk@31689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 23:20:26 +00:00
Sergey Biryukov
74dfb2680b Don't run update checks for AJAX requests after [31168].
fixes #30947.
Built from https://develop.svn.wordpress.org/trunk@31701


git-svn-id: http://core.svn.wordpress.org/trunk@31682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-10 19:30:27 +00:00
John Blackbourn
93fced2d15 Revert [30696] pending further investigation.
See #31011, #13071

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


git-svn-id: http://core.svn.wordpress.org/trunk@31371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-09 21:50:29 +00:00
Scott Taylor
fc843ce4d0 There are some random add_action() and add_filter() calls littered around some files in wp-includes/. These should be moved to wp-includes/default-filters.php with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even SHORTINIT - a lot of the hooks registered won't run anyways (that's already the case).
See #30947.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 16:40: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
John Blackbourn
b0a2416040 Ensure the theme and plugin update checks are always in sync with the current theme and plugin versions before fetching cached update data. This change only triggers a request to the update API when necessary.
Fixes #13071
Props bswatson

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


git-svn-id: http://core.svn.wordpress.org/trunk@30686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 01:52:23 +00:00
Scott Taylor
d097e7cf83 Improve the @param docs for src/includes/theme.php and src/includes/update.php.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 22:44:22 +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
Gary Pendergast
007ec52958 Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8.
Change all core calls from `json_encode()` to `wp_json_encode()`.

Fixes #28786.


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


git-svn-id: http://core.svn.wordpress.org/trunk@30055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 18:35:19 +00:00
Andrew Nacin
860f0922b7 Add 'Details' links to installed plugins.
Installed plugins that are up to date are now returned in the update-check API response.

props tellyworth.
see #17902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-18 20:49:17 +00:00
Sergey Biryukov
60285aa687 Use direct typecasting instead of intval() for better performance.
props kovshenin.
see #25788.
Built from https://develop.svn.wordpress.org/trunk@28823


git-svn-id: http://core.svn.wordpress.org/trunk@28627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-24 16:06:14 +00:00
Sergey Biryukov
2b8460af62 Simplify the code for calculating plugin API check timeout.
props leewillis77.
fixes #28600.
Built from https://develop.svn.wordpress.org/trunk@28805


git-svn-id: http://core.svn.wordpress.org/trunk@28614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-23 14:31:14 +00:00
John Blackbourn
6782686192 Increase the timeout for plugin and theme update checks based on how many are being checked. Props dd32. Fixes #25788
Built from https://develop.svn.wordpress.org/trunk@28782


git-svn-id: http://core.svn.wordpress.org/trunk@28595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-19 23:21:16 +00:00
Scott Taylor
2f513d3320 Fix some hackificator odds and ends in wp-admin:
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed

See #27881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:04:16 +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
Andrew Nacin
2bc282957c Translate a string added in 3.7.1 but never translated previously.
props SergeyBiryukov.
fixes #27819.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-16 00:38: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
Andrew Nacin
3b50cf7ec2 Add a TTL to core update checks to allow us to narrow the 12-hour update window.
props dd32.
fixes #27772.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-15 02:23:16 +00:00
Dion Hulse
0fd4d1e492 Background Updates: Fix a PHP Warning caused by a Upgrader instance being passed into the Theme & Plugin $extra_stats parameter. See #27633
Built from https://develop.svn.wordpress.org/trunk@27928


git-svn-id: http://core.svn.wordpress.org/trunk@27758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-03 05:33:14 +00:00
Dion Hulse
61289de08d Background Updates: Fix two variable typos in r27905
Built from https://develop.svn.wordpress.org/trunk@27906


git-svn-id: http://core.svn.wordpress.org/trunk@27737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 13:13: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
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
Drew Jaynes
cb8951b0b3 Remove all @package and @subpackage PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Dion Hulse
cd6096c44b Updates: Force an update check to occur when the 'Check Again' button is used in the Dashboard. Fixes #25831
Built from https://develop.svn.wordpress.org/trunk@26192


git-svn-id: http://core.svn.wordpress.org/trunk@26100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 03:04:10 +00:00
Dion Hulse
20e5b27731 Invalidate the 'update_core' Update check transient when $wp_version changes. See #25831
Built from https://develop.svn.wordpress.org/trunk@26188


git-svn-id: http://core.svn.wordpress.org/trunk@26096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-15 02:35:10 +00:00
Dion Hulse
a71cd00cdb Background Updates: Spread them over the hour. Props Pento. Fixes #25833 for trunk
Built from https://develop.svn.wordpress.org/trunk@26149


git-svn-id: http://core.svn.wordpress.org/trunk@26060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-14 04:04:10 +00:00
Sergey Biryukov
8d659b278c Fix docblock formatting. fixes #25893.
Built from https://develop.svn.wordpress.org/trunk@26081


git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Andrew Nacin
a8ef13972c When an HTTPS request to api.wordpress.org fails, try an insecure HTTP request and issue a warning.
Certain versions of cURL appear to claim OpenSSL support but fail to work. We need to not trap users on older versions while we work this out, and instead fall back to an insecure request.

see #25716 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-27 21:09:10 +00:00
Andrew Nacin
70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin
ac2e70227f Make some changes to the email templates to account for the fact that an auto update offer might not be to the latest version.
For example, 3.7.2 install is served a 3.7.3 update, but the current version is 3.8.1.

This commit also allows for core update notification emails to be sent even when we are unable to run an auto update due to filesystem configuration (VCS checkout or file permissions). But, since these emails go through WP_Automatic_Updater, they will not be sent if the updater is outright disabled.

fixes #25654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 23:00:01 +00:00
Andrew Nacin
83b20ee7f9 Notify administrators of successful, failed, and pending core updates.
Blocks future background updates after critical failures, but allow retries in certain situations. More in the ticket.

fixes #10787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:55:30 +00:00
Andrew Nacin
a3561e7e07 In automatic background updates, standardize on 'update'.
New, final filter names:
 * auto_update_{$type} (plugin, theme, core, language)
 * automatic_updates_is_vcs_checkout
 * automatic_updates_disabled

New class name is WP_Automatic_Updater. Method names include update() and should_update().

see #22704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:54:38 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren
b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Andrew Nacin
a387c3bef9 Make some changes to the email templates to account for the fact that an auto update offer might not be to the latest version.
For example, 3.7.2 install is served a 3.7.3 update, but the current version is 3.8.1.

This commit also allows for core update notification emails to be sent even when we are unable to run an auto update due to filesystem configuration (VCS checkout or file permissions). But, since these emails go through WP_Automatic_Updater, they will not be sent if the updater is outright disabled.

fixes #25654.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 21:19:09 +00:00
Andrew Nacin
ee20af1fad Notify administrators of successful, failed, and pending core updates.
Blocks future background updates after critical failures, but allow retries in certain situations. More in the ticket.

fixes #10787.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 16:30:11 +00:00
Andrew Nacin
a65661abee In automatic background updates, standardize on 'update'.
New, final filter names:
 * auto_update_{$type} (plugin, theme, core, language)
 * automatic_updates_is_vcs_checkout
 * automatic_updates_disabled

New class name is WP_Automatic_Updater. Method names include update() and should_update().

see #22704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 23:21:10 +00:00
Andrew Nacin
9432acde4e Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 04:02:09 +00:00
Andrew Nacin
191efaef61 Make WP_Automatic_Upgrader a proper object that gets instantiated. Renames nearly all of its methods.
Also renames wp_auto_updates_maybe_update() to wp_maybe_auto_update().

see #22704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 00:55:09 +00:00
Andrew Nacin
ba0ebf3736 Include translations in the update bubbles (as +1 if there are any). see #18200.
Built from https://develop.svn.wordpress.org/trunk@25810


git-svn-id: http://core.svn.wordpress.org/trunk@25722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 14:34:10 +00:00
Andrew Nacin
cdede88a23 Automatic updates: Include error data in the follow-up API request.
props dd32.
see #22704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 23:33:10 +00:00
Dion Hulse
98762b4a30 Correct a variable typo in [25750]. See #22704
Built from https://develop.svn.wordpress.org/trunk@25751


git-svn-id: http://core.svn.wordpress.org/trunk@25664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-10 01:38:10 +00:00
Dion Hulse
0b9f198994 In the event that an Automatic Upgrade fails, send a failure status on the next API request to indicate that it failed, and if the rollback was successful.
See #22704

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


git-svn-id: http://core.svn.wordpress.org/trunk@25663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-10 01:32:09 +00:00
Drew Jaynes
2aff6bb864 Inline documentation for hooks in wp-includes/update.php.
Props ShinichiN.
Fixes #25467.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-06 15:31:09 +00:00
Andrew Nacin
ddd4473714 Send back core translation information to the API. Update wp_get_installed_translations() to work with core translations. see #18200.
Built from https://develop.svn.wordpress.org/trunk@25652


git-svn-id: http://core.svn.wordpress.org/trunk@25569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-30 19:47:12 +00:00
Dion Hulse
75475ed773 Automatic Updates: Add a rollback functionality upon installation failure, the rollback package will be available for partial-updates for automatic updates and be similar to our existing partial builds (but in reverse).
A further iteration of this is to also detect whitescreens (fatals) after a auto update, and trigger the rollback for that too.
See #22704

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


git-svn-id: http://core.svn.wordpress.org/trunk@25566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-30 00:21:09 +00:00
Andrew Nacin
f092346465 Filters for locale in wp_update_plugins() and wp_update_themes(). see #18200.
Built from https://develop.svn.wordpress.org/trunk@25634


git-svn-id: http://core.svn.wordpress.org/trunk@25551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-28 04:18:12 +00:00
Andrew Nacin
187c26415f Add a language pack upgrader class.
At the conclusion of any upgrade, after the transients are refreshed from the API, pending translations are downloaded and installed to wp-content/languages.

props dd32.
see #18200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25484 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 02:08:10 +00:00
Dion Hulse
6cef83f271 Plugin Update API: Set the translations key to an empty array when the API is unavailable. Props rmmcue. See #18200
Built from https://develop.svn.wordpress.org/trunk@25544


git-svn-id: http://core.svn.wordpress.org/trunk@25464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-21 09:34:09 +00:00
Andrew Nacin
79df17be9c Accept and store translations data from the plugin and theme update check endpoints.
Send site locale. Rename wp_get_installed_language_data() to wp_get_installed_translations().

see #18200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-21 04:08:10 +00:00
Andrew Nacin
aede88a822 Send installed language data to the plugin and theme update-check endpoints.
Introduces wp_get_installed_language_data() and wp_get_pomo_file_data().

see #18200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-20 19:13:09 +00:00
Andrew Nacin
a03549d08a Further adjust the request and response formats for plugin and theme update checks. see #25311.
Built from https://develop.svn.wordpress.org/trunk@25514


git-svn-id: http://core.svn.wordpress.org/trunk@25434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-20 05:55:09 +00:00
Dion Hulse
dfc708333f WordPress Core Automatic Updates: Switch to a twicedaily cronjob to match the update check cron jobs, this removes the ability for update checks to continuously re-queue a upgrade job. See #22704
Built from https://develop.svn.wordpress.org/trunk@25466


git-svn-id: http://core.svn.wordpress.org/trunk@25387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-17 02:26:09 +00:00
Andrew Nacin
9414d6e40e Move to JSON for the plugin and theme update-check API endpoints. see #25311.
Built from https://develop.svn.wordpress.org/trunk@25442


git-svn-id: http://core.svn.wordpress.org/trunk@25363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-14 19:58:09 +00:00
Dion Hulse
4678d33216 WordPress Core Automatic Updates: Add the first slice of Automatic Upgrades, This is presently disabled, and requires a filter to enable ( 'auto_upgrade_core' ). See #22704
Built from https://develop.svn.wordpress.org/trunk@25421


git-svn-id: http://core.svn.wordpress.org/trunk@25346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-13 06:19:12 +00:00
Dion Hulse
068df26686 Switch to using HTTPS connections for Plugin and Theme API requests when SSL is available. See #18577
Built from https://develop.svn.wordpress.org/trunk@25308


git-svn-id: http://core.svn.wordpress.org/trunk@25270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-09 07:54:11 +00:00
Dion Hulse
98db8bb549 Core Updates: Ensure that the system supports outgoing HTTPS requests before making an update check over HTTPS. Fixes a typo in [25219]. See #22704
Built from https://develop.svn.wordpress.org/trunk@25220


git-svn-id: http://core.svn.wordpress.org/trunk@25191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-03 07:12:10 +00:00
Dion Hulse
88702eba45 Core Updates: Switch to using a new 1.7 version check API which will return extra auto-update packages when requested over SSL. The new API has switched to returning JSON. See #22704
Built from https://develop.svn.wordpress.org/trunk@25219


git-svn-id: http://core.svn.wordpress.org/trunk@25190 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-03 03:22:10 +00:00
Peter Westwood
f683fc7677 Tighten our braces. Fixes #23118 props evansolomon.
git-svn-id: http://core.svn.wordpress.org/trunk@23265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-04 10:13:51 +00:00
Andrew Nacin
557d9313a7 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: http://core.svn.wordpress.org/trunk@21996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 05:26:19 +00:00
Andrew Nacin
45472e9915 Add a filter to wp_get_update_data. props usermrpapa, SergeyBiryukov. fixes #17838.
git-svn-id: http://core.svn.wordpress.org/trunk@21874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-16 20:51:51 +00:00
nacin
69e9cf2888 Fix string offset PHP 5.4 error by normalizing $user_count to always be an integer. props ericmann. see #20966 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-25 19:40:16 +00:00
nacin
0511b153a3 Remove unused variable in wp_update_themes(). props duck_. fixes #20831.
git-svn-id: http://core.svn.wordpress.org/trunk@21089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-18 18:49:14 +00:00
duck_
ee8a368f1c Use correct filter name in wp_update_themes(): s/load-plugins/load-themes/. See r19683, #18876.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 14:07:12 +00:00
nacin
d130a63e25 Introduce WP_Theme, wp_get_themes(), and wp_get_theme() to replace get_themes(), get_theme(), get_theme_data(), current_theme_info(), and others.
* Getters and Helpers: Introduces a series of methods to allow for easy generation of headers for display, and other theme metadata, including page templates.
 * Screenshots: Handles support for multiple screenshots. (see # Additional screenshots must be PNG and start with screenshot-2.png, and be sequential to be counted. see #19816.
 * Error Handling: Broken themes have a WP_Error object attached to them.
 * Caching: Introduces a wp_cache_themes_persistently filter (also in [20020]) to enable persistent caching of all filesystem and sanitization operations normally handled by WP_Theme (and formerly get_file_data() and get_themes()). Themes are cached individually and across five different cache keys for different data pieces.
 * Compatibility: A WP_Theme object is backwards compatible with a theme's array formerly returned by get_themes() and get_theme(), and an stdClass object formerly returned by current_theme_info().
 * i18n/L10n: Theme headers are now localizable with proper Text Domain and Domain Path headers, like plugins. (Language packs may remove the requirement for headers.) For page templates, see #6007 (not fixed yet, but will be easy now). For headers, fixes #15858.
 * PHP and CSS files: New methods that fetch a list of theme files (for the theme editor) only on demand, rather than only loading them into memory. fixes #11214.

Functions deprecated:
 * get_themes(), get_allowed_themes() and get_broken_themes() -- use wp_get_themes()
 * get_theme() and current_theme_info() -- use wp_get_theme()
 * get_site_allowed_themes() -- use WP_Theme::get_allowed_on_network()
 * wpmu_get_blog_allowedthemes() -- use WP_theme::get_allowed_on_site()

see also [20016], [20018], [20019], [20020], [20021], [20022], [20025], [20026], [20027]. also fixes #19244.

see #20103.



git-svn-id: http://svn.automattic.com/wordpress/trunk@20029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-28 21:24:44 +00:00
ryan
d910c26182 Pinking shears 6-20000
git-svn-id: http://svn.automattic.com/wordpress/trunk@20000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-27 19:46:52 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
dd32
3686bc4b6e use maybe_unserialize() in update and API checks, Tighten up the checks on expected return data to avoid processing invalid responses after change. See #19617
git-svn-id: http://svn.automattic.com/wordpress/trunk@19707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 03:48:05 +00:00
ryan
5849122174 Don't fire update checks for ajax requests. Props mitchoyoshitaka. fixes #13732
git-svn-id: http://svn.automattic.com/wordpress/trunk@19693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 22:46:32 +00:00
ryan
fafe61b247 Check for plugin and theme updates more often when visitng update-core.php. Props kurtpayne. fixes #18876
git-svn-id: http://svn.automattic.com/wordpress/trunk@19683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 19:49:47 +00:00
nacin
8085f7d529 Revert update changes that snuck in with [19311]. see #19255, see #18876.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-16 07:23:15 +00:00
nacin
cd33a2118d Fix typo in filler text cause we all know it'll slip through accidentally. props paulhastings0, fixes #19255.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-16 01:58:13 +00:00