Commit Graph

35481 Commits

Author SHA1 Message Date
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
afercia 2c01dadd40 Accessibility: Remove target=_blank from the old custom background/header help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38141. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38719 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:56:02 +00:00
Andrea Fercia 65e01d5951 Accessibility: Remove target=_blank from the comment/edit-comments help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38140. See #23432.


git-svn-id: https://develop.svn.wordpress.org/trunk@38718 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 06:53:20 +00:00
Gary Pendergast 2f4f5aac44 Emoji: Add support for the upcoming Emoji 4 release.
Emoji 4 adds 32 new professions, (with variations for gender and skin tone), and updates 33 existing character for male and female variations.

Fixes #38113 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@38717 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 03:23:22 +00:00
Boone Gorges 5a6cfb0bb7 Docs: Improve description for `term_exists()` `$term` param.
Props Kenshino.
Fixes #37224.

git-svn-id: https://develop.svn.wordpress.org/trunk@38716 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 02:28:48 +00:00
boonebgorges 3b6202a4d2 Query: Add nicename and login params to user query.
New parameters are: `login`, `login__in`, `login__not_in`, `nicename`,
`nicename__in`, `nicename__not_in`.

`login__in` and `nicename__in` are also now valid values for the
'orderby' parameter.

Props ryanplas.
Fixes #36624.

git-svn-id: https://develop.svn.wordpress.org/trunk@38715 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 02:26:26 +00:00
Sergey Biryukov 0a23c4d206 Unit Tests: Remove unused variable in `Tests_oEmbed::dataShouldNotMatchOembedRegex()`.
Props jrf.
See #38187.

git-svn-id: https://develop.svn.wordpress.org/trunk@38714 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 00:50:09 +00:00
Gary Pendergast 7e4e9f1ce7 Shortcodes: Add a `do_shortcode_tag` filter.
The addition of the `pre_do_shortcode_tag` in [38506] allows plugins to short-circuit the shortcode execution process, which is particularly helpful for caching expensive shortcodes.

The `do_shortcode_tag` is the corresponding part of that system - when a shortcode hasn't been executed previously, there needs to be a clean method of populating the cache.

Props flixos90.
Fixes #32790.



git-svn-id: https://develop.svn.wordpress.org/trunk@38713 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-04 00:38:45 +00:00
Konstantin Obenland e3becde640 Tests: Add newly introduced theme to theme list.
Introduced in [38710].

See #37924.



git-svn-id: https://develop.svn.wordpress.org/trunk@38712 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 18:44:19 +00:00
Konstantin Obenland 9cfa200891 wpLists: Pass the current element to `process()` to properly register event handlers.
Fixes a bug where new categories couldn't be added from the post edit screen.
Introduced in [38599].

Props dlh.
Fixes #38174.


git-svn-id: https://develop.svn.wordpress.org/trunk@38711 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 18:38:43 +00:00
Konstantin Obenland ab087dadfc Themes: Account for uppercase chars when managing themes.
Fixes a bug where the UI wasn't updated after deleting/updating a theme.

Also introduces unit tests for theme management ajax handlers. For now they're
focused on `wp_ajax_update_theme()` but they can include tests for other
handlers as well.

Props chrisjean for initial patch.
Fixes #37924.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@38710 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 18:12:57 +00:00
Andrea Fercia 395823c9cd Customize: Improve the widgets and menu items search.
- adds a "search" icon into the search fields
- adds a hidden description for the widget search field, targeted by `aria-describedby`
- adds the "clear-results" button to the widgets search
- removes the `change` and `search` events bound on the widget search, for these "live searches" WordPress should standardize on `input` (+ `keyup` when needed)
- adds property and function to keep track and update the number of the widgets search results
- the widgets search results are now announced via `wp.a11y.speak()`
- adds a visible and audible message when there are no widgets search results
- moves some CSS to `customize-controls.css`

Props ryankienstra, melchoyce, afercia.
Fixes #36908.


git-svn-id: https://develop.svn.wordpress.org/trunk@38709 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 16:27:55 +00:00
Pascal Birchler bcf50fedcd Toolbar: Be more strict about adding a 'View Posts' link to the toolbar.
After [38634], this adjusts the behaviour to remove redundancy by not displaying the link if the latest posts are shown on the front page. In that scenario, the 'Visit Site' link already points to the latest posts.

Fixes #34113.

git-svn-id: https://develop.svn.wordpress.org/trunk@38708 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 08:37:27 +00:00
Pascal Birchler 25f3c04a58 Editor: Improve documentation for `user_can_richedit()`.
Clarifies the various global variables used in the function.

Props gma992.
Fixes #37321.

git-svn-id: https://develop.svn.wordpress.org/trunk@38707 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:54:14 +00:00
Pascal Birchler 7387321059 Plugins: Fix odd typo introduced in [38703].
`even` should of course be `event`.

See #37973.

git-svn-id: https://develop.svn.wordpress.org/trunk@38706 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:06:12 +00:00
Pascal Birchler f231e7233d I18N: Introduce a user-specific language setting.
By enabling the user to select their preferred locale when editing the profile, we allow for greater personalization of the WordPress admin and therefore a better user experience.

The back end will be displayed in the user's individual locale while the locale used on the front end equals the one set for the whole site. If the user didn't specify a locale, the site's locale will be used as a fallback. The new `locale` property of the `WP_User` class can be used to retrieve the user's locale setting.

Props ocean90, ipm-frommen, swissspidy.
Fixes #29783.

git-svn-id: https://develop.svn.wordpress.org/trunk@38705 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 07:03:41 +00:00
Pascal Birchler d3afcc4e33 Import: Fix plugin activation link after installing an importer on multisite.
When installing the importer via Ajax, the activation link should be the same as if the page were reloaded.

Props joelcj91 for initial patch.
Fixes #37943.

git-svn-id: https://develop.svn.wordpress.org/trunk@38704 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 06:41:37 +00:00
Pascal Birchler fd5d2a65ad Plugins: Fix checkbox selection when searching for installed plugins.
Since the plugin search works via Ajax, the JavaScript events need to delegated in order for the checkboxes to work properly.

Props afercia.
Fixes #37973.

git-svn-id: https://develop.svn.wordpress.org/trunk@38703 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 06:36:19 +00:00
Weston Ruter a39953e1e3 Menus: Restore checkboxes in post type search which were lost in [38584].
The `$args` variable was being overridden instead of extended, therefore causing the `walker` to be dropped.

Fixes #33742.


git-svn-id: https://develop.svn.wordpress.org/trunk@38702 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-03 02:34:46 +00:00