This changeset removes the bulk action checkboxes when there is no menu item to select.
Follow-up to [51006], [51539].
Props oglekler, krishaweb, costdev, Boniu91, hugodevos, audrasjb.
Fixes#54799.
See #21603, #53654.
git-svn-id: https://develop.svn.wordpress.org/trunk@54316 602fd350-edb4-49c9-b593-d223f7449a82
Verify that the `resized` property exists on a video in the playlist before attempting to read it. Prevent a TypeError from being thrown and breaking the playlist if a video type requires native video support.
Props afercia, here.
Fixes#47513.
git-svn-id: https://develop.svn.wordpress.org/trunk@54279 602fd350-edb4-49c9-b593-d223f7449a82
When `wp.template()` is called in JavaScript for a template element that does not exist, a very nondescript error message is currently returned (“Uncaught TypeError: Cannot read property `replace` of `undefined`”).
This updates adds a check for this scenario and a new “Template not found” error is now thrown instead.
Props joehoyle, noisysocks, hilayt24.
Fixes#36631.
git-svn-id: https://develop.svn.wordpress.org/trunk@54241 602fd350-edb4-49c9-b593-d223f7449a82
Change the "Insert from URL" field in the media library to use a placeholder suggesting the `https://` protocol instead of a value attribute with `http://`.
Props Presskopp, adamsilverstein, joyously, thijso, joedolson, costdev.
Fixes#53404.
git-svn-id: https://develop.svn.wordpress.org/trunk@54228 602fd350-edb4-49c9-b593-d223f7449a82
It is obviously more logical and semantic to remove the `hidden` class when the panel is displayed. Plus, it prevents from weird behavior occurring when plugins also use the `hidden` class to hide stuff.
Props grabmedia, SergeyBiryukov, helen, sabernhardt, costdev, audrasjb.
Fixes#27697.
git-svn-id: https://develop.svn.wordpress.org/trunk@54177 602fd350-edb4-49c9-b593-d223f7449a82
In [53164] the `clipboard.js` library was updated to from version 2.0.8 to 2.0.10, and in doing so caused a TypeError JavaScript error to be thrown when the copy button for debug information was used.
With the update, the `clipboard.js` library introduced an enhancement to its `.copy()` API, which now removes the fake DOM element used for copying content, which Site Health previously had to remove manually.
As this fake DOM element is now removed automatically, the copy function within the debug information screen can rely on the library performing the removal, instead of WordPress needing to do so manually.
Props hiren1094, costdev.
Fixes#56515.
git-svn-id: https://develop.svn.wordpress.org/trunk@54089 602fd350-edb4-49c9-b593-d223f7449a82
The Site Health Status screen groups issues into the categories `good`, `recommended`, and `critical` when displaying them to the end user.
Initially, this screen would show `0 critical issues` while the checks were being performed, and then hide the group if no issues were discovered after all checks had completed, this not being an ideal user experience, as it is a better experience to show areas that have content, instead of hiding them after the fact.
This change makes the groups hidden by default, and also changes the logic to see if a group should be displayed when an item is added to the list (as opposed to the previous approach which only did this check once every single test had completed).
Props DavidAnderson, palmiak.
Fixes#47222.
git-svn-id: https://develop.svn.wordpress.org/trunk@53950 602fd350-edb4-49c9-b593-d223f7449a82
Change the notification announced when a custom structure is removed. Previously, the notification incorrectly indicated that the structure was added for both actions. This changes the notification to correctly announce removals when structures are removed.
Props joedolson, kebbet, SergeyBiryukov.
Fixes#56230.
git-svn-id: https://develop.svn.wordpress.org/trunk@53911 602fd350-edb4-49c9-b593-d223f7449a82
This better matches the tab name and changes the associated action hooks to:
* `install_themes_pre_block-themes` (fires before the tab is rendered)
* `install_themes_block-themes` (fires at the top the tab)
While including a mix of underscores and hyphens in a hook name is not quite typical for core, it does have a precedent and brings more consistency with similar filters on Add Plugin screen:
* `install_plugins_pre_plugin-information`
* `install_plugins_plugin-information`
Follow-up to [53906], [53907].
Fixes#56283.
git-svn-id: https://develop.svn.wordpress.org/trunk@53908 602fd350-edb4-49c9-b593-d223f7449a82
Alphabetize the list of possible hook name in `install_themes_pre_*` and `install_themes_*` filters.
Follow-up to [53906].
See #56283.
git-svn-id: https://develop.svn.wordpress.org/trunk@53907 602fd350-edb4-49c9-b593-d223f7449a82
The Theme Directory on wordpress.org recently got updated to show a shortcut for filtering block themes. This changeset adds a "Block Themes" filter when adding a new theme from WordPress administration.
It also introduces two new action hooks: `install_themes_pre_blockthemes` (fires before the tab is rendered) and `install_themes_blockthemes` (fires at the top the tab).
Follow-up to [meta11963].
Props luminuu, audrasjb, SergeyBiryukov, rafiahmedd.
Fixes#56283.
See #meta6330.
git-svn-id: https://develop.svn.wordpress.org/trunk@53906 602fd350-edb4-49c9-b593-d223f7449a82
This ensures special characters like `&` are properly encoded when passed as URL parameter.
Props praful2111, audrasjb, costdev.
Fixes#56339.
git-svn-id: https://develop.svn.wordpress.org/trunk@53844 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds the capability for core media uploads to generate sub sized images in more than a single mime type. The output formats for each mime type can be controlled through a filter. WebP is used as an additional output format for JPEG images by default to improve front end performance.
When generating additional mime types, only images which are smaller than the respective original are retained. By default, additional mime type images are only generated for the built-in core image sizes and any custom sizes that have opted in.
Image meta is updated with a new 'sources' array containing file details for each mime type. Each image size in the 'sizes' array also gets a new 'sources' array that contains the image file details for each mime type.
This change also increases image upload retries to accommodate additional image sizes. It also adds a `$mime_type` parameter to the `wp_get_missing_image_subsizes` function and filter.
This change adds three new filters to enable full control of secondary mime image generation and output:
* A new filter `wp_image_sizes_with_additional_mime_type_support` that filters the sizes that support secondary mime type output. Developers can use this to control the output of additional mime type sub-sized images on a per size basis.
* A new filter `wp_upload_image_mime_transforms` that filters the output mime types for a given input mime type. Developers can use this to control generation of additional mime types for a given input mime type or even override the original mime type.
* A new filter `wp_content_image_mimes` which controls image mime type output selection and order for frontend content. Developers can use this to control the mime type output preference order for content images. Content images inserted from the media library will use the available image versions based on the order from this filter.
Thanks to the many contributors who helped develop, test and give feedback on this feature.
A haiku to summarize:
Upload a JPEG
Images of all sizes
Output as WebPs
Props flixos90, MatthiasReinholz, studiolxv, markhowellsmead, eatingrules, pbiron, mukesh27, joegrainger, mehulkaklotar, tweetythierry, akshitsethi, peterwilsoncc, eugenemanuilov, mitogh, shetheliving, clarkeemily, codekraft, mikeschroder, clorith, kasparsd, spacedmonkey, trevorpfromsandee, jb510, scofennellgmailcom, seedsca, cagsmith, karinclimber, dainemawer, baxbridge, grapplerulrich, sobatkras, chynnabenton, tonylocalword, barneydavey, kwillmorth, garymatthews919, olliejones, imarkinteractive, jeffpaul, feastdesignco, webbeetle, masteradhoc.
See #55443.
git-svn-id: https://develop.svn.wordpress.org/trunk@53751 602fd350-edb4-49c9-b593-d223f7449a82
Issues appropriate audible messages via `wp.a11y.speak()` when `ajax-response.js` generates an error via `wp_die()`.
Props afercia, alexstine.
Fixes#54483.
git-svn-id: https://develop.svn.wordpress.org/trunk@53709 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that `.webp` images are properly recognized and displayed in the modal as expected.
Follow-up to [50810], [51227], [52073].
Props ilunabar, graham73may, sabernhardt, mukesh27, SergeyBiryukov.
Fixes#55786.
git-svn-id: https://develop.svn.wordpress.org/trunk@53451 602fd350-edb4-49c9-b593-d223f7449a82
Rename `#inline-edit-legend` to avoid duplicate HTML IDs. These have been renamed `#quick-edit-legend` and `#bulk-edit-legend` for the quick and bulk editors respectively.
This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.
Follow up to [53096].
Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt.
Fixes#55575.
See #35483.
git-svn-id: https://develop.svn.wordpress.org/trunk@53352 602fd350-edb4-49c9-b593-d223f7449a82
Move the conversion of `minimalInterval` to milliseconds to be grouped with the other time conversions from seconds to milliseconds.
This fixes a bug in which the minimal and main intervals were compared after the former had been converted to milliseconds but the latter had not. This could cause the heatbeat interval to blow out to unexpectedly high values if the minimal interval was set.
Props tabrisrp, sabernhardt, SergeyBiryukov, audrasjb.
Fixes#54825.
git-svn-id: https://develop.svn.wordpress.org/trunk@53226 602fd350-edb4-49c9-b593-d223f7449a82
[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