Commit Graph

35349 Commits

Author SHA1 Message Date
Andrea Fercia 907d67572a Accessibility: Improve the UI controls to move the Menu items.
On the Menus screen, the links to move menu items behave like buttons: they
perform an action so they should be real buttons to be correctly reported to
assistive technologies. Since they're logically grouped controls, they should
also be wrapped in a `<fieldset>` element for better semantics and accessibility.

Props Cheffheid.
Fixes #35578.


git-svn-id: https://develop.svn.wordpress.org/trunk@38770 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-10 16:23:23 +00:00
John Blackbourn 0842857b5c Role/Capability: Add tests for all user roles that check custom capabilities that do not have any form of handling (eg. in a `map_meta_cap` filter).
See #38191


git-svn-id: https://develop.svn.wordpress.org/trunk@38769 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-10 14:39:35 +00:00
Gary Pendergast 6774e27ae7 General: Restore usage of `$wpdb`, instead of `$this->db`.
Hiding the `$wpdb` global behind a property decreases the readability of the code, as well as causing irrelevant output when dumping an object.

Reverts [38275], [38278], [38279], [38280], [38387].
See #37699.



git-svn-id: https://develop.svn.wordpress.org/trunk@38768 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-10 06:37:02 +00:00
Weston Ruter 81ae08cf40 Customize: Show Pages section first and pre-expanded in list of available nav menu items.
Props ryankienstra, westonruter.
Fixes #36984.


git-svn-id: https://develop.svn.wordpress.org/trunk@38767 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 23:40:53 +00:00
Weston Ruter 03b8796cad Customize: Improve message displayed in widgets panel when there are no widget areas currently displayed in the preview.
Props karmatosed, westonruter.
Fixes #36922.


git-svn-id: https://develop.svn.wordpress.org/trunk@38766 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 21:08:34 +00:00
Weston Ruter f4779221a3 Customize: Ensure `customize_validate_{$setting->id}` filters apply on input post values for `WP_Customize_Setting` subclasses that neglect to apply the filter themselves.
Fixes #37638.


git-svn-id: https://develop.svn.wordpress.org/trunk@38765 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 20:07:16 +00:00
Peter Wilson 2216b8ba37 Emoji: Update Emoji CDN filter default for resource hints.
Updates the default value for the filter `emoji_svg_url` used in `wp_resource_hints()` to match the default used for the filter in `_print_emoji_detection_script()`.

See [38717], #38724.


git-svn-id: https://develop.svn.wordpress.org/trunk@38764 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 04:23:43 +00:00
John Blackbourn b4f01bb97f Build/Test Tools: Continue eliminating randomness in tests.
See [38762]
See #37371


git-svn-id: https://develop.svn.wordpress.org/trunk@38763 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 01:29:04 +00:00
John Blackbourn c91be6f1fe Build/Test Tools: Begin eliminating unnecessary randomness in tests.
Although unlikely, clashes in randomly generated strings could cause unexpected failures. In addition, most randomness is entirely unnecessary, is bad practice, and increases test time (however small it may be).

See #37371


git-svn-id: https://develop.svn.wordpress.org/trunk@38762 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-09 01:11:14 +00:00
John Blackbourn b45f2feada Build/Test Tools: Revert [38759]. PHPUnit's `@requires` syntax was introduced in PHPUnit 3.7, but the tests for PHP 5.2 use PHPUnit 3.6 because it's the latest version that supports PHP 5.2.
Fixes #38256


git-svn-id: https://develop.svn.wordpress.org/trunk@38761 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-08 22:42:12 +00:00
John Blackbourn 471103de31 Media: Correct the hostname used in the `wp_get_attachment_metadata()` test.
See #36246


git-svn-id: https://develop.svn.wordpress.org/trunk@38760 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-08 12:04:39 +00:00
John Blackbourn b3d15125a6 Build/Test Tools: Make use of PHPUnit's `@requires` notation.
Fixes #38256


git-svn-id: https://develop.svn.wordpress.org/trunk@38759 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-08 01:19:11 +00:00
John Blackbourn 3fad194f64 HTTP API: Remove an unnecessary duplicate HTTP request in the HTTP tests.
See #30017


git-svn-id: https://develop.svn.wordpress.org/trunk@38758 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-08 01:02:40 +00:00
John Blackbourn 8f5999fe47 HTTP API: Convert the POST redirect test to use a dataProvider in order for its speed to be more accurately measured.
See #38237


git-svn-id: https://develop.svn.wordpress.org/trunk@38757 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-08 00:29:20 +00:00
Andrew Ozz 6cbf1eebf8 TinyMCE: Allow pasting in image captions. Remove blocks and insert `<br>` tags instead, also remove elements that would break the caption like other images, video, audio, etc.
See #36211.

git-svn-id: https://develop.svn.wordpress.org/trunk@38756 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 21:41:00 +00:00
John Blackbourn 1271cbd258 Themes: Remove `paged.php` from the theme template hierarchy.
The position of this template within the hierarchy is of so little use that zero themes in the WordPress.org theme directory make use of it. It's second only to `index.php` in the hierarchy, meaning that any archive template such as `category.php` or `archive.php` will be chosen before it.

Fixes #38162
Props ryankienstra for initial patch


git-svn-id: https://develop.svn.wordpress.org/trunk@38755 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 21:02:39 +00:00
Dominik Schilling (ocean90) 8448857427 Menus: Hide controls in the search tab if no items are found.
Props sayedwp, afercia, tywayne, abrightclearweb.
Fixes #35576.

git-svn-id: https://develop.svn.wordpress.org/trunk@38754 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:55:25 +00:00
Dominik Schilling (ocean90) 70ae852c69 Taxonomy: On `wp-admin/term.php`, don't show a 'Back to' link which links to the current page.
Fixes #37573.

git-svn-id: https://develop.svn.wordpress.org/trunk@38753 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:12:35 +00:00
Dominik Schilling (ocean90) cf14d8a2a2 Taxonomy: Remove `paged` argument from referer and add it only if current page is greater than 1.
Props swissspidy.
See #38194.

git-svn-id: https://develop.svn.wordpress.org/trunk@38752 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 20:05:45 +00:00
Aaron Jorbin bb8d792d37 Make sure rewrite rules are not written until `wp_loaded` has fired
If a plugin attempts to change the rewrite rules to early, other plugins may have their rules inadvertently discarded. Additionally, some function such as `url_to_post_id` cause a rewrite rule lookup that could cause this accidental flushing. This forces the flushing to only occur once `wp_loaded` has been fired.

Fixes #37892.
Props Chouby.



git-svn-id: https://develop.svn.wordpress.org/trunk@38751 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 19:43:57 +00:00
Dominik Schilling (ocean90) 981ff63724 Taxonomy: Don't drop term order and current page when bulk deleting terms.
* Removes special handling for `edit-tags.php` which is no longer required because of `term.php`. Related: [34202] and [36308].
* Sets `$referer` to `$_SERVER['REQUEST_URI']` because `wp_get_referer()` returns false if `$_SERVER['REQUEST_URI'] === $_REQUEST['_wp_http_referer']`.
* Sets `paged` always to `$pagenum` which is the value of `$wp_list_table->get_pagenum();`. This avoids an additional redirect when you delete an item which was previously on the last page.

Fixes #38194.

git-svn-id: https://develop.svn.wordpress.org/trunk@38750 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 19:38:03 +00:00
Dominik Schilling (ocean90) 70a69ffa93 Docs: Improve formatting of filter docs added in [38689].
Fixes #35590.

git-svn-id: https://develop.svn.wordpress.org/trunk@38749 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 19:23:02 +00:00
Dominik Schilling (ocean90) c138f3616a Comments: Pass `$comment` to the `comment_max_links_url` filter.
Props rachelbaker.
Fixes #37955.

git-svn-id: https://develop.svn.wordpress.org/trunk@38748 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 18:31:51 +00:00
swissspidy b2f60b5419 Taxonomy: Introduce `WP_Taxonomy` and use it in `register_taxonomy()` and `unregister_taxonomy()`.
This changes the global `$wp_taxonomies` to an array of `WP_Taxonomy ` objects. `WP_Taxonomy ` includes methods to handle rewrite rules and hooks.
Each taxonomy argument becomes a property of `WP_Taxonomy`. Introducing such a class makes further improvements in the future much more feasible.

Props boonebgorges for review.
Fixes #36224. See #36217.

git-svn-id: https://develop.svn.wordpress.org/trunk@38747 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 17:11:02 +00:00
Pascal Birchler 0be11d0ecc Docs: Document global variables used by `get_the_content()`.
Props goranseric, morganestes.
Fixes #37173.

git-svn-id: https://develop.svn.wordpress.org/trunk@38746 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:59:54 +00:00
Pascal Birchler 92cf15870f Plugins: Correctly display the current plugin in the plugin editor.
When editing a plugin file, show the correct plugin as being edited in the dropdown with the correct activation status.

Props aniketpant, dd32, DrewAPicture, jayarjo, MattyRob, mt8.biz, solarissmoke, swissspidy, WraithKenny.
Fixes #24122, #17552.

git-svn-id: https://develop.svn.wordpress.org/trunk@38745 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:57:49 +00:00
Pascal Birchler f683e9aae1 Menus: Do not show trashed posts in nav menus.
Trashed posts cannot be accessed by site visitors and thus should not be visible on the front end. By marking menu items of trashed posts as invalid, they are excluded from the output.

Props solarissmoke, swissspidy.
Fixes #19038.

git-svn-id: https://develop.svn.wordpress.org/trunk@38744 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:49:19 +00:00
Pascal Birchler 5d4546367a Upgrade/Install: Show correct time of last checked update.
Props PieWP for initial patch.
Fixes #37554.

git-svn-id: https://develop.svn.wordpress.org/trunk@38743 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-07 16:36:06 +00:00
Weston Ruter 6c3301476d Customize: Add workaround for Safari bug causing preview frame to be unscrollable via `mousewheel` after a refresh.
Props westonruter, tristangemus.
Fixes #38149.


git-svn-id: https://develop.svn.wordpress.org/trunk@38742 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 20:16:19 +00:00
Rachel Baker 03bc7a1063 Trackbacks: Allow the error message strings passed to `trackback_response()` to be translatable.
Localize the error messages in wp-trackback.php.

Props websupporter.
Fixes #38214.

git-svn-id: https://develop.svn.wordpress.org/trunk@38741 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 18:08:36 +00:00
Rachel Baker 9dd9880600 Comments: Account for the `comment_order` option in `get_page_of_comment()`.
Use the value of the `comment_order` setting to determine the date_query key to pass to `WP_Comment_Query`.
Fixes a bug where sites that had comments ordered "newest" first would have the incorrect page number returned.

Props tyxla, boonebgorges.
Fixes #31101.

git-svn-id: https://develop.svn.wordpress.org/trunk@38740 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 17:41:51 +00:00
Helen Hou-Sandi 7cc095a1a0 Login: Don't rely on `wp_is_mobile()` for functionality.
Making behavior changes based on some broad definition of what mobile is rarely, if ever, makes sense. Each bit of functionality should be more clearly targeted, whether that's for screen size, performance, or some kind of touch capability.

props akibjorklund.
see #33704.


git-svn-id: https://develop.svn.wordpress.org/trunk@38739 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 15:51:53 +00:00
Rachel Baker 57a80e2c84 Comments: Improve check for previous comments for authenticated users in `check_comment()`.
When the 'comment_whitelist' option is enabled and the commenter is an authenticated user, query for the existence of an approved comment with a matching `user_id`.  This allows authenticated users that have changed their email address to bypass having their comment held for moderation.

Props voldemortensen, rachelbaker.
Fixes #28603.

git-svn-id: https://develop.svn.wordpress.org/trunk@38738 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 15:50:55 +00:00
Boone Gorges b8ddcea510 Docs: Improvements to `register_taxonomy()` docblock.
* Fix spelling and whitespace.
* Remove `$label` argument documentation. This argument hasn't worked since [14614], despite the documentation added in [14619].

Props bobbingwide.
Fixes #38007.

git-svn-id: https://develop.svn.wordpress.org/trunk@38737 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 01:29:22 +00:00
Dion Hulse 0d33ec0b8e Updates: Remove the 'Download' button on the Updates screen.
Props swissspidy.
Fixes #36811.


git-svn-id: https://develop.svn.wordpress.org/trunk@38736 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-06 01:05:15 +00:00
Helen Hou-Sandi a0686cacd1 Taxonomy: Remove the popular tag cloud from `edit-tags.php`.
Sorting by count (which wasn't possible at the time the tag cloud was introduced) is more effective, though we should likely make count sort by `DESC` initially rather than `ASC`.

props ramiy.
fixes #36964.


git-svn-id: https://develop.svn.wordpress.org/trunk@38735 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 21:25:50 +00:00
Joe McGill 5d1f571508 Media: Improve docs for `image_send_to_editor` filter.
This updates inline docs for the `image_send_to_editor` filter to better
describe when it is fired.

Props adamsilverstein.
Fixes #34823.

git-svn-id: https://develop.svn.wordpress.org/trunk@38734 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 19:56:26 +00:00
joemcgill 2eade6230d Media: Better handling of JOINs when searching filenames.
Following [38625], any media searches that already included JOINs,
e.g., `tax_queries`, would get trampled when we joined the post meta
table to search for filenames. This preserves existing JOINs and
also only applies the `_filter_query_attachment_filenames()` filter
when a search query is being performed.

Props flixos90, joemcgill.
Fixes #22744.

git-svn-id: https://develop.svn.wordpress.org/trunk@38733 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 19:50:02 +00:00
John Blackbourn 48e2bde86b Role/capability: Add more complete capability and role assertions to existing user capability tests. Also reuses one more user account fixtures.
Fixes #38236
See #38235


git-svn-id: https://develop.svn.wordpress.org/trunk@38732 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 17:17:02 +00:00
John Blackbourn 7581f3cc25 Role/Capability: Reuse some user account fixtures in the user capability tests.
See #38235


git-svn-id: https://develop.svn.wordpress.org/trunk@38731 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 16:56:32 +00:00
Dion Hulse b03af1ee40 HTTP: Document that the return value of `wp_remote_retrieve_headers()` changed from a simple array to an object which implements ArrayAccess.
Props mrahmadawais, sudar, swissspidy.
Fixes #37722


git-svn-id: https://develop.svn.wordpress.org/trunk@38730 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 03:50:54 +00:00
Dion Hulse 1bd6d19f80 Plugins: Display 'Less Than 10' active installs of a plugin rather than '0+' active installs.
Props ovann86.
Fixes #37509.


git-svn-id: https://develop.svn.wordpress.org/trunk@38729 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 03:32:41 +00:00
Dion Hulse 3586523daf HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.
Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests.
Fixes #37992 allowing for connecting to SSL resources on ports other than 443.
Fixes #37991 by not sending default ports in the `Host:` header.
Fixes #37839 to match and decode Chunked responses correctly.
Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled.


git-svn-id: https://develop.svn.wordpress.org/trunk@38727 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-05 03:23:54 +00:00
Peter Wilson 3d2f8ba836 HTTP API: Simplify `wp_parse_url()` to ensure consistent results.
[38694] revealed some URL formats were been parsed incorrectly, including those used by Google Fonts. This change simplifies the function to use placeholder values which cause PHP's parsing to behave consistently.

Props jrf, peterwilsoncc.
Fixes #36356.


git-svn-id: https://develop.svn.wordpress.org/trunk@38726 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 20:32:40 +00:00
Andrea Fercia 5ba47b2119 Accessibility: Remove target=_blank from the help tab links on several admin screens.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38145. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38725 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 20:26:09 +00:00
Gary Pendergast f881c4e646 Emoji: Update some failing unit tests.
The changes in [38717] weren't reflected in the associated unit tests.

See #38113.



git-svn-id: https://develop.svn.wordpress.org/trunk@38724 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 10:37:59 +00:00
Andrea Fercia 050d2d9a25 Accessibility: Remove target=_blank from the Users and Widgets screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38217. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38723 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:09:12 +00:00
Andrea Fercia 5cd9a575eb Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38722 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:07:17 +00:00
Andrea Fercia 240b114fe8 Accessibility: Remove target=_blank from the Network screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38159. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38721 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 07:02:48 +00:00
Andrea Fercia 0c829777f2 Accessibility: Remove target=_blank from the Settings screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38143. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38720 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:58:36 +00:00