Commit Graph

35734 Commits

Author SHA1 Message Date
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
David A. Kennedy 750d78a8e3 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39152 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 21:06:20 +00:00
Weston Ruter 1207af99d4 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39151 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-07 18:12:28 +00:00
Ella van Dorpe c78f002ae6 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@39150 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-06 23:37:09 +00:00
westonruter 7f069a69dc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@39149 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-06 19:08:01 +00:00
Joe McGill 8e7ab859fd 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@39148 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 18:31:06 +00:00
Andrea Fercia 8a6fa93b84 Accessibility: Revert [38984] as it needs to be better communicated to plugin authors.
See #37513.


git-svn-id: https://develop.svn.wordpress.org/trunk@39147 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 16:27:13 +00:00
David A. Kennedy d93ca46c4f Twenty Seventeen: Fix playlists not rendering on blog/archive pages when using video or audio post format
TwentySeventeen attempts to highlight media found in post content by using `get_media_embedded_in_content()` to extract videos from the content and display their HTML differently. However, the HTML being generated by the playlist shortcode relies on JavaScript to update the video element with the markup needed to display the playlist properly. The `get_media_embedded_in_content()` function wasn't designed to handle this use case.

The patch looks for the presence of `wp-playlist-script` in the content and shows the standard content rather than trying to pluck the media elements from the content using `get_media_embedded_in_content()`.

Props joemcgill.

Fixes #38390.


git-svn-id: https://develop.svn.wordpress.org/trunk@39146 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-05 00:44:28 +00:00
Weston Ruter 5d832bc2ae Customize: For Header Image, ensure "Previously uploaded" and "Suggested" headings are hidden when lists are empty.
Fixes regression introduced with the addition of control notifications in [37476]. The container element for notifications is injected after the `.customize-control-title` element if the `.customize-control-notifications-container` element does not already exist in the control's template. Also adds missing margin between current image and uploaded images.

Props bradyvercher.
See #34893.
Fixes #38561.


git-svn-id: https://develop.svn.wordpress.org/trunk@39145 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 23:14:47 +00:00
Weston Ruter d616ad29a5 Customize: Remove edit shortcut toggle button from preview since visibility is now linked with pane visibility.
Amends [39131].
Props westonruter, sirbrillig.
See #27403.
Fixes #38668.


git-svn-id: https://develop.svn.wordpress.org/trunk@39144 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 20:53:56 +00:00
Helen Hou-Sandi 7435ecdce0 Post-4.7 beta 2 bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@39143 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 17:40:12 +00:00
Helen Hou-Sandi 7ece646407 WordPress 4.7 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@39142 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 16:08:49 +00:00
Aaron Jorbin 9768ec2b97 Administration: Ensure collapse menu is usable with a keyboard
Currently, the "Collapse menu" item is not focusable and keyboard users can't collapse/expand the admin menu. This aims to fix it so that screen readers no longer announce it as a clickable but it remains unfocusable and thus unusable. So it's now a button.

Quoting joedolson at WordCamp Chicago 2014:
"If it's supposed to act like a button, it should be a button."

Also includes a grunt:precommit run that picked up some postcss changes to src/wp-includes/css/customize-preview.css

Fixes #29958.
Props ajercia, ipm-frommen for an iterative patch, valendesigns for an iterative patch, GaryJ for feedback, joedolson for feedback, helen for feedback




git-svn-id: https://develop.svn.wordpress.org/trunk@39141 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 16:01:24 +00:00
Helen Hou-Sandi f7e5811287 Customize: Revert theme install feature.
This is a great goal for core, and is close, but it is not in shape to be shipped for 4.7 and there is not enough time left in the development cycle to alter and polish sufficiently. There are bugs, but more than that, there are more fundamental questions around the use of existing UI, general UX, and how findable themes are (not) on the .org side.

see #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@39140 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 15:53:01 +00:00
John Blackbourn f8a5c7b8d4 Editor: Correct the docblock for the `wp_default_editor` filter.
Props dimadin
See #38327


git-svn-id: https://develop.svn.wordpress.org/trunk@39139 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 12:14:05 +00:00
Weston Ruter ef33fd1841 Customize: Ensure page/post stubs are included in listings and searches for available nav menu items.
Include the customized state in the Ajax requests to load items and search items.

See #38573.
Fixes #38122.


git-svn-id: https://develop.svn.wordpress.org/trunk@39138 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 07:23:49 +00:00
Weston Ruter d6c217886a Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.


git-svn-id: https://develop.svn.wordpress.org/trunk@39137 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 06:03:51 +00:00
Weston Ruter 71f8622cdc Customize: Use `button` with `svg` as click target instead of `:before` content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.


git-svn-id: https://develop.svn.wordpress.org/trunk@39136 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-04 01:47:56 +00:00
David A. Kennedy a02ab35128 Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.


git-svn-id: https://develop.svn.wordpress.org/trunk@39135 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 23:07:20 +00:00
Dominik Schilling (ocean90) ece3b68aaf I18N: In `get_user_locale()` ensure that `$user_id` isn't a falsy value before calling `get_user_by()`.
Fixes #38485.

git-svn-id: https://develop.svn.wordpress.org/trunk@39134 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 23:05:34 +00:00
Weston Ruter ed37aaa664 Customize: No-op `edit_post_link()` when in customizer preview.
Edit links can be restored in plugins by removing the `__return_empty_string` function from the `get_edit_post_link` filter at the `customize_preview_init` action.

Fixes #38648.


git-svn-id: https://develop.svn.wordpress.org/trunk@39133 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:43:43 +00:00
Weston Ruter 58f7c47cfc Customize: For toggling visibility of the controls pane, rename "Collapse (Sidebar)" to "Hide Controls" and "Expand Sidebar" to "Expand Controls".
Fixes #38647.


git-svn-id: https://develop.svn.wordpress.org/trunk@39132 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:34:05 +00:00
Weston Ruter a981b22e15 Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.


git-svn-id: https://develop.svn.wordpress.org/trunk@39131 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:22:43 +00:00
Dominik Schilling (ocean90) fb9b3819de Load: Remove unused global imports in `wp_load_translations_early()`.
See #38535.

git-svn-id: https://develop.svn.wordpress.org/trunk@39130 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:02:00 +00:00
David A. Kennedy 119c36b0bd Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39129 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 22:01:46 +00:00
Joe McGill bd52f81e87 Customize: Remove Vimeo reference from description for external header videos.
Vimeo's API requires a Pro account to display videos as background videos
(i.e., without player controls), thus we shouldn't support Vimeo
URLs by default in custom header videos. This removes the reference of Vimeo
from the control description in the customizer.

Fixes #38544.

git-svn-id: https://develop.svn.wordpress.org/trunk@39128 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 21:33:47 +00:00
Pascal Birchler 8a08cfc840 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

This re-introduces [39069], but now with additional tests and a `function_exists( 'wp_get_current_user' )` check in `get_user_locale()` in case it gets used early.

Props swissspidy, ocean90.
Fixes #38485.

git-svn-id: https://develop.svn.wordpress.org/trunk@39127 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 20:07:08 +00:00
Rachel Baker 4757546045 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.

git-svn-id: https://develop.svn.wordpress.org/trunk@39126 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 20:04:59 +00:00
Pascal Birchler b7cfad8697 I18N: Move `load_textdomain()` tests to separate file.
See #38485.

git-svn-id: https://develop.svn.wordpress.org/trunk@39125 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:56:53 +00:00
David A. Kennedy 9dd2063876 Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.


git-svn-id: https://develop.svn.wordpress.org/trunk@39124 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:43:15 +00:00
Joe McGill 4bdbfc4526 Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder
strings in place of the template directory URI, which WordPress transforms
in several places by running the value of
`get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`.

This fixes a few places where WordPress skipped the `sprintf()` step and
referenced the `get_theme_support()` value directly.

Props bradyvercher for initial patch.
See #38557.

git-svn-id: https://develop.svn.wordpress.org/trunk@39123 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 19:01:16 +00:00
Dominik Schilling (ocean90) c1f7d89592 I18N: Show "Settings saved." in the correct language after switching the site language.
This simplifies the logic by comparing `get_user_locale()` before and after an settings update.

Props swissspidy, ocean90.
See #29783, #29281.
Fixes #38482.

git-svn-id: https://develop.svn.wordpress.org/trunk@39122 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 17:54:42 +00:00
Joe McGill f64f956847 Themes: Improve reliability of URL used in `get_header_image_tag()`.
`get_header_image_tag()` relies on the data returned by `get_custom_header()`
to build the attributes for the header `<img>` element. However,
`get_custom_header()` relies on data from the `header_image_data` theme
mod rather than the `header_image` theme mod that `get_header_image()` uses.
This can create inconsistencies when no header image is set, but a theme
supports a default header image.

This fixes the issue by making `get_custom_image_tag()` rely on the URL
returned by `get_header_image()` instead.

Props bradyvercher.
Fixes #38633.

git-svn-id: https://develop.svn.wordpress.org/trunk@39121 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 12:36:01 +00:00
Weston Ruter 144f0cb317 Customize: Prevent collapsing expanded panel/section/control when `Esc` is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.


git-svn-id: https://develop.svn.wordpress.org/trunk@39120 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 06:18:35 +00:00
Aaron Jorbin 40197b63d9 Revert [39118] due to incompatibility with node v0.10.x
Props nacin

See #38199.



git-svn-id: https://develop.svn.wordpress.org/trunk@39119 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 06:08:34 +00:00
Aaron Jorbin c03bc60a70 Bump grunt-includes from 0.5.4 to 1.0.0
Diff
0790695413

See #38199.


git-svn-id: https://develop.svn.wordpress.org/trunk@39118 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:44:18 +00:00
Aaron Jorbin 2c0e24babf Bump grunt-contrib-uglify from 1.0.1 to 2.0.0
Sets `screwIE8` to false as it is now enabled by default

Files Changed:
build/wp-admin/js/customize-nav-menus.min.js
build/wp-admin/js/customize-widgets.min.js
build/wp-includes/js/customize-loader.min.js

Changelog:
2016-07-19   v2.0.0   Update uglify-js to v2.7.0. screwIE8 is enabled by default.
2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix beautify when passed as an object. Fix docs about report values.

See #38199.



git-svn-id: https://develop.svn.wordpress.org/trunk@39117 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:39:10 +00:00
Aaron Jorbin fff00cbc94 Bump grunt-contrib-cssmin from v1.0.0 to v1.0.2
Changelog:
2016-08-31   v1.0.2   Fix issues for node 6.
2016-03-16   v1.0.1   Downgrade maxmin to support Node.js 0.10.

See #38199.


git-svn-id: https://develop.svn.wordpress.org/trunk@39116 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:31:56 +00:00
Aaron Jorbin 2de138fbb6 Bump grunt-contrib-compress from 1.1.0 to 1.3.0
Changelog:
2016-05-24   v1.3.0   Update to Archiver 1.0. Fix node 6 support.
2016-03-24   v1.2.0   Dependency update.

See #38199


git-svn-id: https://develop.svn.wordpress.org/trunk@39115 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:27:41 +00:00
Aaron Jorbin 05b092902a Bump autoprefixer from 6.5.0 to 6.5.1
Changelog
Fix selectors with :-- prefix support.

See #38199.

M    package.json


git-svn-id: https://develop.svn.wordpress.org/trunk@39114 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:17:07 +00:00
Aaron Jorbin 822762b101 Bump grunt-contrib-qunit from 1.1.0 to 1.2.0
Changlog:
2016-04-14   v1.2.0   Add support for filtering running modules using command line (--modules) Removed 'grunt.warn' output from error.onError handler, onus now on end user binding to event. Update docs.

See #38199.


git-svn-id: https://develop.svn.wordpress.org/trunk@39113 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:13:35 +00:00
Weston Ruter 5a03cb2426 Customize: Prevent syncing unmodified settings from controls into preview to guard against triggering an infinite reload due to selective refresh fallback behavior.
If a value is sanitized in PHP and differs from the JS value in the pane, a `change` event for the setting is triggered upon refresh. This should be avoided since the value just came from the server as being sanitized. This also fixes periodic issue where selective refresh happens immediately after a full refresh.

Fixes #37032.


git-svn-id: https://develop.svn.wordpress.org/trunk@39112 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 05:06:17 +00:00
Ryan McCue a94ba30624 REST API: Only provide JSON error code on PHP 5.3+.
json_last_error() was only added to PHP 5.3.0, so we can't provide the information for older versions.

See #38547.


git-svn-id: https://develop.svn.wordpress.org/trunk@39111 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 04:57:00 +00:00
Aaron Jorbin 3146b1e971 Bump grunt-sass from 1.1.0 to 1.2.1
diff: https://github.com/sindresorhus/grunt-sass/compare/v1.1.0...v1.2.1

See #38199.


git-svn-id: https://develop.svn.wordpress.org/trunk@39110 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 04:54:46 +00:00
Joe Hoyle f784a0481b REST API: Return error when JSON decoding fails.
If you send a request to the REST API with invalid JSON in body than it will now return a error. This assists developers if they accidentally send invalid JSON and wonder why their data appears to be ignored.

Props rmccue.
Fixes #38547.


git-svn-id: https://develop.svn.wordpress.org/trunk@39109 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 04:04:41 +00:00
Rachel Baker 973ade2a28 REST API: Return a `WP_Error` when a user does not have permission to create or update a post with the provided terms.
Add the 'assign_term' check for post create and update.

Props boonebgorges, johnbillion.
Fixes #38505.

git-svn-id: https://develop.svn.wordpress.org/trunk@39108 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 03:15:28 +00:00
Joe McGill f2f3b3696b Media: Sanity check array value in `wp_prepare_attachment_for_js()`.
This adds a sanity check to the return value of the `image_downsize` filter
in `wp_prepare_attachment_for_js()` to avoid undefined offest notices.

Props justinbusa for initial patch.
Fixes 34437.

git-svn-id: https://develop.svn.wordpress.org/trunk@39107 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-03 02:22:43 +00:00