Sergey Biryukov
de1fab0b66
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 .
Built from https://develop.svn.wordpress.org/trunk@37979
git-svn-id: http://core.svn.wordpress.org/trunk@37920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 21:43:30 +00:00
Dominik Schilling
bfe46464c5
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 .
Built from https://develop.svn.wordpress.org/trunk@37978
git-svn-id: http://core.svn.wordpress.org/trunk@37919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:46:29 +00:00
Dominik Schilling
51579c49a8
Embeds: After [37745], check if a featured image exists before attaching an event listener.
...
Props swissspidy.
Fixes #35657 .
Built from https://develop.svn.wordpress.org/trunk@37977
git-svn-id: http://core.svn.wordpress.org/trunk@37918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:16:57 +00:00
Pascal Birchler
685cce51d2
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 .
Built from https://develop.svn.wordpress.org/trunk@37976
git-svn-id: http://core.svn.wordpress.org/trunk@37917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:16:28 +00:00
Dominik Schilling
a728528542
I18N: Add tests for `wp_maybe_decline_date()`.
...
Reverts [37718], `$wp_locale` needs to be cloned.
Props SergeyBiryukov.
Fixes #36790 .
Built from https://develop.svn.wordpress.org/trunk@37975
git-svn-id: http://core.svn.wordpress.org/trunk@37916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 16:09:28 +00:00
Pascal Birchler
f2c4003dde
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 .
Built from https://develop.svn.wordpress.org/trunk@37974
git-svn-id: http://core.svn.wordpress.org/trunk@37915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:37:28 +00:00
Pascal Birchler
600e511533
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 .
Built from https://develop.svn.wordpress.org/trunk@37973
git-svn-id: http://core.svn.wordpress.org/trunk@37914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:32:28 +00:00
Dominik Schilling
3d6fc45834
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 .
Built from https://develop.svn.wordpress.org/trunk@37972
git-svn-id: http://core.svn.wordpress.org/trunk@37913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:22:29 +00:00
Pascal Birchler
b55493e3e6
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 .
Built from https://develop.svn.wordpress.org/trunk@37971
git-svn-id: http://core.svn.wordpress.org/trunk@37912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:18:27 +00:00
Pascal Birchler
848318aeb1
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 .
Built from https://develop.svn.wordpress.org/trunk@37970
git-svn-id: http://core.svn.wordpress.org/trunk@37911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:09:28 +00:00
Pascal Birchler
066360f569
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 .
Built from https://develop.svn.wordpress.org/trunk@37969
git-svn-id: http://core.svn.wordpress.org/trunk@37910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 15:05:28 +00:00
Dominik Schilling
c50abe823f
Themes: After [37742], fix the color of the "Upload Theme" button to match other page title actions.
...
Props afercia.
Fixes #35457 .
Built from https://develop.svn.wordpress.org/trunk@37968
git-svn-id: http://core.svn.wordpress.org/trunk@37909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 14:42:29 +00:00
Dominik Schilling
bcf027eda1
Themes: Avoid announcing the theme search results too many times.
...
Props afercia.
Fixes #36848 .
Built from https://develop.svn.wordpress.org/trunk@37967
git-svn-id: http://core.svn.wordpress.org/trunk@37908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 14:38:29 +00:00
Dominik Schilling
de3b2db1e2
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 .
Built from https://develop.svn.wordpress.org/trunk@37966
git-svn-id: http://core.svn.wordpress.org/trunk@37907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:37:29 +00:00
Dominik Schilling
4594006ca6
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 .
Built from https://develop.svn.wordpress.org/trunk@37965
git-svn-id: http://core.svn.wordpress.org/trunk@37906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 13:28:29 +00:00
Dominik Schilling
56e463a38e
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 .
Built from https://develop.svn.wordpress.org/trunk@37964
git-svn-id: http://core.svn.wordpress.org/trunk@37905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 12:42:27 +00:00
Dominik Schilling
4e66d6a568
Customize: Add a RTL version of "browser.png" for the site icon preview.
...
Props sidati.
Fixes #37063 .
Built from https://develop.svn.wordpress.org/trunk@37963
git-svn-id: http://core.svn.wordpress.org/trunk@37904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 11:32:29 +00:00
Dominik Schilling
9b893cd558
General: Return "O B" when passing 0 to `size_format()`.
...
Props swissspidy.
Fixes #36635 .
Built from https://develop.svn.wordpress.org/trunk@37962
git-svn-id: http://core.svn.wordpress.org/trunk@37903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 10:36:30 +00:00
Pascal Birchler
a5580012a3
Docs: Fix a typo across some function and hook docs.
...
s/filterss/filters.
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@37961
git-svn-id: http://core.svn.wordpress.org/trunk@37902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:45:29 +00:00
Sergey Biryukov
4a62825a05
Text Changes: Remove duplicate string, use the one we already have.
...
See #34521 .
Built from https://develop.svn.wordpress.org/trunk@37960
git-svn-id: http://core.svn.wordpress.org/trunk@37901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:10:28 +00:00
Dominik Schilling
9ccd9b3a3e
Network Admin: Replace "Options saved." notice with "Settings saved.".
...
"Settings saved." is already used on all other settings screens.
Fixes #37279 .
Built from https://develop.svn.wordpress.org/trunk@37959
git-svn-id: http://core.svn.wordpress.org/trunk@37900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 22:01:27 +00:00
Sergey Biryukov
7caf951bbf
Text Changes: Remove duplicate string, use the one we already have.
...
See #34521 .
Built from https://develop.svn.wordpress.org/trunk@37958
git-svn-id: http://core.svn.wordpress.org/trunk@37899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:48:28 +00:00
Weston Ruter
fed5a03c8f
Customize: Prevent image controls with selected images smaller than pane width from being distorted through stretching to fit width.
...
Props celloexpressions.
Fixes #37277 .
Built from https://develop.svn.wordpress.org/trunk@37957
git-svn-id: http://core.svn.wordpress.org/trunk@37898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:45:28 +00:00
Sergey Biryukov
83cd70a5f6
Text Changes: Remove duplicate string, use the one we already have.
...
See #34521 .
Built from https://develop.svn.wordpress.org/trunk@37956
git-svn-id: http://core.svn.wordpress.org/trunk@37897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 21:37:27 +00:00
Dominik Schilling
6f33a94487
Customize: Use the correct variable when referring to the media frame.
...
Props celloexpressions.
Fixes #36236 .
Built from https://develop.svn.wordpress.org/trunk@37955
git-svn-id: http://core.svn.wordpress.org/trunk@37896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:45:28 +00:00
Dominik Schilling
54c92d656f
Unit Tests: Change some `@group` annotations to `@ticket`.
...
Built from https://develop.svn.wordpress.org/trunk@37954
git-svn-id: http://core.svn.wordpress.org/trunk@37895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:25:27 +00:00
Dominik Schilling
be54af2e4c
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 .
Built from https://develop.svn.wordpress.org/trunk@37953
git-svn-id: http://core.svn.wordpress.org/trunk@37894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 20:16:28 +00:00
Sergey Biryukov
e64b88cb34
Media: Avoid PHP notices when trying to show a parent post title of an orphaned post type.
...
Props littler.chicken.
See #37186 .
Built from https://develop.svn.wordpress.org/trunk@37952
git-svn-id: http://core.svn.wordpress.org/trunk@37893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 19:34:28 +00:00
Dominik Schilling
a7bbdb23cc
Unit Tests: Remove `@group foo` annotation from `Tests_WP_Resource_Hints::test_dns_prefetch_styles()`.
...
Built from https://develop.svn.wordpress.org/trunk@37951
git-svn-id: http://core.svn.wordpress.org/trunk@37892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 19:29:27 +00:00
Dominik Schilling
c95e87bd34
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 .
Built from https://develop.svn.wordpress.org/trunk@37950
git-svn-id: http://core.svn.wordpress.org/trunk@37891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 19:08:28 +00:00
Sergey Biryukov
6edb48dd57
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 .
Built from https://develop.svn.wordpress.org/trunk@37949
git-svn-id: http://core.svn.wordpress.org/trunk@37890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 14:34:27 +00:00
Sergey Biryukov
caa11e403d
I18N: Make the translator comment added in [37858] more explicit and consistent with other similar instances.
...
See #37147 .
Built from https://develop.svn.wordpress.org/trunk@37948
git-svn-id: http://core.svn.wordpress.org/trunk@37889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 13:10:30 +00:00
Dominik Schilling
1d13c64927
Themes: After [37287], remove deprecated feature category.
...
See #33407 .
Built from https://develop.svn.wordpress.org/trunk@37947
git-svn-id: http://core.svn.wordpress.org/trunk@37888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 10:01:28 +00:00
Dominik Schilling
720106e16d
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 .
Built from https://develop.svn.wordpress.org/trunk@37946
git-svn-id: http://core.svn.wordpress.org/trunk@37887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 09:58:28 +00:00
Dominik Schilling
b733aa79ab
Themes: Add "Custom Logo" to the list of WordPress theme features.
...
Props rabmalin.
See #33407 .
Fixes #36744 .
Built from https://develop.svn.wordpress.org/trunk@37945
git-svn-id: http://core.svn.wordpress.org/trunk@37886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 09:35:27 +00:00
Gary Pendergast
2d6b9ca91b
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 .
Built from https://develop.svn.wordpress.org/trunk@37944
git-svn-id: http://core.svn.wordpress.org/trunk@37885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-04 04:02:31 +00:00
Rachel Baker
e5fcbb3514
REST API: Reverse order of setting sanitization/validation, validating prior to sanitizing.
...
Fixes mistake in the current behavior, where the sanitization callback ran before the validation callback. Now the validation callback will run before the sanitization.
Props schlessera, rachelbaker.
See #37247 .
Fixes #37192 .
Built from https://develop.svn.wordpress.org/trunk@37943
git-svn-id: http://core.svn.wordpress.org/trunk@37884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-02 23:03:27 +00:00
Weston Ruter
318fec4dcd
Customize: Reverse order of setting sanitization/validation, validating prior to sanitizing.
...
Reverses order where sanitization was being applied before validation originally in accordance with REST API logic.
Props westonruter, schlessera.
See #34893 .
See #37192 .
Fixes #37247 .
Built from https://develop.svn.wordpress.org/trunk@37942
git-svn-id: http://core.svn.wordpress.org/trunk@37883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-02 18:39:30 +00:00
Helen Hou-Sandí
20b329ba08
Media: Only show parent post titles when the user can read said post.
...
fixes #37186 .
Built from https://develop.svn.wordpress.org/trunk@37941
git-svn-id: http://core.svn.wordpress.org/trunk@37882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 15:07:36 +00:00
Peter Wilson
26c07ed8d9
Users: Check zxcvbn is defined before calling.
...
Prevents JavaScript errors by checking zxcvbn is defined before calling.
Changes `wp.passwordStrength.meter()` to return `-1` if the strength of the password is unknown.
On the user profile screen, `generatePassword()` checks if the user has entered the password before setting the value of the password input box.
Props peterwilsoncc, adamsilverstein.
Fixes #34905 .
Built from https://develop.svn.wordpress.org/trunk@37940
git-svn-id: http://core.svn.wordpress.org/trunk@37881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 12:45:29 +00:00
Sergey Biryukov
8aa1c37590
Docs: Fix typo in `WP_Theme_Install_List_Table` description.
...
Props Frozzare.
Fixes #37234 .
Built from https://develop.svn.wordpress.org/trunk@37937
git-svn-id: http://core.svn.wordpress.org/trunk@37878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 10:27:32 +00:00
Helen Hou-Sandí
7f5717ba5d
Meta: Make retrieving registered metadata actually work.
...
The initial implementation used a `single` argument, which has now been added to the whitelist.
props Faison.
see #35658 .
Built from https://develop.svn.wordpress.org/trunk@37934
git-svn-id: http://core.svn.wordpress.org/trunk@37875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 21:25:27 +00:00
Helen Hou-Sandí
42854ca56f
Meta registration: Ensure `$args` is an array and simplify compat logic.
...
props ocean90, sc0ttkclark.
see #35658 .
Built from https://develop.svn.wordpress.org/trunk@37933
git-svn-id: http://core.svn.wordpress.org/trunk@37874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 19:00:31 +00:00
Jeremy Felt
858fb83f57
Docs: Remove duplicate text for `is_main_site()` parameter.
...
Props Kenshino.
Fixes #37241 .
Built from https://develop.svn.wordpress.org/trunk@37932
git-svn-id: http://core.svn.wordpress.org/trunk@37873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 17:17:28 +00:00
Drew Jaynes
5e467a2774
Docs: Add changelog entries to the hook doc for the `safe_style_css` filter denoting recent CSS attribute additions.
...
* `min-height`, `max-height`, `min-width`, and `max-width` were added in 4.4, see [33739].
* `list-style-type` was added in 4.6, see [37898].
See #35877 . See #32246 .
Built from https://develop.svn.wordpress.org/trunk@37931
git-svn-id: http://core.svn.wordpress.org/trunk@37872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 17:02:30 +00:00
Jeremy Felt
4789f30c40
Multisite: Simplify logic assigning `orderby` in `get_site_by_path()`.
...
Before [37628], there were 3 separate conditions for ordering by domain and/or path in `get_site_by_path()` that each resulted in it's own query. Now that `get_sites()` is used and supports `WP_Site_Query`, this can be simplified.
Props spacedmonkey.
Fixes #37215 .
Built from https://develop.svn.wordpress.org/trunk@37930
git-svn-id: http://core.svn.wordpress.org/trunk@37871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 16:59:29 +00:00
Jeremy Felt
f4d46f0235
Multisite: Revert [37874].
...
After [37923], `get_blog_details()` contained a now unnecessary attempt at back-compat for objects stored in cache.
See #36717 .
Built from https://develop.svn.wordpress.org/trunk@37929
git-svn-id: http://core.svn.wordpress.org/trunk@37870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 16:40:28 +00:00
Helen Hou-Sandí
48ca588a6c
Meta: Actually use fallback auth for the previous registration method.
...
see #35658 .
Built from https://develop.svn.wordpress.org/trunk@37928
git-svn-id: http://core.svn.wordpress.org/trunk@37869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 16:39:29 +00:00
Andrew Ozz
21ae71eaa1
TinyMCE: do not trigger `execCommand` on loading, it focuses the editor in Chrome.
...
Fixes #37243 .
Built from https://develop.svn.wordpress.org/trunk@37927
git-svn-id: http://core.svn.wordpress.org/trunk@37868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 15:18:27 +00:00
Dominik Schilling
b39bddfd2a
Post WordPress 4.6 Beta 1 version bump.
...
Built from https://develop.svn.wordpress.org/trunk@37926
git-svn-id: http://core.svn.wordpress.org/trunk@37867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-06-30 01:15:28 +00:00