Commit Graph

34843 Commits

Author SHA1 Message Date
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
John Blackbourn
4a39dde8f5 Role/Capability: Introduce capability tests for non-logged-in users.
Fixes #37405


git-svn-id: https://develop.svn.wordpress.org/trunk@38096 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-18 22:38:18 +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
59f15cdea9 Unit Tests: Account for the string changes in [38077].
See #18218.

git-svn-id: https://develop.svn.wordpress.org/trunk@38078 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 16:23:31 +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
John Blackbourn
6f31511f23 Canonical: Remove a duplicate test data entry.
Fixes #37370


git-svn-id: https://develop.svn.wordpress.org/trunk@38063 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-14 20: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