When upgrading to `utf8mb4`, `TEXT` fields will be upgraded to `MEDIUMTEXT` (and likewise for all other `*TEXT` and `*BLOB` fields). This is to allow for the additional space requirements of `utf8mb4`.
On the subsequent upgrade, `dbDelta()` would try and downgrade the fields to their original size again. At best, this it a waste of time, at worst, this could truncate any data larger than the original size. There's no harm in leaving them at their new size, so let's do that.
This also fixes a typo in the `dbDelta()` tests.
Merge of [37525] to the 4.4 branch.
Partial merge of [36552] to the 4.4 branch.
See #36748.
Built from https://develop.svn.wordpress.org/branches/4.4@37936
git-svn-id: http://core.svn.wordpress.org/branches/4.4@37877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The codex says that taxonomy names "should only contain lowercase letters and the underscore character", but that's not enforced. It's too late to enforce it, since some plugins haven't been following it and the official phpdoc doesn't mention this restriction.
Merge of [37133] to the 4.4 branch.
Built from https://develop.svn.wordpress.org/branches/4.4@37134
git-svn-id: http://core.svn.wordpress.org/branches/4.4@37101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When the browser test for diversity emoji was added in [36160], it included a workaround for Chrome not being able to compare Uint8ClampedArray objects directly, by converting them to a string. Unfortunately, Safari doesn't support the Uint8ClampedArray.toString() method correctly, so the test was incorrectly failing in Safari.
Merge of [37028] to the 4.4 branch.
Fixes#36266.
Built from https://develop.svn.wordpress.org/branches/4.4@37090
git-svn-id: http://core.svn.wordpress.org/branches/4.4@37057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
IE 11's implementation of MutationObserver is buggy. It unnecessarily splits text nodes when it encounters a HTML template interpolation symbol ( "{{", for example ). So, we join the text nodes back together as a work-around.
Merge of [36817] and [36981] to the 4.4 branch.
Fixes#35977.
Built from https://develop.svn.wordpress.org/branches/4.4@37089
git-svn-id: http://core.svn.wordpress.org/branches/4.4@37056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes issue where user gets stuck at login screen after trying to close the app if previously they had to first login to access the Customizer. Prevents `WP_Customize_Manager::get_return_url()` from using `wp-login.php` as a referer.
Merges [36261] to the 4.4 branch.
Props chandrapatel.
See #32637.
Fixes#35355.
Built from https://develop.svn.wordpress.org/branches/4.4@36363
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In order to calculate comment pagination when newest comments are displayed
first, `comments_template()` must perform a separate query to determine the
total number of paginating comments available on a post. See [34729], #8071,
pagination calculation - can be defined as a top-level comment, or a comment
with `parent=0`. However, when comment threading is disabled, yet comments
exist in the database that have parents, all comments - even those with a
parent - are "paginating". (This typically happens when comments threading was
once enabled, but has since been turned off.) As such, the total-paginating-
comments query should only be limited to top-level comments when
'thread_comments' is disabled.
Merges [36275] to the 4.4 branch.
Props jmdodd.
Fixes#35419.
Built from https://develop.svn.wordpress.org/branches/4.4@36362
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The refactor of `WP_Comment_Query`'s SQL generation in [34542] introduced a bug
that caused only the last post-related filter to be respected in comment
queries. In other words, if querying for comments using params
`post_status=draft&post_author=3`, only the last-processed of these params
would be respected. The current changeset fixes the logic so that these clauses
don't overwrite each other.
Merges [36326] to the 4.4 branch.
Props chriscct7.
Fixes#35478.
Built from https://develop.svn.wordpress.org/branches/4.4@36361
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[36157] fixed a problem, introduced in 4.4, that caused custom pagination
parameters passed to `wp_list_comments()`. However, the fix introduced in that
changeset was limited to the `is_singular()` context, so that the bug remained
when `wp_list_comments()` is used within a non-singular `WP_Query` loop. We
fix this by removing the `is_singular()` check and using the more general
`get_the_ID()` to identify the correct post_id to use for the secondary
comment query.
Merges [36324] to the 4.4 branch.
Props boonebgorges.
Fixes#35402.
Built from https://develop.svn.wordpress.org/branches/4.4@36360
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[34999] modified the cache strategy for terms in the context of
`wp_get_object_terms()`. As part of these changes, the `object_id` property of
term objects had to be unset before being cached. To avoid modifying passed-by-
reference terms, `update_term_cache()` attempted to make a copy of the terms
passed to the function; however, it failed to use the `clone` keyword, and thus
only created a reference instead of a copy.
Merges [36323] to the 4.4 branch.
Props berengerzyla.
Fixes#35462.
Built from https://develop.svn.wordpress.org/branches/4.4@36358
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The descendant query in `WP_Comment_Query::fill_descendants()` uses the clauses
of the main `get_comment_ids()` query as a basis, discarding the `parent`,
`parent__in`, and `parent__not_in` clauses. As implemented in WP 4.4 [34546],
the WHERE clause was assembled in such a way that any modifications applied
using the `comments_clauses` filter were not inherited by `fill_descendants()`.
This resulted in descendant queries that did not always properly filter
results, and sometimes contained syntax errors.
The current changeset fixes the problem by using the post-filter WHERE clause
as the basis for the `fill_descendants()` query. This change requires a new
approach for eliminating the unneeded parent-related clauses: instead of
eliminating values in an associative array, we must use regular expressions.
Merges [36277] to the 4.4 branch.
Props boonebgorges, firebird75.
Fixes#35192.
Built from https://develop.svn.wordpress.org/branches/4.4@36357
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[36157] fixed a bug whereby `wp_list_comments()` would not properly recognize
custom pagination arguments. See #35175. However, it inadvertently introduced
a bug that caused any `$comments` array explicitly passed to the function to be
ignored, when that array was accompanied by pagination arguments that differ
from those in `$wp_query`. We address this bug by moving the logic introduced
in [36157] inside a block that only fires when no `$comments` array has been
provided to the function.
Merges [36276] to the 4.4 branch.
Props ivankristianto, boonebgorges.
Fixes#35356.
Built from https://develop.svn.wordpress.org/branches/4.4@36356
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The introduction of negative search terms in 4.4 [34934] introduced the
possibility that the ORDER BY clause of a search query could be assembled in
such a way as to create invalid syntax. The current changeset fixes this by
ensuring that the ORDER BY clause corresponding to the search terms is
excluded when it would otherwise be empty.
Merges [36251] to the 4.4 branch.
Props salvoaranzulla, boonebgorges.
Fixes#35361.
Built from https://develop.svn.wordpress.org/branches/4.4@36354
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When hierarchical=true, WP_Comment_Query will always fetch comments according to the comment hierarchy, even if 'thread_comments' is disabled for the site.
This can cause problems when comment threading is disabled after threaded comments have been recorded on the site; comments will no longer be returned in a strictly chronological order.
We address the issue by refraining from querying hierarchically when comment threading is disabled.
Merges [36226] to the 4.4 branch.
Props jmdodd.
Fixes#35378.
Built from https://develop.svn.wordpress.org/branches/4.4@36353
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36320 1a063a9b-81f0-0310-95a4-ce76da25c4cd