Commit Graph

35803 Commits

Author SHA1 Message Date
Tammie Lister
bffa48a6ee Twenty Seventeen: Resolves focused controls hidden by the top menu.
When a page is scrolled, the top nav menu become fixed. Depending on the page content this caused issue where focused links or buttons may be hidden behind the  nav menu.

Props afercia, davidakennedy, Fencer04
Fixes #38476



git-svn-id: https://develop.svn.wordpress.org/trunk@39225 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 17:00:57 +00:00
Tammie Lister
6d7ed1e861 Twenty Seventeen: Fixes custom header text color issues
Removes default header text color and updates and updates selectors.

Props laurelfulford, davidakennedy, Idealien
Fixes #38391



git-svn-id: https://develop.svn.wordpress.org/trunk@39224 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:48:32 +00:00
Joe Hoyle
850dd1be76 REST API: Make all collection params filterable.
For developers wanting to add their own registered collection parameters, they can now use the `rest_$type_collection_params` filter. This brings consistency with the already existing `rest_$post_type_collection_params`.

Fixes #38710.
Props jnylen0.


git-svn-id: https://develop.svn.wordpress.org/trunk@39223 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:41:40 +00:00
Joe Hoyle
58169b04fa REST API: Validate and Sanitize registered meta based off the schema.
With the addition of Array support in our schema validation functions, it's now possible to use these in the meta validation and sanitization steps. Also, this increases the test coverage of using registered via meta the API significantly.

Fixes #38531.
Props rachelbaker, tharsheblows.


git-svn-id: https://develop.svn.wordpress.org/trunk@39222 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 16:35:35 +00:00
David A. Kennedy
76e44c9166 Twenty Seventeen: Make sure theme JavaScript follows proper coding standards
Props sstoqnov, afercia.

Fixes #38752.


git-svn-id: https://develop.svn.wordpress.org/trunk@39221 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:40:55 +00:00
David A. Kennedy
5b41a1c33e Twenty Seventeen: Make custom header preview match front end in Customizer when changed
* Toggles `has-header-image` body class  in Customizer preview whenever images or videos are added or removed.
* Hides the `.custom-header-image`div in CSS when an image or video haven't been set so preview changes are smoother.
* Also fixes the main issues in #38391 – making the preview match.

Props bradyvercher.

Fixes #38627.
See #38391.


git-svn-id: https://develop.svn.wordpress.org/trunk@39220 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 11:22:25 +00:00
Ryan McCue
ecb1e33d0d REST API: Improve validation for usernames and passwords.
Also improves the slashing of user data in the REST API to avoid data loss.

Props jnylen0.
Fixes #38739.


git-svn-id: https://develop.svn.wordpress.org/trunk@39219 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 07:12:31 +00:00
Weston Ruter
47a04c044d Customize: Remove root panel description text which notes that edit shortcuts can be toggled by clicking anywhere in the preview.
Amends [39131], in which this method of toggling edit shortcuts was removed.
Props presskopp.
See #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39218 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 04:32:47 +00:00
Andrew Ozz
61de8de75a TinyMCE: fix black outline around _moz_abspos. This is added in Firefox in paragraphs inserted after a non-editable block.
See #38757.

git-svn-id: https://develop.svn.wordpress.org/trunk@39217 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-14 02:33:05 +00:00
David A. Kennedy
2835aa5f99 Twenty Seventeen: Adds numbers to the table of contents in style.css
Props karmatosed.

Fixes #38767.


git-svn-id: https://develop.svn.wordpress.org/trunk@39216 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:44:39 +00:00
David A. Kennedy
40b3a5a878 Twenty Seventeen: Fix Customizer preview display issues in IE9
IE9 doesn't understands `vh ` (vertical height) when inside of an `iframe`. Normally IE9 will understand `vh` as the vertical height relative to the viewport, but in an `iframe`, IE9 thinks the vertical height is relative to the size of the whole page. So this fixes that when the site is viewed in the Customizer preview – an `iframe`.

Props laurelfulford.

Fixes #38722.


git-svn-id: https://develop.svn.wordpress.org/trunk@39215 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 23:30:53 +00:00
Weston Ruter
2158edc28f Customize: Prevent the "Hide Controls" button label from overrunning the device preview buttons.
Adds translation context for "Hide Controls" strings so translators can supply shorter strings where space is constrained. Adds styles to fade-out long the "Hide Controls" label where it would run into the device preview buttons.

Props westonruter, ocean90.
Fixes #38762.


git-svn-id: https://develop.svn.wordpress.org/trunk@39214 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 18:59:21 +00:00
Helen Hou-Sandi
0c044ba8d9 Media: Clearly indicate that PDF thumbnails are just document previews.
This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.


git-svn-id: https://develop.svn.wordpress.org/trunk@39213 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 16:38:06 +00:00
Dion Hulse
6ade77e936 WP_HTTP: Map internal Requests hooks to WordPress actions.
This change introduces a `requests-{$hook}` action which can be used to hook into Requests hooks, and restores the `http_api_curl` action.

Props rmccue.
Fixes #37843.


git-svn-id: https://develop.svn.wordpress.org/trunk@39212 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 10:35:15 +00:00
Dion Hulse
4404f32cb5 Updates: Allow background updates to update multiple plugins/themes in the same request.
Due to the `clear_update_cache` parameter not being respected, update caches were being cleared incorrectly which prevented multiple plugins to be updated at the same time in background updates - failing with a `fs_unavailable` error message.

Fixes #38024


git-svn-id: https://develop.svn.wordpress.org/trunk@39211 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 09:52:49 +00:00
Dion Hulse
7e9960edad Posts, Post Types: Fix Quick Edit to correctly set the page template for non-hierarchical post types.
Props dd32, swissspidy.
Fixes #38655.


git-svn-id: https://develop.svn.wordpress.org/trunk@39210 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 07:41:30 +00:00
Weston Ruter
c68c1c8ec7 Customize: Improve extensibility of Custom CSS.
* Add `customize_value_custom_css` filter to `WP_Customize_Custom_CSS::value()` method.
* Introduce `customize_update_custom_css_post_content_args` filter in `WP_Customize_Custom_CSS::update()` method.
* Make clear that `wp_get_custom_css()` and `wp_get_custom_css` filter are specifically for obtaining the value to render/display. Eliminate use of `wp_get_custom_css()` when getting the setting value. Use the underlying `post_value` directly when `is_previewed`.
* Move anonymous functions handing JS previewing for `custom_logo`, `custom_css`, and `background` into named functions on the `wp.customize.settingPreviewHandlers` to allow plugins to override/extend preview logic.
* Update `_custom_background_cb` to always print a `style` tag wen in the customizer preview, and update background preview logic to replace existing style element instead of appending a new style to the head so that background changes don't unexpectedly override any Custom CSS in the preview's stylesheet cascade.

Props westonruter, georgestephanis.
See #22058.
Fixes #38672.


git-svn-id: https://develop.svn.wordpress.org/trunk@39209 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 02:42:04 +00:00
David A. Kennedy
97ae697d6a Twenty Seventeen: Fix typos in font family translator comment
Props dimadin.

Fixes #38740.


git-svn-id: https://develop.svn.wordpress.org/trunk@39208 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 01:29:29 +00:00
David A. Kennedy
09a0941999 Twenty Seventeen: Update screen-reader-text to reset word-wrap
This resets the property to normal where needed and, to be safe, uses `!important`. It avoids screen readers reading out words ignoring spaces between words in some cases.

Props afercia.

Fixes #38764.


git-svn-id: https://develop.svn.wordpress.org/trunk@39207 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-13 00:25:49 +00:00
Tammie Lister
5cab939b1e Twenty Seventeen: Keyboard navigation on Safari 10 fix
This resolves the weird behaviour on Safari 10 has some weird behaviour.

Props rianrietveld, swisspidy, afercia, sami.keijonen, arush, davidakennedy
Fixes #38387



git-svn-id: https://develop.svn.wordpress.org/trunk@39206 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-12 23:38:43 +00:00
Joe McGill
ef9eb5f26e Customize: Rename "Header Visuals" to "Header Media".
"Header Visuals" is a bit vague since the title/tagline are arguably
also “header visuals”. "Header Media" is more descriptive and is
consistent with how we refer to images/videos throughout core.

Props bradyvercher.
Fixes #38756.

git-svn-id: https://develop.svn.wordpress.org/trunk@39205 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 23:23:06 +00:00
Andrew Ozz
9f67a915d9 TinyMCE: fix freezing the editor when wpautop is disabled and a paragraph starts with a lot of white space characters.
Fixes #38294.

git-svn-id: https://develop.svn.wordpress.org/trunk@39204 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 23:06:03 +00:00
Dominik Schilling (ocean90)
74e3e309c3 Multisite: Rename the $user parameter to $user_login in wpmu_signup_blog_notification() and wpmu_signup_user_notification().
[38961] added a `$user = get_user_by( 'login', $user );` call which was overriding the `$user` string variable for the login name. The change to `$user_login` makes this clear.

Props johnjamesjacoby.
Fixes #38763.

git-svn-id: https://develop.svn.wordpress.org/trunk@39203 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-11 22:19:14 +00:00
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