Commit Graph

122 Commits

Author SHA1 Message Date
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