Commit Graph

34982 Commits

Author SHA1 Message Date
Dominik Schilling
0b1f2f7ca3 Update/Install: Remove the .notice-error class before adding classes for the update process.
Prevents displaying an update message with error styling.

Props obenland.
Props SergeyBiryukov for review.
Fixes #37550.

git-svn-id: https://develop.svn.wordpress.org/trunk@38209 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 22:56:53 +00:00
Dominik Schilling
8317d0735a Customize: Increase the target size of the 'Edit Menu' button.
Props celloexpressions.
Props afercia, helen for review.
Fixes #36795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38207 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 22:37:54 +00:00
Dominik Schilling
a02d4c4a16 Update/Install: Replace "error" and "-1" failure messages with a more meaningful one.
* "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'.
* "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'.
* Escape the message in `wp-updates-admin-notice` because the response may include HTML.
* Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable.

Props azaozz for review.
Fixes #37583.

git-svn-id: https://develop.svn.wordpress.org/trunk@38205 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 19:27:56 +00:00
Andrew Nacin
6c2d90dfba MediaElement: Remove translated string from a plugin WP doesn't bundle.
fixes #37394.


git-svn-id: https://develop.svn.wordpress.org/trunk@38203 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-05 04:43:32 +00:00
John Blackbourn
5cc963a721 Docs: Correct and clarify various @since docs.
Fixes #37562


git-svn-id: https://develop.svn.wordpress.org/trunk@38201 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 22:53:40 +00:00
Dominik Schilling
152fba56cc Upgrade/Install: Make some install/update failures more verbose.
An upgrader class is used in conjunction with an upgrader skin class. A skin class handles the logging for an upgrade and informs a user about the progress and failures.
The current Ajax install/update handlers are using the `Automatic_Upgrader_Skin` class because during an Ajax request no output is intended. The difference between Ajax updates and automatic updates is that you will see the full log (usually by email) while Ajax updates focus only on success or failure. For that `Automatic_Upgrader_Skin` has one disadvantage: It doesn't provide a way to retrieve failure messages which were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the `error()` and `feedback()` methods to intercept all errors, which can be a `WP_Error` object or a string.

This updates all four Ajax handler for installing/updating themes/plugins to use the new skin. They now also check the skin for any intercepted errors and pass them on to the user.

Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
Fixes #37531.

git-svn-id: https://develop.svn.wordpress.org/trunk@38199 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 22:17:44 +00:00
John Blackbourn
90fb0ded3b I18N: Correct the documented return types of get_translations_for_domain().
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@38198 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 22:12:21 +00:00
Dominik Schilling
0e2a61dca9 Plugins: Also update aria-labels when a plugin update fails.
Previously the label was stuck at "Updating…".

Props afercia, ocean90.
Props DrewAPicture for review.
Fixes #37556.

git-svn-id: https://develop.svn.wordpress.org/trunk@38196 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 21:05:19 +00:00
Dominik Schilling
dea0ca7dbc Emoji: Update the Twemoji loader to include the rainbow flag.
[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.

Props pento.
See #37543.
Fixes #37566.

git-svn-id: https://develop.svn.wordpress.org/trunk@38194 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 20:50:11 +00:00
Sergey Biryukov
7f106c4f8b Formatting: In remove_accents(), correct replacements for:
* Latin small letter n preceded by apostrophe
* Latin capital letter Eng
* Latin small letter Eng

Props gitlost.
Fixes #37564.

git-svn-id: https://develop.svn.wordpress.org/trunk@38193 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 13:55:30 +00:00
Dion Hulse
140f4914f2 Requests: Merge handling for custom HTTP methods.
This merges the latest changes to Requests from upstream to add support for custom HTTP methods.
See 1b5ffd8501

Props Ipstenu, ocean90.
Fixes #37503 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@38191 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-04 07:13:41 +00:00
Dominik Schilling
9628a53be7 Customize: Make the menu edit button look like a link.
The button was introduced in [37901] to allow users switching to the selected menu for further edits. A link makes it more clear that the user is taken away from the current view.
This also adds an aria label and makes the button label more verbose, 'Edit Menu'.

Props afercia.
Props helen for review.
Fixes #36795.

git-svn-id: https://develop.svn.wordpress.org/trunk@38189 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:44:58 +00:00
Aaron Jorbin
cd6a017b66 Updates: Clean up debug statements.
Removing some `console.error` calls leftover from development and wrapping the `console.log` call in a check to ensure `console.log` exists.

Fixes #37514.
Props ocean90, obenland



git-svn-id: https://develop.svn.wordpress.org/trunk@38186 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:27:51 +00:00
Aaron Jorbin
10906c673f Updates: Improve bulk update failure notice
When doing a bulk update, if there are failures the user needs to know about that. This makes it clearer that you can click on the notification to see more details, especially for screen reader users.

Fixes #37510.
Props  juhise, Ankit K Gupta, afercia, jorbin, ocean90. 



git-svn-id: https://develop.svn.wordpress.org/trunk@38185 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 22:23:50 +00:00
Dominik Schilling
cc524820be About Page: First pass for 4.6 with strings (not yet translatable) and images (not CDN).
Props macmanx, jorbin, hugobaeta, DrewAPicture, peterwilsoncc, iamfriendly, rahulsprajapati, vishalkakadiya, petya, celloexpressions, westonruter, mikeschroder, zetaraffix, mapk, boonebgorges, adamsilverstein, jeremyfelt, rosso99, karmatosed, swissspidy, michael-arestad, ramiy, ocean90.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38183 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 19:53:44 +00:00
Boone Gorges
fa21c5e675 In WP_Term_Query, accept a string value for taxonomy.
Props endocreative.
Props ocean90 for review.
Fixes #37545.

git-svn-id: https://develop.svn.wordpress.org/trunk@38181 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 13:50:14 +00:00
Gary Pendergast
6efa061bd5 Emoji: Add support for the Rainbow and Pirate flag emoji.
Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development.

Props ocean90 for the code review.

See #37543.



git-svn-id: https://develop.svn.wordpress.org/trunk@38179 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-03 00:10:46 +00:00
Helen Hou-Sandi
35c6691858 Trunk is now 4.7-alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@38178 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-02 13:44:37 +00:00
Aaron Jorbin
11a5970263 Upgrade/Install: Trigger additional JS events in shiny updates
Events for updating exist, but they lack context. This adds args so that plugins can detec t what plugin/theme is being installed.  Additionally, events for bulk actions, deleting and that and install is starting didn't exist, so this adds them.

Fixes #37512.
Props DavidAnderson, and ocean90, swissspidy for review.



git-svn-id: https://develop.svn.wordpress.org/trunk@38175 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:56:57 +00:00
Dominik Schilling
48078058d7 Script Loader: Ignore deregistered dependencies in wp_dependencies_unique_hosts().
Prevents a PHP warning when a handle of a deregistered dependency is still in the queue.

Fixes #37502.

git-svn-id: https://develop.svn.wordpress.org/trunk@38174 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:24:21 +00:00
Dominik Schilling
11e4642c67 HTTP API: Set $use_authentication property of Requests_Proxy_HTTP to true when proxy authentication is required.
Props francescobagnoli for initial patch.
Fixes #37494.

git-svn-id: https://develop.svn.wordpress.org/trunk@38173 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:19:02 +00:00
Dominik Schilling
dbe140910b Plugins: Use install_plugins_upload action to print the upload form.
Since [37221] the upload form is added to every plugin install screen via `install_plugins_upload()`. Previously the form was added through the `install_plugins_upload` (alias of `install_plugins_$tab`) action which allowed plugin authors to replace the form. This restores the previous behaviour.

* Add the form only to non-upload plugin install screens.
* Replace `install_plugins_upload()` with the `install_plugins_upload` and `install_plugins_pre_upload` actions.
* Remove `$upload_tab_class` and add a CSS class for the current tab to `.wrap`
* Adjust CSS selectors and toggle the whole container to support upload without an `upload-plugin` class.

Props DavidAnderson, ocean90.
Fixes #37495.

git-svn-id: https://develop.svn.wordpress.org/trunk@38172 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 18:10:45 +00:00
Dominik Schilling
76a5d17bf5 Bundled Themes: Bump versions and update theme tags.
* Twenty Ten 2.2
* Twenty Eleven 2.5
* Twenty Twelve 2.1
* Twenty Thirteen 2.0
* Twenty Fourteen 1.8
* Twenty Fifteen 1.6

Props davidakennedy.
Fixes #37426.

git-svn-id: https://develop.svn.wordpress.org/trunk@38171 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-31 16:36:45 +00:00
Dominik Schilling
0eebac0404 Post WordPress 4.6 RC 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@38170 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 18:59:49 +00:00
Dominik Schilling
366eada864 WordPress 4.6 RC 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@38169 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 18:28:30 +00:00
Dominik Schilling
af6b1a5388 Plugins: Move capability checks further up in wp_ajax_update_plugin() and wp_ajax_delete_plugin().
Add tests for both Ajax handlers.

Props Yorick Koster, swissspidy.
Fixes #37490.

git-svn-id: https://develop.svn.wordpress.org/trunk@38168 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 17:42:01 +00:00
Dominik Schilling
d097c1d916 Filesystem API: Output buffering for request_filesystem_credentials() should wrap the function directly.
Previously `ob_end_clean()` was only called when the previous condition was successful which led to unexpected results when another output buffering was involved, like PHPUnit's.

Fixes #37488.

git-svn-id: https://develop.svn.wordpress.org/trunk@38167 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 17:09:27 +00:00
Weston Ruter
3b28231001 Customize: Prevent customize-preview-widgets JS errors in preview if a sidebar is registered with empty before_widget/after_widget params.
Selective refresh will not be available for widgets when they lack these params, so previewing will fallback to full page refreshes. Sidebars registered as such should be rare so this accounts for an edge case.

Fixes #37478.


git-svn-id: https://develop.svn.wordpress.org/trunk@38166 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 16:26:22 +00:00
Dominik Schilling
2db9d7bee7 HTTP API: All non-GET/HEAD requests should put the arguments in the form body.
Requests defaults to _GET/query for HEAD/GET/DELETE and _POST/body for POST/PUT/OPTIONS/PATCH. For backward compatibility `WP_HTTP` needs to force `data_format` to 'body' for all non-GET/HEAD requests.

Props dd32.
Fixes #37456.

git-svn-id: https://develop.svn.wordpress.org/trunk@38165 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 15:51:19 +00:00
Dominik Schilling
24f890045c HTTP API: Normalize cookies before passing them to Requests.
Requests has its own cookie object in form of `Requests_Cookie`. Therefore we have to convert `WP_Http_Cookie` objects to `Requests_Cookie`.
This introduces `WP_Http_Cookie::get_attributes()` to retrieve cookie attributes of a `WP_Http_Cookie` object and `WP_Http::normalize_cookies()` to convert the cookie objects.

Fixes #37437.

git-svn-id: https://develop.svn.wordpress.org/trunk@38164 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 15:31:48 +00:00
Dominik Schilling
55e086355f HTTP API: Bump version of Requests to 1.7.
See #33055.

git-svn-id: https://develop.svn.wordpress.org/trunk@38163 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 14:54:57 +00:00
Sergey Biryukov
a2175c9ede I18N: After [38077], merge two duplicate strings in wp_insert_term() and wp_update_term().
Props ramiy.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38162 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 10:42:23 +00:00
Peter Wilson
d1aacf419e Script Loader: Clarify documentation of wp_resource_hints hook.
Specify that the `wp_resource_hints` hook is firing for a single relation type.

Props: dimadin for initial patch.
See #37458.


git-svn-id: https://develop.svn.wordpress.org/trunk@38161 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 10:35:04 +00:00
Andrew Ozz
e8c58c47db TinyMCE: fix the calculation for the inline toolbar vertical position.
Fixes #37481.

git-svn-id: https://develop.svn.wordpress.org/trunk@38160 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-27 02:58:27 +00:00
Andrew Ozz
d16d808d8b TinyMCE, inline link:
- Remove proxying through WordPress to test if an URL exists.
- Fix and enhance the regex that tests if the URL is well formed.

Fixes #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@38159 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 23:23:21 +00:00
Andrew Ozz
63980b7cf3 TinyMCE, wpView:
- Add the `wpview-wrap` class and pass third param to the getNodes() callback for back-compat.
- Attach the mutation observer that resizes a view iframe inside the iframe to minimize memory use/leaks.
- Remove the `wp-mce-view-unbind` event. It has never been particularly reliable and now it doesn't fire when the user deletes a view by typing or pasting over it.
- Restore changing of a view iframe body classes when the editor body classes change.

Props iseulde, azaozz.
Fixes #36434.

git-svn-id: https://develop.svn.wordpress.org/trunk@38158 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 23:12:14 +00:00
Andrew Ozz
10e93c557b TinyMCE, wpView: bail early when the iframe node is not attached to the DOM. We can't load any HTML in it as here is no iframe.contentWindow in these cases.
See #36434.

git-svn-id: https://develop.svn.wordpress.org/trunk@38157 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 22:05:39 +00:00
Andrew Ozz
a08e89ed97 TinyMCE: fix selecting an image on touch in iOS Safari for TinyMCE 4.4.1.
Fixes #37427.

git-svn-id: https://develop.svn.wordpress.org/trunk@38156 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 21:50:51 +00:00
Andrew Ozz
52ea1c53ac TinyMCE: upgrade to 4.4.1, changelog: https://www.tinymce.com/docs/changelog/#version441-july262016.
See #37427.
Fixes #37476.

git-svn-id: https://develop.svn.wordpress.org/trunk@38155 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 21:46:36 +00:00
Dominik Schilling
86b5cfcb83 Plugins: Use history.pushState() to customize the URL during searches.
`history.pushState()` requires an event handler for `popstate` which doesn't exist (yet).

Props rahulsprajapati for initial patch.
Fixes #37233.

git-svn-id: https://develop.svn.wordpress.org/trunk@38154 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 20:00:29 +00:00
Helen Hou-Sandi
7f6bfb42fe System fonts: Adjust the smaller tabs so they appear as tabs.
The tab effect comes from overlapping the border of the box below. Only applies to OSX; testing did not reveal adverse effects in other OSes.

props ocean90.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@38153 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 16:45:16 +00:00
Helen Hou-Sandi
1e21bf9bf7 System fonts: Don't quote single-word font names, per our coding standards.
props ocean90, netweb.
see #36753.


git-svn-id: https://develop.svn.wordpress.org/trunk@38152 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-26 16:38:49 +00:00
Dominik Schilling
076cbcdb71 Filesystem API: Prevent an endless self-calling loop in wp_tempnam().
Under certain conditions upgrades on Windows may fail because `wp_tempnam()` gets called in a loop.
This can happen when `wp_tempnam()` is called with `\.maintenance` for the `$filename` parameter. The function strips the extension, in this case `.maintenance`, which results in an empty filename. Because it's empty, `wp_tempnam()` calls itself with `dirname( '\.maintenance' )`. On *nix systems this would be `"/"` which allows `wp_tempnam()` to fall back on `time()`. But on Windows it's `"\"`.

This change adds the backslash to the list of characters which allow `wp_tempnam()` to fall back on `time()`.

See [32322], [31936].
Fixes #33999.

git-svn-id: https://develop.svn.wordpress.org/trunk@38151 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 15:27:43 +00:00
Sergey Biryukov
7bf85ed296 I18N: Add a translator comment for two MediaElement.js strings added in [38089].
Props ideag.
See #37453, #37394.

git-svn-id: https://develop.svn.wordpress.org/trunk@38150 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 14:15:07 +00:00
Sergey Biryukov
cc9e4262ca Plugins: Add a missing space between classes on <td> element for custom columns of the Plugins list table.
Props crstauf.
Fixes #37460.

git-svn-id: https://develop.svn.wordpress.org/trunk@38149 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 13:27:42 +00:00
Sergey Biryukov
ad09174df2 Docs: In wp_schedule_single_event(), add a note about scheduling an event to occur within 10 minutes of another event with the same action hook.
Props medariox.
Fixes #37455.

git-svn-id: https://develop.svn.wordpress.org/trunk@38148 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-25 12:22:21 +00:00
Sergey Biryukov
22b3bdc333 Posts, Post Types: Remove a redundant function_exists( 'mb_strlen' ) check in get_sample_permalink_html().
`mb_strlen()` is always available since [32114].

See #30633.

git-svn-id: https://develop.svn.wordpress.org/trunk@38147 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 13:04:47 +00:00
Dominik Schilling
6f5f178e8c List Table: Improve WP_Plugins_List_Table::search_box() which was added in [38033].
* Update DocBlock to use third-person singular verb and to include a period at the end.
* Use `submit_button()` for the submit button.
* Escape the ID attribute.
* Apply the same to `WP_List_Table::search_box()`.

See #37230.

git-svn-id: https://develop.svn.wordpress.org/trunk@38146 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 10:58:23 +00:00
Sergey Biryukov
ccb70aee4b Permalinks: In get_page_uri(), don't prepend a parent page slug if it's empty.
Props inderpreet99, SergeyBiryukov.
Fixes #36174.

git-svn-id: https://develop.svn.wordpress.org/trunk@38145 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 10:04:20 +00:00
Sergey Biryukov
299802bbb5 Unit Tests: Add a @ticket reference for test_get_page_uri_without_argument().
See #26284.

git-svn-id: https://develop.svn.wordpress.org/trunk@38144 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-23 08:54:23 +00:00