Locales are codes to identify a language in WordPress which can be different from the specification for language tags, see https://www.w3.org/International/articles/language-tags/.
An example is `de_DE_formal` or `nl_NL_formal` where the subtag `formal` isn't officially supported.
To give translators the possibility to specify the language tag of their language introduce a string `html_lang_attribute` which can be translated into the language tag which conforms to the specification.
Props SergeyBiryukov.
Fixes#33511.
git-svn-id: https://develop.svn.wordpress.org/trunk@36802 602fd350-edb4-49c9-b593-d223f7449a82
Fixes issue where `wptexturize` and other filters fail to apply when previewing changes via `postMessage` transport.
See #27355.
Fixes#33738.
git-svn-id: https://develop.svn.wordpress.org/trunk@36797 602fd350-edb4-49c9-b593-d223f7449a82
Removes overly-zealous filtering of autofocus panels, sections, and controls which are unrecognized or for which the user doesn't have the capability to focus (in which case it would no-op anyway). Also defers autofocus logic until instances are created, even after initial `ready` event. This ensures that autofocus can apply for any panels, sections, or controls that get created via the loaded preview.
See #28650.
Fixes#36018.
git-svn-id: https://develop.svn.wordpress.org/trunk@36796 602fd350-edb4-49c9-b593-d223f7449a82
- Fix running wpLink without tinymce.js and the TinyMCE plugin without wplink.js.
- Do not show the Advanced button in the inline link dialog when wpLink is not loaded.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36777 602fd350-edb4-49c9-b593-d223f7449a82
A `temp` control is instantiated when `WP_Customize_Manager:: render_control_templates()` is called. This control needs to explicitly specify an empty settings array to avoid trying to use a `temp` setting which won't exist.
See #35926.
See #29572.
git-svn-id: https://develop.svn.wordpress.org/trunk@36776 602fd350-edb4-49c9-b593-d223f7449a82
- Add description of the new patterns to the Shortcuts help modal.
- Fix the layout a bit and make the patterns in two columns.
- Disable the `textpatterns` plugin in IE < 9.
See #33300.
git-svn-id: https://develop.svn.wordpress.org/trunk@36761 602fd350-edb4-49c9-b593-d223f7449a82
- Fix in IE (again). Remove setting/getting placeholders, pass the link node instead.
- In the inline dialog: when the selected text looks like URL or email, pre-fill the URL field with it (same as in the modal).
- Fix setting the name of the main button in the modal: Add Link or Update.
- In the modal when clicking Update remove the link if the URL field is empty. That matches the inline dialog behaviour. Otherwise the modal remains open, nothing happens when clicking the Update button there.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36747 602fd350-edb4-49c9-b593-d223f7449a82
- Fix applying the changes when pressing the Enter key in Firefox. No longer inserts new paragraph in the editor.
- Fix empty check when getting text from the dialog.
- Always focus the URL field when opening the dialog.
- Add back the keydown events in the modal.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36743 602fd350-edb4-49c9-b593-d223f7449a82
When an array of parameters is passed to `do_action|apply_filters_ref_array`, parameters should be documented as individuals instead of as part of the whole.
Props sudar.
Fixes#35962.
git-svn-id: https://develop.svn.wordpress.org/trunk@36735 602fd350-edb4-49c9-b593-d223f7449a82
- Make sure the inline dialog is not showing under the advanced modal.
- Fix checking if the link node contains text.
- Fix undo levels so all actions can be undone and redone.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36716 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a bug in Firefox where assets inside the iframe aren't being displayed because they have no computed style.
See #35894.
git-svn-id: https://develop.svn.wordpress.org/trunk@36708 602fd350-edb4-49c9-b593-d223f7449a82
Includes a cross reference from the DocBlock for `wp_get_current_user()`, which itself is pluggable, but the new internal function is not.
See #19615. See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@36705 602fd350-edb4-49c9-b593-d223f7449a82
- Reset the inline dialog when canceling the advanced modal. If there is a link it should be on the first stage: follow/preview link.
- Fix tabbing in the inline edit dialog.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36703 602fd350-edb4-49c9-b593-d223f7449a82
- Resamples and sharpens larger images before resize.
- Uses imagick::FILTER_TRIANGLE for a smoother resize.
- Introduces `WP_Image_Editor_Imagick::thumbnail_image()` protected method to efficiently resize images. Similar to the functionality of Imagick's `thumbnailImage()`.
- Introduces `WP_Image_Editor_Imagick::strip_meta()` protected method and `image_strip_meta` filter that, by default, strip image profiles to reduce file size, while leaving color profiles intact.
See: #33642, #30402, #28634.
Props: joemcgill, dnewton, mikeschroder.
git-svn-id: https://develop.svn.wordpress.org/trunk@36700 602fd350-edb4-49c9-b593-d223f7449a82
This broke embeds. Needs a better solution to also make sure all queries from the REST API aren't broken.
see #35907.
git-svn-id: https://develop.svn.wordpress.org/trunk@36699 602fd350-edb4-49c9-b593-d223f7449a82
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/
Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland.
See #33755.
git-svn-id: https://develop.svn.wordpress.org/trunk@36698 602fd350-edb4-49c9-b593-d223f7449a82
Splits wp-includes/embed-template.php, introduced in 4.4, into five new templates that can be individually overridden by themes:
* embed.php
* embed-404.php
* embed-content.php
* header-embed.php
* footer-embed.php
Also introduces a new template tag for outputting the site title, `the_embed_site_title()`.
The five new templates live in theme-compat, allowing for graceful fallbacks should themes prefer not to override any or all of them.
Props swissspidy, imath, ocean90, DrewAPicture.
See #34561.
git-svn-id: https://develop.svn.wordpress.org/trunk@36693 602fd350-edb4-49c9-b593-d223f7449a82
When querying for terms in hierarchical taxonomies, `get_terms()` initially
queries for all matching terms, and then trims the located results based on the
`$number` and `$offset` arguments passed to the function. See #8832. However,
a flaw in the original logic meant that results were failing to be trimmed
properly in cases where `$offset` exceeds the total number of matching terms;
in these cases, we should force an empty array.
Props danielbachhuber.
Fixes#35935.
git-svn-id: https://develop.svn.wordpress.org/trunk@36691 602fd350-edb4-49c9-b593-d223f7449a82
* Improves parity between partials and controls. A partial or control can be settingless if instantiated with `settings` param as empty array (otherwise, if null, then the partial/control ID is used).
* Eliminate need to create dummy settings that serve no purpose except to place a control in the UI.
* Removes dummy settings for `create_new_menu` and `new_menu_name`.
* Introduces `WP_Customize_Control::$capability` and `WP_Customize_Partial::$capability`, and if set checks them in the respective `check_capabilities()` methods.
* Prevents PHP fatal error from happening when non-existing settings are provided to control: "Call to a member function `check_capabilities()` on a non-object".
* Fixes issue where nav menu items and widgets were no longer working with selective refresh because cap check was failing.
See #27355.
Fixes#35926.
git-svn-id: https://develop.svn.wordpress.org/trunk@36689 602fd350-edb4-49c9-b593-d223f7449a82
- Makes the list of comments a list
- Always displays the title of the post the comment relates to, linked to the post itself and no more to the Edit screen
- Headings: changes the visible one in "Recent Comments" and adds a hidden "View more comments" heading before the views links
- Adds the pending status indicator to Pingbacks and Trackbacks
Props rachelbaker, afercia.
Fixes#35392.
git-svn-id: https://develop.svn.wordpress.org/trunk@36683 602fd350-edb4-49c9-b593-d223f7449a82
* Use the domain and path combination from `wp_blogs` when displaying the site address for the main site.\
* Update the text from "Site URL" to "Site Address (URL)" for all sites in `site-info.php` to better align with how we refer to this in single site.
Props flixos90, rachelbaker.
Fixes#35632.
git-svn-id: https://develop.svn.wordpress.org/trunk@36682 602fd350-edb4-49c9-b593-d223f7449a82
To prevent inconsistent data across sites in a network the new email address is now stored in usermeta. Adds visual feedback for the case when an update has failed.
All existing options will be removed on a database upgrade.
Props MikeHansenMe, kovshenin, jeremyfelt, ocean90.
Fixes#23358.
git-svn-id: https://develop.svn.wordpress.org/trunk@36679 602fd350-edb4-49c9-b593-d223f7449a82
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36677 602fd350-edb4-49c9-b593-d223f7449a82
This new filter can be used in conjunction with the `customize_nav_menu_available_items` and `customize_nav_menu_available_item_types` filters.
Props TimothyBlynJacobs, westonruter.
Fixes#34947.
git-svn-id: https://develop.svn.wordpress.org/trunk@36676 602fd350-edb4-49c9-b593-d223f7449a82