Include the asset version of JavaScript and CSS files when generating the ETag for concatenated assets in `load-scripts.php` and `load-styles.php`. This ensures the ETag is updated as script versions change (for example editor package updates) rather than only when the WordPress version changes.
The `W\` prefix is added to the generated ETag to allow for CDNs and proxy servers modifying the script to add or improve the compression algorithm.
Props azaozz, dav4, ironprogrammer, johnbillion, kkmuffme, monzuralam, peterwilsoncc, sergeybiryukov.
Fixes#58433.
Built from https://develop.svn.wordpress.org/trunk@57943
git-svn-id: http://core.svn.wordpress.org/trunk@57440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The value of `start` is not fully supported by Opera Mini which has 1.01% usage. There is no material change in functionality with this change.
Follow-up to [55919].
Props davidbaumwald, sabernhardt, khokansardar, devsahadat.
Fixes#60876.
Built from https://develop.svn.wordpress.org/trunk@57933
git-svn-id: http://core.svn.wordpress.org/trunk@57434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since WordPress 6.5, the minimum supported version of MySQL and MariaDB is 5.5.5. This means all supported database servers now support the `utf8mb4` character set and therefore the conditional logic for this is no longer necessary.
Props l1nuxjedi, craigfrancis, OllieJones, johnbillion
Fixes#60096
Built from https://develop.svn.wordpress.org/trunk@57926
git-svn-id: http://core.svn.wordpress.org/trunk@57427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset put back the context parameter of the "Patterns" string which was previously removed to fix a translation issue without introducing a string change during WP 6.5 string freeze period.
Follow-up to [57864].
Props kebbet, narenin, nestea29950.
Fixes#60827.
Built from https://develop.svn.wordpress.org/trunk@57887
git-svn-id: http://core.svn.wordpress.org/trunk@57388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset updates a translation string to ensure the "Patterns" menu item introduced in [57543] is translatable.
This quickfix simply removes the erroneous `context` parameter so no new string is introduced during WP 6.5 string freeze period. A follow-up changeset will be needed to replace the current `__()` function with `_x()` and put back the `context` parameter.
Follow-up to [57543].
Props jdy68, audrasjb, kebbet, swissspidy.
Fixes#60825.
Built from https://develop.svn.wordpress.org/trunk@57864
git-svn-id: http://core.svn.wordpress.org/trunk@57365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes the "Pattern overrides" section from features.
Also updates the field guide link, this link should redirect correctly once the post is published.
Follow-up to [57715], [57767].
Props ryelle, benjamin_zekavica.
See #60303.
Built from https://develop.svn.wordpress.org/trunk@57809
git-svn-id: http://core.svn.wordpress.org/trunk@57310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes several refinements to the various error messages displayed throughout the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.
Props costdev, swissspidy, afragen, huzaifaalmesbah, knutsp.
Fixes#60465.
Built from https://develop.svn.wordpress.org/trunk@57770
git-svn-id: http://core.svn.wordpress.org/trunk@57271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes several refinements to the various notices displayed in the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.
Props costdev, joedolson, afragen, swissspidy, peterwilsoncc, euthelup.
Fixes#60465.
Built from https://develop.svn.wordpress.org/trunk@57769
git-svn-id: http://core.svn.wordpress.org/trunk@57270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the spacing between media toolbar elements in grid and list view did not match. We now use the same select margin across both views.
Props desrosj, seusmaniqbal, ianbelanger, subrataemfluence, sabernhardt, pooja1210, sumitbagthariya16, shailu25, devmuhib, huzaifaalmesbah, audrasjb.
Fixes#43904.
Built from https://develop.svn.wordpress.org/trunk@57764
git-svn-id: http://core.svn.wordpress.org/trunk@57265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add parity between site icon, custom header, and default image crop behaviors. [53027] fixed a bug where alt text and caption were not copied on custom headers, but did not apply that change in any other context.
Deprecate the `create_attachment_object` method in the `Wp_Site_Icon` and `Custom_Image_Header` classes and replace that functionality with the new function `wp_copy_parent_attachment_properties()` to improve consistency.
Props afercia, rcreators, jorbin, joedolson, huzaifaalmesbah, shailu25, swissspidy, mukesh27.
Fixes#60524.
Built from https://develop.svn.wordpress.org/trunk@57755
git-svn-id: http://core.svn.wordpress.org/trunk@57256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix missing subitem indicator when menu items in the Customizer are children of parent menu items & add menu item original title to button text. Adds parity with the admin menu editor and fixes a bug where the button text was 'untitled' if the menu item title had not been edited.
Props designsimply, afercia, celloexpressions, kushang78, joedolson, rcreators.
Fixes#32728.
Built from https://develop.svn.wordpress.org/trunk@57746
git-svn-id: http://core.svn.wordpress.org/trunk@57247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When removing a single item from the bulk edit box or when adding more items, the “All” checkboxes at the top and bottom of the posts list table should be properly toggled.
Props hiteshtalpada, oglekler, webcommsat, ugyensupport, chaion07, Toru.
Fixes#59121.
Built from https://develop.svn.wordpress.org/trunk@57745
git-svn-id: http://core.svn.wordpress.org/trunk@57246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introducing the new content & design for the 6.5 About page & related pages. This style is simplified, with no header images, and brings back the illustrations from previous versions for Contribute, Freedoms, and Privacy.
This also includes a fix for heading hierarchy on the Get Involved page.
Props laurlittle, dansoschin, benjamin_zekavica, richtabor, joen, annezazu, swissspidy, marybaum, ryelle, huzaifaalmesbah.
See #60303.
Built from https://develop.svn.wordpress.org/trunk@57715
git-svn-id: http://core.svn.wordpress.org/trunk@57216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes a number of issues, chief among them:
- Updates to the site title are reflected in the preview.
- Improve alt text for preview
- Make string describing site icon more succinct.
- Add inline documentation to JavaScript
Props kebbet, jorbin, swissspidy, afercia, mukesh27, alexstine, jameskoster, andraganescu.
Fixes#54370.
Built from https://develop.svn.wordpress.org/trunk@57713
git-svn-id: http://core.svn.wordpress.org/trunk@57214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes deprecated options that no longer have any effect, and updates the targeted ES version in line with WordPress’ browser support.
This change mostly allows new code to properly use trailing commas, as added by the Prettier formatter.
Future efforts should rather go towards adopting ESLint for code formatting, see #31823.
Props netweb.
Fixes#28236.
Built from https://develop.svn.wordpress.org/trunk@57702
git-svn-id: http://core.svn.wordpress.org/trunk@57203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This fixes a bug introduced by [57129] and [56635] in which deprecating the previous `TEMPLATEPATH` and `STYLESHEETPATH` constants in favor of `get_template_directory()` and `get_stylesheet_directory()` functions caused the active theme template path to change when using `switch_to_blog()`.
This introduces a new function, `wp_set_template_globals()`, which is called during the bootstrap process to store the template paths to new globals values `$wp_template_path` and `$wp_stylesheet_path`. This restores behavior to how things worked prior to [56635] but retains the ability for template values to be reset for better testability.
Related #18298, #60025.
Props joemcgill, flixos90, mukesh27, swissspidy, manfcarlo, metropolis_john, jeremyfelt.
Fixes#60290.
Built from https://develop.svn.wordpress.org/trunk@57685
git-svn-id: http://core.svn.wordpress.org/trunk@57186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This bugfix resolves an issue in `export_wp()` with featured images.
When using Tools > Export and selecting either Posts or Pages (with or without a specific author), the resulting XML file now includes a XML item for each post|page's featured image attachment and its metadata.
Uses same chunking (for performance) and code patterns from existing code in the same file.
Adds a new test class for `export_wp()` with code coverage specific to this bugfix.
Follow-up to [34326], [14444], [6375], [6335].
Props billseymour, nateallen, petitphp, hellofromTonya, duck_, jane, rcain, jghazally, jghazally, smub, batmoo, axwax, creativeslice, dlocc, nacin, wonderboymusic, ganon, SergeyBiryukov, hlashbrooke, chriscct7, fischfood, hifidesign, ankit-k-gupta, 5um17, shailu25, huzaifaalmesbah, mukesh27.
Fixes#17379.
Built from https://develop.svn.wordpress.org/trunk@57681
git-svn-id: http://core.svn.wordpress.org/trunk@57182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the notice for listing dependencies in a plugin card was styled with the CSS `order` properties. This created a mismatch between the visual order and DOM order of elements in the plugin card.
For accessibility, visual order and DOM order must always match when they affect meaning and functionality.
This removes the CSS `order` properties and outputs the dependencies notice later, making the visual and DOM order match. Some unused/empty CSS is also removed.
Follow-up to [57545].
Props afercia, afragen, bosskhj, huzaifaalmesbah, mukesh27, costdev.
Fixes#60488.
Built from https://develop.svn.wordpress.org/trunk@57679
git-svn-id: http://core.svn.wordpress.org/trunk@57180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Automatic deactivation of dependents with unmet dependencies requires a write operation to the database. This was performed during Core's bootstrap, which risked the database and cache becoming out-of-sync on sites with heavy traffic.
No longer loading plugins that have unmet requirements has not had a final approach decided core-wide, and is still in discussion in #60491 to be handled in a future release.
The `plugin_data` option, used to persistently store plugin data for detecting unmet dependencies during Core's bootstrap, is no longer needed.
Follow-up to [57545], [57592], [57606], [57617].
Props dd32, azaozz, swissspidy, desrosj, afragen, pbiron, zunaid321, costdev.
Fixes#60457. See #60491, #60510, #60518.
Built from https://develop.svn.wordpress.org/trunk@57658
git-svn-id: http://core.svn.wordpress.org/trunk@57159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update JavaScript files for tag suggestions and the TinyMCE link plugin to use client side translations. This allows for `_n()` to be used for strings requiring singular and plural versions in which the correct form is only known client side.
Props audrasjb, chaion07, costdev, hellofromtonya, johnbillion, marybaum, nicolefurlan, oglekler, rebasaurus, rsiddharth, sergeybiryukov, shaampk1, shahariaazam, swissspidy, tobifjellner.
Fixes#48244.
Built from https://develop.svn.wordpress.org/trunk@57654
git-svn-id: http://core.svn.wordpress.org/trunk@57155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The intended behaviour of Plugin Dependencies is that dependencies cannot be deleted until their dependents are deleted.
While the 'Delete' link was removed from the plugin row, the bulk actions checkbox remained enabled, allowing for deletion of dependencies through bulk actions.
This was unintended behaviour and the bulk actions checkbox is now disabled as intended.
Follow-up to [57545].
Props johnbillion, afragen, knutsp, huzaifaalmesbah, mukesh27, costdev.
Fixes#60471.
Built from https://develop.svn.wordpress.org/trunk@57620
git-svn-id: http://core.svn.wordpress.org/trunk@57121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Improve buttons flow on small viewports, taking longer translations into account.
* Make `alt` attributes translatable.
* Remove unused `id` attributes.
Follow-up to [57602].
Props kebbet, afercia, mukesh27.
See #54370.
Built from https://develop.svn.wordpress.org/trunk@57618
git-svn-id: http://core.svn.wordpress.org/trunk@57119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, the `setCardButtonStatus()` JS function was called when a card had the ID 'plugin-information-footer'. However, the card will only exist on plugin install pages. This caused a failure when updating plugins from the plugin row on `plugins.php` due to an undefined `$card` variable.
This adds a guard to ensure that the current page is one of the plugin install pages, preventing the error and allowing plugin updates from the `plugins.php` rows to work as expected.
Follow-up to [57545].
Props Presskopp, huzaifaalmesbah, krupajnanda, hellofromTonya, krupalpanchal, costdev.
Fixes#60521.
Built from https://develop.svn.wordpress.org/trunk@57615
git-svn-id: http://core.svn.wordpress.org/trunk@57116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This restores the site icon setting to its original home on the settings page where it lives with the title and tagline.
The base for this code was originally added in [32994] and then removed in [33329]. The majority of the modification to that version are to remove the no-js pieces and make the workflow completely inline rather than putting the cropping on a separate page.
Additionally, since image crops rely on the ability to upload an image, this setting is gated by the `upload_files` capability.
Follow-up to: [32994], [33329].
Props jorbin, audrasjb, mukesh27, joedolson, afercia, kebbet, swissspidy, obenland, jameskoster, kjellr, andraganescu, stacimc, mikeschroder, h71, krupajnanda, huzaifaalmesbah.
Fixes#54370.
See #16434.
Built from https://develop.svn.wordpress.org/trunk@57602
git-svn-id: http://core.svn.wordpress.org/trunk@57103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On upgrade, the `$_old_files` array is used to cleanup any files that exist in a previous version of core but are no longer present in the current version. Sometimes, an entire directory should be removed. In the past, when a parent directory was included in the array, subfiles were also included for good measure.
However, the code that removes the old files uses `$wp_filesystem->delete()` with the `$recursive` parameter set to `true`. With this setup, individual subfiles are not required to be individually listed when their parent directory is already included in the `$_old_files` array.
This commit removes all individual subfiles from the `$_old_files` array when their parent directory is already included.
Props SergeyBiryukov, mhshohel, pbiron, oglekler.
Fixes#58995.
Built from https://develop.svn.wordpress.org/trunk@57598
git-svn-id: http://core.svn.wordpress.org/trunk@57099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[57545] introduced the Plugin Dependencies feature, which contains a new `plugin_data` option.
Previously, the `plugin_data` option was being updated during bootstrap and in `get_plugins()`, causing an error when using the install script as the options database table does not yet exist, and also risked an "out of sync" issue between the database and the cache on websites with heavy traffic.
This removes the calls to `update_option()` during Core's bootstrap, and guards the call in `get_plugins()` to ensure that it doesn't run when WordPress is installing.
Follow-up to [57545].
Props desrosj, swisspidy, huzaifaalmesbah, afragen, dd32, azaozz, costdev.
Fixes#60461. See #60457, #60491.
Built from https://develop.svn.wordpress.org/trunk@57592
git-svn-id: http://core.svn.wordpress.org/trunk@57093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Pre-fill category fields in the Quick/Bulk Edit form with their current status.
When bulk editing, if only some of the selected items are in a given category, the category's checkbox will display a line to indicate an indeterminate status.
Originally committed in [56172], but reverted due to a bug that removed all categories. Updated commit fixes the bug, adds unit tests, and improves the accessibility of the indeterminate state checkboxes.
Props pavelevap, scribu, chasedsiedu, helen, joshcanhelp, ubernaut, Cyberchicken, laumindproductscomau, SergeyBiryukov, Marcoevich, tomybyte, thinkluke, virtality-marketing-solutions, Michalooki, dmsnell, itecrs, pannelars, WHSajid, samba45, Mte90, johnbillion, tomluckies, soulseekah, francina, oglekler, ajmcfadyen, mukesh27, costdev, hellofromTonya, peterwilsoncc, joedolson, pbiron, oglekler, webcommsat, jorbin, ajmcfadyen, huzaifaalmesbah.
Fixes#11302.
Built from https://develop.svn.wordpress.org/trunk@57580
git-svn-id: http://core.svn.wordpress.org/trunk@57081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace the `table` element used to present color palette selection in the user profile screen with generic elements. The extra semantics of a table are at best unhelpful and have some potential to great extraneous verbosity for screen readers.
Props sabernhardt, desrosj.
Fixes#53157.
Built from https://develop.svn.wordpress.org/trunk@57572
git-svn-id: http://core.svn.wordpress.org/trunk@57073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Apply new focus styles from WordPress 5.3 more broadly. An updated focus style for form inputs, buttons, and link styled as buttons was added in WordPress 5.3; this commit makes other focus styles consistent with those changes so they meet accessibility standards for color contrast.
Props johnbillion, kebbet, joedolson, afercia.
Fixes#51870.
Built from https://develop.svn.wordpress.org/trunk@57553
git-svn-id: http://core.svn.wordpress.org/trunk@57054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces a new "Requires Plugins" plugin header so that plugin developers can list the slugs of the plugins theirs depends on.
This will inform users of the requirements, and provide links to the WordPress.org Plugins Repository that they can click to install and activate the dependencies first.
Plugins whose requirements are not met cannot be installed or activated, and they will be deactivated automatically if their requirements become unmet.
Plugins that others rely on cannot be deactivated or deleted until their dependent plugins are deactivated or deleted.
In memory of Alex Mills and Alex King.
WordPress Remembers.
Props ahoereth, afragen, alanfuller, alexkingorg, amykamala, anonymized_10690803, apeatling, ashfame, atimmer, audrasjb, aristath, azaozz, batmoo, beaulebens, blobaugh, bobbingwide, boonebgorges, brianhenryie, chanthaboune, chrisdavidmiles, coolmann, costdev, courane01, danielbachhuber, davidperez, dd32, Denis-de-Bernardy, dingo_d, DJPaul, dougal, DrewAPicture, ethitter, filosofo, georgestephanis, giuseppemazzapica-1, goldenapples, griffinjt, hellofromTonya, husobj, ideag, jarednova, jbobich, jbrinley, jltallon, joedolson, johnciacia, johnjamesjacoby, joppuyo, jsmoriss, karmatosed, kebbet, knutsp, kraftbj, kraftner, kurtpayne, lkraav, logikal16, luisherranz, man4toman, markjaquith, matt, mbijon, megphillips91, mikeschinkel, mordauk, morehawes, mrwweb, mte90, mukesh27, mzaweb, nacin, norcross, nvwd, nwjames, obliviousharmony, ocean90, oglekler, paaljoachim, pauldewouters, pbaylies, pbiron, peterwilsoncc, Philipp15b, poena, pogidude, retlehs, rmccue, ryan, sabreuse, sc0ttkclark, scribu, sereedmedia, SergeyBiryukov, ShaneF, shidouhikari, soean, spacedmonkey, stephenh1988, swissspidy, taylorde, tazotodua, threadi, TimothyBlynJacobs, TJNowell, tollmanz, toscho, tropicalista, Viper007Bond, westi, whiteshadow, williamsba1, wpsmith, ZaneMatthew.
Fixes#22316.
Built from https://develop.svn.wordpress.org/trunk@57545
git-svn-id: http://core.svn.wordpress.org/trunk@57046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Block themes and classic themes with template parts support
can already access the patterns list within the site editor.
This adds a "Patterns" menu item under Appearance for classic themes
without template parts support.
Props wildworks, kevin940726, aaronrobertshaw, fabiankaegy, swissspidy, get_dave, kebbet.
Fixes#58827.
Built from https://develop.svn.wordpress.org/trunk@57543
git-svn-id: http://core.svn.wordpress.org/trunk@57044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`ZipArchive` can fail to validate ZIP files correctly and report valid files as invalid. This introduces a fallback to `PclZip` to check validity of files if `ZipArchive` fails them.
This introduces the new function `wp_zip_file_is_valid()` to validate archives.
Follow up to [57388].
Props audunmb, azaozz, britner, cdevroe, colorful-tones, costdev, courane01, endymion00, feastdesignco, halounsbury, jeffpaul, johnbillion, jorbin, jsandtro, karinclimber, kevincoleman, koesper, maartenbelmans, mathewemoore, melcarthus, mujuonly, nerdpressteam, olegfuture, otto42, peterwilsoncc, room34, sayful, schutzsmith, stephencronin, svitlana41319, swissspidy, tnolte, tobiasbg, vikram6, welaunchio.
Fixes#60398.
Built from https://develop.svn.wordpress.org/trunk@57537
git-svn-id: http://core.svn.wordpress.org/trunk@57038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add support for uploading, editing and saving AVIF images when supported by the server.
Add 'image/avif' to supported mime types. Correctly identify AVIF images and sizes even when PHP doesn't support AVIF. Resize uploaded AVIF files (when supported) and use for front end markup.
Props adamsilverstein, lukefiretoss, ayeshrajans, navjotjsingh, Tyrannous, jb510, gregbenz, nickpagz, JavierCasares, mukesh27, yguyon, swissspidy.
Fixes#51228.
Built from https://develop.svn.wordpress.org/trunk@57524
git-svn-id: http://core.svn.wordpress.org/trunk@57025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The native cursor style for labels and form controls is `default`, which is the platform-dependent default cursor. Typically an arrow. Historically, WordPress always used the `pointer` style for all form controls and labels. While this isn't standard, there is some value in using the `pointer` style for form controls. However, labels should use the default style especially when the associated controls are disabled.
Additionally, makes sure the disabled styling works for form controls with an `aria-disabled="true"` attribute.
Props joedolson, afercia.
Fixes#59733.
Built from https://develop.svn.wordpress.org/trunk@57520
git-svn-id: http://core.svn.wordpress.org/trunk@57021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previous Gutenberg versions are not compatible with recent trunk because of the
WP_Navigation_Block_Renderer classname. It's present in both.
Gutenberg has been updated to avoid the use of this class but we need to auto-disable
old plugins to avoid fatals.
Props hellofromtonya.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57384
git-svn-id: http://core.svn.wordpress.org/trunk@56890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This introduces a more lightweight library for loading `.mo` translation files which offers increased speed and lower memory usage.
It also supports loading multiple locales at the same time, which makes locale switching faster too.
For plugins interacting with the `$l10n` global variable in core, a shim is added to retain backward compatibility with the existing `pomo` library.
In addition to that, this library supports translations contained in PHP files, avoiding a binary file format and leveraging OPCache if available.
If an `.mo` translation file has a corresponding `.l10n.php` file, the latter will be loaded instead.
This behavior can be adjusted using the new `translation_file_format` and `load_translation_file` filters.
PHP translation files will be typically created by downloading language packs, but can also be generated by plugins.
See https://make.wordpress.org/core/2023/11/08/merging-performant-translations-into-core/ for more context.
Props dd32, swissspidy, flixos90, joemcgill, westonruter, akirk, SergeyBiryukov.
Fixes#59656.
Built from https://develop.svn.wordpress.org/trunk@57337
git-svn-id: http://core.svn.wordpress.org/trunk@56843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that the message about deleting a plugin or having no plugins installed is displayed in full width.
Follow-up to [26134], [33016].
Props shailu25, mukesh27, passoniate, JavierCasares, sabernhardt.
Fixes#50069.
Built from https://develop.svn.wordpress.org/trunk@57321
git-svn-id: http://core.svn.wordpress.org/trunk@56827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove the `action` attribute in the login language selector, privacy forms, and classic widget forms.
An empty `action` attribute is invalid HTML4 and unsupported HTML5. The `action` attribute is optional, but must have a valid URL when provided.
Props Malae, audrasjb, bartkleinreesink, nicolefurlan, shubhamsedani, costdev, peterwilsoncc, rajinsharwar, joedolson.
Fixes#58226.
Built from https://develop.svn.wordpress.org/trunk@57295
git-svn-id: http://core.svn.wordpress.org/trunk@56801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Blocks registration causes scripts to be initialized and localized very early, before the current locale has been properly set on the installation page.
This changes `determine_locale()` so that the locale chosen during installation is recognized and loaded earlier, ensuring proper script localization.
Props sabernhardt, NekoJonez, jornp, costdev.
Fixes#58696
Built from https://develop.svn.wordpress.org/trunk@57286
git-svn-id: http://core.svn.wordpress.org/trunk@56792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset introduces the `new_admin_email_subject` hook which allow developers to filter the subject of the email sent when a change of site admin email address is attempted.
Props MadtownLems, johnbillion, alexanderkoledov, shooper, Marc_J, nikmeyer, xlthlx, devmuhib, nuhel, audrasjb.
Fixes#59250.
Built from https://develop.svn.wordpress.org/trunk@57283
git-svn-id: http://core.svn.wordpress.org/trunk@56789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove the `maxlength` attribute on screen options number of items per page input. Previously kept due to input inconsistencies in IE 11 and Edge, this invalid usage is no longer needed. IE 11 is no longer supported, and Edge now behaves according to specifications.
Props Arena94, afercia, joedolson.
Fixes#40610.
Built from https://develop.svn.wordpress.org/trunk@57272
git-svn-id: http://core.svn.wordpress.org/trunk@56778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The exif standards expect the UserComment field to be used as a substitute for ImageDescription if multibyte characters are needed. WordPress media only mapped the ImageDescription field and did not correctly handle descriptions with multibyte characters.
Fix metadata saving to better handle media with multibyte characters in metadata and update unit tests.
Props fotodrachen, antpb, joedolson, mikinc860, azaozz, nicolefurlan.
Fixes#58082.
Built from https://develop.svn.wordpress.org/trunk@57267
git-svn-id: http://core.svn.wordpress.org/trunk@56773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, bulk upgrades did not verify that a theme package was compatible with the site's WordPress version or the server's PHP version.
This was previusly done for plugins in #59198, but themes were missed.
Follow-up to: [56525].
Props salcode, lakshmananphp.
Fixes#59758.
Built from https://develop.svn.wordpress.org/trunk@57252
git-svn-id: http://core.svn.wordpress.org/trunk@56758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The phrase "sanity check" unnecessarily references mental health. It's an old phrase used to denote an extra step in verifying code works as expected.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”
While "sanity check" is a well-known phrase with a specific meaning, "confidence check" is a direct replacement that is more clear of its intent while being more inclusive.
Words matter.
Follow-up to [49216], [46271], [40583], [38832], [38637], [37409], [33359], [32162], [30346], [30345], [30238], [30055], [29902], [28763], [26141], [25002], [22227], [13428], [12148], [11025], [8927].
Props dartiss, hellofromTonya.
Fixes#60187.
Built from https://develop.svn.wordpress.org/trunk@57239
git-svn-id: http://core.svn.wordpress.org/trunk@56745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`clipboard.js` used to suffer from a bug that triggered a focus loss when activating the Copy buttons. The bug was fixed a while ago with the `clipboard.js` 2.0.11 release so that the workaround implemented in WordPress is no longer necessary.
Props dhrumilk, paulkevan, afercia.
Fixes#60139.
Built from https://develop.svn.wordpress.org/trunk@57231
git-svn-id: http://core.svn.wordpress.org/trunk@56737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This matches a similar conditional in `wp-admin/menu-header.php`, where these values are handled as special cases and don't output the default menu image so that an icon could be added to `div.wp-menu-image` as CSS background.
Follow-up to [9578], [21877], [26664].
Props andrewleap, ironprogrammer, azaozz.
Fixes#58361.
Built from https://develop.svn.wordpress.org/trunk@57159
git-svn-id: http://core.svn.wordpress.org/trunk@56670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Alongside [57153], this reduces unnecessarily autoloaded data from inactive themes, which can contribute to slow database performance as part of excessive autoloading. This changeset specifically resolves the issue for existing sites.
Props mukesh27, joemcgill, swissspidy, westonruter, flixos90.
Fixes#59975.
See #39537.
Built from https://develop.svn.wordpress.org/trunk@57155
git-svn-id: http://core.svn.wordpress.org/trunk@56666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that the update counter bubble in the admin menu is properly decreased after a successful plugin or theme update from within the update iframe when the site uses a non-standard port number.
Follow-up to [27280], [29357].
Props TobiasBg.
Fixes#59987.
Built from https://develop.svn.wordpress.org/trunk@57148
git-svn-id: http://core.svn.wordpress.org/trunk@56659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When JavaScript is disabled, the Add Plugins screen's search button position was too high in comparison to the search text field. This fix reuses the CSS declaration to keep field and button aligned.
By targeting the `.no-js` class, the CSS specificity is not impacted when JavaScript is enabled.
Follow up to [48281], [30830].
Props devmuhib, sabernhardt, huzaifaalmesbah, hellofromTonya.
Fixes#59967.
Built from https://develop.svn.wordpress.org/trunk@57144
git-svn-id: http://core.svn.wordpress.org/trunk@56655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit updates the `submit_button()` function to standardize the default values of `$text` and `$other_attributes` parameters. Previously set to `null`, these defaults have now been changed to an empty string (`''`), bringing consistency with the `get_submit_button()` function, which `submit_button()` wraps.
The change maintains backward compatibility, as `get_submit_button()` does not perform strict type-checking on these parameters. This update aligns with the ongoing effort to standardize function parameters across the WordPress codebase, improving the readability and predictability of the core functions.
Follow-up to [31446].
Props andbalashov.
Fixes#59921.
Built from https://develop.svn.wordpress.org/trunk@57128
git-svn-id: http://core.svn.wordpress.org/trunk@56639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to:
* Perform the checks as early as possible to avoid redundant function calls.
* Remove an empty conditiaonal branch and make the exit conditions clearer.
* Bring the formatting in line with other multi-line conditionals in core.
Follow-up to [56836].
See #59650.
Built from https://develop.svn.wordpress.org/trunk@57123
git-svn-id: http://core.svn.wordpress.org/trunk@56634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Most of the `tabindex` attributes across the admin were removed in [21311].
This commit updates the example for the `$other_attributes` parameter to use the `id` attribute instead.
Includes synchronizing documentation between `submit_button()` and `get_submit_button()`.
Follow-up to [15810], [16061], [21311], [27136], [31599].
Props benjaminknox, sabernhardt, fushar, SergeyBiryukov.
Fixes#59768.
Built from https://develop.svn.wordpress.org/trunk@57114
git-svn-id: http://core.svn.wordpress.org/trunk@56625 1a063a9b-81f0-0310-95a4-ce76da25c4cd
During a bulk edit of posts with different categories, the categories for the edited posts would be reset to the default category: uncategorized by default.
This reverts [56712] to resolve the issue.
Props peterwilsoncc, hellofromtonya, jorbin.
Fixes#59837.
See #11302.
Built from https://develop.svn.wordpress.org/trunk@57093
git-svn-id: http://core.svn.wordpress.org/trunk@56604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It is perfectly possible to write a commented regex with layout for readability by using the `x` modifier.
As per the manual:
> x (`PCRE_EXTENDED`)
>
> If this modifier is set, whitespace data characters in the pattern are totally ignored except when escaped or inside a character class, and characters between an unescaped # outside a character class and the next newline character, inclusive, are also ignored. This is equivalent to Perl's /x modifier, and makes it possible to include commentary inside complicated patterns.
>
> Note, however, that this applies only to data characters. Whitespace characters may never appear within special character sequences in a pattern, for example within the sequence (?( which introduces a conditional subpattern.
Reference: [https://www.php.net/manual/en/reference.pcre.pattern.modifiers.php PHP Manual: Pattern Modifiers].
This commit rewrites these two regexes to use the `x` modifier and gets rid of the unnecessary `phpcs:disable` comments.
The tests in the `tests/phpunit/tests/db/dbDelta.php` file cover this change.
Follow-up to [42249].
Props jrf.
See #59650.
Built from https://develop.svn.wordpress.org/trunk@57061
git-svn-id: http://core.svn.wordpress.org/trunk@56572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a conditional to prevent the `prefers-reduced-motion` `ajaxComplete` listener from observing events not occurring in the plugin installation screen. Improve handling of settings data test.
The listener observing `ajaxComplete` in [56541] was intercepting all `ajaxComplete` events, creating potential for unexpected errors in unrelated functions.
Props bplv, afercia, rudlinkon, hellofromTonya, huzaifaalmesbah, joedolson, jorbin.
Fixes#59689.
Built from https://develop.svn.wordpress.org/trunk@57022
git-svn-id: http://core.svn.wordpress.org/trunk@56533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Tweaks the 6.4 about pages in a couple of ways:
- Decouples the background from the 6.4 logo so the logo can move for RTL.
- Updates a color to improve color contrast.
- Help prevent overlap of long text strings with 6.4 logo.
- Ensure background isn't dark when no background is used on mobile.
Props nudge, jorbin, afercia, sumitsingh, sabernhardt.
See #59289, #59664.
Built from https://develop.svn.wordpress.org/trunk@57018
git-svn-id: http://core.svn.wordpress.org/trunk@56529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Also includes updates to the contribute, credits, freedom and privacy pages.
Props luminuu, rmartinezduque, estelaris, jorbin, mukesh27, cbringmann, richtabor, annezazu, nudge, ohia, acirujano, elmastudio, cathibosco1, sereedmedia, markoserb, joen. (Also someone named Allison who I am going to guess is Taylor Alison Swift but has no avatar so I will never know)
Built from https://develop.svn.wordpress.org/trunk@56950
git-svn-id: http://core.svn.wordpress.org/trunk@56461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent the saving of invalid timezone string in to the database on the options pages. If an invalid timezone is submitted it is ignored and the setting remains unchanged.
This prevents a warning or fatal (depending on the PHP version) from being thrown by an invalid timezone setting on the Settings > General page.
Props ankit-k-gupta, costdev, huzaifaalmesbah, mrinal013, nicolefurlan, oglekler.
Fixes#58814.
Built from https://develop.svn.wordpress.org/trunk@56949
git-svn-id: http://core.svn.wordpress.org/trunk@56460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When an admin sends a password reset link to a user (from the Users UI screen), the "finished" UI message:
>Password reset link sent.
is displayed on "finished" and no longer displayed on error.
**What is the change?**
Previously, the conditional (for incrementing the reset counter) checked for a truthy return from `retrieve_password()`. But `retrieve_password()` always returns a truthy state: `true` (meaning "finished") or an instance of `WP_Error`. Thus, checking for a truthy meant the "finished" message was sent on both "finished" and error/failed.
This fix checks for `retrieve_password()` returning `true` to indicate "finished".
**What is displayed on error?**
If `retrieve_password()` returns an instance of `WP_Error`, the following UI message is shown:
>Password reset links sent to 0 users.
The UI messages were not modified by this changeset.
Follow-up to [50129].
Props letraceursnork, prashantbhivsane, audrasjb, costdev, dilipbheda, hareesh-pillai, hellofromTonya, ironprogrammer, huzaifaalmesbah, marybaum, nicolefurlan, oglekler, petitphp, SergeyBiryukov.
Fixes#58407.
Built from https://develop.svn.wordpress.org/trunk@56937
git-svn-id: http://core.svn.wordpress.org/trunk@56448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The filter was initially introduced for file replication purposes. Since the returned value is not always used directly, some instances were later converted to an action as part of removing unused variables, and the hook was documented as an action while still being called as a filter in other instances.
This commit aims to correct the discrepancy between the code and the documentation.
Follow-up to [4673], [4817], [4818], [6363], [6551], [13041], [25821], [33154], [33280].
Props Howdy_McGee, nicolefurlan, johnbillion, mhshujon, SergeyBiryukov.
Fixes#57775.
Built from https://develop.svn.wordpress.org/trunk@56929
git-svn-id: http://core.svn.wordpress.org/trunk@56440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [56599], a `sprintf()` call was modified which resulted in an insufficient number of arguments.
This caused a Fatal Error when an incompatible plugin notice was displayed.
This fixes the `sprintf()` call.
Follow-up to [56599].
Props petitphp, TobiasBg, sabernhardt, mukesh27.
Fixes#59590. See #57791.
Built from https://develop.svn.wordpress.org/trunk@56824
git-svn-id: http://core.svn.wordpress.org/trunk@56336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit changes the Gutenberg minimum compatible version number from 14.1 (introduced in [54790]) to 16.5. For versions older than 16.5, the plugin will deactivate when upgrading WordPress to 6.4-beta3 or newer.
Changes are done within Core's `_upgrade_core_deactivate_incompatible_plugins()` which is invoked during WordPress' upgrade process.
Follow-up to [54790].
Props hellofromTonya, spacedmonkey.
Fixes#59584.
Built from https://develop.svn.wordpress.org/trunk@56820
git-svn-id: http://core.svn.wordpress.org/trunk@56332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace the `focusout` event handler added in [55326] with a combination of `blur` and `keyup` handler. This change handles Safari not setting focus on clicked elements.
Props afercia, joedolson, travel_girl, oglekler, rajinsharwar, marybaum, rcorrales, binsaifullah, shubhamsedani, ashikur698.
Fixes#58912.
Built from https://develop.svn.wordpress.org/trunk@56810
git-svn-id: http://core.svn.wordpress.org/trunk@56322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use `pagehide` event instead of `unload` in the following cases:
* For classic editor to release the post lock.
* In Text widget to rebuild editor after dragging widget to new location in classic widgets interface.
* To clear out the `window.name` when navigating away from a post preview.
* To suspend heartbeat, while also using `pageshow` event to resume as if it had been a focused tab in case page restored from bfcache.
Also:
* Remove obsolete mobile cleanup code in `js/_enqueues/lib/gallery.js` (introduced in [9894]). Do same for `src/js/_enqueues/wp/media/models.js` (introduced in [22872]). See #22552.
* Remove obsolete Firefox-specific workaround in `js/_enqueues/wp/mce-view.js` from [39282]. See #38511.
Fixes#55491.
Props spenserhale, westonruter, adamsilverstein, azaozz, shawfactor, peterwilsoncc, swissspidy.
Built from https://develop.svn.wordpress.org/trunk@56809
git-svn-id: http://core.svn.wordpress.org/trunk@56321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Follow up to [56022] to fix inability to set a date/time in quick editing. Allow a user to set a quick/edit date while preventing accidental date assignments per the original intent.
Props tristanleboss, ivanzhuck, tibbsa, sabernhardt, sergeybiryukov, oandregal, khokansardar, joedolson, shailu25.
Fixes#59125. See #19907.
Built from https://develop.svn.wordpress.org/trunk@56802
git-svn-id: http://core.svn.wordpress.org/trunk@56314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to better align the navigation fallback implementation with core architecture and best practices.
The function that updates the `wp_navigation` post response schema is now a public method of the `WP_Navigation_Fallback` class, so an extra file previously used for that specific function is no longer necessary.
Follow-up to [56052].
Props ramonopoly, scruffian, isabel_brison, mukesh27, swissspidy, rajinsharwar, afercia, audrasjb, mikeschroder, JeffPaul, johnjamesjacoby, TimothyBlynJacobs, oglekler, SergeyBiryukov.
Fixes#58910.
Built from https://develop.svn.wordpress.org/trunk@56793
git-svn-id: http://core.svn.wordpress.org/trunk@56305 1a063a9b-81f0-0310-95a4-ce76da25c4cd