Commit Graph

36280 Commits

Author SHA1 Message Date
Weston Ruter 5f9c6ef4ae Customize: Remove left-margin guard from edit shortcuts and adjust for small screen sizes.
Removes the `.customize-partial-edit-shortcut-left-margin` class which was not effective on some themes, created a worse experience for other themes, and which did not recalculate when the preview was reflowed or resized. Now some small-width media queries are added to handle common cases while more dramatic issues can be handled by the theme. Also renames `Partial.positionEditShortcut()`to `Partial.addEditShortcutToPlacement()` which is a more accurate description of its function.

Props sirbrillig, sstoqnov.
See #38651, #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39202 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 09:46:47 +00:00
Helen Hou-Sandi 9d73e7a311 Post-4.7 beta 3 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39201 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 03:31:59 +00:00
Helen Hou-Sandi 543fe671c0 WordPress 4.7 Beta 3.
git-svn-id: https://develop.svn.wordpress.org/trunk@39200 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 03:18:47 +00:00
Weston Ruter af640568fe Customize: Prevent previewer from appearing to freeze when refreshing too fast.
Fixes race condition issue where a previous iframe fails to get destroyed, leaving a iframe pending loading persistently shown.

Props nikeo, westonruter.
Fixes #38728.


git-svn-id: https://develop.svn.wordpress.org/trunk@39199 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 22:42:38 +00:00
Helen Hou-Sandi 195e86fda5 Twenty Seventeen: Better RTL positioning for scroll down arrow.
props adamsilverstein.
fixes #38706.


git-svn-id: https://develop.svn.wordpress.org/trunk@39198 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 13:53:58 +00:00
Helen Hou-Sandi 9f6a9e6c4a Customize: Ensure RTL version of `customize-preview.css` is loaded.
props adamsilverstein.
see #27403, #38706.


git-svn-id: https://develop.svn.wordpress.org/trunk@39197 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 13:53:00 +00:00
Joe Hoyle 08c7dddc41 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39196 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 03:34:30 +00:00
Aaron Jorbin 8b464c7140 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39195 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 03:21:39 +00:00
Helen Hou-Sandi 208998a9d5 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39194 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:55:56 +00:00
Joe Hoyle 5309ebbbaa REST API: Fix test for unfiltered_html under multisite.
See #38726.


git-svn-id: https://develop.svn.wordpress.org/trunk@39193 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:47:48 +00:00
joehoyle 660333387e REST API: Use wp_slash rather than addslashes.
See #38726.
Props dd32.


git-svn-id: https://develop.svn.wordpress.org/trunk@39192 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:38:02 +00:00
Joe Hoyle c67401baf1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39191 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:20:09 +00:00
Joe Hoyle ec2ffb45c1 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39190 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 02:09:40 +00:00
John Blackbourn 09e332c301 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


git-svn-id: https://develop.svn.wordpress.org/trunk@39189 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-10 01:53:08 +00:00
John Blackbourn 9ac95f7650 Docs: Improve the documentation for parameters which accept `OBJECT`, `ARRAY_A`, and `ARRAY_N` as parameters.
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@39188 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 22:59:02 +00:00
Mike Schroder 28e538bf80 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39187 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 21:04:04 +00:00
Weston Ruter 477e34fbf8 Customize: Eliminate use of flexbox for edit shortcuts.
Props sirbrillig.
See #27403.
Fixes #38660.


git-svn-id: https://develop.svn.wordpress.org/trunk@39186 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 20:54:41 +00:00
Weston Ruter 5fb093bfe6 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39185 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 20:42:22 +00:00
Tammie Lister b847c1c2c4 Twenty Seventeen fix for Travis Error
Removed semi-colo on line 46

Props swissspidy


git-svn-id: https://develop.svn.wordpress.org/trunk@39184 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 16:54:51 +00:00
Tammie Lister 208e443dc5 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



git-svn-id: https://develop.svn.wordpress.org/trunk@39183 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 16:12:35 +00:00
Ryan McCue 446dc73042 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39182 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 07:12:01 +00:00
Weston Ruter 8a0c502703 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39181 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 07:02:53 +00:00
Weston Ruter 865f3633f4 Customize: Prevent `post_content` and `post_name` from being modified when trashing `customize_changeset` posts.
See #30937.
Fixes #38719.


git-svn-id: https://develop.svn.wordpress.org/trunk@39180 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 05:44:14 +00:00
Ryan McCue c20af6e31f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39179 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 03:41:07 +00:00
Weston Ruter cebc30dd67 Customize: Rename remaining instances `unfiltered_css` meta capability to `edit_css` in unit tests.
Amends [39175].
See #38672, #35395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39178 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:47:50 +00:00
Ryan McCue cd5572b67a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39177 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:34:56 +00:00
David A. Kennedy b2fc03af7f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39176 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:11:59 +00:00
Weston Ruter b20cda2d4b Customize: Rename `unfiltered_css` meta capability to `edit_css`; add `revisions` support to `custom_css` post type.
Props lukecavanagh, georgestephanis, westonruter.
See #38672, #35395.


git-svn-id: https://develop.svn.wordpress.org/trunk@39175 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 01:11:49 +00:00
John Blackbourn 61fa0a69d6 Build/Test Tools: Utilise `assertWPError()` and `assertNotWPError()` in more places.
See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39174 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-09 00:01:42 +00:00
John Blackbourn 5ab2a22a38 Build/Test Tools: Utilise `assertFileExists()` and `assertFileNotExists()` in more places.
See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39173 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:49:11 +00:00
John Blackbourn 52a834a6d8 Themes: Re-use fixtures in the `wp_get_document_title()` tests.
See #38716


git-svn-id: https://develop.svn.wordpress.org/trunk@39172 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:31:45 +00:00
Aaron Jorbin 6d98c6cda5 Cleanup .orig file accidentally added.
Introduced in [39165].

Unprops joemcgill.



git-svn-id: https://develop.svn.wordpress.org/trunk@39171 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:29:53 +00:00
Aaron Jorbin 5cb18b6c38 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@39170 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:22:23 +00:00
Pascal Birchler 21e874e00a 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39169 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 23:00:38 +00:00
Pascal Birchler 5f610350e1 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39168 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 22:40:28 +00:00
Pascal Birchler 4b3e128140 Date/Time: Improve `date_i18n()` timezone tests.
This uses a timezone without DST for the tests covering `date_i18n()`.

Fixes #37910.

git-svn-id: https://develop.svn.wordpress.org/trunk@39167 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 22:31:51 +00:00
Drew Jaynes b955bdd506 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39166 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 20:15:38 +00:00
Joe McGill c25537e6e2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39165 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 19:19:23 +00:00
David A. Kennedy 61af54b335 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39164 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 18:00:07 +00:00
Dominik Schilling (ocean90) 221384ab8a Customize: Autoprefixer for [39149].
See #38667.

git-svn-id: https://develop.svn.wordpress.org/trunk@39163 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 15:24:45 +00:00
Joe Hoyle 4f685410b2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39162 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 14:07:10 +00:00
Joe Hoyle 6fd4d6e0ea 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39161 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 13:08:49 +00:00
Ryan McCue 2eca6870b9 REST API: Remove more emoji from tests.
More from [39156].

See #38609.


git-svn-id: https://develop.svn.wordpress.org/trunk@39160 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 07:38:40 +00:00
Ryan McCue 0bbeaf7b15 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39159 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:45:26 +00:00
Ryan McCue 08efd7b636 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39158 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:41:57 +00:00
Ryan McCue e74994b2f4 REST API: Respect unfiltered_html for HTML comment fields.
Same as [39155], but for comments, natch.

Props jnylen0.
Fixes #38704, see #38609.


git-svn-id: https://develop.svn.wordpress.org/trunk@39157 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:35:51 +00:00
Ryan McCue 2212d62d83 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39156 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 06:25:36 +00:00
Ryan McCue 074d204c12 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39155 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 05:54:22 +00:00
Ryan McCue f6e433b250 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39154 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-08 04:28:47 +00:00
Weston Ruter c0f007b691 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39153 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 21:46:43 +00:00