Commit Graph

35320 Commits

Author SHA1 Message Date
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
Sergey Biryukov
eef4795716 Docs: Correct default value for next_text in paginate_links().
Props truongwp.
Fixes #38212.

git-svn-id: https://develop.svn.wordpress.org/trunk@38701 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-02 19:09:32 +00:00
Andrea Fercia
9732c3ff44 Accessibility: Editor, Publish meta box: remove a stray label and redundant CSS.
Also, adds a `role="button"` attribute to the "Edit" links.

Props iseulde.
Fixes #28411.


git-svn-id: https://develop.svn.wordpress.org/trunk@38700 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-02 14:37:54 +00:00
Peter Wilson
fe0ba53c44 Meta: Improve ID casting when getting, updating or deleting meta data.
Blindly casting IDs to absolute integers in `get_metadata_by_mid()`, `update_metadata_by_mid()` and `delete_metadata_by_mid()` can cause unexpected behaviour when a floating or negative number is passed.

Fixes #37746.


git-svn-id: https://develop.svn.wordpress.org/trunk@38699 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-01 06:27:27 +00:00
John Blackbourn
17ef6d8cfa Taxonomy: Introduce more fine grained capabilities for managing taxonomy terms.
This introduces the singular `edit_term`, `delete_term`, and `assign_term` meta capabilities for terms, and switches the base capability name for tags from `manage_categories` to `manage_post_tags` and the corresponding `edit_post_tags`, `delete_post_tags`, and `assign_post_tags`.

All of these capabilities ultimately map to `manage_categories` so by default there is no change in the behaviour of the capabilities for categories, tags, or custom taxonomies. The `map_meta_cap` filter and the `capabilities` argument when registering a taxonomy now allow for control over editing, deleting, and assigning individual terms, as well as a separation of capabilities for tags from those of categories.

Fixes #35614
Props johnjamesjacoby for feedback


git-svn-id: https://develop.svn.wordpress.org/trunk@38698 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 22:39:32 +00:00
John Blackbourn
ad6ef7c110 Role/Capability: Introduce tests that assert the primitive and meta capability tests test the correct capabilities.
Fixes #38191


git-svn-id: https://develop.svn.wordpress.org/trunk@38697 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 22:11:47 +00:00
John Blackbourn
ec49d4d3d1 Role/Capability: Correct some meta capabilities that were incorrectly listed as primitive capabilities in the role and capability tests.
See #38191


git-svn-id: https://develop.svn.wordpress.org/trunk@38696 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 22:10:27 +00:00
John Blackbourn
e18c88ae19 Role/Capability: Add explicit cases to map_meta_cap() for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.
Fixes #38201


git-svn-id: https://develop.svn.wordpress.org/trunk@38695 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 22:05:30 +00:00
John Blackbourn
e0f4a218fb HTTP API: Add a $component parameter to wp_parse_url() to give it parity with PHP's parse_url() function.
Fixes #36356
Props jrf


git-svn-id: https://develop.svn.wordpress.org/trunk@38694 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 21:46:43 +00:00
Dominik Schilling (ocean90)
41fc5ba881 Embeds: Add oEmbed support for User, List and Like Twitter timelines.
Props earnjam.
Fixes #38003.

git-svn-id: https://develop.svn.wordpress.org/trunk@38693 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 21:42:01 +00:00
Dominik Schilling (ocean90)
f603891a41 Embeds: Update the oEmbed provider test suite.
* Dailymotion: Use an URL for an existing video.
* Facebook: Remove URLs which don't exist and update provider map for [38691].

See #32360.

git-svn-id: https://develop.svn.wordpress.org/trunk@38692 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 21:01:36 +00:00
Dominik Schilling (ocean90)
22d4eb63b6 Embeds: Add support for embedding Facebook photos of a user/page.
See #34737.

git-svn-id: https://develop.svn.wordpress.org/trunk@38691 602fd350-edb4-49c9-b593-d223f7449a82
2016-09-30 20:39:32 +00:00