This is similar to `edit.php` -> `post.php` and `users.php` -> `user-edit.php` and fixes a bug where screen options for the list table were shown while editing a term.
Fixes#34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@36308 602fd350-edb4-49c9-b593-d223f7449a82
Subviews are stored internally on the Subview manager as an object. The object
is composed of key-value pairs where the key is a jQuery selector for a view,
and the value is an array of views that matching the selector.
To extract subviews, `_.flatten()` was used to collate the nested arrays of
views into a single view. However, `_.flatten()` is not intended to be used
for objects, and this unintended functionality breaks in newer versions of
Underscore.js.
Instead, we'll use `_.values()` to extract the arrays of views first,
and then flatten the array of arrays.
Props adamsilverstein.
See #34350.
git-svn-id: https://develop.svn.wordpress.org/trunk@36305 602fd350-edb4-49c9-b593-d223f7449a82
Avoids a focus loss when saving or closing the form moving focus back to a proper place.
Uses `wp.a11y.speak()` to dispatch successful edits and error messages to screen readers.
Fixes#34756.
git-svn-id: https://develop.svn.wordpress.org/trunk@36303 602fd350-edb4-49c9-b593-d223f7449a82
After [36182], plugin data contains compatibility info from the API, which is an array and cannot be searched.
Fixes#35461.
git-svn-id: https://develop.svn.wordpress.org/trunk@36301 602fd350-edb4-49c9-b593-d223f7449a82
These provide a more descriptive way to set response codes elsewhere,
so it's readable and less chance for the wrong response code to be
used such as 401 vs 403.
Props rmccue for the idea.
Fixes#35426.
git-svn-id: https://develop.svn.wordpress.org/trunk@36294 602fd350-edb4-49c9-b593-d223f7449a82
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.
Props boonebgorges, firebird75.
Fixes#35192.
git-svn-id: https://develop.svn.wordpress.org/trunk@36277 602fd350-edb4-49c9-b593-d223f7449a82
[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.
Props ivankristianto.
Fixes#35356.
git-svn-id: https://develop.svn.wordpress.org/trunk@36276 602fd350-edb4-49c9-b593-d223f7449a82
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.
Props jmdodd.
Fixes#35419.
git-svn-id: https://develop.svn.wordpress.org/trunk@36275 602fd350-edb4-49c9-b593-d223f7449a82
Though this is technically still in the proposal stage, there is support from the core team and precedent in #16914
Props andizer.
Fixes#35333.
git-svn-id: https://develop.svn.wordpress.org/trunk@36273 602fd350-edb4-49c9-b593-d223f7449a82
Added hardcoded maxlength attributes on the author, author_email, author_url, and comment_field input markup. These can be modified via the comment_form_defaults filter. Added logic in wp_handle_comment_submission() to return a WP_Error when the comment_author, comment_author_url, or comment_content values exceed the max length of their columns. Introduces wp_get_comment_column_max_length() which returns the max column length for a given column name, and is filterable. Unit tests included for the error conditions in wp_handle_comment_submission()
Fixes#10377.
Props westonruter rachelbaker.
git-svn-id: https://develop.svn.wordpress.org/trunk@36272 602fd350-edb4-49c9-b593-d223f7449a82
Also maintains visual separation for Broken Themes table on searches that
return no results.
See [36171] for `.wp-clearfix`.
Props 5um17, obenland, valendesigns, afercia.
Fixes#26646.
git-svn-id: https://develop.svn.wordpress.org/trunk@36270 602fd350-edb4-49c9-b593-d223f7449a82
For things like redirects `wp_get_referer()` should be used instead.
Props voldemortensen for initial patch.
Fixes#27152.
git-svn-id: https://develop.svn.wordpress.org/trunk@36266 602fd350-edb4-49c9-b593-d223f7449a82
Date and time formats are now displayed in plain text and available for all
users. Also, lines up them with the "custom" date and time format fields to
help reinforce what these fields do.
Props afercia, perezlabs.
Fixes#35064.
git-svn-id: https://develop.svn.wordpress.org/trunk@36263 602fd350-edb4-49c9-b593-d223f7449a82
Introduces protected `WP_Customize_Manager::$components` to store list of loaded core components filtered by `customize_loaded_components`.
Props DrewAPicture.
See #35242
See #33552.
Fixes#35354.
git-svn-id: https://develop.svn.wordpress.org/trunk@36262 602fd350-edb4-49c9-b593-d223f7449a82
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.
Props chandrapatel.
See #32637.
Fixes#35355.
git-svn-id: https://develop.svn.wordpress.org/trunk@36261 602fd350-edb4-49c9-b593-d223f7449a82