Commit Graph

11037 Commits

Author SHA1 Message Date
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
65ba451f5b Docs: Update the description of the $box argument of wp_nav_menu_item_taxonomy_meta_box() for consistency with [38129].
Missed in [38130].

See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38142 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 16:50:01 +00:00
Dominik Schilling
0780b19984 Plugins: Make search field placeholder translatable.
See #37230.

git-svn-id: https://develop.svn.wordpress.org/trunk@38141 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 14:50:22 +00:00
Dominik Schilling
626169a8ce Docs: Fix typo in hook description for customize_save_validation_before.
See #37318.

git-svn-id: https://develop.svn.wordpress.org/trunk@38140 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 13:50:42 +00:00
Dominik Schilling
ec783d67b9 Docs: Fix minor formatting issue for a comment added in [38113].
See #32171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38139 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 13:45:33 +00:00
Dominik Schilling
92231118dd Filesystem API: Change the default value for the $context parameter of get_filesystem_method() and request_filesystem_credentials() to an empty string.
`$context` is a full path to the directory that is tested for being writable. A path shouldn't be a boolean value.
This also updates `WP_Upgrader_Skin::request_filesystem_credentials()` and `Automatic_Upgrader_Skin::request_filesystem_credentials()` and adds missing docs.

Props DrewAPicture, ocean90.
Fixes #37412.


git-svn-id: https://develop.svn.wordpress.org/trunk@38138 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 12:09:55 +00:00
Dominik Schilling
b19f91f4bb Post Thumbnails: Remove an unused nonce in _wp_post_thumbnail_html().
See #12922.



git-svn-id: https://develop.svn.wordpress.org/trunk@38137 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:43:36 +00:00
Dominik Schilling
4fd98bb5ed Media: Remove global import for $content_width in _wp_post_thumbnail_html().
`$content_width` is unused since [35023].

See #28512.

git-svn-id: https://develop.svn.wordpress.org/trunk@38136 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 11:39:28 +00:00
Sergey Biryukov
fad2c0111b Docs: Fix typo in wp_title() description.
Props ixkaito.
Fixes #37442.

git-svn-id: https://develop.svn.wordpress.org/trunk@38135 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 10:44:05 +00:00
Dominik Schilling
db037aad34 Docs: Change type of WP_Upgrader_Skin::$result to 'string|bool|WP_Error'.
`$result` can be `true` too, see `Language_Pack_Upgrader::bulk_upgrade()`.

See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38134 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-22 10:42:35 +00:00
Sergey Biryukov
e7bd22f87e Database: Replace incorrect use of E_USER_NOTICE in wpdb::_real_escape() with the version number where the message was added.
Props andizer.
Fixes #36403.

git-svn-id: https://develop.svn.wordpress.org/trunk@38133 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 22:44:26 +00:00
Sergey Biryukov
90d4614157 Editor: Improve styling of "Add Media" button on mobile and make it more consistent with media buttons added by plugins.
Props FolioVision.
Fixes #36999.

git-svn-id: https://develop.svn.wordpress.org/trunk@38132 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 21:53:09 +00:00
Sergey Biryukov
0c1b988a63 Docs: In meta box functions, clarify that "Meta box ID" refers to the id attribute of the meta box and not a numeric ID.
Fixes #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38131 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:23:56 +00:00
Sergey Biryukov
58e390d1ac Menus: In wp_nav_menu_item_taxonomy_meta_box():
* Rename the `$taxonomy` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_categories_meta_box()` and other meta box functions.

See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38130 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:20:50 +00:00
Sergey Biryukov
48f6fddb49 Menus: In wp_nav_menu_item_post_type_meta_box():
* Rename the `$post_type` parameter to `$box` for clarity and consistency with other meta box functions.
* Make the docs more consistent with `post_format_meta_box()` and other meta box functions.
* Correct type and description for the third argument of `nav_menu_items_{$post_type_name}_recent` filter.

See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38129 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 19:18:36 +00:00
Sergey Biryukov
068ecc915c Docs: Correct and expand the docs for the $taxonomy argument of wp_nav_menu_item_taxonomy_meta_box().
Props mehulkaklotar for initial patch.
See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38128 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 18:00:41 +00:00
Sergey Biryukov
1db7b8441a Docs: Correct and expand the docs for the $post_type argument of wp_nav_menu_item_post_type_meta_box().
Props mehulkaklotar for initial patch.
See #37211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38127 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 17:59:52 +00:00
Andrew Ozz
fb1fbcfdc0 TinyMCE, link check:
- Use `wp.a11y.speak()` to announce bad URLs.
- Do not add a title to the link toolbar.
- Better error message.

Props afercia, azaozz.
See #36638.

git-svn-id: https://develop.svn.wordpress.org/trunk@38126 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-21 03:41:17 +00:00
Drew Jaynes
7e52b06003 Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 2/2.

Fixes #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38125 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 19:32:05 +00:00
Dominik Schilling
22585895b3 Post WordPress 4.6 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@38124 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:42:54 +00:00
Dominik Schilling
fb6193a820 WordPress 4.6 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@38123 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:31:44 +00:00
Dominik Schilling
63b7f3da1b Script Loader: Use dns-prefetch for the Emoji CDN.
* `preconnect` will be potentially pretty heavy on the CDN. With the Unicode 9.0 emoji update, almost all browsers will trigger the `preconnect`.
* `preconnect` only opens one connection, but `s.w.org` is HTTP/1.1, so the browser will use the preconnected connection for the first emoji, then it has to open new connections for subsequent emoji.

Also use the same URL as we use for the `emoji_svg_url` filter. This will print the hint for the correct CDN in case someone uses a custom CDN.

Props peterwilsoncc.
Fixes #37387.

git-svn-id: https://develop.svn.wordpress.org/trunk@38122 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 18:18:30 +00:00
Drew Jaynes
c750ff2d3c Docs: Fix formatting, tense, verb conjugation, and other syntax for wp-includes/* elements introduced or changed in 4.6.
Part 1/2.

See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38121 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:56:21 +00:00
Drew Jaynes
dd49a0512b Docs: Add missing inline documentation in WP_HTTP_Requests_Response.
* Adds a missing file header
* Adjusts class DocBlock
* Adds missing version and access information for all methods

See #37318, [37428] and #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@38120 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:33:11 +00:00
Dominik Schilling
44676ab38f Plugins: Improve Ajax search of new plugins.
Fixes a few accessibility issues, restores the "Search Results" tab and the search type selector, and improves compatibility with older browsers.

Props rahulsprajapati, swissspidy, adamsilverstein, ocean90
See #37233.

git-svn-id: https://develop.svn.wordpress.org/trunk@38119 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:31:50 +00:00
Joe McGill
2586eeeeca Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the change.

This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to be
previewed by passing the `_thumbnail_id` as a query variable to the preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`, which
gets applied to `get_post_metadata` during the post preview process.

Props flixos90.
Fixes #12922.

git-svn-id: https://develop.svn.wordpress.org/trunk@38118 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 16:23:36 +00:00
Sergey Biryukov
f5f8d1df2b Comments: Introduce the cache_domain argument for WP_Comment_Query to allow caching to a unique set of cache buckets.
See [18128] for `get_terms()` and [37572] for `WP_Term_Query`.

Props Chouby, rachelbaker.
Fixes #37419.

git-svn-id: https://develop.svn.wordpress.org/trunk@38117 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 15:06:19 +00:00
Joe McGill
1bda0a6e2e Media: Ensure empty alt attributes are set to blank strings.
This is a follow up to [38065] to ensure that `wp.html.string()` always
converts empty `alt` attributes to `alt=""` rather than returning HTML using
empty attribute notation, like `alt`. This allows screen readers to ignore
images with empty `alt` attributes, rather than reading out the URL string.

Additionally this completely removes the logic in `wp.html.string()` for
converting blank attributes to empty attribute notation since empty attribute
notation is generally meant to denote a boolean value, e.g.,
`checked` == `checked="checked"`, which doesn't apply in this context because
boolean attributes must be omitted in order to represent a `false` value.
See: https://www.w3.org/TR/html5/infrastructure.html#boolean-attributes

Props adamsilverstein, afineman, joemcgill.
Fixes #36735.

git-svn-id: https://develop.svn.wordpress.org/trunk@38116 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 14:37:24 +00:00
Andrea Fercia
e284dafbc7 Accessibility: Ensure only text is sent to aria-live messages.
While messages passed to `wp.speak.a11y()` should preferably be meaningful,
short, and carefully crafted case by case, this will ensure any HTML tags will
be stripped out from the message string.

Props adamsilverstein.
Fixes #37382.

git-svn-id: https://develop.svn.wordpress.org/trunk@38115 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 14:25:34 +00:00
Mike Schroder
ffb2db0521 Media: Clean up prior image edits if IMAGE_EDIT_OVERWRITE is true.
When `IMAGE_EDIT_OVERWRITE` is set to true, edited image files are
supposed to be deleted when an image is restored to the original.

However, when an image was edited more than once, and then restored,
files created during previous edits were left behind.

Fixes this behavior by updating `wp_save_image()` to clean up
leftover images after each edit when `IMAGE_EDIT_OVERWRITE` is true.

Props bradt, chriscct7, joemcgill.
Fixes #32171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38113 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:34:54 +00:00
Drew Jaynes
3dc7308bea Docs: Add missing class, method, and property DocBlocks for feed classes.
Covers:

* `WP_Feed_Cache`
* `WP_Feed_Cache_Transient`
* `WP_SimplePie_File`
* `WP_SimplePie_Sanitize_KSES`

Props ramiy, stevenkword.
Fixes #36295.


git-svn-id: https://develop.svn.wordpress.org/trunk@38112 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 07:32:26 +00:00
Andrew Ozz
616d4416e2 TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.
Props afercia, azaozz.
Fixes #36863.

git-svn-id: https://develop.svn.wordpress.org/trunk@38110 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-20 01:38:12 +00:00
Sergey Biryukov
79e7fca981 Permalinks: In wp_install_maybe_enable_pretty_permalinks():
* Use `get_page_by_path()` instead of a hardcoded ID, which may not always exist.
* Remove the "test against a random 404 page" part, which is no longer relevant after [34442].

Fixes #36628.

git-svn-id: https://develop.svn.wordpress.org/trunk@38109 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 23:11:25 +00:00
Jeremy Felt
2a8fd61b0c Meta: Ensure $wp_meta_keys is an array in get_registered_meta_keys().
Props vishalkakadiya.
Fixes #37415, See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38108 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 21:58:15 +00:00
Drew Jaynes
3aad67fd48 Docs: Use the three-digit, x.x.x-style version in the DocBlock for the nested lowercase_octets() function.
See #32246. See #meta942.


git-svn-id: https://develop.svn.wordpress.org/trunk@38107 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 19:33:31 +00:00
Drew Jaynes
5a286f7a1b Docs: Add a missing DocBlock for the lowercase_octets() function, which is nested within redirect_canonical().
Will be skipped from parsing.

See #32246. See #meta942.


git-svn-id: https://develop.svn.wordpress.org/trunk@38106 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 19:31:31 +00:00
Drew Jaynes
aa86283408 Readme: Link to the Plugin Developer Handbook on DevHub as the primary resource for information on extending WordPress.
The `Plugin API` article in the Codex is no longer actively maintained.

Props morganestes.
Fixes #37399.


git-svn-id: https://develop.svn.wordpress.org/trunk@38105 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 17:34:00 +00:00
Sergey Biryukov
0fbc96e5bc Docs: Clarify the fields argument description in WP_Network_Query::__construct().
See #32504.

git-svn-id: https://develop.svn.wordpress.org/trunk@38104 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:17:51 +00:00
Sergey Biryukov
a64a8ea726 Docs: Clarify the fields argument description in WP_Site_Query::__construct().
Props ramiy.
See #35791.

git-svn-id: https://develop.svn.wordpress.org/trunk@38103 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:14:40 +00:00
Sergey Biryukov
87376166f2 Multisite: Correct default value for orderby in WP_Network_Query::__construct().
Add a unit test.

See #32504.

git-svn-id: https://develop.svn.wordpress.org/trunk@38102 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 13:09:39 +00:00
Dominik Schilling
b9606d3c4a Filesystem API: Ensure memory limit calculations by PclZip are using integers.
This prevents a warning in PHP trunk, see https://wiki.php.net/rfc/invalid_strings_in_arithmetic.

See #36435.

git-svn-id: https://develop.svn.wordpress.org/trunk@38101 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 11:54:09 +00:00
Peter Wilson
b92c1c58b3 Script Loader: Limit resource hinting to enqueued assets.
Externally hosted script and style dependencies trigger `dns-prefetch` hinting only when enqueued. This removed a bug in which hinting was added on registration.

Renames the function `wp_resource_hints_scripts_styles` to `wp_dependencies_unique_hosts` as the function provides the hosts, not the hinting.

Props swissspidy.
Fixes #37385.


git-svn-id: https://develop.svn.wordpress.org/trunk@38100 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 02:34:42 +00:00
Boone Gorges
103da159d5 Taxonomy: Improve back compat of values passed to 'terms_clauses' filter.
Prior to the introduction of `WP_Term_Query`, the 'orderby' clause
passed to the 'terms_clauses' filter was prefixed by `ORDER BY`. After
`WP_Term_Query`, this was not the case; `ORDER BY` was added after the
filter. As such, plugins filtering 'terms_clauses' and returning an
'orderby' clause beginning with `ORDER BY` resulted in invalid syntax
when `WP_Term_Query` prepended a second `ORDER BY` keyword to
the clause.

This changeset rearranges the way the 'orderby' clause is built so that
it will be passed to 'terms_clauses' in the previous format.

Fixes #37378.

git-svn-id: https://develop.svn.wordpress.org/trunk@38099 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 02:12:48 +00:00
Rachel Baker
456d5b4880 Docs: Correct comment_max_links_url filter and $url param descriptions to communicate values are found links.
`$num_links` is the number of link matches found within the comment_content, and that is the value that can be modified with the `comment_max_links_url` filter.

Props pbearne.
Fixes #37319.

git-svn-id: https://develop.svn.wordpress.org/trunk@38098 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-19 01:48:23 +00:00
Weston Ruter
1aa4b6f87f Docs: Correct type of WP_Post_Type::$cap from array to object.
Fixes typo introduced in r37890. The `WP_Post_Type::$cap` property is set to the return value of `get_post_type_capabilities()` which is an `object`.

See #36217.


git-svn-id: https://develop.svn.wordpress.org/trunk@38097 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 22:51:39 +00:00
Jeremy Felt
4f2008a104 Meta: Remove object subtype handling from register_meta().
Registration is now based solely on object type, which allows the code around this to be simplified significantly.

In the process of making this adjustment:

* `register_meta()`, `unregister_meta_key()`, `get_registered_metadata()`, and `registered_meta_key_exists()` no longer return `WP_Error` objects.
* The recently introduced `wp_object_type_exists()` function and the restriction on object type has been removed.

Note: No guarantee of uniqueness is made across object subtypes. Registered meta keys should be uniquely prefixed to avoid conflict.

Fixes #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38095 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 21:15:37 +00:00
Dominik Schilling
ff6d8819e4 Filesystem API: Cleanup temporary file when the temporary file couldn't be opened.
Props ruud@joyo.
See #34772.
Fixes #36942, #36943.

git-svn-id: https://develop.svn.wordpress.org/trunk@38094 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 19:42:48 +00:00
Tammie
b55afe7f4d Remove .pot files from Default Themes
Fixes #34884
Props davidakennedy


git-svn-id: https://develop.svn.wordpress.org/trunk@38093 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 14:32:52 +00:00
Dominik Schilling
cbbba23530 Comments: Use wp_strip_all_tags() to strip HTML tags.
`wp_kses()` should only be used if you have a whitelist.

Props rachelbaker.
Fixes #37208.

git-svn-id: https://develop.svn.wordpress.org/trunk@38092 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 14:03:04 +00:00
Dominik Schilling
5b6ab5a596 Plugins: Use the correct admin screen when searching for plugins via Ajax.
Both list tables provide different actions based on where they are loaded, regular admin or network admin. Since there is only one Ajax handler for both screens we have to set the current screen before using the list tables.

Props swissspidy, ocean90.
Fixes #37373.

git-svn-id: https://develop.svn.wordpress.org/trunk@38091 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 13:59:17 +00:00
Dominik Schilling
97c25ea5c1 Media: Add missing gettext to a string added in [38089].
See #37394.

git-svn-id: https://develop.svn.wordpress.org/trunk@38090 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 12:38:46 +00:00
Dominik Schilling
29dd928983 Media: Update list of translatable strings for MediaElement.js.
Fixes #37394.

git-svn-id: https://develop.svn.wordpress.org/trunk@38089 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 11:29:03 +00:00
Dominik Schilling
2beb89575b External Libraries: Update MediaElement.js to 2.22.0.
Includes a fix for broken YouTube embeds which are embedded with the `[video]` shortcode. 

Changelog: https://github.com/johndyer/mediaelement/blob/2.22.0/changelog.md
Diff: https://github.com/johndyer/mediaelement/compare/2.21.1...2.22.0

Fixes #37363.

git-svn-id: https://develop.svn.wordpress.org/trunk@38088 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 10:58:17 +00:00
Gary Pendergast
1ba5469262 Emoji: Update to Unicode 9.0 emoji.
This includes a new test in the emoji loader, to see if the browser supports rendering Unicode 9.0 emoji, as well as an update to `twemoji.js`, to load Unicode 9.0 twemoji images.

The default CDN location for loading Twemoji images has changed, moving to a versioned subdirectory. This allows updates without needing to purge the CDN.

Fixes #37361.



git-svn-id: https://develop.svn.wordpress.org/trunk@38087 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 07:34:24 +00:00
Joe McGill
a91e769e36 Media: Prevent image_get_intermediate_size() from returning cropped images.
When `$size` is passed to `image_get_intermediate_size()` as an array of width
and height values and an exact image size matching those values isn't available,
the function loops through the available attachment sizes and returns the
smallest image larger than the requested dimensions with the same aspect ratio.

The aspect ratio check is skipped for the 'thumbnail' size to provide a fallback
for small sizes when no other image option is available. This resulted in a poor
selection when the size requested was smaller than the 'thumbnail' dimensions
but a larger size matching the requested ratio existed.

This refactors the internals of `image_get_intermediate_size()` to ensure the
'thumbnail' size is only returned as a fallback to small sizes once all other
options have been considered, and makes the control flow easier to follow.

This also introduces a new helper function, `wp_image_matches_ratio()` for
testing whether the aspect ratios of two sets of dimensions match. This function
is also now used in `wp_calculate_image_srcset()` during the selection process.

Props flixos, joemcgill.
Fixes #34384, #34980.

git-svn-id: https://develop.svn.wordpress.org/trunk@38086 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 02:13:45 +00:00
Sergey Biryukov
38bcf065df Multisite: Correct default values for orderby and order in WP_Site_Query::__construct().
Add a unit test.

Props ramiy, SergeyBiryukov.
See #35791.

git-svn-id: https://develop.svn.wordpress.org/trunk@38085 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 23:29:11 +00:00
Andrea Fercia
7b833f38a6 Accessibility: Improve keyboard navigation on the themes browser modal window.
Improves the `containFocus()` function to always get the correct first and last
focusable elements, even when the theme browser shows the active theme details.
Also, when on the first and last theme, adds a `disabled` attribute on the
previous and next navigation buttons to make them not focusable.

Fixes #37383.

git-svn-id: https://develop.svn.wordpress.org/trunk@38084 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 22:18:35 +00:00
Weston Ruter
57fe32e081 Twenty Thirteen: Fix selective refresh of Masonry-laid out widgets by deferring initialization until DOM ready.
This ensures that the `wp.customize.selectiveRefresh` object will be available when in the Customizer preview.

Fixes #37390.
Props westonruter, celloexpressions.


git-svn-id: https://develop.svn.wordpress.org/trunk@38083 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 21:13:35 +00:00
Sergey Biryukov
b87911eccb I18N: Remove non-translatable link attributes from translatable strings in wp_plugin_update_row(), wp_theme_update_row(), and get_theme_update_available().
The resulting strings are much easier to translate.

See #36048.

git-svn-id: https://develop.svn.wordpress.org/trunk@38082 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 21:02:21 +00:00
Sergey Biryukov
fd19901336 Text Changes: Change Network deactivate %s to upper case, for consistency with Network Activate %s.
See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38081 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 17:03:24 +00:00
Sergey Biryukov
4c5165a8d0 I18N: Combine duplicate "Menu Locations" and "Menu Options" strings.
Props ramiy.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38080 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:46:25 +00:00
Sergey Biryukov
ad30724bb5 Taxonomy: Correct WP_Error usage in WP_Tax_Query::clean_query() and WP_Tax_Query::transform_query().
Fixes #37389.

git-svn-id: https://develop.svn.wordpress.org/trunk@38079 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:32:50 +00:00
Sergey Biryukov
776b3c3f1d Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.
See #18218, #32329.

git-svn-id: https://develop.svn.wordpress.org/trunk@38077 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:14:27 +00:00
Sergey Biryukov
8d81483b5e I18N: Combine two duplicate "Invalid post type" strings.
Props @ramiy.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38076 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:04:50 +00:00
Dominik Schilling
8756f2912f Import: Enhance accessibility on the Import screen.
* Remove title attributes.
* Show "Install Now" and "Details" links if the importer isn't installed yet.
* Show a "Run Importer" link if the importer is installed. It also handles activation if the plugin isn't activated.
* Add `aria-label` attributes to each link.
* Unify the importer descriptions to make them independent from the plugin state. The API was changed in [meta3690].
* Adjust JavaScript callbacks for ajaxified importer installs.

Props afercia, swissspidy, ocean90.
See #24766.
Fixes #35191.

git-svn-id: https://develop.svn.wordpress.org/trunk@38075 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 15:31:29 +00:00
Sergey Biryukov
f160118827 I18N: Change unnecessary uppercased words in WP_Upgrader::generic_strings() to lower case.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38074 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 13:28:13 +00:00
Sergey Biryukov
bc2a58755f I18N: Combine two duplicate "Unable to locate WordPress Theme directory" strings.
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38073 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 12:57:06 +00:00
Sergey Biryukov
751f76fbaf Text Changes: After [37297], replace two more instances of "WordPress.org Plugin Directory" with "WordPress Plugin Directory".
See #35938.

git-svn-id: https://develop.svn.wordpress.org/trunk@38072 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 12:49:12 +00:00
Sergey Biryukov
8308164a77 I18N: After [38057], consistently use a context for other instances of Activate %s, Network Activate %s, and Delete %s strings.
See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38071 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 23:19:05 +00:00
Sergey Biryukov
cd75368a3f I18N: Remove a stray translator comment added in [38057].
See #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38070 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 23:10:49 +00:00
Boone Gorges
a33080dbf5 On term.php, use $taxnow when fetching currently edited term.
[36874] changed the `get_term()` call so that no `$taxonomy` parameter
was passed, as 4.4 made the parameter optional. This change made it
impossible to access a shared term that has not yet been splitr, since
passing an ambiguous `$term_id` to `get_term()` results in an error.
Restoring the `$taxonomy` parameter fixes the regression.

Props alleynoah, dlh.
Fixes #37205.

git-svn-id: https://develop.svn.wordpress.org/trunk@38069 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 18:36:15 +00:00
Sergey Biryukov
be12798c9a Docs: Correct $post parameter name and description for wp_attachment_is() and wp_attachment_is_image().
Props flixos90.
Fixes #37377.

git-svn-id: https://develop.svn.wordpress.org/trunk@38068 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 13:04:01 +00:00
Sergey Biryukov
cc4bc59293 Permalinks: Rename $usingpi to $using_index_permalinks for clarity.
See #37380.

git-svn-id: https://develop.svn.wordpress.org/trunk@38067 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 12:45:01 +00:00
Sergey Biryukov
d5ba63e6a5 Permalinks: After [37747], make sure $usingpi, $writable, and $update_required are defined before checking them on permalinks update.
Props Clorith.
Fixes #37380.

git-svn-id: https://develop.svn.wordpress.org/trunk@38066 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-16 12:43:16 +00:00
Joe McGill
9d0f2e27d0 Media: Always add alt attributes to images inserted from URLs
Previously, when inserting an image from a URL, leaving the `alt`
field blank in the media modal would result in an image being
inserted into the editor without an `alt` attribute, rather than
an empty `alt`. This happened because the `props.type` would not
get set in `wp.media.string.props()` — because `attachment` is
undefined in this case — causing the image fallbacks to get
skipped.

This fixes the issue by explicitly setting `props.type` to 'image'
in `wp.media.string.image()` before filling out the rest of the
properties.

Props ambrosey, dabnpits.
Fixes #36735.

git-svn-id: https://develop.svn.wordpress.org/trunk@38065 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-15 03:15:23 +00:00
Dominik Schilling
f24f22ce4c Users: Update help text for user-new.php to remove reference to sending passwords via email.
Props anneschmidt.
Fixes #36763.

git-svn-id: https://develop.svn.wordpress.org/trunk@38064 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-14 21:50:45 +00:00
Dominik Schilling
3baaffc5da Editor: Enqueue the wp-embed script to fix embed previews inside the media modal.
Props swissspidy.
Fixes #37334.

git-svn-id: https://develop.svn.wordpress.org/trunk@38062 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-14 13:28:36 +00:00
Drew Jaynes
6bfe8458aa Docs: Update a cross-reference in the DocBlock for wp_register_plugin_realpath() from plugin_basename() to wp_normalize_path().
Props zuige.
Fixes #37357.


git-svn-id: https://develop.svn.wordpress.org/trunk@38061 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 19:21:34 +00:00
Dominik Schilling
f71e683061 Post WordPress 4.6 Beta 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@38060 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 18:57:14 +00:00
Dominik Schilling
e259c9497d WordPress 4.6 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@38059 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 18:40:39 +00:00
Boone Gorges
af068cdbe0 Mail: Improve handling of UTF-8 address headers.
Previously, `wp_mail()` implemented Reply-To as a generic header, using
PHPMailer's `addCustomHeader()`. As such, the email address portion of
the header was being incorrectly encoded when the name portion
contained UTF-8 characters. Switching to PHPMailer's more specific
`addReplyTo()` method fixes the issue.

For greater readability, the handling of all address-related headers
(To, CC, BCC, Reply-To) has been standardized.

Props szepe.viktor, iandunn, bpetty, stephenharris.
Fixes #21659.

git-svn-id: https://develop.svn.wordpress.org/trunk@38058 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 18:03:52 +00:00
Dominik Schilling
94c2212de8 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38057 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 17:31:15 +00:00
Drew Jaynes
2c579e3909 Docs: Add an initial @since version to wp-includes/feed.php.
The file was introduced in 2.1.0 when it was moved from wp-includes/feed-functions.php in [3862].

See #32246. See #36295.


git-svn-id: https://develop.svn.wordpress.org/trunk@38056 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 17:03:54 +00:00
Drew Jaynes
41dc691fbd Docs: Update the default value for the optional $args parameter in get_networks() following [38042].
See #32504.


git-svn-id: https://develop.svn.wordpress.org/trunk@38055 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 16:04:00 +00:00
Dominik Schilling
7fccd0ba4f HTTP API: Pass proxy settings to Requests.
`WP_HTTP_Proxy()` is used directly in `WP_Http_Curl()` and `WP_Http_Streams()`. Since `WP_Http::request()` doesn't use them anymore we have to move the proxy handling into `WP_Http::request()` so the proxy data can be passed to `Requests::request()`.

Props rmccue.
See #33055.
Fixes #37107.

git-svn-id: https://develop.svn.wordpress.org/trunk@38054 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:50:58 +00:00
ocean90
26758ec22f HTTP API: Update Requests.
Fixes an issue where you couldn't set a `Requests_Proxy_HTTP` object as a proxy setting.

See https://github.com/rmccue/Requests/pull/223.
See #37107, #33055.

git-svn-id: https://develop.svn.wordpress.org/trunk@38053 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:43:02 +00:00
Joe McGill
94da293e5f Media: URL encode spaces in srcset attributes.
In some cases, images in the media library may contain spaces in
their filenames. This results in an invalid `srcset` attribute,
causing broken images on the front end. This change fixes the issue
by replacing spaces in URLs with URL encoded '%20' characters before
returning the `srcset` string.

Props underdude, joemcgill.
Fixes #36549.

git-svn-id: https://develop.svn.wordpress.org/trunk@38052 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:23:27 +00:00
Drew Jaynes
55692a6e6b Docs: Add and clarify changelog entries for elements that can now accept, use, or return WP_Post_Type objects.
Also adds a missing initial `@since` version for `wp_xmlrpc_server::_prepare_post_type()`.

See [37890]. See #36217.


git-svn-id: https://develop.svn.wordpress.org/trunk@38051 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:23:04 +00:00
Dominik Schilling
c7ac50ab9e Comments: After [37743], prevent a JavaScript error when wpAjax.parseAjaxResponse() returns an error or true.
Props rachelbaker.
Fixes 36742.

git-svn-id: https://develop.svn.wordpress.org/trunk@38050 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 15:02:59 +00:00
Dominik Schilling
a9d1e10161 Remove svn:executable property from Requests and some other files.
git-svn-id: https://develop.svn.wordpress.org/trunk@38049 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 14:38:21 +00:00
Rachel Baker
224aecf240 Comments: Include comment_content with html and without in blacklist_keys comparison.
After [38047], also include the comment_content with html in the preg_match against blacklist keys to match urls.

Props ocean90.
Fixes #37208.

git-svn-id: https://develop.svn.wordpress.org/trunk@38048 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 14:04:10 +00:00
Rachel Baker
d6eac6593c Comments: Strip html tags from comment content before blacklist_keys comparison.
Use `wp_kses()` to clean comment_content for preg_match against the blacklist_keys. Also includes some initial unit tests for `wp_blacklist_check()`.
Previously, if a blacklisted key was used in comment_content split by an html tag the regex in `wp_blacklist_check()` would not find a match. Example: Where "springfield" was a blacklisted word, if the content of a comment included `spring<i>field</i>" `wp_blacklist_check()` would not return true.

Props cfinke.
Fixes #37208.

git-svn-id: https://develop.svn.wordpress.org/trunk@38047 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 13:47:49 +00:00
Dominik Schilling
e332cfbed8 Resource Hints: Increase priority of wp_resource_hints() so hints get printed before scripts and styles.
Also run `wp_resource_hints()` on the login screen and in the customizer. 

Props swissspidy.
Fixes #37317.

git-svn-id: https://develop.svn.wordpress.org/trunk@38046 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 12:53:06 +00:00
Dominik Schilling
2f89742973 WP Mail: Remove an unused variable.
Unused since [34864].

Props vishalkakadiya.
Fixes #37346.

git-svn-id: https://develop.svn.wordpress.org/trunk@38045 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 12:36:22 +00:00
John Blackbourn
967fcbdc61 HTTP API: Remove duplicate documentation for the http_api_debug hook.
Fixes #37081


git-svn-id: https://develop.svn.wordpress.org/trunk@38043 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 10:23:01 +00:00
Jeremy Felt
f51e0ae92a Multisite: Set default $args to an empty array in get_networks().
The empty string was not incorrect. Using `array()` here instead makes things a bit more consistent by aligning with `get_sites()`, `get_users()`, and `get_terms()`.

See #32504.


git-svn-id: https://develop.svn.wordpress.org/trunk@38042 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 05:29:02 +00:00
Jeremy Felt
da154081f6 Meta: Ensure filters are backwards compatible for pre-4.6 style meta registration.
When using `register_meta()` with the function signature from 4.5 and earlier, the `auth_{$type}_meta_{$key}` and `sanitize_{$type}_meta_{$key}` filters are used. Any calls to `register_meta()` expecting this behavior should continue to work. The new filters, which take advantage of object subtypes, should not be added unless the proper `$args` array is passed.

See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38041 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 04:45:50 +00:00
Jeremy Felt
6830e90949 Meta: Remove filters when meta is unregistered.
If auth and/or sanitize callbacks are specified in the arguments for
`register_meta()`, filters are added to handle these callbacks. These
should be removed when calling `unregister_meta_key()` to avoid
unintentional filtering.

See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@38040 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 04:12:41 +00:00
Andrew Ozz
afea5ef3a7 TinyMCE: preserve <script> and <style> tags inside the editor.
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.

Props iseulde, azaozz.
Fixes #32923.

git-svn-id: https://develop.svn.wordpress.org/trunk@38039 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 22:08:28 +00:00
John Blackbourn
a501d6c8be Meta: Add a missing @since param for wp_object_type_exists().
See #35658


git-svn-id: https://develop.svn.wordpress.org/trunk@38038 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 13:20:55 +00:00
Dominik Schilling
7083cd200a Text Changes: Unify/merge two more permission error messages.
Props ramiy.
Fixes #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38037 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:44:33 +00:00
Dominik Schilling
a27c61f7c2 Resource Hints: Remove schemes from dns-prefetch resource hint outputs.
"wordpress.org", "!http://wordpress.org", and "!https://wordpress.org" should all have the same DNS lookup.
Also, replace `\r\n` with `\n` and ensure that invalid URLs are skipped.

Props niallkennedy, peterwilsoncc.
Fixes #37240.

git-svn-id: https://develop.svn.wordpress.org/trunk@38036 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:31:58 +00:00
Dominik Schilling
e556fec595 Toolbar: Allow 0 as a value for the tabindex property of a menu item.
To enhance accessibility for items without a link you can now define `tabindex="0"`, which makes descendant dropdowns accessible.

Props joedolson, afercia, ocean90.
Fixes #32495.

git-svn-id: https://develop.svn.wordpress.org/trunk@38035 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:18:00 +00:00
Andrew Ozz
f11d5ef4d8 TinyMCE: update to 4.4.0, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. Includes two bugfixes for #36434.
Fixes #37327.

git-svn-id: https://develop.svn.wordpress.org/trunk@38034 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 00:19:47 +00:00
Pascal Birchler
68cff6ac40 Plugins: Improve Ajax search of installed plugins.
Fixes a few accessibility issues, tweaks the design of the search form to match other Ajax search fields and improves compatibility with older browsers.

See #37230.

git-svn-id: https://develop.svn.wordpress.org/trunk@38033 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-11 21:49:30 +00:00
Dominik Schilling
1991213da7 Multisite: Use hash_equals() when comparing hashes to mitigate timing attacks.
Fixes #37324.

git-svn-id: https://develop.svn.wordpress.org/trunk@38032 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:42:02 +00:00
Dominik Schilling
310d406274 Accessibility: Add aria-button-if-js class to links in the media list table that behave like buttons when JavaScript is on.
Props joedolson, afercia.
See #26504.
Fixes #36555.

git-svn-id: https://develop.svn.wordpress.org/trunk@38031 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:30:20 +00:00
Drew Jaynes
a745c3f168 Docs: The $labels property in WP_Post_Type is of type object as returned from get_post_type_labels(), not an array.
Props swissspidy.
See #36217.


git-svn-id: https://develop.svn.wordpress.org/trunk@38030 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 17:40:11 +00:00
Drew Jaynes
13ec34335a Docs: Standardize references to "meta box" or "meta boxes" as two distinct words throughout core documentation per the core spelling guide.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38029 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:55:21 +00:00
Drew Jaynes
5cf0ef170a Docs: Standardize capitalization of Ajax throughout core documentation per the core spelling guide.
Ajax, while considered an acronym for Asynchronous JavaScript and XML, is most commonly capitalized only in the first character.

Part props ocean90.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38028 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:50:21 +00:00
Drew Jaynes
8af1a9d56a Docs: Link the 4.6 changelog entry in the DocBlock for register_meta() to its corresponding dev note on make/core.
h/t ocean90.

See #35658. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38027 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 16:49:06 +00:00