Commit Graph

34833 Commits

Author SHA1 Message Date
Dominik Schilling a1d37564b2 Post WordPress 4.6 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@37993 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:38:54 +00:00
Dominik Schilling cabbc22606 WordPress 4.6 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@37992 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:24:58 +00:00
Helen Hou-Sandi 495ff0c633 Meta: Make registration error conditions return consistently.
In doing this, non-core object types are no longer forcibly blocked and are instead checked against `wp_object_type_exists()` which has a filterable return value. Still, filter that at your own risk.

props Faison for the initial patch.
see 35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37991 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:08:55 +00:00
Jeremy Felt 68b18c62f2 Meta: Ensure `$object_subtype` is available before use in `register_meta()`.
Props sc0ttkclark.
See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37990 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:00:23 +00:00
Ryan McCue 194c8d0e33 HTTP API: Switch back to returning an array.
The array-compatibility object we started returning in r37428 unfortunately isn't enough like an array. In particular, `is_array()` checks fail, despite the object implementing ArrayAccess. Mea culpa.

This moves the WP_HTTP_Response object to a new http_response key in the array, and changes the value back to an actual array.

Fixes #37097.
See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37989 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 17:50:44 +00:00
Dominik Schilling 3edf3be241 Embeds: Don't print the HTML for a featured image if a post has no featured image.
See [36693].
Fixes #37288.

git-svn-id: https://develop.svn.wordpress.org/trunk@37988 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 17:07:19 +00:00
Sergey Biryukov 946e6ac8de I18N: Introduce an on/off switch for locales where comment number needs to be declined.
When enabled, the switch would override the theme's pseudo-plural `'% Comments'` string with a correct form of `_n( '%s Comment', '%s Comments', $number )`.

Historically, `comments_popup_link()` and `get_comments_number_text()` did not support plural forms and used a pseudo-plural style instead, so some locales were forced to come up with workarounds to display the number of comments in their language correctly.

This change should make those functions more i18n-friendly.

Fixes #13651.

git-svn-id: https://develop.svn.wordpress.org/trunk@37987 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 14:45:55 +00:00
Joe McGill 73cd1b3f8f Media: Don't use 'full' as array key in `wp_calculate_image_srcset()`.
In `wp_calculate_image_srcset()` we get an array of image sizes
associated with an attachment and then add the original image's
information to the array before processing the `srcset`. In doing
so, we set the original data to a `$image_sizes['full']` key, which
could stomp on any custom image sizes using `full` as a size name.

This avoid the issues by adding the original data without a named
key, which is never referenced anyway.

Props jaspermdegroot.
Fixes #36345.

git-svn-id: https://develop.svn.wordpress.org/trunk@37986 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 14:04:06 +00:00
Sergey Biryukov 920f29616a Docs: Use 3-digit, x.x.x-style semantic versioning for `_doing_it_wrong()`, `_deprecated_function()`, `_deprecated_argument()`, and `_deprecated_file()` throughout core.
Props metodiew.
Fixes #36495.

git-svn-id: https://develop.svn.wordpress.org/trunk@37985 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 12:39:01 +00:00
Dominik Schilling 50007cf37d Customize: Fix panel indentation in Firefox.
In Firefox on Windows the menus and widgets panel weren't fully visible due to a miscalculation of the width of a panel, caused by a visible scrollbar.

Props wpfo.
Fixes #34622.

git-svn-id: https://develop.svn.wordpress.org/trunk@37984 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 11:31:22 +00:00
Dominik Schilling 0037aa1dd5 Plugins: In `plugin_basename()` sort plugin paths before resolving symlinks.
`arsort()` sorts the paths reverse-alphabetically while preserving the keys. It results in a longer path being listed before a shorter one with the same base directory(ies).

Props jdgrimes, ocean90.
Fixes #28441.

git-svn-id: https://develop.svn.wordpress.org/trunk@37983 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 09:44:58 +00:00
Weston Ruter ad52e49e4f Customize: Ensure that `WP_Customize_Setting::value()` can return a previewed value for aggregated multidimensionals.
Fixes #37294.


git-svn-id: https://develop.svn.wordpress.org/trunk@37982 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 05:58:28 +00:00
Weston Ruter bddb06dd13 Customize: Ensure that `WP_Customize_Nav_Menu_Section` is able to represent a placeholder nav menu.
Placeholder nav menus (ones that have yet to be saved into the DB) have negative integer IDs.

Fixes #37293.
Props valendesigns, stubgo, westonruter.


git-svn-id: https://develop.svn.wordpress.org/trunk@37981 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 05:32:49 +00:00
Dominik Schilling 8a1fad3178 XML-RPC: Add unit test to verify IXR changes in [37244].
Props aaires.
Fixes #36586.

git-svn-id: https://develop.svn.wordpress.org/trunk@37980 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 21:58:41 +00:00
Sergey Biryukov eb176b40b8 I18N: Adjust the regex in `wp_maybe_decline_date()` to avoid `\w` and `\b`, as they don't work with Unicode characters correctly in PHP 5.3.3 and earlier versions.
See [37975] for unit tests.

See #36790.

git-svn-id: https://develop.svn.wordpress.org/trunk@37979 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 21:42:06 +00:00
Dominik Schilling fdb54dfe7b Upgrade/Install: Change priority for theme/update update rows.
`wp_plugin_update_rows()` and `wp_theme_update_rows()` are using the site transients `update_plugins` and `update_themes` which are set by `wp_update_plugins()` and `wp_update_themes()`. Both functions are hooked into `load-plugins.php` and `load-themes.php`. Therefore the update rows need to be registered after the transients were populated.

See #13071.

git-svn-id: https://develop.svn.wordpress.org/trunk@37978 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 16:45:42 +00:00
Dominik Schilling 9037072780 Embeds: After [37745], check if a featured image exists before attaching an event listener.
Props swissspidy.
Fixes #35657.

git-svn-id: https://develop.svn.wordpress.org/trunk@37977 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 16:15:05 +00:00
Pascal Birchler 146e6665c8 Update/Install: Reject invalid messages in the Shiny Updates `postMessage` handler.
This prevents conflicts with third-party messages (e.g. sent by browser extensions). The updates script expects a specific JSON-encoded message and now bails early if it's not valid JSON.

Fixes #37125.

git-svn-id: https://develop.svn.wordpress.org/trunk@37976 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 16:15:04 +00:00
Dominik Schilling e34157ceb8 I18N: Add tests for `wp_maybe_decline_date()`.
Reverts [37718], `$wp_locale` needs to be cloned.

Props SergeyBiryukov.
Fixes #36790.

git-svn-id: https://develop.svn.wordpress.org/trunk@37975 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 16:09:01 +00:00
Pascal Birchler f89f0a284d Update/Install: Fix plugin updates from the details modal on the Dashboard.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the Dashboard. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Fixes #37131. See #37126.

git-svn-id: https://develop.svn.wordpress.org/trunk@37974 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:36:43 +00:00
Pascal Birchler d17d567661 Update/Install: Fix plugin updates from the details modal on `update-core.php`.
The plugin details modal has been greatly improved in [37714]. However, Shiny Updates aren't yet implemented on the WordPress Updates screen. Therefore, we need to fall back to The Bleak Screen of Sadness. Otherwise nothing happens when trying to install an update from inside the modal.

Props Nikschavan.
Fixes #37126.

git-svn-id: https://develop.svn.wordpress.org/trunk@37973 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:31:24 +00:00
Dominik Schilling d9de76e2a7 Dashboard: Don't add a "Configure" link to the toggle button.
The HTML for the toggle gets appended to the widget name which is later used for the widget title and the screen reader text of the toggle button. Storing the original widget name in the arguments allows us to use the name without the HTML for the screen reader text and doesn't require further changes by plugin developers.

Props nicholas_io, swissspidy.
Fixes #35021.

git-svn-id: https://develop.svn.wordpress.org/trunk@37972 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:21:44 +00:00
Pascal Birchler 31ae7b3d85 Update/Install: Correctly decrement the update count after translation updates.
After [37714], an error was unnecessarily being displayed in the JavaScript console when updating translations on `wp-admin/update-core.php`. Let's not throw an error in these cases.

Props afercia.
Fixes #37127.

git-svn-id: https://develop.svn.wordpress.org/trunk@37971 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:17:20 +00:00
Pascal Birchler 431c469497 Update/Install: Trigger a JS event when updating a theme.
For plugins a `'wp-plugin-updating'` event is triggered, for themes there's now the `'wp-theme-updating'` equivalent.

Props DavidAnderson.
Fixes #37216.

git-svn-id: https://develop.svn.wordpress.org/trunk@37970 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:08:46 +00:00
Pascal Birchler d61706e07e Update/Install: Trigger the correct event after installing an importer plugin.
This fixes a typo inside `wp.updates.installImporterSuccess()` as it's about installing an importer, not an installer.

Fixes #37273.

git-svn-id: https://develop.svn.wordpress.org/trunk@37969 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 15:04:36 +00:00
Dominik Schilling a74032c39f Themes: After [37742], fix the color of the "Upload Theme" button to match other page title actions.
Props afercia.
Fixes #35457.

git-svn-id: https://develop.svn.wordpress.org/trunk@37968 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 14:41:03 +00:00
Dominik Schilling 13896fc5de Themes: Avoid announcing the theme search results too many times.
Props afercia.
Fixes #36848.

git-svn-id: https://develop.svn.wordpress.org/trunk@37967 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 14:37:06 +00:00
Dominik Schilling 727b070c60 Media: Improve form validation errors handling when editing images.
* Use the same check for a numeric value used on the crop fields on all the other fields: don't display "NaN", just empty the field.
* Remove the inline script that runs the initialization of the image editor and call it after the editor UI is fully ready.

Props afercia.
Fixes #36316.

git-svn-id: https://develop.svn.wordpress.org/trunk@37966 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 13:36:59 +00:00
Dominik Schilling 961dd36801 Plugins: Clean up `uninstall_plugins` option during database upgrade.
`register_uninstall_hook()` is designed to be given a function callback (or a static class variable), not an array/object instance. This got blocked in [16339] but the option itself was never cleaned up.

Props polevaultweb.
Fixes #31625.

git-svn-id: https://develop.svn.wordpress.org/trunk@37965 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 13:27:38 +00:00
Dominik Schilling 59b0096dfe Customize: Fix site icon preview in RTL.
* Set the direction of previews to LTR.
* Remove the ID attribute from the favicon preview in the customizer panel. The preview in the media modal uses the same ID which prevented updating the correct favicon preview.

Fixes #37286.

git-svn-id: https://develop.svn.wordpress.org/trunk@37964 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 12:41:38 +00:00
Dominik Schilling 9c4f1a3431 Customize: Add a RTL version of "browser.png" for the site icon preview.
Props sidati.
Fixes #37063.

git-svn-id: https://develop.svn.wordpress.org/trunk@37963 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 11:31:13 +00:00
Dominik Schilling c259f4c35d General: Return "O B" when passing 0 to `size_format()`.
Props swissspidy.
Fixes #36635.

git-svn-id: https://develop.svn.wordpress.org/trunk@37962 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-05 10:35:24 +00:00
Pascal Birchler ce7b53fb3f Docs: Fix a typo across some function and hook docs.
s/filterss/filters.

See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@37961 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:44:10 +00:00
Sergey Biryukov 83e3bc084b Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37960 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:09:32 +00:00
Dominik Schilling 1752b073e0 Network Admin: Replace "Options saved." notice with "Settings saved.".
"Settings saved." is already used on all other settings screens.

Fixes #37279.

git-svn-id: https://develop.svn.wordpress.org/trunk@37959 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 22:00:38 +00:00
Sergey Biryukov 31497f69a1 Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37958 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:47:19 +00:00
Weston Ruter 097b3ad595 Customize: Prevent image controls with selected images smaller than pane width from being distorted through stretching to fit width.
Props celloexpressions.
Fixes #37277.


git-svn-id: https://develop.svn.wordpress.org/trunk@37957 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:44:49 +00:00
Sergey Biryukov f4d197c534 Text Changes: Remove duplicate string, use the one we already have.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37956 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 21:36:55 +00:00
Dominik Schilling 1d16d1f36d Customize: Use the correct variable when referring to the media frame.
Props celloexpressions.
Fixes #36236.

git-svn-id: https://develop.svn.wordpress.org/trunk@37955 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:44:30 +00:00
Dominik Schilling 1ae9f9c733 Unit Tests: Change some `@group` annotations to `@ticket`.
git-svn-id: https://develop.svn.wordpress.org/trunk@37954 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:24:52 +00:00
Dominik Schilling 2f90caa574 Nav Menus: In `Walker_Nav_Menu_Edit::start_el()` initialize `$original_title` with `false`.
Prevents displaying "Original:" without a title when adding a menu item without a title.

Props grapplerulrich, swissspidy.
Fixes #36729.

git-svn-id: https://develop.svn.wordpress.org/trunk@37953 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 20:15:48 +00:00
Sergey Biryukov f7c680e84f Media: Avoid PHP notices when trying to show a parent post title of an orphaned post type.
Props littler.chicken.
See #37186.

git-svn-id: https://develop.svn.wordpress.org/trunk@37952 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:33:43 +00:00
Dominik Schilling bc6e877446 Unit Tests: Remove `@group foo` annotation from `Tests_WP_Resource_Hints::test_dns_prefetch_styles()`.
git-svn-id: https://develop.svn.wordpress.org/trunk@37951 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:28:25 +00:00
Dominik Schilling f043ad7e02 Unit Tests: Remove an unused parameter from `Tests_Ajax_DimComment::test_with_bad_id()`.
Prevents a "too few arguments" error in PHP 7.1.0.

Fixes #37271.

git-svn-id: https://develop.svn.wordpress.org/trunk@37950 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 19:07:21 +00:00
Sergey Biryukov 8ae60fd26c Docs: In `wp_list_authors()`, clarify that `include` and `exclude` arguments can also be an array.
Fix duplicated `exclude` argument description.

Props birgire.
Fixes #37239.

git-svn-id: https://develop.svn.wordpress.org/trunk@37949 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 14:33:03 +00:00
Sergey Biryukov 266ffe1f35 I18N: Make the translator comment added in [37858] more explicit and consistent with other similar instances.
See #37147.

git-svn-id: https://develop.svn.wordpress.org/trunk@37948 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 13:09:07 +00:00
Dominik Schilling 222ef34ff2 Themes: After [37287], remove deprecated feature category.
See #33407.

git-svn-id: https://develop.svn.wordpress.org/trunk@37947 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 10:00:23 +00:00
Dominik Schilling 9eb8e29357 Themes: After [37287], add deprecated theme features to the tag list in `WP_Theme::translate_header()`.
Themes which are not yet updated can still have the old tags. This makes sure that these tags are still translated.

See #33407.

git-svn-id: https://develop.svn.wordpress.org/trunk@37946 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 09:57:37 +00:00
Dominik Schilling ba80e82ffb Themes: Add "Custom Logo" to the list of WordPress theme features.
Props rabmalin.
See #33407.
Fixes #36744.

git-svn-id: https://develop.svn.wordpress.org/trunk@37945 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 09:34:38 +00:00
Gary Pendergast b3a6124e3d General: Remove the `Pragma` header from responses.
`Pragma` is supposed to be a request header, but we've been including it in responses since the beginning of time.

This is a relic dating all the way back to b2, probably originally added because Internet Explorer version 5 and earlier didn't understand the `Cache-Control` header in responses, but they did (incorrectly) obey the `Pragma` header.

Internet Explorer 6 and 7 will obey the `Pragma` response header only if no other cache-related response headers are present (in our case, they are always present), and all other browsers ignore the `Pragma` response header.

Props geekysoft.
Fixes #37250.



git-svn-id: https://develop.svn.wordpress.org/trunk@37944 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-04 04:01:19 +00:00