Commit Graph

34748 Commits

Author SHA1 Message Date
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
Dominik Schilling 9eaab508ab Database: Add unit test to test that a column type change for a table name with a hyphen is working after [37583].
Fixes #31679.

git-svn-id: https://develop.svn.wordpress.org/trunk@38044 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 11:38:29 +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
Tammie a68d3d1469 PHP 7 compatibility issues fixed in Twenty Thirteen and Twenty Fourteen
Props xknown
Fixes #37227
--This Line, and those below, will be ignored--

M    themes/twentyfourteen/functions.php
M    themes/twentythirteen/functions.php


git-svn-id: https://develop.svn.wordpress.org/trunk@38026 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 15:10:38 +00:00
Dominik Schilling 408ac29bfb Docs: Fix a typo in the DocBlock for `themes_api()`, `themes_api`, `plugins_api()`, and `plugins_api`.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38025 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 14:38:33 +00:00
Drew Jaynes ea78fbdcdb Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38024 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:59:16 +00:00
Drew Jaynes c717040925 Docs: Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6
See #36618. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38023 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:44:23 +00:00
Drew Jaynes 871fadef86 Docs: Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38022 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:22:57 +00:00
Drew Jaynes 16c18387ba Docs: Fix a typo in the hook doc description for the `enable_loading_advanced_cache_dropin` run-time filter.
See #34936. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38021 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:16:43 +00:00
Dominik Schilling 73fc7915cd Taxonomy: Remove an unnecessary double assignment in `WP_Term_Query::get_terms()`.
Props birgire.
Fixes #37254.

git-svn-id: https://develop.svn.wordpress.org/trunk@38020 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 11:48:13 +00:00
Pascal Birchler d1db1f5e10 Upgrade/Install: Do not remove event handlers when trying to update a theme.
Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.

git-svn-id: https://develop.svn.wordpress.org/trunk@38019 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 11:42:04 +00:00
Drew Jaynes 180559f064 Docs: Fix a typo in an inline hook reference in the DocBlock for `comment_form()`.
Props ocean90.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38018 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 23:55:54 +00:00
Dominik Schilling 78789beda9 Bootstrap: Make `wp_is_ini_value_changeable()` compatible with PHP 5.2.6 - 5.2.17.
There is a bug in PHP 5.2.6 - 5.2.17 (https://bugs.php.net/bug.php?id=44936, https://3v4l.org/IL0A2) which changes the access level of a setting to 63 after `ini_set()` was called.
To continue comparing the access value against `INI_ALL` and `INI_USER` use the bit operator `& 7`:

* `1 & 7 === 1` (INI_USER)
* `2 & 7 === 2` (INI_PERDIR)
* `4 & 7 === 4` (INI_SYSTEM)
* `7 & 7 === 7` (INI_ALL)
* `63 & 7 === 7` (INI_ALL)

See [38015].
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38017 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 18:35:22 +00:00
Dominik Schilling a927a48b31 Unit tests: Don't change the `memory_limit` setting during tests.
40M isn't enough and can lead to an "out of memory" error. Change `test_wp_raise_memory_limit()` to test that `wp_raise_memory_limit()` doesn't *lower* the memory limit.

See [38015].
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38016 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 18:16:07 +00:00
Dominik Schilling c68f1ec772 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38015 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 14:36:37 +00:00
Sergey Biryukov ec1f83f770 Docs: Fix typo in a comment in `Core_Upgrader::upgrade()`.
Props Zuige.
Fixes #37314.

git-svn-id: https://develop.svn.wordpress.org/trunk@38014 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 13:18:31 +00:00
Dominik Schilling 629c6e36b5 Bootstrap: Clean up `wp_convert_hr_to_bytes()`.
* Don't return a value higher than `PHP_INT_MAX`.
* Add unit tests.

Props jrf.
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38013 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 12:53:08 +00:00
Dominik Schilling df78fb4ef3 Boostrap: Move `wp_convert_hr_to_bytes()` to wp-includes/load.php.
`wp_convert_hr_to_bytes()` was previously defined in wp-includes/media.php because it's only used by `wp_max_upload_size()` in the same file.
Moving this function to load.php allows us to improve core's memory limit handling.

See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38012 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 11:26:58 +00:00
Dominik Schilling a64bf12b1b Constants: Move constants for data sizes before constants for memory limits.
This allows us to improve core's memory limit handling.

See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38011 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 11:18:19 +00:00
Peter Wilson c611f9a514 Embeds: Include locale stylesheets after default styles.
Fire `locale_stylesheet` action after the `wp_print_styles` action in the embeds header to match the order in `wp_head`.

Props swissspidy.
Fixes #36839.


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