* Adds missing `resolve`/`fail` for promise returned by `loadThemePreview`.
* Adds missing jsdoc blocks and tags.
* Adds missing phpdoc and makes corrections.
See #37770.
Fixes#38908.
git-svn-id: https://develop.svn.wordpress.org/trunk@39345 602fd350-edb4-49c9-b593-d223f7449a82
Sending a request to update a page with the template property set to an empty string resulted in an error because “” was not a valid value in the enum.
Props lucasstark, swissspidy.
Fixes#38877.
git-svn-id: https://develop.svn.wordpress.org/trunk@39343 602fd350-edb4-49c9-b593-d223f7449a82
This bug occurred in any language where text wraps character-by-character, since those languages don't delimit words with spaces. In Japanese, Chinese and Korean, etc., it was possible for the label to be displayed vertically.
Props tg29359, afercia, odysseygate.
Fixes#38876.
git-svn-id: https://develop.svn.wordpress.org/trunk@39341 602fd350-edb4-49c9-b593-d223f7449a82
This makes a few adjustments to CSS to bring them inline with WordPress
CSS coding standards including:
* Font weights should be defined using numeric values
* Do not pad parentheses with spaces
This also fixes a couple of typos to inline comments.
Props netweb for initial patch.
Fixes#38901.
git-svn-id: https://develop.svn.wordpress.org/trunk@39340 602fd350-edb4-49c9-b593-d223f7449a82
It appears IE11 needs an explicit width for an `inline-block` parent element.
props derrickkoo, afercia.
fixes#38872.
git-svn-id: https://develop.svn.wordpress.org/trunk@39339 602fd350-edb4-49c9-b593-d223f7449a82
When a custom header image was set but custom CSS was not, `wp_get_custom_css_post()` was generating an UPDATE query on every frontend request.
In theme options the header image meta data is stored as an object. In `update_option()` this hits an edge case as the resource IDs of the old and new values never match.
This changes the logic of `wp_get_custom_css_post()` to ensure `set_theme_mod()` is only called when the custom CSS has changed.
Props bradyvercher, helen.
Fixes#38866.
git-svn-id: https://develop.svn.wordpress.org/trunk@39338 602fd350-edb4-49c9-b593-d223f7449a82
Document the type property as `readonly` and remove the default value. After #38820 it is no longer possible to set the type property on a comment to anything a custom type.
Props jnylen0, rachelbaker.
Fixes#38886.
git-svn-id: https://develop.svn.wordpress.org/trunk@39337 602fd350-edb4-49c9-b593-d223f7449a82
Invalid nav menu items are exported as settings in the customize controls since it `is_admin()`, but any such `nav_menu_item` settings are excluded from the preview since it's the frontend. Selective refresh for nav menus needs to ignore the syncing of any such `nav_menu_item` settings that are `_invalid` since they are never rendered, and when a nav menu only contains invalid items, an infinite fallback refresh can ensue.
Fixes#38890.
git-svn-id: https://develop.svn.wordpress.org/trunk@39333 602fd350-edb4-49c9-b593-d223f7449a82
* Strip out `customize_messenger_channel` from preview window URL when not contained in iframe.
* Allow interacting with unpreviewable links and forms when previewing customized state on frontend.
See #30937.
Fixes#38867.
git-svn-id: https://develop.svn.wordpress.org/trunk@39332 602fd350-edb4-49c9-b593-d223f7449a82
Previously, if no translation files exist for a text domain, `_load_textdomain_just_in_time()` went through the entire process each time it was called. This results in an increased call to `get_locale()` and its `locale` filter.
This change splits the logic into `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()`. The former, which is used by `_load_textdomain_just_in_time()`, caches the result of the latter. It also removes some non-working code from `WP_Locale_Switcher::load_translations()`.
Props jrf, swissspidy, sharkomatic, ocean90.
Fixes#37997.
git-svn-id: https://develop.svn.wordpress.org/trunk@39330 602fd350-edb4-49c9-b593-d223f7449a82
WordPress' rewrites do this usually, but the behaviour was inconsistent when using non-pretty permalinks.
Props joehoyle.
Fixes#38873.
git-svn-id: https://develop.svn.wordpress.org/trunk@39329 602fd350-edb4-49c9-b593-d223f7449a82
This accidentally assumed $name was the same as $meta_key, which ruined the whole point of $name.
Props tharsheblows, joehoyle.
Fixes#38786.
git-svn-id: https://develop.svn.wordpress.org/trunk@39328 602fd350-edb4-49c9-b593-d223f7449a82
Adding a brand new anonymous comment method is a potential conduit for spam. Since it's still useful functionality, we're now hiding it behind a filter to allow plugins and themes to turn it on if they do want it.
Props helen, rachelbaker, joehoyle.
Fixes#38855.
git-svn-id: https://develop.svn.wordpress.org/trunk@39327 602fd350-edb4-49c9-b593-d223f7449a82
Adds context to one string used in two different contexts for the new user and new site signup email notification.
More to come.
See #38882
git-svn-id: https://develop.svn.wordpress.org/trunk@39323 602fd350-edb4-49c9-b593-d223f7449a82
Check setting existence and authorization via `WP_Customize_Manager::validate_setting_values()` even for `null` values to account for custom params being added to settings, preventing failures from being silently ignored.
See #38705, #30937.
Fixes#38865.
git-svn-id: https://develop.svn.wordpress.org/trunk@39320 602fd350-edb4-49c9-b593-d223f7449a82
This removes support for the skin tone modifier on emoji involving two or more people. This functionality is opposed by Apple and Google, so there is unlikely to be an input mechanism for such emoji, they oppose it on the grounds that they "...do not think a mechanism should be supported that only permits depiction of multi-person groups (or elements) in which each person has the same skin tone."
See their official notification for further details: http://www.unicode.org/L2/L2016/16332-remove-multi-emb.pdf
This change does not require a CDN update, as no emoji were altered or added, only removed.
See #38113.
git-svn-id: https://develop.svn.wordpress.org/trunk@39319 602fd350-edb4-49c9-b593-d223f7449a82
Properties of objects should not be translated, and therefore are pulled out of the translation strings.
Props ramiy.
Fixes#38822.
git-svn-id: https://develop.svn.wordpress.org/trunk@39306 602fd350-edb4-49c9-b593-d223f7449a82
We're checking if `current_user_can( 'moderate_comments' )` here, not the specific comment permissions.
See #38857.
git-svn-id: https://develop.svn.wordpress.org/trunk@39305 602fd350-edb4-49c9-b593-d223f7449a82
After [39187], WordPress started loading only the first page of a PDF.
This is appropriate for performance, but made it impossible to
write plugins that read other pages without overriding `load()`.
Introduces `WP_Image_Editor_Imagick->pdf_setup()`, to allow an override
to change WordPress' rendering DPI defaults or which pages are loaded.
Fixes#38832. See #38522, #31050.
Props markoheijnen, joemcgill, mikeschroder.
git-svn-id: https://develop.svn.wordpress.org/trunk@39303 602fd350-edb4-49c9-b593-d223f7449a82
Users without the moderate_comments capability can no longer set the `author_ip` property directly, and instead receive a `WP_Error` if they attempt to do so. Otherwise, the `author_ip property` is populated from `$_SERVER['REMOTE_ADDR']` if present and a valid IP value. Finally, fallback to 127.0.0.1 as a last resort.
Props dd32, rachelbaker, joehoyle.
Fixes#38819.
git-svn-id: https://develop.svn.wordpress.org/trunk@39302 602fd350-edb4-49c9-b593-d223f7449a82
Fixes one errant value and re-aligns some existing prefixed property values so they don't get doubled when precommit/postcss is run again in the future.
props davidakennedy.
see #29158.
git-svn-id: https://develop.svn.wordpress.org/trunk@39301 602fd350-edb4-49c9-b593-d223f7449a82
Properties of objects should not be translated, and therefore are pulled out of the translation strings.
Props ocean90, ramiy, danielbachhuber.
Fixes#38822.
git-svn-id: https://develop.svn.wordpress.org/trunk@39298 602fd350-edb4-49c9-b593-d223f7449a82
iOS disables this feature under the hood, but it also distorts the images – unlike other mobile devices that don't support it. So this adds a check for both `background-attachment: fixed` support or whether it’s an iOS device - passing it adds the class `background-fixed` which is used to add the proper styles.
It also lowers the media query so the parallax-like style is present on a wider range of screens since this bug can be better targeted and avoided. In this way, screens that aren't the offending devices aren't punished merely based on screen size.
Props joemcgill, laurelfulford, helen.
Fixes#38395.
git-svn-id: https://develop.svn.wordpress.org/trunk@39297 602fd350-edb4-49c9-b593-d223f7449a82
Stop presuming IP address are IPv4, instead make the type “ip” to be agnostic of IP version. This fixes requests with ipv6 addresses for comments in core.
Props dd32, schlessera, danielbachhuber.
Fixes#38818.
git-svn-id: https://develop.svn.wordpress.org/trunk@39296 602fd350-edb4-49c9-b593-d223f7449a82