[52953] added HTML5 input types to the form reset after a tag is created. The selector was a bit too greedy, causing `button` types to have their values reset also.
This change updates the jQuery selector to exclude `button`, `submit`, and `reset` input types from the form reset.
Follow-up to [52953].
Props peterwilsoncc.
Fixes#48030.
git-svn-id: https://develop.svn.wordpress.org/trunk@53168 602fd350-edb4-49c9-b593-d223f7449a82
This version introduces support for the latest Emoji added in Emoji 14.
"Insert witty comment newly supported emoji."
Props kraftbj, desrosj, dd32, milana_cap.
Fixes#55395.
git-svn-id: https://develop.svn.wordpress.org/trunk@53150 602fd350-edb4-49c9-b593-d223f7449a82
Update the item count, "N items", on the plugin list when a plugin is deleted. This matches the live updating of various other counts on the screen.
Props mitogh, costdev, azouamauriac, swissspidy, kebbet.
Fixes#55316.
git-svn-id: https://develop.svn.wordpress.org/trunk@53124 602fd350-edb4-49c9-b593-d223f7449a82
Replace hard coded check for the term creation page in `_enqueues/lib/ajax-response.js` with a check for a notification to display in the AJAX response data.
Follow up to [52170], [52672].
Props SergeyBiryukov, ryokuhi, johnregan3, sabernhardt, joedolson.
Fixes#55078.
See #54955.
git-svn-id: https://develop.svn.wordpress.org/trunk@53123 602fd350-edb4-49c9-b593-d223f7449a82
A JavaScript race condition was throwing an error and preventing passwords from being set if the zxcvbn library loaded earlier than expected. This could prevent the installation of WordPress or the creation/updating of user accounts.
Props adi64bit, afragen, agepcom, audrasjb, bedas, brookedot, cbigler, charlyox, costdev, desrosj, drago239, Eric3D, espiat, jadpm, jrf, justinahinon, kubiq, lkraav, michelangelovandam, mirkolofio, mkox, peterwilsoncc, poena, sbossarte, sebastienserre, SergeyBiryukov, Synchro, thomasplevy, walbo, waterfire, wpmakenorg.
Fixes#53974, #52086.
git-svn-id: https://develop.svn.wordpress.org/trunk@53122 602fd350-edb4-49c9-b593-d223f7449a82
Fix the quick and bulk edit forms to set an appropriate initial focus, use native HTML controls for all interactions, and set appropriate labels for controls. Improve the semantics of HTML wrappers so lists are enumerable by screen readers.
Props afercia, azaozz.
Fixes#35483.
git-svn-id: https://develop.svn.wordpress.org/trunk@53096 602fd350-edb4-49c9-b593-d223f7449a82
On the classic editor, limit the search of tags and non-hierarchical taxonomies to twenty results. This in turn prevents an unbounded database query via an AJAX request.
Props pikamander2, costdev, azouamauriac, audrasjb.
Fixes#55052.
git-svn-id: https://develop.svn.wordpress.org/trunk@53089 602fd350-edb4-49c9-b593-d223f7449a82
Display an error message to users if they attempt to create a term without a name via the admin-ajax `add-tag` action. This improves the accessibility of the screen by avoiding the use of color alone to indicate an error.
Props conner_bw, birgire, afercia.
Fixes#47018.
git-svn-id: https://develop.svn.wordpress.org/trunk@53088 602fd350-edb4-49c9-b593-d223f7449a82
This change improves the description of the "select all" shortcut for Mac users in Permalink Settings screen.
Props Valer1e, ajoah, audrasjb, SergeyBiryukov.
Fixes#54633.
git-svn-id: https://develop.svn.wordpress.org/trunk@53047 602fd350-edb4-49c9-b593-d223f7449a82
This change adds an information notice to the customizer when a block theme is active and the customizer is also available (for example when a plugin activates it), to encourage people to use the Site Editor for the best full site customization experience.
Props ironprogrammer, antonvlasenko, Clorith, audrasjb, psmits1567, tobifjellner, costdev, webcommsat.
Fixes#54939.
git-svn-id: https://develop.svn.wordpress.org/trunk@53024 602fd350-edb4-49c9-b593-d223f7449a82
When adding a new tag, the form is reset by clearing values for `input[type=text]` and `textarea`s. However, the reset doesn't account for any HTML5 input types, like `number` or `url`, that may be added by plugins or themes.
This change updates the form resetting jQuery to clear any values from `input` types that are not hidden and neither a `checkbox` nor `radio` type.
Props stevegrunwell.
Fixes#48030.
git-svn-id: https://develop.svn.wordpress.org/trunk@52953 602fd350-edb4-49c9-b593-d223f7449a82
When using an Input Method Editor(IME), pressing escape to perform actions in the IME is common. However, if this was done while replying to a comment, the "close on escape" feature was also triggered which cleared the current textarea and closed it.
This change checks if an IME is in use by binding the `compositionstart` event to the reply text box and setting a flag if it's triggered. The "close on escape" feature will now only be triggered if this new flag is not set after typing a reply.
Props BettyJJ, sabernhardt, alexstine, konradyoast, audrasjb, rafiahmedd, afercia.
Fixes#54548.
git-svn-id: https://develop.svn.wordpress.org/trunk@52951 602fd350-edb4-49c9-b593-d223f7449a82
Previously, a button was added to the modal view for a single media item in the "grid" view to copy the file URL to the user's clipboard. This change adds a similar function to the "list" view for each media item.
Follow-up to [48232].
Props pbiron, ravipatel, alexstine, afercia.
Fixes#54426.
git-svn-id: https://develop.svn.wordpress.org/trunk@52842 602fd350-edb4-49c9-b593-d223f7449a82
Prevent the Customizer/Live Preview button from showing for installed block themes when on the theme installation page.
Props antonvlasenko, costdev, ironprogrammer.
Fixes#54878.
git-svn-id: https://develop.svn.wordpress.org/trunk@52819 602fd350-edb4-49c9-b593-d223f7449a82
This changeset capitalizes the letter of keyboard shortcuts and replaces `CTRL` with `Ctrl`, for better consistency.
Props Presskopp, sabernhardt, joyously, SergeyBiryukov, audrasjb.
Fixes#40582.
git-svn-id: https://develop.svn.wordpress.org/trunk@52808 602fd350-edb4-49c9-b593-d223f7449a82
Change the mirroring property verification method to be consistent with other usages across models and attachments, since we don't care whether it's assigned directly on inherited.
Props MMDeveloper, SergeyBiryukov.
Fixes#53856.
git-svn-id: https://develop.svn.wordpress.org/trunk@52806 602fd350-edb4-49c9-b593-d223f7449a82
Keyboard handlers were prevented from navigating attachments in input fields, but the key handler excluded readonly fields, like the media URL field. This could prevent exploring the URL using the keyboard.
Props jrivett, joemcgill, afercia.
Fixes#43202.
git-svn-id: https://develop.svn.wordpress.org/trunk@52792 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the attachment was silently removed from the grid but reappeared after a page reload.
Follow-up to [22869].
Props kapilpaul, costdev, mukesh27, azouamauriac, SergeyBiryukov.
Fixes#55158.
git-svn-id: https://develop.svn.wordpress.org/trunk@52725 602fd350-edb4-49c9-b593-d223f7449a82
Prevent blank notices from appearing when adding custom fields or terms in the post editor.
Props gadhiyaravi, Boniu91, ravipatel, sabernhardt.
Fixes#54955. See #42937.
git-svn-id: https://develop.svn.wordpress.org/trunk@52672 602fd350-edb4-49c9-b593-d223f7449a82
Checks that the media collection has a mirroring property before accessing the property in media views.
Props MMDeveloper, mukesh27.
Fixes#53856.
git-svn-id: https://develop.svn.wordpress.org/trunk@52671 602fd350-edb4-49c9-b593-d223f7449a82
The NPM package for jQuery Color was updated in [50543], but a bundled version still existed within core.
This removes that bundled version, in favor of expanding the Grunt build steps to include the package from NPM instead.
Fixes#55016. See #51405.
git-svn-id: https://develop.svn.wordpress.org/trunk@52657 602fd350-edb4-49c9-b593-d223f7449a82
Some regressions happened alongside the release of jQuery UI 1.13.0, this brings the fixes from 1.13.1 downstream to WordPress, notably relating to Widget, Autocomplete, Sortable, and Tooltip modules.
See the changelog between version 1.13.0 and 1.13.1 at https://github.com/jquery/jquery-ui/compare/1.13.0...1.13.1
Props blogaid, linux4me2, mgol.
Fixes#54902.
git-svn-id: https://develop.svn.wordpress.org/trunk@52648 602fd350-edb4-49c9-b593-d223f7449a82
Reverting changeset due to reported issue of menu being hidden after clicking on certain mobile devices.
Props dhusakovic, audrasjb, SergeyBiryukov, costdev, joedolson.
See #54837, #53587.
git-svn-id: https://develop.svn.wordpress.org/trunk@52591 602fd350-edb4-49c9-b593-d223f7449a82
During password resets, the 'Generate Password" button has a `aria-expanded="true"` attribute, but the button itself does not expand or collapse anything. This change adds a `skip-aria-expanded` class to the button which is referenced in JavaScript to skip updating the `aria-expanded` attribute on the button itself when clicked.
This change also resets the `aria-expanded` attribute to `false` for the parent form after it's submitted.
Props alexstine, johnjamesjacoby, sabernhardt.
Fixes#54538.
git-svn-id: https://develop.svn.wordpress.org/trunk@52450 602fd350-edb4-49c9-b593-d223f7449a82
[52232] relocated the Theme Editor menu item from Appearance to Tools for block themes. This commit relocates the Plugin Editor menu item from Plugins to Tools for block themes for a consistent workflow.
Both the Theme Editor and Plugin Editor menu items are renamed to "Theme File Editor" and "Plugin File Editor" respectively. Why? To better identify their purpose, i.e. to directly edit the code in the theme or plugin files. The rename is not limited to only block themes.
Follow-up to [52232].
Props poena, annezazu, audrasjb, clorith, courane01, costdev, dryanpress, desrosj, hellofromTonya, ipstenu, jameskoster, joen, johnbillion, joyously, manfcarlo, marybaum, pbiron, SergeyBiryukov, walbo, youknowriad.
Fixes#54382.
git-svn-id: https://develop.svn.wordpress.org/trunk@52406 602fd350-edb4-49c9-b593-d223f7449a82
In [50829] infinite scrolling was removed from the Media Library and modal which introduced unintended behavior for featured images where only the selected image shows when opening the library. This change reverts only the logic that caused this and applies a proper fix when opening the library.
Props benitolopez, hellofromTonya, joedolson, peterwilsoncc, circlecube, danielbachhuber, PieWP, sabernhardt, szaqal21, dariak, sergeybiryukov.
Fixes#53765.
git-svn-id: https://develop.svn.wordpress.org/trunk@52384 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [52287] which added an undefined variable. The variable should have been the global `wp.media.view.settings.infiniteScrolling`. This commit brings that global setting into each of the functions and renames the variable using camelCase to comply with JS coding standards.
Follow-up to [52287].
Props SergeyBiryukov.
Fixes#53765.
git-svn-id: https://develop.svn.wordpress.org/trunk@52288 602fd350-edb4-49c9-b593-d223f7449a82
Follow-up to [52167], which partially fixed a bug introduced in [50829] that caused media modal to only load the selected image.
This commit adds additional checks to ensure infinite scroll is disabled.
Follow-up to [50829], [52167].
Props dariak, joedolson, szaqal21.
Fixes#53765.
git-svn-id: https://develop.svn.wordpress.org/trunk@52287 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the input for changing the permalink of a post does not have a label in the Classic Editor. This change adds a visually hidden label. It also makes sure browsers do not run spellcheck on the input field.
Props sabernhardt.
Fixes#53725.
git-svn-id: https://develop.svn.wordpress.org/trunk@52225 602fd350-edb4-49c9-b593-d223f7449a82
Although auto-focusing form fields can be arguable in some cases, it makes sense when there is a very specific task to accomplish and when there is no relevant content before the auto-focused field.
This change brings consistency between various forms generated by `wp-login.php`.
Props afercia, donmhico, sabernhardt.
Fixes#40302.
git-svn-id: https://develop.svn.wordpress.org/trunk@52193 602fd350-edb4-49c9-b593-d223f7449a82
Based on follow-up research, this change was never necessary in order to use e2e tests in the media library uploader. Additionally, it created several complicated side effects. Without significant benefit, it's not valuable to pursue the change further.
Follow up to [52059].
See #54168, #54411.
Fixes#54168.
git-svn-id: https://develop.svn.wordpress.org/trunk@52171 602fd350-edb4-49c9-b593-d223f7449a82
Display notice and announce to screen readers when a new term is added.
Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes#42937.
git-svn-id: https://develop.svn.wordpress.org/trunk@52170 602fd350-edb4-49c9-b593-d223f7449a82
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.
Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes#42937.
git-svn-id: https://develop.svn.wordpress.org/trunk@52168 602fd350-edb4-49c9-b593-d223f7449a82
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.
Props benitolopez, hellofromTonya, peterwilsoncc, danielbachhuber, PieWP, sabernhardt, szaqal21.
Fixes#53765.
git-svn-id: https://develop.svn.wordpress.org/trunk@52167 602fd350-edb4-49c9-b593-d223f7449a82
Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu.
Props joedolson, costdev, hellofromTonya.
Fixes#53840.
git-svn-id: https://develop.svn.wordpress.org/trunk@52166 602fd350-edb4-49c9-b593-d223f7449a82
Update the hidden screen-reader-text update count in the adminbar when updates are run on the plugin or theme screens.
Props pento, paulschreiber, adamsilverstein, afercia, SergeyBiryukov, sabernhardt.
Fixes#29022.
git-svn-id: https://develop.svn.wordpress.org/trunk@52139 602fd350-edb4-49c9-b593-d223f7449a82
* Prevent loading `wp-embed` script unconditionally on every page in favor of conditionally enqueueing when a post embed is detected. The `wp-embed` script is also explicitly marked as being in the footer group. Sites which currently disable post embed scripts from being enqueued via `remove_action( 'wp_head', 'wp_oembed_add_host_js' )` will continue to do so.
* Send a `ready` message from the host page to each post embed window in case the `iframe` loads before the `wp-embed` script does. When the `ready` message is received by the post embed window, it sends the same `height` message as it sends when it loads.
* Eliminate use of `grunt-include` to inject emoji script and the post embed script. Instead obtain the script contents via `file_get_contents()` (as is done elsewhere in core) and utilize `wp_print_inline_script_tag()`/`wp_get_inline_script_tag()` to construct out the script. This simplifies the logic and allows the running of src without `SCRIPT_DEBUG` enabled.
* For the embed code that users are provided to copy for embedding outside of WP, add the `secret` on the `blockquote` and `iframe`. This ensures the `blockquote` will be hidden when the `iframe` loads. The embed code in question is accessed here via `get_post_embed_html()`.
Props westonruter, swissspidy, pento, flixos90, ocean90.
Fixes#44632, #44306.
git-svn-id: https://develop.svn.wordpress.org/trunk@52132 602fd350-edb4-49c9-b593-d223f7449a82
Add "webp" extension to a media extension check, fixing an issue where the last used media
link type was not used for WebP images.
Props almendron, desrosj, kallookoo.
Fixes#53917.
git-svn-id: https://develop.svn.wordpress.org/trunk@52073 602fd350-edb4-49c9-b593-d223f7449a82
Changes the media library upload button to `input type="file"` for better end to end testing capabilities.
Props justinahinon, joedolson, sabernhardt, audrasjb.
Fixes#54168.
git-svn-id: https://develop.svn.wordpress.org/trunk@52059 602fd350-edb4-49c9-b593-d223f7449a82
The latest version includes jQuery 3.x deprecation fixes:
* `$.isArray` → `Array.isArray`
* Event attachment/trigger shorthands → `.on()` and `.trigger()`
For a full list of changes in this update, see the PR on GitHub:
https://github.com/Automattic/Iris/pull/72
Follow-up to [22030], [22033], [22385], [22457], [22697], [22732], [23443], [26334], [30551], [30650], [38931], [50547].
Props Clorith, mattwiebe, Cybr.
Fixes#54224.
git-svn-id: https://develop.svn.wordpress.org/trunk@52006 602fd350-edb4-49c9-b593-d223f7449a82
When a child panel is open, `wp.customize.panel('parent_panel').focus()` (e.g. `'parent_parent'` might be `'nav_menus'`) collapses the child panel(s) to show the parent panel.
Follow-up to [30102], [31920], [38648].
Props celloexpressions, costdev, dlh, hareesh-pillai, hellofromTonya, westonruter, wpweaver.
Fixes#34436.
git-svn-id: https://develop.svn.wordpress.org/trunk@52003 602fd350-edb4-49c9-b593-d223f7449a82