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
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
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
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
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
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
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
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
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
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
`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
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
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
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
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
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
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
Multiple post statuses can be specified by the usual CSV or array-propper format.
Props jnylen0, kadamwhite, websupporter.
Fixes#38420.
git-svn-id: https://develop.svn.wordpress.org/trunk@39104 602fd350-edb4-49c9-b593-d223f7449a82
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.
This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.
Props adamsilverstein, joemcgill.
Fixes#38550.
git-svn-id: https://develop.svn.wordpress.org/trunk@39102 602fd350-edb4-49c9-b593-d223f7449a82
Introduces `wp_check_comment_data_max_lengths()` which allows both the REST API comments endpoints and `wp_handle_comment_submission()` to check the length of the comment content, author name, author url, and author email fields against their respective database columns.
Props rachelbaker, mangeshp, salcode, pento.
Fixes#38477.
git-svn-id: https://develop.svn.wordpress.org/trunk@39101 602fd350-edb4-49c9-b593-d223f7449a82
Fixes PHP warning triggered by calling `max()` on `$widget_numbers` when there are no widget instances of the type yet. Also makes sure that widget instances start at 2 instead of 1.
See #38114.
git-svn-id: https://develop.svn.wordpress.org/trunk@39100 602fd350-edb4-49c9-b593-d223f7449a82
Removes the highlight from the current filter when performing an Ajax search and adds it back when clearing the search input.
Fixes#37657.
git-svn-id: https://develop.svn.wordpress.org/trunk@39099 602fd350-edb4-49c9-b593-d223f7449a82
While "Menu/Theme locations" was descriptive of what the choices listed were, in the context of editing an individual nav menu it is more descriptive to use a setting label that tells you what it is you are affecting for that nav menu, which is where it will be displayed. Technically multiple locations can be chosen, but in practice that appears to be rare enough that we can avoid an awkward "location(s)" type string.
props Fencer04 for the initial patch.
fixes#38525.
git-svn-id: https://develop.svn.wordpress.org/trunk@39098 602fd350-edb4-49c9-b593-d223f7449a82
Add the taxonomies for a post type to the `/wp/v2/types` endpoint, so clients know which taxonomies are available for which post types.
Props danielbachhuber.
Fixes#38438, #38631.
git-svn-id: https://develop.svn.wordpress.org/trunk@39097 602fd350-edb4-49c9-b593-d223f7449a82