Joe Hoyle
f325af9caa
REST API: Allow updating a comment without the content present.
...
For all resources in the REST API, sending partial updates is supported. This fixes needing to _always_ specify comment content.
Props jnylen.
Fixes #38720 .
Built from https://develop.svn.wordpress.org/trunk@39196
git-svn-id: http://core.svn.wordpress.org/trunk@39136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 03:35:30 +00:00
Aaron Jorbin
0e2dd4d85f
Build/Test tools: Add "apply" as alias for "patch"
...
The command applies a patch, so apply makes just as much sense. Additionally, this is to help translate dev tools into Australian.
Props netweb.
Fixes #38724 .
Built from https://develop.svn.wordpress.org/trunk@39195
git-svn-id: http://core.svn.wordpress.org/trunk@39135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 03:22:31 +00:00
Helen Hou-Sandí
f94285d68c
Customize: Make "Add New Page" buttons less intrusive.
...
They now better match the existing add functionality from the category metabox and are better separated from the surrounding inputs. All hail `.button-link`.
fixes #38164 . see #35126 .
Built from https://develop.svn.wordpress.org/trunk@39194
git-svn-id: http://core.svn.wordpress.org/trunk@39134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:56:30 +00:00
Joe Hoyle
215e5351cc
REST API: Fix test for unfiltered_html under multisite.
...
See #38726 .
Built from https://develop.svn.wordpress.org/trunk@39193
git-svn-id: http://core.svn.wordpress.org/trunk@39133 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:48:30 +00:00
Joe Hoyle
3138878aa5
REST API: Use wp_slash rather than addslashes.
...
See #38726 .
Props dd32.
Built from https://develop.svn.wordpress.org/trunk@39192
git-svn-id: http://core.svn.wordpress.org/trunk@39132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:39:30 +00:00
Joe Hoyle
67da42825e
REST API: Add rest_base
to response objects of wp/v2/taxonomies
and wp/v2/types
...
Though we have the `_links.collection` available, having this value can be useful to know post type / taxonomy urls if you need to build them another way.
Props youknowriad, jnylen0.
Fixes #38607 .
Built from https://develop.svn.wordpress.org/trunk@39191
git-svn-id: http://core.svn.wordpress.org/trunk@39131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:21:30 +00:00
Joe Hoyle
e66d2478ee
REST API: unfiltered_html
and slashing: terms.
...
Follow-up to #38609 and #38704 ; handle slashes correctly for taxonomy terms.
Props westonruter, jnylen0.
Fixes #38726 , see #38609 .
Built from https://develop.svn.wordpress.org/trunk@39190
git-svn-id: http://core.svn.wordpress.org/trunk@39130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 02:10:30 +00:00
John Blackbourn
7e11873b43
Build/Test Tools: Re-use a bunch of fixtures in test classes for user and XMLRPC tests.
...
Shaves a couple of seconds off of the tests.
See #30017 , #38716
Built from https://develop.svn.wordpress.org/trunk@39189
git-svn-id: http://core.svn.wordpress.org/trunk@39129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-10 01:54:33 +00:00
John Blackbourn
b9033ad6a1
Docs: Improve the documentation for parameters which accept OBJECT
, ARRAY_A
, and ARRAY_N
as parameters.
...
See #37770
Built from https://develop.svn.wordpress.org/trunk@39188
git-svn-id: http://core.svn.wordpress.org/trunk@39128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 23:00:32 +00:00
Mike Schroder
5cdb46c16a
Media: Only load first PDF page for thumbnails.
...
To improve performance, directly load the first page of uploaded PDFs
to reduce the total clock time necessary to generate thumbnails.
Props dglingren, lukecavanagh, helen, johnbillion, mikeschroder.
See #38522 .
Built from https://develop.svn.wordpress.org/trunk@39187
git-svn-id: http://core.svn.wordpress.org/trunk@39127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 21:05:30 +00:00
Weston Ruter
3b008dc2a0
Customize: Eliminate use of flexbox for edit shortcuts.
...
Props sirbrillig.
See #27403 .
Fixes #38660 .
Built from https://develop.svn.wordpress.org/trunk@39186
git-svn-id: http://core.svn.wordpress.org/trunk@39126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 20:55:33 +00:00
Weston Ruter
ad80e08c17
Customize: Split out custom_css
query logic from wp_get_custom_css()
into a re-usable wp_get_custom_css_post()
function to also be used when updating.
...
Props georgestephanis, westonruter.
See #38672 , #35395 .
Built from https://develop.svn.wordpress.org/trunk@39185
git-svn-id: http://core.svn.wordpress.org/trunk@39125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 20:43:30 +00:00
Tammie Lister
8e3e901559
Twenty Seventeen fix for Travis Error
...
Removed semi-colo on line 46
Props swissspidy
Built from https://develop.svn.wordpress.org/trunk@39184
git-svn-id: http://core.svn.wordpress.org/trunk@39124 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 16:55:31 +00:00
Tammie Lister
6c435f5afb
Twenty Seventeen: Fixes focused controls hidden by top menu.
...
When a page is scrolled, the top nav menu became fixed. This resolves that.
Props afercia, Fencer04, davidakennedy
Fixes #38476
Built from https://develop.svn.wordpress.org/trunk@39183
git-svn-id: http://core.svn.wordpress.org/trunk@39123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 16:13:34 +00:00
Ryan McCue
a2bbbddb9e
REST API: Include template in all post type schemas.
...
[38951] added templates to all post types, but didn't add them to the schema.
Props swissspidy.
Fixes #38698 .
Built from https://develop.svn.wordpress.org/trunk@39182
git-svn-id: http://core.svn.wordpress.org/trunk@39122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 07:12:32 +00:00
Weston Ruter
5b676af8ff
Customize: Store modifying user ID with setting change written into changeset and restore current user when setting is being saved.
...
Restoring the current user context when saving a setting ensures filters apply as expected, such as Kses. When a user is not associated with a given setting change, continue to override `capability` to be `exist` when saving. Skip overwriting setting values in a changeset that have not changed, facilitating concurrent editing and amending a changeset by a user with fewer privileges.
See #30937 .
Fixes #38705 .
Built from https://develop.svn.wordpress.org/trunk@39181
git-svn-id: http://core.svn.wordpress.org/trunk@39121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 07:03:30 +00:00
Weston Ruter
5b633c548e
Customize: Prevent post_content
and post_name
from being modified when trashing customize_changeset
posts.
...
See #30937 .
Fixes #38719 .
Built from https://develop.svn.wordpress.org/trunk@39180
git-svn-id: http://core.svn.wordpress.org/trunk@39120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 05:45:32 +00:00
Ryan McCue
3a449ea543
Roles/Capabilities: Add meta-caps for comment, term, and user meta.
...
Additionally, use these meta-caps in the REST API endpoints.
Previously, register_meta()'s auth_callback had no effect for non-post meta. This introduces `{add,edit,delete}_{comment,term,user}_meta` meta-caps to match the existing post meta capabilities. These are currently only used in the REST API.
Props tharsheblows, boonebgorges.
Fixes #38303 , fixes #38412 .
Built from https://develop.svn.wordpress.org/trunk@39179
git-svn-id: http://core.svn.wordpress.org/trunk@39119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 03:42:30 +00:00
Weston Ruter
054d2c2565
Customize: Rename remaining instances unfiltered_css
meta capability to edit_css
in unit tests.
...
Amends [39175].
See #38672 , #35395 .
Built from https://develop.svn.wordpress.org/trunk@39178
git-svn-id: http://core.svn.wordpress.org/trunk@39118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:48:30 +00:00
Ryan McCue
4060c68f85
REST API: Fire correct hooks when creating users on multiste.
...
`add_user_to_blog()` is now called, ensuring the correct hooks are called, along with setting the primary blog and clearing relevant caches.
Props jeremyfelt.
Fixes #38526 .
Built from https://develop.svn.wordpress.org/trunk@39177
git-svn-id: http://core.svn.wordpress.org/trunk@39117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:35:30 +00:00
David A. Kennedy
fa4cbf29f1
Twenty Seventeen: Fix badly pixelated images on iOS devices
...
The CSS property `background-attachment: fixed` is disabled in some mobile browsers for performance reasons. So here, the fix increases the breakpoint where the `background-attachment: fixed` is applied to the front page images. Doing this removes the fixed backgrounds and the issue from all smaller screens, but the downside is that it also removes the fixed backgrounds from smaller laptops. It's also possible future devices could fall into this breakpoint, but this seems to be the most practical solution.
Props laurelfulford.
Fixes #38395 .
Built from https://develop.svn.wordpress.org/trunk@39176
git-svn-id: http://core.svn.wordpress.org/trunk@39116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:13:00 +00:00
Weston Ruter
08712b4baa
Customize: Rename unfiltered_css
meta capability to edit_css
; add revisions
support to custom_css
post type.
...
Props lukecavanagh, georgestephanis, westonruter.
See #38672 , #35395 .
Built from https://develop.svn.wordpress.org/trunk@39175
git-svn-id: http://core.svn.wordpress.org/trunk@39115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 01:12:30 +00:00
John Blackbourn
cf786e592c
Build/Test Tools: Utilise assertWPError()
and assertNotWPError()
in more places.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39174
git-svn-id: http://core.svn.wordpress.org/trunk@39114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-09 00:02:30 +00:00
John Blackbourn
11d46ae3a8
Build/Test Tools: Utilise assertFileExists()
and assertFileNotExists()
in more places.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39173
git-svn-id: http://core.svn.wordpress.org/trunk@39113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:50:33 +00:00
John Blackbourn
6941992403
Themes: Re-use fixtures in the wp_get_document_title()
tests.
...
See #38716
Built from https://develop.svn.wordpress.org/trunk@39172
git-svn-id: http://core.svn.wordpress.org/trunk@39112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:32:33 +00:00
Aaron Jorbin
8ee453a8b3
Cleanup .orig file accidentally added.
...
Introduced in [39165].
Unprops joemcgill.
Built from https://develop.svn.wordpress.org/trunk@39171
git-svn-id: http://core.svn.wordpress.org/trunk@39111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:30:34 +00:00
Aaron Jorbin
8ee1fe8cea
Posts, Post Types: Fix themes tests broken in [39168]
...
[39168] introduced a new theme to the tests, but it wasn't taken into account in Tests_Theme_ThemeDir::test_theme_list.
See #38696 .
Built from https://develop.svn.wordpress.org/trunk@39170
git-svn-id: http://core.svn.wordpress.org/trunk@39110 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:23:31 +00:00
Pascal Birchler
548ac82b06
I18N: Add ability to change user's locale back to site's locale.
...
Previously there was no way to remove the user locale setting again, even though that might be desirable.
This adds a new 'Site Default' option to the user-specific language setting by introducing a new `show_site_locale_default` argument to `wp_dropdown_languages()`.
Props ocean90.
See #29783 .
Fixes #38632 .
Built from https://develop.svn.wordpress.org/trunk@39169
git-svn-id: http://core.svn.wordpress.org/trunk@39109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 23:01:31 +00:00
Pascal Birchler
2f7f8d526b
Posts, Post Types: Fix post type templates with child themes.
...
After [38951] added support for post type templates beyond pages, this fixes an issue where an empty meta box would be shown when using child themes.
Fixes #38696 .
Built from https://develop.svn.wordpress.org/trunk@39168
git-svn-id: http://core.svn.wordpress.org/trunk@39108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 22:41:30 +00:00
Pascal Birchler
d8cbc61020
Date/Time: Improve date_i18n()
timezone tests.
...
This uses a timezone without DST for the tests covering `date_i18n()`.
Fixes #37910 .
Built from https://develop.svn.wordpress.org/trunk@39167
git-svn-id: http://core.svn.wordpress.org/trunk@39107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 22:32:30 +00:00
Drew Jaynes
7eeab12b1a
Docs: Notate the incoming $theme
object members for WP_Theme_Install_List_Table::single_row()
as a proper hash notation.
...
h/t coffee2code.
See #37770 .
Built from https://develop.svn.wordpress.org/trunk@39166
git-svn-id: http://core.svn.wordpress.org/trunk@39106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 20:16:31 +00:00
Joe McGill
5704743a78
Themes: Remove Vimeo logic from header_video_settings()
.
...
Following [39148] and [39128], this removes the mime type logic for
Vimeo URLs from `get_header_video_settings()` and removes remaining
Vimeo reference from `_validate_external_header_video()` docs.
Fixes #38544 .
Built from https://develop.svn.wordpress.org/trunk@39165
git-svn-id: http://core.svn.wordpress.org/trunk@39105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 19:20:32 +00:00
David A. Kennedy
35035be00b
Twenty Seventeen: Improve SVG markup, providing more options customization
...
* Removes `aria-hidden` argument. Lets `aria-hidden="true"` be there by default and sets it empty when there is `title` and `desc`.
* Adds unique IDs for title and desc for accessible implementation options.
* Removes absolute path in the Customizer. It didn't work in Internet Explorer, and the original bug is fixed in #30028 .
* Add whitespace around `<use>`, from #38387 .
Props sami.keijonen, swissspidy, laurelfulford.
Fixes #38659 .
See #38387 .
Built from https://develop.svn.wordpress.org/trunk@39164
git-svn-id: http://core.svn.wordpress.org/trunk@39104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 18:01:33 +00:00
Dominik Schilling
45d5d6ddb5
Customize: Autoprefixer for [39149].
...
See #38667 .
Built from https://develop.svn.wordpress.org/trunk@39163
git-svn-id: http://core.svn.wordpress.org/trunk@39103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 15:25:32 +00:00
Joe Hoyle
c15065dddf
REST API: Remove get_allowed_query_vars() now filter
is gone.
...
Now all public query vars are not supoprted via `?filter` in the REST API, we can remove the get_allowed_query_vars() method and filter. To provide developers with a good altnerative to `filter`, the `"rest_{$this->post_type}_collection_params"` filter has been added.
Props rmccue, rachelbacker, danielbachhuber.
Fixes #38629 .
Built from https://develop.svn.wordpress.org/trunk@39162
git-svn-id: http://core.svn.wordpress.org/trunk@39102 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 14:08:32 +00:00
Joe Hoyle
8de95582e2
REST API: Remove rest_get_post filter and get_post
abstraction.
...
This filter was originally introduced in https://github.com/WP-API/WP-API/pull/2535 to support Customizer Changesets (née Transactions). This is a super broad filter and doesn't really fit with the design of the API, nor is it (arguably) the right level to do this.
Props rmccue.
Fixes #38701 .
Built from https://develop.svn.wordpress.org/trunk@39161
git-svn-id: http://core.svn.wordpress.org/trunk@39101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 13:09:33 +00:00
Ryan McCue
f8d6cb3260
REST API: Remove more emoji from tests.
...
More from [39156].
See #38609 .
Built from https://develop.svn.wordpress.org/trunk@39160
git-svn-id: http://core.svn.wordpress.org/trunk@39100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 07:39:33 +00:00
Ryan McCue
e592f3b1eb
REST API: Embiggen the test email address.
...
We no longer want a@b.c to be valid, so let's make it a@b.co instead.
Props dd32.
See #38506 .
Built from https://develop.svn.wordpress.org/trunk@39159
git-svn-id: http://core.svn.wordpress.org/trunk@39099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:46:31 +00:00
Ryan McCue
d6a5c68516
REST API: Require 6 characters for comment email addresses.
...
The regular comments API requires 6 characters rather than 3, so we need to match this.
Props mangeshp, dd32.
Fixes #38506 .
Built from https://develop.svn.wordpress.org/trunk@39158
git-svn-id: http://core.svn.wordpress.org/trunk@39098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:42:32 +00:00
Ryan McCue
caabc52753
REST API: Respect unfiltered_html for HTML comment fields.
...
Same as [39155], but for comments, natch.
Props jnylen0.
Fixes #38704 , see #38609 .
Built from https://develop.svn.wordpress.org/trunk@39157
git-svn-id: http://core.svn.wordpress.org/trunk@39097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:36:31 +00:00
Ryan McCue
1239980fad
REST API: Remove ship emoji from slashing tests.
...
Introduced in [39155], but not necessary for the slashing tests. These fail on 5.3, which encodes the emoji as HTML entities.
Props dd32.
See #38609 .
Built from https://develop.svn.wordpress.org/trunk@39156
git-svn-id: http://core.svn.wordpress.org/trunk@39096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 06:26:30 +00:00
Ryan McCue
f1975b18ea
REST API: Respect unfiltered_html for HTML post fields.
...
This necessitates a change to our slashing code as well. Ah slashing, the cause of, and solution to, all of life's problems.
Props jnylen0.
Fixes #38609 .
Built from https://develop.svn.wordpress.org/trunk@39155
git-svn-id: http://core.svn.wordpress.org/trunk@39095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 05:55:32 +00:00
Ryan McCue
8760c9a91d
REST API: Change attachment caption & description to objects.
...
Just like excerpt and content for regular posts, these have transformations applied that can make the content significantly different from the raw value.
Props jnylen0.
Fixes #38679 .
Built from https://develop.svn.wordpress.org/trunk@39154
git-svn-id: http://core.svn.wordpress.org/trunk@39094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 04:29:32 +00:00
Weston Ruter
25a052bac7
Customize: Fix loading of theme screenshots in themes section and remove erroneous borders on hover.
...
Fixes regressions introduced in [38648].
Props delawski, mckernanin.
See #34391 .
Fixes #38222 .
Built from https://develop.svn.wordpress.org/trunk@39153
git-svn-id: http://core.svn.wordpress.org/trunk@39093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:47:30 +00:00
David A. Kennedy
1d8d59a21a
Twenty Seventeen: Fix post navigation font legibility issue
...
The combination of font-size and weight for post navigation made lower case "i"s illegible in some cases. Using `15px` seemed to be the best choice all around. Also adjusts the spacing around the arrows a bit, since they touch the text on small screen sizes.
Props laurelfulford.
Fixes #38670 .
Built from https://develop.svn.wordpress.org/trunk@39152
git-svn-id: http://core.svn.wordpress.org/trunk@39092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 21:07:34 +00:00
Weston Ruter
1363813c6b
Customize: Move Custom CSS control placeholder
help text to setting default
value.
...
The `WP_Customize_Custom_CSS_Setting::value()` method now returns the `default` if `wp_get_custom_css()` returns empty.
Props westonruter, afercia, helen.
See #35395 .
Fixes #38685 .
Built from https://develop.svn.wordpress.org/trunk@39151
git-svn-id: http://core.svn.wordpress.org/trunk@39091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-07 18:13:34 +00:00
Ella Iseulde Van Dorpe
c1ff206bac
TinyMCE: wptextpattern: Fix inline patterns.
...
* Allow spaces inside inline pattern text, unless the delimiter stands alone.
* Add more unit tests.
* Add more inline docs.
Part props azaozz.
Fixes #37693 .
Built from https://develop.svn.wordpress.org/trunk@39150
git-svn-id: http://core.svn.wordpress.org/trunk@39090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 23:38:33 +00:00
Weston Ruter
5ea1e6fd80
Customize: Allow tab characters in custom CSS input.
...
Pressing `Esc` followed by `Tab` allows for tabbing to the next element.
Props afercia, coffee2code, westonruter.
See #35395 .
Fixes #38667 .
Built from https://develop.svn.wordpress.org/trunk@39149
git-svn-id: http://core.svn.wordpress.org/trunk@39089 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-06 19:09:33 +00:00
Joe McGill
68b4181985
Customize: Remove Vimeo validation for external videos.
...
Following [39128], this removes the validation logic for Vimeo URLs from
`_validate_external_header_video()` since WP does not support the
display of videos from Vimeo by default.
This also includes a change to using `esc_url_raw()` instead of `esc_url()`
on the URL value to avoid unexpected behavior from the inclusion of HTML
entities.
Props peterwilsoncc, westonruter.
Fixes #38544 .
Built from https://develop.svn.wordpress.org/trunk@39148
git-svn-id: http://core.svn.wordpress.org/trunk@39088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 18:32:35 +00:00
Andrea Fercia
7b3445c312
Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
...
See #37513 .
Built from https://develop.svn.wordpress.org/trunk@39147
git-svn-id: http://core.svn.wordpress.org/trunk@39087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-05 16:28:33 +00:00