`get_available_languages()` is only designed to work with translations for core. Using it for plugins/themes means unnecessary `strpos()` checks and incomplete results for plugins/themes whose names are beginning with `admin-` or `ms-`.
Props swissspidy, ocean90.
Fixes#38590.
git-svn-id: https://develop.svn.wordpress.org/trunk@39230 602fd350-edb4-49c9-b593-d223f7449a82
Textarea will fill vertical height of Custom CSS section for browsers that support `calc()` and when plugins don't add other controls to the section. Also run CSS autoprefixer.
Props michaelarestad, westonruter.
See #35395.
Fixes#38755.
git-svn-id: https://develop.svn.wordpress.org/trunk@39229 602fd350-edb4-49c9-b593-d223f7449a82
* Use `postMessage` transport for header image settings by default when video headers are supported, and thus `the_custom_header_markup()` will necessarily be used (and thus a selective refresh partial will be available).
* Ensure that `the_custom_header_markup()` always outputs a container element in the customizer preview even if the header is empty.
* Ensure that edit shortcut appearing for custom header does not get positioned off-screen.
Props bradyvercher, westonruter.
See #38639.
Fixes#38737.
git-svn-id: https://develop.svn.wordpress.org/trunk@39227 602fd350-edb4-49c9-b593-d223f7449a82
Support was added to test implementation but never completed. This removes the test implementation.
Props davidakennedy
Fixes#38783
git-svn-id: https://develop.svn.wordpress.org/trunk@39226 602fd350-edb4-49c9-b593-d223f7449a82
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
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
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
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
* 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
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
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
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
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
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
* 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
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
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
"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
[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
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
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
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
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
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
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
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
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