Commit Graph

33497 Commits

Author SHA1 Message Date
John Blackbourn d438831da3 Taxonomy: Correct the accetped types for the `taxonomy` element in the arguments passed to `wp_dropdown_categories()`.
Props grapplerulrich
Fixes #35446


git-svn-id: https://develop.svn.wordpress.org/trunk@36289 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 20:15:19 +00:00
Dominik Schilling (ocean90) 017550ea8e jQuery: Replace `$( document ).on( 'ready', fn )` with `$( fn )`.
The 'ready' event is deprecated since jQuery 1.8.

See https://github.com/jquery/jquery-migrate/blob/1.3.0/warnings.md#jqmigrate-ready-event-is-deprecated.
See #35380.

git-svn-id: https://develop.svn.wordpress.org/trunk@36288 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 17:38:18 +00:00
Dominik Schilling (ocean90) e5223b57b4 jQuery: Replace use of the `.load()` method for the "load" event with `.on( 'load', handler )`.
The shortcut is deprecated since jQuery 1.8.

See http://api.jquery.com/load-event/.
See #35380.

git-svn-id: https://develop.svn.wordpress.org/trunk@36287 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 17:21:36 +00:00
Dominik Schilling (ocean90) ceb892533f jQuery: Replace the use of the `.size()` method with the `.length` property.
The `.size()` method is deprecated since jQuery 1.8. The `.length` property is preferred because it doesn't have the overhead of a function call.

See https://api.jquery.com/size/.
See #35380.

git-svn-id: https://develop.svn.wordpress.org/trunk@36286 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 16:16:15 +00:00
Dominik Schilling (ocean90) 3e571a393f External Libraries: Update jQuery to 1.12.0 and jQuery Migrate to 1.3.0.
jQuery:
* Release post: http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/
* Changes: https://github.com/jquery/jquery/compare/1.11.3...1.12.0

jQuery Migrate:
* Release post: http://blog.jquery.com/2016/01/13/jquery-migrate-1-3-0-released/
* Changes: https://github.com/jquery/jquery-migrate/compare/1.2.1...1.3.0

See #35380.

git-svn-id: https://develop.svn.wordpress.org/trunk@36285 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 15:51:25 +00:00
Dominik Schilling (ocean90) 185387f915 Set `svn:eol-style` to native on "jquery-migrate.js" and "jquery-migrate.min.js".
git-svn-id: https://develop.svn.wordpress.org/trunk@36284 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 15:44:39 +00:00
Dominik Schilling (ocean90) 2efcaf2921 Plugins: In `_get_plugin_data_markup_translate()` remove the fallback to the "default" textdomain for Akismet.
Akismet has its own language files since WordPress 3.9.

Props jrf.
Fixes #35436.

git-svn-id: https://develop.svn.wordpress.org/trunk@36283 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 13:55:42 +00:00
Dominik Schilling (ocean90) c86ffe454a Plugins: In `_get_plugin_data_markup_translate()` don't reload translations if they're already loaded.
Props jrf.
Fixes #35439.

git-svn-id: https://develop.svn.wordpress.org/trunk@36282 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 13:03:21 +00:00
Boone Gorges 5a545bbe90 Use `assertEqualSets()` in `comment_author` test.
The previous assertion was too specific, resulting in race conditions.

See #35377.

git-svn-id: https://develop.svn.wordpress.org/trunk@36279 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 04:42:59 +00:00
Boone Gorges 0b564d48df Support searching for `'0'` in `WP_Query`.
Props swissspidy.
See #31025.

git-svn-id: https://develop.svn.wordpress.org/trunk@36278 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 04:36:54 +00:00
Boone Gorges bf2f6f8104 Use the post-filter WHERE clause when querying for comment descendants.
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
2016-01-13 04:00:36 +00:00
Boone Gorges 1880b466c7 Always respect `$comments` array passed to `wp_list_comments()`.
[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
2016-01-13 03:26:31 +00:00
Boone Gorges f7d238dfe3 Ignore hierarchy in pagination calculation when comment threading is disabled.
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
2016-01-13 03:12:34 +00:00
Joe Hoyle b9e083e360 Add missing HTTP status code descriptions (specifically 308 and 421.)
Props kraftbj.
Fixes 35336.


git-svn-id: https://develop.svn.wordpress.org/trunk@36274 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-13 02:54:33 +00:00
Joe Hoyle 9a93e87d37 Add support for 451 http status code (Unavailable For Legal Reasons.)
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
2016-01-13 02:48:37 +00:00
Rachel Baker 0e85f45cb4 Comments: Restrict the maximum characters for input fields within the comments template.
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
2016-01-13 01:24:46 +00:00
Eric Andrew Lewis 3212239199 Docs: Fix typo in wp-admin/admin.php.
Props sebastian.pisula 
Fixes #35423.



git-svn-id: https://develop.svn.wordpress.org/trunk@36271 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-12 20:42:46 +00:00
Konstantin Obenland 12ac7b2998 Themes: Clear floated theme cards on Themes page.
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
2016-01-12 17:12:17 +00:00
Pascal Birchler 13896125d5 Docs: Revert [36268] as the global is indeed used, just via the superglobal.
Fixes #35413.

git-svn-id: https://develop.svn.wordpress.org/trunk@36269 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-12 12:25:37 +00:00
Pascal Birchler d7ed4900a1 Docs: Fix incorrect DocBlock for `wp_get_attachment_url()`.
The documented `$pagenow` global isn't used in the function.

Props sebastian.pisula.
Fixes #35413.

git-svn-id: https://develop.svn.wordpress.org/trunk@36268 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-12 12:07:30 +00:00
Andrea Fercia 9a9278ca1a After [36263] escape filterable HTML output.
Props adamsilverstein.
Fixes #35064.

git-svn-id: https://develop.svn.wordpress.org/trunk@36267 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-12 08:57:41 +00:00
Pascal Birchler 3a358c33d3 Introduce `wp_get_raw_referer()` to retrieve unvalidated referer.
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
2016-01-12 08:31:10 +00:00
Andrea Fercia baaa8946a2 Accessibility: Remove title attributes from the Terms list table.
Fixes #35187.

git-svn-id: https://develop.svn.wordpress.org/trunk@36265 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 23:30:00 +00:00
Andrea Fercia 6c2876acce Menus screen: improve responsiveness of select elements.
Props Luan-Ramos, sagarjadhav.
Fixes #31826.

git-svn-id: https://develop.svn.wordpress.org/trunk@36264 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 23:04:40 +00:00
Andrea Fercia e6297676fb Accessibility: Remove title attributes from the General Settings screen.
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
2016-01-11 22:53:10 +00:00
Weston Ruter 8ad1df35f8 Customizer: Re-use list of components to eliminate code duplication.
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
2016-01-11 20:27:40 +00:00
Weston Ruter 2fa620e4c3 Customizer: Prevent erroneously directing user to login screen when closing.
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
2016-01-11 18:50:30 +00:00
Andrea Fercia 68d4b23608 Quick Edit: on the Taxonomies screens, prevent a page reload when pressing Enter on a focused field.
Fixes #35401 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@36260 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 13:14:18 +00:00
Dion Hulse c4526edeec Multisite: The `networks` group should be global.
Fixes #35251.


git-svn-id: https://develop.svn.wordpress.org/trunk@36258 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 05:03:35 +00:00
Boone Gorges 68bc0fc216 Add missing param to 'comments_template_query_args'.
As introduced in [36235].

Props birgire.
See #34442.

git-svn-id: https://develop.svn.wordpress.org/trunk@36256 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-11 02:27:43 +00:00
Pascal Birchler 844e1b6e7e After [36254], commit all the necessary files and not just the unit test.
git-svn-id: https://develop.svn.wordpress.org/trunk@36255 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 19:06:03 +00:00
Pascal Birchler 94992e25ae Rewrite: Ensure `WP_Rewrite::flush_rules()` does not delete the 'rewrite_rules' option.
Instead, the option gets updated to an empty string.
Adds unit tests.

Props SergeyBiryukov, jesin, voldemortensen.
Fixes #29107.

git-svn-id: https://develop.svn.wordpress.org/trunk@36254 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 19:01:13 +00:00
Pascal Birchler 519051b305 Permalinks: Ensure the page hierarchy is correct for sample permalinks.
Fixes #35368.

git-svn-id: https://develop.svn.wordpress.org/trunk@36253 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 18:27:06 +00:00
Boone Gorges 28818255c2 Don't reset index keys when trimming results of term queries.
`array_slice()` must be told to preserve keys when the query results exceed the
limit specified the 'number' parameter, so that `id=>parent` and other
id-indexed return value formats don't get mangled.

Props fantasyworld, wpdelighter.
Fixes #35382.

git-svn-id: https://develop.svn.wordpress.org/trunk@36252 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 04:05:26 +00:00
Boone Gorges e75a1f5ab3 Avoid invalid SQL when building ORDER BY clause using long search strings.
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.

Props salvoaranzulla.
Fixes #35361.

git-svn-id: https://develop.svn.wordpress.org/trunk@36251 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 03:25:15 +00:00
John Blackbourn ba5f0fdc7b Docs: Various docblock corrections.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@36250 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 01:25:44 +00:00
John Blackbourn 61fbfa9947 Emoji: Explictly use `https` as the scheme for emoji fallback images, as they're only served over HTTPS by the CDN anyway.
Fixes #35376
Props ocean90


git-svn-id: https://develop.svn.wordpress.org/trunk@36249 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 01:23:49 +00:00
John Blackbourn f0a706d1eb Comments: Correct the docblocks for various methods in the comment list table class.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@36248 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-10 00:51:35 +00:00
John Blackbourn 6681e9701c Taxonomy: More tests for `unregister_taxonomy()`.
See #35227


git-svn-id: https://develop.svn.wordpress.org/trunk@36247 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 23:34:27 +00:00
Eric Andrew Lewis 2670f66c76 Login is not a verb, change "login" to "log in".
See #35387


git-svn-id: https://develop.svn.wordpress.org/trunk@36246 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 21:07:44 +00:00
Eric Andrew Lewis fb1852fe5c Users: Fix incorrect docs for user authentication and login functions.
Fixes #35387


git-svn-id: https://develop.svn.wordpress.org/trunk@36245 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 20:51:13 +00:00
Pascal Birchler f4b3c2453c Taxonomy: Use `Invalid taxonomy` instead of `Invalid Taxonomy` for error strings.
git-svn-id: https://develop.svn.wordpress.org/trunk@36244 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 15:15:55 +00:00
Pascal Birchler eafbcb3b6e Taxonomy: Introduce `unregister_taxonomy()`.
This new function can be used to completely unregister non built-in taxonomies.

Fixes #35227.

git-svn-id: https://develop.svn.wordpress.org/trunk@36243 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 14:57:22 +00:00
Pascal Birchler d92ead50c8 Ensure `wp_get_referer()` returns `false` when the referrer URL is the current URL.
Adds unit tests.

Fixes #19856.

git-svn-id: https://develop.svn.wordpress.org/trunk@36242 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 14:35:03 +00:00
swissspidy 0002ff515b Media: After [36240], remove some unneeded whitespace.
Props ocean90.
See #35367.

git-svn-id: https://develop.svn.wordpress.org/trunk@36241 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 14:28:02 +00:00
Pascal Birchler 54134dd49b Media: Fix `wp_audio_shortcode` and `wp_video_shortcode` attributes handling.
Although documented, the `class` and `style` attributes were simply ignored.
Adds unit tests.

Fixes #35367.

git-svn-id: https://develop.svn.wordpress.org/trunk@36240 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 14:17:02 +00:00
Dion Hulse 0e73cc3da4 Tests: Add more paged canonical tests for page_on_front.
See #35344.


git-svn-id: https://develop.svn.wordpress.org/trunk@36238 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 08:08:47 +00:00
Dion Hulse 3cce67f8bc Canonical: Generate the correct canonical url for paged posts/pages when they're used as the page_on_front.
This fixes an issue where pages become inacessible on a front page post.

Fixes #35344 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@36237 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 07:32:42 +00:00
Dion Hulse 5f55910b5c Tests: Remove some debug that's slipped in at some point.
git-svn-id: https://develop.svn.wordpress.org/trunk@36236 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 06:11:58 +00:00
Boone Gorges 530ffc712f Introduce `comments_template_query_args` filter.
This new filter gives developers a way to target the arguments used for comment
queries specifically when populating the main comment template.

Props birgire.
Fixes #34442.

git-svn-id: https://develop.svn.wordpress.org/trunk@36235 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-09 04:43:33 +00:00